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
--- 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)();
}
}