Changeset 27351 in webkit


Ignore:
Timestamp:
Nov 1, 2007 8:30:23 AM (16 years ago)
Author:
mitz
Message:

WebCore:

Reviewed by Dave Hyatt.

Test: fast/repaint/overflow-clip-subtree-layout.html

This patch does not address the bigger issue of doing a full relayout
of inline flows containing floats, but it addresses the problem on
aol.com, where the changes that trigger layout are confined to an
overflow area inside the float.

  • page/FrameView.cpp: (WebCore::FrameView::scheduleRelayoutOfSubtree): If the new and old layout roots are different but one descends from the other, make (or keep) the ancestor as the layout root.
  • rendering/RenderObject.cpp: (WebCore::objectIsRelayoutBoundary): Made boxes with overflow clipping and non-auto width and height relayout boundaries.

LayoutTests:

Reviewed by Dave Hyatt.

  • fast/repaint/overflow-clip-subtree-layout.html: Added.
  • platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.checksum: Added.
  • platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.png: Added.
  • platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.txt: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r27342 r27351  
     12007-11-01  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=15015
     6          <rdar://problem/5420308> Most of www.aol.com redraws unnecessarily when headline/photo section changes
     7
     8        * fast/repaint/overflow-clip-subtree-layout.html: Added.
     9        * platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.checksum: Added.
     10        * platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.png: Added.
     11        * platform/mac/fast/repaint/overflow-clip-subtree-layout-expected.txt: Added.
     12
    1132007-10-31  Adam Roben  <aroben@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r27350 r27351  
     12007-11-01  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=15015
     6          <rdar://problem/5420308> Most of www.aol.com redraws unnecessarily when headline/photo section changes
     7
     8        Test: fast/repaint/overflow-clip-subtree-layout.html
     9
     10        This patch does not address the bigger issue of doing a full relayout
     11        of inline flows containing floats, but it addresses the problem on
     12        aol.com, where the changes that trigger layout are confined to an
     13        overflow area inside the float.
     14
     15        * page/FrameView.cpp:
     16        (WebCore::FrameView::scheduleRelayoutOfSubtree): If the new and old
     17        layout roots are different but one descends from the other, make (or
     18        keep) the ancestor as the layout root.
     19        * rendering/RenderObject.cpp:
     20        (WebCore::objectIsRelayoutBoundary): Made boxes with overflow
     21        clipping and non-auto width and height relayout boundaries.
     22
    1232007-11-01  Alexey Proskuryakov  <ap@webkit.org>
    224
  • trunk/WebCore/page/FrameView.cpp

    r26044 r27351  
    730730    if (layoutPending()) {
    731731        if (d->layoutRoot != n) {
    732             // Just do a full relayout
    733             if (d->layoutRoot && d->layoutRoot->renderer())
    734                 d->layoutRoot->renderer()->markContainingBlocksForLayout(false);
    735             d->layoutRoot = 0;
    736             if (n->renderer())
    737                 n->renderer()->markContainingBlocksForLayout(false);
     732            if (n->isDescendantOf(d->layoutRoot.get())) {
     733                // Keep the current root
     734                if (n->renderer())
     735                    n->renderer()->markContainingBlocksForLayout(false);
     736            } else if (d->layoutRoot && d->layoutRoot->isDescendantOf(n)) {
     737                // Re-root at n
     738                if (d->layoutRoot->renderer())
     739                    d->layoutRoot->renderer()->markContainingBlocksForLayout(false);
     740                d->layoutRoot = n;
     741            } else {
     742                // Just do a full relayout
     743                if (d->layoutRoot && d->layoutRoot->renderer())
     744                    d->layoutRoot->renderer()->markContainingBlocksForLayout(false);
     745                d->layoutRoot = 0;
     746                if (n->renderer())
     747                    n->renderer()->markContainingBlocksForLayout(false);
     748            }
    738749        }
    739750    } else {
  • trunk/WebCore/rendering/RenderObject.cpp

    r27263 r27351  
    711711    // FIXME: In future it may be possible to broaden this condition in order to improve performance
    712712    return obj->isTextField() || obj->isTextArea()
     713        || obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto()
    713714#if ENABLE(SVG)
    714715           || obj->isSVGRoot()
Note: See TracChangeset for help on using the changeset viewer.