Bug 1478576 - Drop GetXULWindow() check in nsBaseWidget::NotifyPresShell. r?karlt draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 07 Aug 2018 11:56:18 +0900
changeset 827105 05a1a60f699d3cda68ac5227fa359ffe7e0a6b08
parent 827084 588a314db0d5d2f7d1b758d09f170e3afb1283a3
child 827106 5b8a35c265a09672f0d06004f23e58e498bb6ad8
push id118467
push userhikezoe@mozilla.com
push dateTue, 07 Aug 2018 02:56:46 +0000
reviewerskarlt
bugs1478576
milestone63.0a1
Bug 1478576 - Drop GetXULWindow() check in nsBaseWidget::NotifyPresShell. r?karlt In these days, it's common to not create a child widget, so if there is GetXULWindow() check the notifications are not propagated to the proper pres shell. Even in the case there is a child widget, which means both of the parent and the child widgets notify to the same pres shell, but NotifySizeMoveDone is fairly cheap, and the other two notifications (SysColorChanged and ThemeChanged) are queued and will be processed later together, so it will not be a big deal. MozReview-Commit-ID: 2t23kVZzXgS
widget/nsBaseWidget.cpp
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1842,17 +1842,17 @@ nsBaseWidget::NotifyWindowMoved(int32_t 
   if (mIMEHasFocus && IMENotificationRequestsRef().WantPositionChanged()) {
     NotifyIME(IMENotification(IMEMessage::NOTIFY_IME_OF_POSITION_CHANGE));
   }
 }
 
 void
 nsBaseWidget::NotifyPresShell(NotificationFunc aNotificationFunc)
 {
-  if (!mWidgetListener || mWidgetListener->GetXULWindow()) {
+  if (!mWidgetListener) {
     return;
   }
 
   nsIPresShell* presShell = mWidgetListener->GetPresShell();
   if (presShell) {
     (presShell->*aNotificationFunc)();
   }
 }