Commit 88c7b054 authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by Darin Adler and Dave Hyatt.

        - eliminate excessive repainting when an object's final position
          after layout is unchanged

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlockChildren): Removed the full repaint
        for the case that the final position is unchanged but the position at
        which an intermediate layout occurred was different. Any repainting
        done during the intermediate layout would have happened at the object's
        initial (and also final) coordinates, since layoutDelta is factored
        into repaint rect calculations.

LayoutTests:

        Reviewed by Darin Adler.

        - updated pixel results for "eliminate excessive repainting when an
          object's final position after layout is unchanged"

        * platform/mac/fast/repaint/intermediate-layout-position-clip-expected.checksum:
        * platform/mac/fast/repaint/intermediate-layout-position-clip-expected.png:
        * platform/mac/fast/repaint/intermediate-layout-position-expected.checksum:
        * platform/mac/fast/repaint/intermediate-layout-position-expected.png:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2ca11c14
2008-05-30 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- updated pixel results for "eliminate excessive repainting when an
object's final position after layout is unchanged"
* platform/mac/fast/repaint/intermediate-layout-position-clip-expected.checksum:
* platform/mac/fast/repaint/intermediate-layout-position-clip-expected.png:
* platform/mac/fast/repaint/intermediate-layout-position-expected.checksum:
* platform/mac/fast/repaint/intermediate-layout-position-expected.png:
2008-05-30 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
4cc39db9e0acf1a66bdb6a6b7cc0b0b5
\ No newline at end of file
fa5e19674c0f0a191d533d52abb70c35
\ No newline at end of file
ff2ab8ca87826c939775ba447f3a6d84
\ No newline at end of file
07fcdcfeb384a73648c7bb66d7f9b714
\ No newline at end of file
2008-05-30 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler and Dave Hyatt.
- eliminate excessive repainting when an object's final position
after layout is unchanged
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren): Removed the full repaint
for the case that the final position is unchanged but the position at
which an intermediate layout occurred was different. Any repainting
done during the intermediate layout would have happened at the object's
initial (and also final) coordinates, since layoutDelta is factored
into repaint rect calculations.
2008-05-30 Chris Fleizach <cfleizach@apple.com>
Reviewed by Beth Dakin.
......@@ -1262,7 +1262,6 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
// Now determine the correct ypos based off examination of collapsing margin
// values.
collapseMargins(child, marginInfo, yPosEstimate);
int postCollapseChildY = child->yPos();
// Now check for clear.
clearFloatsIfNeeded(child, marginInfo, oldTopPosMargin, oldTopNegMargin);
......@@ -1294,22 +1293,15 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren, int& maxFloatBottom
// Insert our compact into the block margin if we have one.
insertCompactIfNeeded(child, compactInfo);
view()->addLayoutDelta(IntSize(child->xPos() - oldRect.x(), child->yPos() - oldRect.y()));
IntSize childOffset(child->xPos() - oldRect.x(), child->yPos() - oldRect.y());
if (childOffset.width() || childOffset.height()) {
view()->addLayoutDelta(childOffset);
// If the child moved, we have to repaint it as well as any floating/positioned
// descendants. An exception is if we need a layout. In this case, we know we're going to
// repaint ourselves (and the child) anyway.
if (!selfNeedsLayout() && child->checkForRepaintDuringLayout()) {
int finalChildX = child->xPos();
int finalChildY = child->yPos();
if (finalChildX != oldRect.x() || finalChildY != oldRect.y())
// If the child moved, we have to repaint it as well as any floating/positioned
// descendants. An exception is if we need a layout. In this case, we know we're going to
// repaint ourselves (and the child) anyway.
if (!selfNeedsLayout() && child->checkForRepaintDuringLayout())
child->repaintDuringLayoutIfMoved(oldRect);
else if (finalChildY != yPosEstimate || finalChildY != postCollapseChildY) {
// The child invalidated itself during layout at an intermediate position,
// but not at its final position. Take care of it now.
child->repaint();
child->repaintOverhangingFloats();
}
}
child = child->nextSibling();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment