Bug 1213953. Remove pref "layout.imagevisibility.enabled_for_browser_elements_only", it is unused and obsolete. r=seth
authorTimothy Nikkel <tnikkel@gmail.com>
Mon, 12 Oct 2015 13:50:16 -0500
changeset 267382 ac11fbd3b96acc32f4c2bb8327a6017b0866175b
parent 267381 e130aada4c972d69a860a1a72a70b643f2e550aa
child 267383 1dc16f70de9caca403f3f05e3dc3017bafbd95e0
push id29517
push usercbook@mozilla.com
push dateTue, 13 Oct 2015 10:01:04 +0000
treeherdermozilla-central@607a236c2299 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1213953
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1213953. Remove pref "layout.imagevisibility.enabled_for_browser_elements_only", it is unused and obsolete. r=seth
layout/base/nsPresShell.cpp
modules/libpref/init/all.js
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5846,51 +5846,38 @@ PresShell::UpdateImageVisibility()
   list.DeleteAll();
 #endif
 }
 
 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;
   }
 
   // We assume all images are visible in print, print preview, chrome, xul, and
   // resource docs and don't keep track of them.
   if (mPresContext->Type() == nsPresContext::eContext_PrintPreview ||
       mPresContext->Type() == nsPresContext::eContext_Print ||
       mPresContext->IsChrome() ||
       mDocument->IsResourceDoc() ||
       mDocument->IsXULDocument()) {
     return true;
   }
 
-  if (!sImageVisibilityEnabled &&
-      sImageVisibilityEnabledForBrowserElementsOnly) {
-    nsCOMPtr<nsIDocShell> docshell(mPresContext->GetDocShell());
-    if (!docshell || !docshell->GetIsInBrowserElement()) {
-      return true;
-    }
-  }
-
   return false;
 }
 
 void
 PresShell::ScheduleImageVisibilityUpdate()
 {
   if (AssumeAllImagesVisible())
     return;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -927,20 +927,16 @@ pref("nglayout.debug.paint_flashing_chro
 pref("nglayout.debug.widget_update_flashing", false);
 
 // Enable/disable display list invalidation logging --- useful for debugging.
 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);
 
 // scrollbar snapping region
 // 0 - off
 // 1 and higher - slider thickness multiple
 pref("slider.snapMultiplier", 0);