Bug 1282334 part 2 - Ensure scheduling flush for fullscreen change. r=smaug

The refresh driver may not be triggered regularly if the page is static.
In that case, we need to ensure a flush is scheduled for fullscreen
change, otherwise the page may get stuck.

MozReview-Commit-ID: c5FhqaIUQW

--HG--
extra : source : 10269de859e1a6b532ecd02fafff205365c51f2b
This commit is contained in:
Xidorn Quan 2016-06-30 14:57:30 +10:00
parent 6415838678
commit 0826f76d6e

View File

@ -3214,6 +3214,10 @@ PrepareForFullscreenChange(nsIPresShell* aPresShell, const nsSize& aSize,
}
if (nsRefreshDriver* rd = aPresShell->GetRefreshDriver()) {
rd->SetIsResizeSuppressed();
// Since we are suppressing the resize reflow which would originally
// be triggered by view manager, we need to ensure that the refresh
// driver actually schedules a flush, otherwise it may get stuck.
rd->ScheduleViewManagerFlush();
}
if (!aSize.IsEmpty()) {
if (nsViewManager* viewManager = aPresShell->GetViewManager()) {