Title: [131479] trunk
Revision
131479
Author
[email protected]
Date
2012-10-16 11:29:38 -0700 (Tue, 16 Oct 2012)

Log Message

REGRESSION (r128787): Fixed position div causes other elements to not update correctly
https://bugs.webkit.org/show_bug.cgi?id=98579

Reviewed by Beth Dakin.

Source/WebCore:

RenderLayers cache repaint rects which are computed relative to the repaint container.
Repaint containers depend on whether a RenderLayerBacking has its own backing store,
so if that changes, we need to recompute repaint rects for all descendants.

Test: compositing/repaint/requires-backing-repaint.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):

LayoutTests:

Repaint test that scrolls an overflow element until its content layers overlap some
other composited element. Only the pixel result is interesting.

* compositing/repaint/requires-backing-repaint-expected.png: Added.
* compositing/repaint/requires-backing-repaint-expected.txt: Added.
* compositing/repaint/requires-backing-repaint.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (131478 => 131479)


--- trunk/LayoutTests/ChangeLog	2012-10-16 18:20:12 UTC (rev 131478)
+++ trunk/LayoutTests/ChangeLog	2012-10-16 18:29:38 UTC (rev 131479)
@@ -1,3 +1,17 @@
+2012-10-16  Simon Fraser  <[email protected]>
+
+        REGRESSION (r128787): Fixed position div causes other elements to not update correctly
+        https://bugs.webkit.org/show_bug.cgi?id=98579
+
+        Reviewed by Beth Dakin.
+
+        Repaint test that scrolls an overflow element until its content layers overlap some
+        other composited element. Only the pixel result is interesting.
+
+        * compositing/repaint/requires-backing-repaint-expected.png: Added.
+        * compositing/repaint/requires-backing-repaint-expected.txt: Added.
+        * compositing/repaint/requires-backing-repaint.html: Added.
+
 2012-10-16  Mike Reed  <[email protected]>
 
         update expectations preparing for skia optimization

Added: trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.txt (0 => 131479)


--- trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.txt	2012-10-16 18:29:38 UTC (rev 131479)
@@ -0,0 +1 @@
+
Property changes on: trunk/LayoutTests/compositing/repaint/requires-backing-repaint-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Added: trunk/LayoutTests/compositing/repaint/requires-backing-repaint.html (0 => 131479)


--- trunk/LayoutTests/compositing/repaint/requires-backing-repaint.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/repaint/requires-backing-repaint.html	2012-10-16 18:29:38 UTC (rev 131479)
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        .bar {
+            width: 200px;
+            height: 50px;
+            margin-left: 50px;
+            background-color: gray;
+            -webkit-transform: translateZ(0);
+        }
+
+        #overflow {
+            position: absolute;
+            top: 70px;
+            left: 100px;
+            z-index: 100;
+            height: 200px;
+            width: 200px;
+            border: 1px solid black;
+            overflow: scroll;
+        }
+        
+        #overflow > div {
+            position: relative;
+            height: 50px;
+            width: 100%;
+            border: 2px solid black;
+            margin: 2px;
+        }
+        
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.dumpAsText(true);
+            testRunner.waitUntilDone();
+        }
+
+        function doTest()
+        {
+            var overflow = document.getElementById('overflow');
+            overflow.scrollTop = 50;
+
+            if (window.testRunner)
+                testRunner.display();
+            
+            window.setTimeout(function() {
+                overflow.scrollTop = 75;
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0)
+        }
+        window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+    <div class="bar"></div>
+    
+    <div id="overflow">
+        <div></div>
+        <div></div>
+        <div></div>
+        <div></div>
+        <div></div>
+    </div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/repaint/requires-backing-repaint.html
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (131478 => 131479)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-10-16 18:20:12 UTC (rev 131478)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-10-16 18:29:38 UTC (rev 131479)
@@ -675,6 +675,10 @@
 compositing/visible-rect [ WontFix ]
 platform/chromium/virtual/softwarecompositing/visible-rect [ WontFix ]
 
+# Repaint test doesn't seem to work on Chromium.
+webkit.org/b/98579 compositing/repaint/requires-backing-repaint.html [ ImageOnlyFailure ]
+webkit.org/b/98579 platform/chromium/virtual/softwarecompositing/repaint/requires-backing-repaint.html [ ImageOnlyFailure ]
+
 # Chrome doesn't call the willCacheResponse callback (a method
 # of ResourceHandleClient).  That function is Mac-specific.
 http/tests/misc/willCacheResponse-delegate-callback.html [ WontFix ]

Modified: trunk/Source/WebCore/ChangeLog (131478 => 131479)


--- trunk/Source/WebCore/ChangeLog	2012-10-16 18:20:12 UTC (rev 131478)
+++ trunk/Source/WebCore/ChangeLog	2012-10-16 18:29:38 UTC (rev 131479)
@@ -1,3 +1,19 @@
+2012-10-16  Simon Fraser  <[email protected]>
+
+        REGRESSION (r128787): Fixed position div causes other elements to not update correctly
+        https://bugs.webkit.org/show_bug.cgi?id=98579
+
+        Reviewed by Beth Dakin.
+
+        RenderLayers cache repaint rects which are computed relative to the repaint container.
+        Repaint containers depend on whether a RenderLayerBacking has its own backing store,
+        so if that changes, we need to recompute repaint rects for all descendants.
+        
+        Test: compositing/repaint/requires-backing-repaint.html
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
+
 2012-10-16  Zan Dobersek  <[email protected]>
 
         [GStreamer] GstBuffer ref race in WebKitWebAudioSrcLoop

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (131478 => 131479)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-10-16 18:20:12 UTC (rev 131478)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-10-16 18:29:38 UTC (rev 131479)
@@ -1373,10 +1373,12 @@
     if (requiresOwnBacking == m_requiresOwnBackingStore)
         return;
     
+    m_requiresOwnBackingStore = requiresOwnBacking;
+
     // This affects the answer to paintsIntoCompositedAncestor(), which in turn affects
     // cached clip rects, so when it changes we have to clear clip rects on descendants.
     m_owningLayer->clearClipRectsIncludingDescendants(PaintingClipRects);
-    m_requiresOwnBackingStore = requiresOwnBacking;
+    m_owningLayer->computeRepaintRectsIncludingDescendants();
     
     compositor()->repaintInCompositedAncestor(m_owningLayer, compositedBounds());
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to