Title: [137217] trunk/Source/WebCore
Revision
137217
Author
simon.fra...@apple.com
Date
2012-12-10 15:43:55 -0800 (Mon, 10 Dec 2012)

Log Message

Fix frame border painting in tiled drawing mode
https://bugs.webkit.org/show_bug.cgi?id=104453
<rdar://problem/11678611>

Reviewed by Dan Bernstein.

Frame borders were not correctly invalidated when in tiled drawing mode, because
RenderFrameSet::layout() invalidated directly on the view, which skips the tile
cache.

Fix by invalidating like all other renderers, via the repaint container.

Also, the layer transform should be updated before the invalidation, and
we make use of RenderObject::updateLayerTransform() which has the same behavior
as the old code.

Attempts to make a layout test failed. Resizing composited framesets repainted
via layer resizing, and an attempt to make a ref test in tiled drawing mode
failed (the test passed without the patch).

* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (137216 => 137217)


--- trunk/Source/WebCore/ChangeLog	2012-12-10 23:43:50 UTC (rev 137216)
+++ trunk/Source/WebCore/ChangeLog	2012-12-10 23:43:55 UTC (rev 137217)
@@ -1,5 +1,30 @@
 2012-12-10  Simon Fraser  <simon.fra...@apple.com>
 
+        Fix frame border painting in tiled drawing mode
+        https://bugs.webkit.org/show_bug.cgi?id=104453
+        <rdar://problem/11678611>
+
+        Reviewed by Dan Bernstein.
+
+        Frame borders were not correctly invalidated when in tiled drawing mode, because
+        RenderFrameSet::layout() invalidated directly on the view, which skips the tile
+        cache.
+        
+        Fix by invalidating like all other renderers, via the repaint container.
+        
+        Also, the layer transform should be updated before the invalidation, and
+        we make use of RenderObject::updateLayerTransform() which has the same behavior
+        as the old code.
+
+        Attempts to make a layout test failed. Resizing composited framesets repainted
+        via layer resizing, and an attempt to make a ref test in tiled drawing mode
+        failed (the test passed without the patch).
+
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::layout):
+
+2012-12-10  Simon Fraser  <simon.fra...@apple.com>
+
         When converting a layer into a tiled layer, ensure that we update the visible rect
         https://bugs.webkit.org/show_bug.cgi?id=104467
 

Modified: trunk/Source/WebCore/rendering/RenderFrameSet.cpp (137216 => 137217)


--- trunk/Source/WebCore/rendering/RenderFrameSet.cpp	2012-12-10 23:43:50 UTC (rev 137216)
+++ trunk/Source/WebCore/rendering/RenderFrameSet.cpp	2012-12-10 23:43:55 UTC (rev 137217)
@@ -466,8 +466,11 @@
 
     bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout();
     LayoutRect oldBounds;
-    if (doFullRepaint)
-        oldBounds = absoluteClippedOverflowRect();
+    RenderLayerModelObject* repaintContainer = 0;
+    if (doFullRepaint) {
+        repaintContainer = containerForRepaint();
+        oldBounds = clippedOverflowRectForRepaint(repaintContainer);
+    }
 
     if (!parent()->isFrameSet() && !document()->printing()) {
         setWidth(view()->viewWidth());
@@ -495,19 +498,15 @@
 
     computeEdgeInfo();
 
+    updateLayerTransform();
+
     if (doFullRepaint) {
-        view()->repaintViewRectangle(oldBounds);
-        LayoutRect newBounds = absoluteClippedOverflowRect();
+        repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds));
+        LayoutRect newBounds = clippedOverflowRectForRepaint(repaintContainer);
         if (newBounds != oldBounds)
-            view()->repaintViewRectangle(newBounds);
+            repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds));
     }
 
-    // If this FrameSet has a transform matrix then we need to recompute it
-    // because the transform origin is a function the size of the RenderFrameSet
-    // which may not be computed until it is attached to the render tree.
-    if (layer() && hasTransform())
-        layer()->updateTransform();
-
     setNeedsLayout(false);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to