Changeset 19148 in webkit


Ignore:
Timestamp:
Jan 26, 2007 3:35:51 AM (17 years ago)
Author:
bdash
Message:

2007-01-26 Mitz Pettel <mitz@webkit.org>

Reviewed by Reviewed by Darin and Maciej.

Test: fast/dynamic/staticY.html

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): Avoid marking the object's parents, since they have already been laid out.
  • rendering/RenderBox.cpp: (WebCore::RenderBox::setStaticY): Added a call to setChildNeedsLayout() to ensure relayout by this box's container (third and fourth cases in the layout test).
  • rendering/RenderBox.h:
  • rendering/RenderObject.cpp: (WebCore::RenderObject::markContainingBlocksForLayout): For positioned objects with static y, also mark the object's parent to ensure that it recomputes the static y value (first case in the layout test).

2007-01-26 Mitz Pettel <mitz@webkit.org>

Reviewed by Darin and Maciej.

Tests three cases that the patch fixes and another one that was fixed in
r8284 but did not have a test.

  • fast/dynamic/staticY-expected.checksum: Added.
  • fast/dynamic/staticY-expected.png: Added.
  • fast/dynamic/staticY-expected.txt: Added.
  • fast/dynamic/staticY.html: Added.
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19133 r19148  
     12007-01-26  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Darin and Maciej.
     4
     5        - test for http://bugs.webkit.org/show_bug.cgi?id=10983
     6          REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown
     7
     8        Tests three cases that the patch fixes and another one that was fixed in
     9        r8284 but did not have a test.
     10
     11        * fast/dynamic/staticY-expected.checksum: Added.
     12        * fast/dynamic/staticY-expected.png: Added.
     13        * fast/dynamic/staticY-expected.txt: Added.
     14        * fast/dynamic/staticY.html: Added.
     15
    1162007-01-25  Justin Garcia  <justin.garcia@apple.com>
    217
  • trunk/WebCore/ChangeLog

    r19147 r19148  
     12007-01-26  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Reviewed by Darin and Maciej.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=10983
     6          REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown
     7
     8        Test: fast/dynamic/staticY.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::layoutPositionedObjects): Avoid marking the object's
     12        parents, since they have already been laid out.
     13        * rendering/RenderBox.cpp:
     14        (WebCore::RenderBox::setStaticY): Added a call to setChildNeedsLayout() to
     15        ensure relayout by this box's container (third and fourth cases in the
     16        layout test).
     17        * rendering/RenderBox.h:
     18        * rendering/RenderObject.cpp:
     19        (WebCore::RenderObject::markContainingBlocksForLayout): For positioned objects
     20        with static y, also mark the object's parent to ensure that it recomputes
     21        the static y value (first case in the layout test).
     22
    1232007-01-26  Lars Knoll <lars@trolltech.com>
    224
  • trunk/WebCore/rendering/RenderBlock.cpp

    r19027 r19148  
    12081208            // positioned explicitly) this should not incur a performance penalty.
    12091209            if (relayoutChildren || (r->hasStaticY() && r->parent() != this && r->parent()->isBlockFlow()))
    1210                 r->setChildNeedsLayout(true);
     1210                r->setChildNeedsLayout(true, false);
    12111211            r->layoutIfNeeded();
    12121212        }
  • trunk/WebCore/rendering/RenderBox.cpp

    r19080 r19148  
    14491449    m_marginTop = style()->marginTop().calcMinValue(cw);
    14501450    m_marginBottom = style()->marginBottom().calcMinValue(cw);
     1451}
     1452
     1453void RenderBox::setStaticY(int staticY)
     1454{
     1455    if (staticY == m_staticY)
     1456        return;
     1457   
     1458    m_staticY = staticY;
     1459    setChildNeedsLayout(true);
    14511460}
    14521461
  • trunk/WebCore/rendering/RenderBox.h

    r19080 r19148  
    143143    virtual int staticY() const { return m_staticY; }
    144144    virtual void setStaticX(int staticX) { m_staticX = staticX; }
    145     virtual void setStaticY(int staticY) { m_staticY = staticY; }
     145    virtual void setStaticY(int staticY);
    146146
    147147    virtual IntRect getOverflowClipRect(int tx, int ty);
  • trunk/WebCore/rendering/RenderObject.cpp

    r19027 r19148  
    683683    while (o) {
    684684        if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) {
     685            if (last->hasStaticY())
     686                last->parent()->setChildNeedsLayout(true);
    685687            if (o->m_posChildNeedsLayout)
    686688                return;
Note: See TracChangeset for help on using the changeset viewer.