https://bugs.webkit.org/show_bug.cgi?id=86278
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 May 2012 01:19:38 +0000 (01:19 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 May 2012 01:19:38 +0000 (01:19 +0000)
Composited layers should only run the overlay scrollbars painting pass
if necessary

Reviewed by Dan Bernstein.

It's not enough that the rootLayer has dirty scrollbars; we also have
to actually be doing the overlay scrollbars painting pass to skip the
early return.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp

index 3d4ab26..117167e 100644 (file)
@@ -1,3 +1,17 @@
+2012-05-11  Beth Dakin  <bdakin@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=86278
+        Composited layers should only run the overlay scrollbars painting pass 
+        if necessary
+
+        Reviewed by Dan Bernstein.
+
+        It's not enough that the rootLayer has dirty scrollbars; we also have 
+        to actually be doing the overlay scrollbars painting pass to skip the 
+        early return.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayer):
+
 2012-05-11  Anders Carlsson  <andersca@apple.com>
 
         Comcast website displays bottom of page when loaded
index 73e97fa..d7d83e0 100644 (file)
@@ -2886,7 +2886,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* context,
         // but we need to ensure that we don't cache clip rects computed with the wrong root in this case.
         if (context->updatingControlTints() || (paintBehavior & PaintBehaviorFlattenCompositingLayers))
             paintFlags |= PaintLayerTemporaryClipRects;
-        else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoCompositedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) && !rootLayer->containsDirtyOverlayScrollbars()) {
+        else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoCompositedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) && !(rootLayer->containsDirtyOverlayScrollbars() && (paintFlags & PaintLayerPaintingOverlayScrollbars))) {
             // If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
             return;
         }