Bug 1501106 - Drop constaint of max zoom in nsViewportInfo. r=botond
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 24 Oct 2018 21:46:51 +0000
changeset 491226 09f5387e2002f4efa33043895decc4c05dcf5d18
parent 491225 dae5b4b90a4209aea03c26937ffb3a71ce0767c8
child 491227 e46f20ef7d4c30d84f3ad8feccd2e33d60e0c989
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersbotond
bugs1501106, 1431601
milestone65.0a1
Bug 1501106 - Drop constaint of max zoom in nsViewportInfo. r=botond This is a follow-up fix for bug 1431601, I didn't notice that we constrain mMaxZoom in here nsViewport class. In bug 1431601, instead we did constrain the value in nsIDocument::GetViewportInfo since the contrained value is used in the function. Differential Revision: https://phabricator.services.mozilla.com/D9459
dom/base/nsViewportInfo.cpp
--- a/dom/base/nsViewportInfo.cpp
+++ b/dom/base/nsViewportInfo.cpp
@@ -8,20 +8,16 @@
 #include "mozilla/Assertions.h"
 #include <algorithm>
 
 using namespace mozilla;
 
 void
 nsViewportInfo::ConstrainViewportValues()
 {
-  // Constrain the min/max zoom as specified at:
-  // dev.w3.org/csswg/css-device-adapt section 6.2
-  mMaxZoom = std::max(mMinZoom, mMaxZoom);
-
   if (mDefaultZoom > mMaxZoom) {
     mDefaultZoomValid = false;
     mDefaultZoom = mMaxZoom;
   }
   if (mDefaultZoom < mMinZoom) {
     mDefaultZoomValid = false;
     mDefaultZoom = mMinZoom;
   }