https://bugs.webkit.org/show_bug.cgi?id=131408
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2014 00:13:43 +0000 (00:13 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2014 00:13:43 +0000 (00:13 +0000)
Scrollbars layers don't dynamically update when device scale factor changes
-and corresponding-
<rdar://problem/16503875>

Reviewed by Tim Horton.

The scrollbar layers are not children of the RenderView's layer, so they were
completely skipped over by this function before. We need to start this higher up
the tree in the rootGraphicsLayer(), which will typically return the
m_overflowControlsHostLayer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged):

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

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

index 74162d1..aa89c76 100644 (file)
@@ -1,3 +1,19 @@
+2014-04-08  Beth Dakin  <bdakin@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=131408
+        Scrollbars layers don't dynamically update when device scale factor changes
+        -and corresponding-
+        <rdar://problem/16503875>
+
+        Reviewed by Tim Horton.
+
+        The scrollbar layers are not children of the RenderView's layer, so they were 
+        completely skipped over by this function before. We need to start this higher up 
+        the tree in the rootGraphicsLayer(), which will typically return the 
+        m_overflowControlsHostLayer.
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged):
+
 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
 
         HTMLConverter::aggregatedAttributesForAncestors should cache intermediate results
index 3e3294d..aed38d2 100644 (file)
@@ -3362,12 +3362,10 @@ bool RenderLayerCompositor::layerHas3DContent(const RenderLayer& layer) const
 
 void RenderLayerCompositor::deviceOrPageScaleFactorChanged()
 {
-    // Start at the RenderView's layer, since that's where the scale is applied.
-    RenderLayer* viewLayer = m_renderView.layer();
-    if (!viewLayer->isComposited())
-        return;
-
-    if (GraphicsLayer* rootLayer = viewLayer->backing()->childForSuperlayers())
+    // Page scale will only be applied at to the RenderView and sublayers, but the device scale factor
+    // needs to be applied at the level of rootGraphicsLayer().
+    GraphicsLayer* rootLayer = rootGraphicsLayer();
+    if (rootLayer)
         rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
 }