mac: route mouse up and down event to views that overlay content area A view that overlays a content area (hosted in a view::WebView) cannot receive mouse up and down events because all events go to WebView's NSView. This NSView is above the NSWindow' contentView that hosts the toolkit-views tree. To fix the issue, this CL redirects such events to the content NSView which hosts the root toolkit-views tree by overriding hitTest: in BridgedContentView. Implementation wise, this CL adds mojo method GetHitTestResult() that replaces the old GetIsDraggableBackgroundAt(). The method returns whether the point is within the draggable area, a regular view, or a NativeViewHost that hosts a subview of the contentView. Note that mouse move will still be sent to all NSViews, including the content NSView and all subviews. When RenderWidgetHostViewCocoa receives mouse moves events, it uses hitTest: to check if the event should be sent to blink and decide if mouse enter and exit events should be synthesized. This is the existing behavior. Bug: 417607649 Change-Id: I10728baecda999bfd451bc8fb98fbcd1c94a75fd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6574464 Commit-Queue: Keren Zhu <kerenzhu@chromium.org> Reviewed-by: Joe Mason <joenotcharles@google.com> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1466557}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.