Bug 1478576 - Drop GetXULWindow() check in nsBaseWidget::NotifyPresShell. r=karlt
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 07 Aug 2018 11:56:18 +0900
changeset 487135 e1392716e580fa5dcce0ceaf27b5d7d89cddd84a
parent 487134 2d5b4c59078e5fb0919ffeabb955b9f78c37174c
child 487136 f74ba700aff02f4716ffb9ce1c07efcc9657fa12
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1478576
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)();
   }
 }