[chromium] out-of-order assert in WebViewImpl setDeviceScaleFactor
authorrjkroege@chromium.org <rjkroege@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 14:55:13 +0000 (14:55 +0000)
committerrjkroege@chromium.org <rjkroege@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 14:55:13 +0000 (14:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90006

The assert in WebViewImpl::setDeviceScaleFactor should test for non-scaling
after we have set both m_DeviceScaleInCompositor and page()->deviceScaleFactor()
instead of in between.

Reviewed by James Robinson.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setDeviceScaleFactor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121342 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebViewImpl.cpp

index 365d0eb..a146d89 100644 (file)
@@ -1,3 +1,17 @@
+2012-06-27  Robert Kroeger  <rjkroege@chromium.org>
+
+        [chromium] out-of-order assert in WebViewImpl setDeviceScaleFactor
+        https://bugs.webkit.org/show_bug.cgi?id=90006
+
+        The assert in WebViewImpl::setDeviceScaleFactor should test for non-scaling
+        after we have set both m_DeviceScaleInCompositor and page()->deviceScaleFactor()
+        instead of in between.
+
+        Reviewed by James Robinson.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setDeviceScaleFactor):
+
 2012-06-26  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed.  Rolled DEPS.
index 652e9a6..26df436 100644 (file)
@@ -2551,16 +2551,16 @@ void WebViewImpl::setDeviceScaleFactor(float scaleFactor)
 
     page()->setDeviceScaleFactor(scaleFactor);
 
+    if (!m_layerTreeView.isNull() && m_webSettings->applyDefaultDeviceScaleFactorInCompositor()) {
+        m_deviceScaleInCompositor = page()->deviceScaleFactor();
+        m_layerTreeView.setDeviceScaleFactor(m_deviceScaleInCompositor);
+    }
     if (m_deviceScaleInCompositor != 1) {
         // Don't allow page scaling when compositor scaling is being used,
         // as they are currently incompatible. This means the deviceScale
         // needs to match the one in the compositor.
         ASSERT(scaleFactor == m_deviceScaleInCompositor);
     }
-    if (!m_layerTreeView.isNull() && m_webSettings->applyDefaultDeviceScaleFactorInCompositor()) {
-        m_deviceScaleInCompositor = page()->deviceScaleFactor();
-        m_layerTreeView.setDeviceScaleFactor(m_deviceScaleInCompositor);
-    }
 }
 
 bool WebViewImpl::isFixedLayoutModeEnabled() const