mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1478519 - Introduce a utility method calling some notification method for nsIPresShell. r=karlt
MozReview-Commit-ID: 1uO3uZeuU4N --HG-- extra : rebase_source : 706685ad0c32bbf2bde23dc5a0dc2daa2a9f9bc3
This commit is contained in:
parent
e2bd8118b8
commit
6fd7b21784
@ -1832,18 +1832,6 @@ nsBaseWidget::NotifyWindowDestroyed()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifySizeMoveDone()
|
||||
{
|
||||
if (!mWidgetListener || mWidgetListener->GetXULWindow())
|
||||
return;
|
||||
|
||||
nsIPresShell* presShell = mWidgetListener->GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->WindowSizeMoveDone();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifyWindowMoved(int32_t aX, int32_t aY)
|
||||
{
|
||||
@ -1857,27 +1845,34 @@ nsBaseWidget::NotifyWindowMoved(int32_t aX, int32_t aY)
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifySysColorChanged()
|
||||
nsBaseWidget::NotifyPresShell(NotificationFunc aNotificationFunc)
|
||||
{
|
||||
if (!mWidgetListener || mWidgetListener->GetXULWindow())
|
||||
if (!mWidgetListener || mWidgetListener->GetXULWindow()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIPresShell* presShell = mWidgetListener->GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->SysColorChanged();
|
||||
(presShell->*aNotificationFunc)();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifySizeMoveDone()
|
||||
{
|
||||
NotifyPresShell(&nsIPresShell::WindowSizeMoveDone);
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifySysColorChanged()
|
||||
{
|
||||
NotifyPresShell(&nsIPresShell::SysColorChanged);
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseWidget::NotifyThemeChanged()
|
||||
{
|
||||
if (!mWidgetListener || mWidgetListener->GetXULWindow())
|
||||
return;
|
||||
|
||||
nsIPresShell* presShell = mWidgetListener->GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->ThemeChanged();
|
||||
}
|
||||
NotifyPresShell(&nsIPresShell::ThemeChanged);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -319,6 +319,9 @@ public:
|
||||
|
||||
bool AsyncPanZoomEnabled() const override;
|
||||
|
||||
typedef void (nsIPresShell::*NotificationFunc)(void);
|
||||
void NotifyPresShell(NotificationFunc aNotificationFunc);
|
||||
|
||||
void NotifyWindowDestroyed();
|
||||
void NotifySizeMoveDone();
|
||||
void NotifyWindowMoved(int32_t aX, int32_t aY);
|
||||
|
Loading…
Reference in New Issue
Block a user