Title: [125104] trunk/Source/WebCore
Revision
125104
Author
bda...@apple.com
Date
2012-08-08 16:09:37 -0700 (Wed, 08 Aug 2012)

Log Message

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.

My first patch to fix this bug removed an if (parent()) check that is 
needed to prevent a table crash seen in 
fast/table/table-row-compositing-repaint-crash.html  
The parent() check was actually added originally to prevent this same 
crash. See http://trac.webkit.org/changeset/110456  
This patch adds that check back, but really we should delay the 
computation of repaint rects if layout has not happened yet.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125103 => 125104)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 22:40:50 UTC (rev 125103)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 23:09:37 UTC (rev 125104)
@@ -1,3 +1,23 @@
+2012-08-08  Beth Dakin  <bda...@apple.com>
+
+        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.
+
+        My first patch to fix this bug removed an if (parent()) check that is 
+        needed to prevent a table crash seen in 
+        fast/table/table-row-compositing-repaint-crash.html  
+        The parent() check was actually added originally to prevent this same 
+        crash. See http://trac.webkit.org/changeset/110456  
+        This patch adds that check back, but really we should delay the 
+        computation of repaint rects if layout has not happened yet.
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateBacking):
+
 2012-08-08  Simon Fraser  <simon.fra...@apple.com>
 
         Avoid backing store on layers created for CoreAnimation plugins

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (125103 => 125104)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-08 22:40:50 UTC (rev 125103)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-08 23:09:37 UTC (rev 125104)
@@ -493,6 +493,12 @@
                 repaintOnCompositingChange(layer);
 
             layer->ensureBacking();
+
+            // 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.
+            if (layer->parent())
+                layer->computeRepaintRectsIncludingDescendants();
+
             layerChanged = true;
         }
     } else {
@@ -511,6 +517,10 @@
             layer->clearBacking();
             layerChanged = true;
 
+            // 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();
+
             // If we need to repaint, do so now that we've removed the backing
             if (shouldRepaint == CompositingChangeRepaintNow)
                 repaintOnCompositingChange(layer);
@@ -531,14 +541,9 @@
             innerCompositor->updateRootLayerAttachment();
     }
     
-    if (layerChanged) {
+    if (layerChanged)
         layer->clearClipRectsIncludingDescendants(PaintingClipRects);
 
-        // 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();
-    }
-
     // If a fixed position layer gained/lost a backing, the scrolling coordinator needs to recalculate whether it can do fast scrolling.
     if (layerChanged && layer->renderer()->style()->position() == FixedPosition) {
         if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to