Ignore:
Timestamp:
Dec 10, 2012, 3:43:55 PM (12 years ago)
Author:
Simon Fraser
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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r137169 r137217  
    467467    bool doFullRepaint = selfNeedsLayout() && checkForRepaintDuringLayout();
    468468    LayoutRect oldBounds;
    469     if (doFullRepaint)
    470         oldBounds = absoluteClippedOverflowRect();
     469    RenderLayerModelObject* repaintContainer = 0;
     470    if (doFullRepaint) {
     471        repaintContainer = containerForRepaint();
     472        oldBounds = clippedOverflowRectForRepaint(repaintContainer);
     473    }
    471474
    472475    if (!parent()->isFrameSet() && !document()->printing()) {
     
    496499    computeEdgeInfo();
    497500
     501    updateLayerTransform();
     502
    498503    if (doFullRepaint) {
    499         view()->repaintViewRectangle(oldBounds);
    500         LayoutRect newBounds = absoluteClippedOverflowRect();
     504        repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds));
     505        LayoutRect newBounds = clippedOverflowRectForRepaint(repaintContainer);
    501506        if (newBounds != oldBounds)
    502             view()->repaintViewRectangle(newBounds);
    503     }
    504 
    505     // If this FrameSet has a transform matrix then we need to recompute it
    506     // because the transform origin is a function the size of the RenderFrameSet
    507     // which may not be computed until it is attached to the render tree.
    508     if (layer() && hasTransform())
    509         layer()->updateTransform();
     507            repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds));
     508    }
    510509
    511510    setNeedsLayout(false);
Note: See TracChangeset for help on using the changeset viewer.