Bug 1213953. Remove pref "layout.imagevisibility.enabled_for_browser_elements_only", it is unused and obsolete. r=seth

This commit is contained in:
Timothy Nikkel 2015-10-12 13:50:16 -05:00
parent 01faab63e4
commit 72d9557ba9
2 changed files with 1 additions and 18 deletions

View File

@ -5851,20 +5851,15 @@ bool
PresShell::AssumeAllImagesVisible()
{
static bool sImageVisibilityEnabled = true;
static bool sImageVisibilityEnabledForBrowserElementsOnly = false;
static bool sImageVisibilityPrefCached = false;
if (!sImageVisibilityPrefCached) {
Preferences::AddBoolVarCache(&sImageVisibilityEnabled,
"layout.imagevisibility.enabled", true);
Preferences::AddBoolVarCache(&sImageVisibilityEnabledForBrowserElementsOnly,
"layout.imagevisibility.enabled_for_browser_elements_only", false);
sImageVisibilityPrefCached = true;
}
if ((!sImageVisibilityEnabled &&
!sImageVisibilityEnabledForBrowserElementsOnly) ||
!mPresContext || !mDocument) {
if (!sImageVisibilityEnabled || !mPresContext || !mDocument) {
return true;
}
@ -5878,14 +5873,6 @@ PresShell::AssumeAllImagesVisible()
return true;
}
if (!sImageVisibilityEnabled &&
sImageVisibilityEnabledForBrowserElementsOnly) {
nsCOMPtr<nsIDocShell> docshell(mPresContext->GetDocShell());
if (!docshell || !docshell->GetIsInBrowserElement()) {
return true;
}
}
return false;
}

View File

@ -932,10 +932,6 @@ pref("nglayout.debug.invalidation", false);
// Whether image visibility is enabled globally (ie we will try to unlock images
// that are not visible).
pref("layout.imagevisibility.enabled", true);
// Whether image visibility is enabled in documents that are within a browser
// element as defined by nsDocShell::FrameType and GetInheritedFrameType. This
// pref only has an effect if layout.imagevisibility.enabled is false.
pref("layout.imagevisibility.enabled_for_browser_elements_only", false);
pref("layout.imagevisibility.numscrollportwidths", 0);
pref("layout.imagevisibility.numscrollportheights", 1);