refactor: remove InspectableWebContentsViewMac in favor of the Views version (#41326)

This commit is contained in:
Jeremy Rose 2024-03-04 09:32:40 -08:00 committed by GitHub
parent 814ba71dc1
commit e67ab9a93d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 304 additions and 956 deletions

View file

@ -200,6 +200,11 @@ void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) {
}
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
// We initialize the window in headless mode to allow painting before it is
// shown, but we don't want the headless behavior of allowing the window to be
// placed unconstrained.
self.isHeadless = false;
// Resizing is disabled.
if (electron::ScopedDisableResize::IsResizeDisabled())
return [self frame];