Title: [125459] branches/safari-536.26-branch

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (125458 => 125459)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-13 22:07:58 UTC (rev 125458)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-13 22:16:02 UTC (rev 125459)
@@ -1,5 +1,23 @@
 2012-08-13  Lucas Forschler  <[email protected]>
 
+    Merge r125086.
+
+    2012-08-08  Beth Dakin  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=93393
+            Overflow regions sometimes repaint incorrectly after going into or 
+            coming out of compositing mode
+            -and corresponding-
+            <rdar://problem/12006463>
+
+            Reviewed by Simon Fraser.
+
+            * compositing/repaint/newly-composited-on-scroll.html: Added.
+            * platform/mac/compositing/repaint/newly-composited-on-scroll-expected.png: Added.
+            * platform/mac/compositing/repaint/newly-composited-on-scroll-expected.txt: Added.
+
+2012-08-13  Lucas Forschler  <[email protected]>
+
     Merge r118725.
 
     2012-05-28  Kent Tamura  <[email protected]>
@@ -10142,3 +10160,4 @@
 
 .
 .
+.

Copied: branches/safari-536.26-branch/LayoutTests/compositing/repaint/newly-composited-on-scroll.html (from rev 125086, trunk/LayoutTests/compositing/repaint/newly-composited-on-scroll.html) (0 => 125459)


--- branches/safari-536.26-branch/LayoutTests/compositing/repaint/newly-composited-on-scroll.html	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/compositing/repaint/newly-composited-on-scroll.html	2012-08-13 22:16:02 UTC (rev 125459)
@@ -0,0 +1,96 @@
+<html>
+<head>
+    <title>Reduction</title>
+    <style>
+    #content-container {
+        position:absolute;
+        top:48px;
+        bottom:0;
+        left:0;
+        right:0;
+        margin-left:225px;
+    }
+
+    #composited {
+        height: 38px;
+        -webkit-transform:translate3d(0px, 0px, 0px);
+    }
+
+    #positioned-2 {
+        position:absolute;
+        top:40px;
+        bottom:0;
+        left:0;
+        right:0;
+    }
+
+    .positioned-3 {
+        position:absolute;
+        top:0;
+        bottom:0;
+        left:0;
+        right:0;
+    }
+    
+    #transformed-container {
+        -webkit-transform: translateX(0);
+        height:300px;
+        width:600px;
+    }
+    
+    #overflow {
+        overflow:auto;
+        border: 2px solid black;
+    }
+    
+    .positioned-4 {
+        position:absolute;
+        top:20px;
+        height:80px;
+        right:20px;
+        width:80px;
+    }
+    </style>
+</head>
+
+<script src=""
+
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+    }
+
+    function repaintTest() {
+        if (window.testRunner)
+            testRunner.display();
+
+        document.getElementById('overflow').scrollTop = 30;
+        if (window.testRunner)
+            testRunner.display();
+
+        window.setTimeout(function() {
+            document.getElementById('overflow').scrollTop = 50;
+            testRunner.notifyDone();
+        }, 0);
+    }
+
+</script>
+
+<body _onload_="runRepaintTest()">
+    <div id="content-container">
+        <div id="composited"></div>
+        <div id="positioned-2">
+            <div id="transformed-container" class="positioned-3">
+                <div id="overflow" class="positioned-3">
+                    <div class="positioned-4"></div>
+        
+                    <div style="background-color:purple; width:50px; height:300px;"></div>
+                    <br/>
+                    <div style="width:500px; height:50px; background-color:green;"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+</html>

Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.png (from rev 125086, trunk/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.png)


(Binary files differ)

Copied: branches/safari-536.26-branch/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.txt (from rev 125086, trunk/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.txt) (0 => 125459)


--- branches/safari-536.26-branch/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.txt	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/platform/mac/compositing/repaint/newly-composited-on-scroll-expected.txt	2012-08-13 22:16:02 UTC (rev 125459)
@@ -0,0 +1,2 @@
+
+

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (125458 => 125459)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-13 22:07:58 UTC (rev 125458)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-13 22:16:02 UTC (rev 125459)
@@ -1,5 +1,32 @@
 2012-08-13  Lucas Forschler  <[email protected]>
 
+    Merge r125086.
+
+    2012-08-08  Beth Dakin  <[email protected]>
+
+            https://bugs.webkit.org/show_bug.cgi?id=93393
+            Overflow regions sometimes repaint incorrectly after going into or 
+            coming out of compositing mode
+            -and corresponding-
+            <rdar://problem/12006463>
+
+            Reviewed by Simon Fraser.
+
+            New RenderLayer function computeRepaintRectsIncludingDescendants()
+            * rendering/RenderLayer.cpp:
+            (WebCore):
+            (WebCore::RenderLayer::computeRepaintRectsIncludingDescendants):
+            * rendering/RenderLayer.h:
+            (RenderLayer):
+
+            It is not sufficient to compute repaint rects just for the current 
+            layer when compositing changes. They must be recomputed for all 
+            descendant layers as well.
+            * rendering/RenderLayerCompositor.cpp:
+            (WebCore::RenderLayerCompositor::updateBacking):
+
+2012-08-13  Lucas Forschler  <[email protected]>
+
     Merge r123013.
 
     2012-07-18  Oliver Hunt  <[email protected]>
@@ -205145,3 +205172,4 @@
 .
 .
 .
+.

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.cpp (125458 => 125459)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-08-13 22:07:58 UTC (rev 125458)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-08-13 22:16:02 UTC (rev 125459)
@@ -475,6 +475,17 @@
     m_outlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, offsetFromRoot);
 }
 
+
+void RenderLayer::computeRepaintRectsIncludingDescendants()
+{
+    // FIXME: computeRepaintRects() has to walk up the parent chain for every layer to compute the rects.
+    // We should make this more efficient.
+    computeRepaintRects();
+
+    for (RenderLayer* layer = firstChild(); layer; layer = layer->nextSibling())
+        layer->computeRepaintRectsIncludingDescendants();
+}
+
 void RenderLayer::clearRepaintRects()
 {
     ASSERT(!m_hasVisibleContent);

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.h (125458 => 125459)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.h	2012-08-13 22:07:58 UTC (rev 125458)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayer.h	2012-08-13 22:16:02 UTC (rev 125459)
@@ -619,6 +619,7 @@
     bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackingContext(); }
 
     void computeRepaintRects(LayoutPoint* offsetFromRoot = 0);
+    void computeRepaintRectsIncludingDescendants();
     void clearRepaintRects();
 
     void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&,

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (125458 => 125459)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-13 22:07:58 UTC (rev 125458)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-13 22:16:02 UTC (rev 125459)
@@ -487,13 +487,6 @@
                 repaintOnCompositingChange(layer);
 
             layer->ensureBacking();
-
-            // The RenderLayer's needs to update repaint rects here, because the target
-            // repaintContainer may have changed after becoming a composited layer.
-            // https://bugs.webkit.org/show_bug.cgi?id=80641
-            if (layer->parent())
-                layer->computeRepaintRects();
-
             layerChanged = true;
         }
     } else {
@@ -512,10 +505,6 @@
             layer->clearBacking();
             layerChanged = true;
 
-            // The layer's cached repaints rects are relative to the repaint container, so change when
-            // compositing changes; we need to update them here.
-            layer->computeRepaintRects();
-
             // If we need to repaint, do so now that we've removed the backing
             if (shouldRepaint == CompositingChangeRepaintNow)
                 repaintOnCompositingChange(layer);
@@ -535,7 +524,14 @@
         if (innerCompositor && innerCompositor->inCompositingMode())
             innerCompositor->updateRootLayerAttachment();
     }
+    
+    if (layerChanged) {
 
+        // This layer and all of its descendants have cached repaints rects that are relative to
+        // the repaint container, so change when compositing changes; we need to update them here.
+        layer->computeRepaintRectsIncludingDescendants();
+    }
+
     return layerChanged;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to