diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index a96335a192da..cd41da37304f 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -3931,11 +3931,9 @@ void PresShell::ScheduleViewManagerFlush() { return; } - nsPresContext* presContext = GetPresContext(); - if (presContext) { + if (nsPresContext* presContext = GetPresContext()) { presContext->RefreshDriver()->ScheduleViewManagerFlush(); } - SetNeedLayoutFlush(); } void PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent) { diff --git a/view/nsView.cpp b/view/nsView.cpp index 7a9addc8e4c4..41988da30cc8 100644 --- a/view/nsView.cpp +++ b/view/nsView.cpp @@ -1081,8 +1081,7 @@ void nsView::DidCompositeWindow(mozilla::layers::TransactionId aTransactionId, } void nsView::RequestRepaint() { - PresShell* presShell = mViewManager->GetPresShell(); - if (presShell) { + if (PresShell* presShell = mViewManager->GetPresShell()) { presShell->ScheduleViewManagerFlush(); } } diff --git a/view/nsViewManager.cpp b/view/nsViewManager.cpp index b9931f0c2a02..dd2f6c77cfa9 100644 --- a/view/nsViewManager.cpp +++ b/view/nsViewManager.cpp @@ -455,6 +455,7 @@ void nsViewManager::PostPendingUpdate() { nsViewManager* rootVM = RootViewManager(); rootVM->mHasPendingWidgetGeometryChanges = true; if (rootVM->mPresShell) { + rootVM->mPresShell->SetNeedLayoutFlush(); rootVM->mPresShell->ScheduleViewManagerFlush(); } }