File tree Expand file tree Collapse file tree 2 files changed +10
-29
lines changed Expand file tree Collapse file tree 2 files changed +10
-29
lines changed Original file line number Diff line number Diff line change @@ -11607,14 +11607,6 @@ void PresShell::SyncWindowProperties(bool aSync) {
11607
11607
windowWidget->SetTransparencyMode (mode);
11608
11608
windowWidget->SetWindowShadowStyle (shadow);
11609
11609
11610
- nsCOMPtr<nsIWidget> viewWidget = view->GetWidget ();
11611
- if (viewWidget != windowWidget) {
11612
- // Happens on macOS (where we have an nsChildView as a child of an
11613
- // nsCocoaWindow), and in popup=yes windows in other platforms, in
11614
- // practice.
11615
- viewWidget->SetTransparencyMode (mode);
11616
- }
11617
-
11618
11610
// For macOS, apply color scheme overrides to the top level window widget.
11619
11611
if (auto scheme = pc->GetOverriddenOrEmbedderColorScheme ()) {
11620
11612
windowWidget->SetColorScheme (scheme);
Original file line number Diff line number Diff line change @@ -3252,33 +3252,22 @@ bool nsDocumentViewer::ShouldAttachToTopLevel() {
3252
3252
return false ;
3253
3253
}
3254
3254
3255
- if (!mContainer ) {
3256
- return false ;
3257
- }
3258
-
3259
3255
// We always attach when using puppet widgets
3260
3256
if (nsIWidget::UsePuppetWidgets ()) {
3261
3257
return true ;
3262
3258
}
3263
3259
3264
- #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || \
3265
- defined (MOZ_WIDGET_ANDROID) || defined (MOZ_WIDGET_UIKIT)
3266
- if (!mPresContext ) {
3267
- return false ;
3268
- }
3269
-
3270
- // On windows, in the parent process we also attach, but just to
3271
- // chrome items
3272
- auto winType = mParentWidget ->GetWindowType ();
3273
- if ((winType == widget::WindowType::TopLevel ||
3274
- winType == widget::WindowType::Dialog ||
3275
- winType == widget::WindowType::Invisible) &&
3276
- mPresContext ->IsChrome ()) {
3277
- return true ;
3278
- }
3279
- #endif
3280
-
3260
+ // FIXME(emilio): Can we unify this between macOS and aother platforms?
3261
+ #ifdef XP_MACOSX
3281
3262
return false ;
3263
+ #else
3264
+ # ifdef DEBUG
3265
+ nsIWidgetListener* parentListener = mParentWidget ->GetWidgetListener ();
3266
+ MOZ_ASSERT (!parentListener || !parentListener->GetView (),
3267
+ " Expect a top level widget" );
3268
+ # endif
3269
+ return true ;
3270
+ #endif
3282
3271
}
3283
3272
3284
3273
// ------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments