mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1323606. Implement the pref layout.show_previous_page for e10s. r=gw280 r=mats
The existing implementation only works for non-remote subdocuments. This essentially makes the changes from bug 1157941 conditional on this pref.
This commit is contained in:
parent
4fe7340dc2
commit
f98faf04e3
@ -113,6 +113,8 @@ nsSubDocumentFrame::Init(nsIContent* aContent,
|
||||
|
||||
static bool addedShowPreviousPage = false;
|
||||
if (!addedShowPreviousPage) {
|
||||
// If layout.show_previous_page is true then during loading of a new page we
|
||||
// will draw the previous page if the new page has painting suppressed.
|
||||
Preferences::AddBoolVarCache(&sShowPreviousPage, "layout.show_previous_page", true);
|
||||
addedShowPreviousPage = true;
|
||||
}
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
static bool sShowPreviousPage = true;
|
||||
|
||||
nsView::nsView(nsViewManager* aViewManager, nsViewVisibility aVisibility)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsView);
|
||||
@ -36,6 +38,12 @@ nsView::nsView(nsViewManager* aViewManager, nsViewVisibility aVisibility)
|
||||
mViewManager = aViewManager;
|
||||
mDirtyRegion = nullptr;
|
||||
mWidgetIsTopLevel = false;
|
||||
|
||||
static bool sShowPreviousPageInitialized = false;
|
||||
if (!sShowPreviousPageInitialized) {
|
||||
Preferences::AddBoolVarCache(&sShowPreviousPage, "layout.show_previous_page", true);
|
||||
sShowPreviousPageInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
void nsView::DropMouseGrabbing()
|
||||
@ -1123,5 +1131,5 @@ nsView::HandleEvent(WidgetGUIEvent* aEvent,
|
||||
bool
|
||||
nsView::IsPrimaryFramePaintSuppressed()
|
||||
{
|
||||
return mFrame ? mFrame->PresContext()->PresShell()->IsPaintingSuppressed() : false;
|
||||
return sShowPreviousPage && mFrame && mFrame->PresContext()->PresShell()->IsPaintingSuppressed();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user