Bug 1052417 - Don't bailout of sizes selection if sizes wasn't provided r=jst
authorJohn Schoenick <jschoenick@mozilla.com>
Thu, 25 Sep 2014 13:34:31 -0700
changeset 212316 9b7fce122203cfc5335ef009fdb22d389f3e282b
parent 212315 97d6ba17ed2e1aca667abb52faa0fb059b34046b
child 212317 60ce1e142f90447d72f6455899f953b05198132d
push id27704
push userkwierso@gmail.com
push dateSat, 25 Oct 2014 01:25:30 +0000
treeherdermozilla-central@e37231060eb4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs1052417
milestone36.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 1052417 - Don't bailout of sizes selection if sizes wasn't provided r=jst
content/base/src/ResponsiveImageSelector.cpp
--- a/content/base/src/ResponsiveImageSelector.cpp
+++ b/content/base/src/ResponsiveImageSelector.cpp
@@ -347,20 +347,16 @@ ResponsiveImageSelector::GetBestCandidat
   mBestCandidateIndex = bestIndex;
   return bestIndex;
 }
 
 bool
 ResponsiveImageSelector::ComputeFinalWidthForCurrentViewport(int32_t *aWidth)
 {
   unsigned int numSizes = mSizeQueries.Length();
-  if (!numSizes) {
-    return false;
-  }
-
   nsIDocument* doc = mContent ? mContent->OwnerDoc() : nullptr;
   nsIPresShell *presShell = doc ? doc->GetShell() : nullptr;
   nsPresContext *pctx = presShell ? presShell->GetPresContext() : nullptr;
 
   if (!pctx) {
     MOZ_ASSERT(false, "Unable to find presContext for this content");
     return false;
   }