New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove InspectableWebContentsViewMac in favor of the Views version #41326
Conversation
ccb2f44
to
da25562
Compare
7798ec7
to
f86909b
Compare
Spent a day tracking down why the frame subscriber tests were failing. It looks like there's logic to skip rendering when the window is hidden unless headless mode is enabled: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/native_widget_mac_ns_window_host.mm;l=634-635;drc=3eb9fd518875bee685ad2e8c2b699822a8dfd5d9
i.e., if the window is hidden, the compositor won't unsuspend unless the headless bit is set. The effects of setting the headless bit appear (currently) to be only this and one other thing: the frame size won't be constrained to a screen (https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm;l=322-326;drc=2245eaf45d235260c18959d54844d6acc9fb4556). So I added some extra logic to unset the headless bit if we're visible in that function. |
Prevents the window from being placed behind the menu bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This puts Electron's WebContents in a views::WebView
, which I think might cause some behavior changes, but this refactoring surely worths the little risk.
Let's find out :D |
No Release Notes |
Description of Change
I just deleted the Mac version and things seem to work okay? A bit surprising.
Probably I missed something?
Checklist
npm test
passesRelease Notes
Notes: none