Repository: electron/electron
Pull request: fix: revert upstream MacOS mouse event routing

#### Description of Change

Page interaction on Mac, after a page is loaded via `loadURL`, is currently broken on nightly and 38-x-y due to this upstream change: [6605819: mac: fix missing mouse up and down event in fullscreen top-chrome](https://chromium-review.googlesource.com/c/chromium/src/+/6605819)

This PR temporarily reverts the upstream change to unblock us while we figure out a more long-term solution with upstream.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [ ] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
- [ ] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed an issue where users on MacOS were unable to interact with a webpage loaded via loadURL.


Changed files:
filename: patches/chromium/.patches
patch: @@ -133,3 +133,4 @@ fix_win32_synchronous_spellcheck.patch
 chore_grandfather_in_electron_views_and_delegates.patch
 refactor_patch_electron_permissiontypes_into_blink.patch
 revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch
+build_partial_revert_mac_fullscreen_top_chrome_mouse_events.patch

filename: patches/chromium/build_partial_revert_mac_fullscreen_top_chrome_mouse_events.patch
patch: @@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Keeley Hammond <khammond@slack-corp.com>
+Date: Wed, 25 Jun 2025 10:21:31 -0400
+Subject: build: partially revert Mac fullscreen top-chrome mouse events
+
+Reverts "mac: fix missing mouse up and down event in fullscreen top-chrome".
+This CL caused all interactions to fail when loading a page via loadURL
+on Mac. This patch can be removed when upstream is fixed, or when a better
+solution is put in place.
+
+This reverts commit 8c004781dde7d42d9a3fed8cafcaa4929943dd69.
+
+diff --git a/components/remote_cocoa/app_shim/bridged_content_view.mm b/components/remote_cocoa/app_shim/bridged_content_view.mm
+index 8f572c0822f95176bb35c25c7c8971bf4fe6139b..4b657e55f3782e951706b5edbe0dcf6974d236ab 100644
+--- a/components/remote_cocoa/app_shim/bridged_content_view.mm
++++ b/components/remote_cocoa/app_shim/bridged_content_view.mm
+@@ -305,14 +305,6 @@ - (NSView*)hitTest:(NSPoint)point {
+     return nil;
+   }
+ 
+-  // Send event to views::RootView.
+-  if (hitTestResult == remote_cocoa::mojom::HitTestResult::kRootView) {
+-    // Most commonly this NSView is NSWindow's contentView. However in immersive
+-    // fullscreen, the view may be a subview of another AppKit-owned view in the
+-    // titlebar.
+-    return self;
+-  }
+-
+   return [super hitTest:point];
+ }
+