Don't apply page scale to clipRect if applyPageScaleFactorInCompositor is set to...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 18:23:18 +0000 (18:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 18:23:18 +0000 (18:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111229

Patch by Min Qin <qinmin@chromium.org> on 2013-03-04
Reviewed by Simon Fraser.

If applyPageScaleFactorInCompositor is set to true, webcore should use css coordinates.
As a result, we shouldn't apply page scale to clipRect in RenderLayerCompositor.
Layout tests set the flag to false, so we don't have anything to test against.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 2a82d85..759d63a 100644 (file)
@@ -1,3 +1,17 @@
+2013-03-04  Min Qin  <qinmin@chromium.org>
+
+        Don't apply page scale to clipRect if applyPageScaleFactorInCompositor is set to true
+        https://bugs.webkit.org/show_bug.cgi?id=111229
+
+        Reviewed by Simon Fraser.
+
+        If applyPageScaleFactorInCompositor is set to true, webcore should use css coordinates.
+        As a result, we shouldn't apply page scale to clipRect in RenderLayerCompositor.
+        Layout tests set the flag to false, so we don't have anything to test against.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::addToOverlapMap):
+
 2013-03-04  Ian Vollick  <vollick@chromium.org>
 
         ASSERTION FAILED: m_clipRectsCache->m_respectingOverflowClip[clipRectsType] == (clipRectsContext.respectOverflowClip == RespectOverflowClip) in RenderLayer.
index 89cf82b..b4b93c6 100644 (file)
@@ -782,7 +782,9 @@ void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer*
     }
 
     IntRect clipRect = pixelSnappedIntRect(layer->backgroundClipRect(RenderLayer::ClipRectsContext(rootRenderLayer(), 0, AbsoluteClipRects)).rect()); // FIXME: Incorrect for CSS regions.
-    clipRect.scale(pageScaleFactor());
+    if (Settings* settings = m_renderView->document()->settings())
+        if (!settings->applyPageScaleFactorInCompositor())
+            clipRect.scale(pageScaleFactor());
     clipRect.intersect(layerBounds);
     overlapMap.add(layer, clipRect);
 }