codebytere

#50330: chore: remove macos hittest workaround patch

Merged
Created: Mar 18, 2026, 4:00:56 AM
Merged: Mar 19, 2026, 10:04:18 AM
3 comments
Target: main

Description of Change

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.

Checklist

Release Notes

Notes: none

Backports

41-x-y
Pending
Waiting for a manual backport
42-x-y
Merged
PR Number
#50374
Merged At
Mar 19, 2026, 2:37:42 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron