Skip to content

chore: remove macos hittest workaround patch#50374

Merged
jkleinsc merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-chore-remove-macos-hittest-workaround-patch-1773932666706
Mar 19, 2026
Merged

chore: remove macos hittest workaround patch#50374
jkleinsc merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-chore-remove-macos-hittest-workaround-patch-1773932666706

Conversation

@trop

@trop trop Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Backport of #50330

See that PR for details.

Notes: none

CL:6574464 changed BridgedContentView::hitTest: to use GetHitTestResult(), which
returns kRootView for any non-null, non-NativeViewHost view — causing
BridgedContentView to absorb all web content mouse events. In BrowserWindow,
content_view_ sits in front of the sibling WebContentsView and covers the full
client area, so it was always found first, breaking all loadURL page interaction.

Fix this by installing a ContentViewTargeterDelegate on content_view_ in
NativeWindowMac::SetContentView that returns nullptr (instead of the view itself)
when no children cover the target point. This makes GetHitTestResult return kOther,
allowing hitTest: to fall through to [super hitTest:] and find
RenderWidgetHostViewCocoa. This also removes the now-unnecessary chromium
partial-revert patch that worked around the same issue.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
@trop trop Bot requested a review from a team as a code owner March 19, 2026 15:04
@trop trop Bot requested review from a team and codebytere March 19, 2026 15:04
@trop trop Bot added 42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 19, 2026
@jkleinsc jkleinsc merged commit 99a6230 into 42-x-y Mar 19, 2026
121 of 122 checks passed
@jkleinsc jkleinsc deleted the trop/42-x-y-bp-chore-remove-macos-hittest-workaround-patch-1773932666706 branch March 19, 2026 19:37
@release-clerk

release-clerk Bot commented Mar 19, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant