Changeset 15121 in webkit


Ignore:
Timestamp:
Jun 30, 2006 7:51:32 PM (18 years ago)
Author:
ddkilzer
Message:

WebCore:

Reviewed by Hyatt.

Test: fast/repaint/float-move-during-layout.html

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::repaintOverhangingFloats): Renamed repaintFloatingDescendants() to this and limited it to repainting overhanging floats. Added a boolean parameter that forces all descendant overhanging floats (that don't have their own layer) to paint.
  • rendering/RenderBlock.h:
  • rendering/RenderBox.cpp: (WebCore::RenderBox::repaintDuringLayoutIfMoved): Changed to paint all descendant floats.
  • rendering/RenderObject.cpp: (WebCore::RenderObject::repaintOverhangingFloats):
  • rendering/RenderObject.h:

LayoutTests:

Reviewed by Hyatt.

  • fast/repaint/float-move-during-layout-expected.checksum: Added.
  • fast/repaint/float-move-during-layout-expected.png: Added.
  • fast/repaint/float-move-during-layout-expected.txt: Added.
  • fast/repaint/float-move-during-layout.html: Added.
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r15117 r15121  
     12006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
     2
     3        Reviewed by Hyatt.
     4
     5        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7204
     6          float inserted in fixed height block via DOM not repainted
     7
     8        * fast/repaint/float-move-during-layout-expected.checksum: Added.
     9        * fast/repaint/float-move-during-layout-expected.png: Added.
     10        * fast/repaint/float-move-during-layout-expected.txt: Added.
     11        * fast/repaint/float-move-during-layout.html: Added.
     12
    1132006-06-30  Levi Weintraub  <lweintraub@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r15117 r15121  
     12006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
     2
     3        Reviewed by Hyatt.
     4
     5        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7204
     6          float inserted in fixed height block via DOM not repainted
     7
     8        Test: fast/repaint/float-move-during-layout.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::layoutBlockChildren):
     12        (WebCore::RenderBlock::repaintOverhangingFloats): Renamed repaintFloatingDescendants()
     13        to this and limited it to repainting overhanging floats. Added a boolean parameter that forces
     14        all descendant overhanging floats (that don't have their own layer) to paint.
     15        * rendering/RenderBlock.h:
     16        * rendering/RenderBox.cpp:
     17        (WebCore::RenderBox::repaintDuringLayoutIfMoved): Changed to paint all descendant
     18        floats.
     19        * rendering/RenderObject.cpp:
     20        (WebCore::RenderObject::repaintOverhangingFloats):
     21        * rendering/RenderObject.h:
     22
    1232006-06-30  Levi Weintraub  <lweintraub@apple.com>
    224
  • trunk/WebCore/rendering/RenderBlock.cpp

    r15079 r15121  
    11191119                // so they were wrong.
    11201120                child->repaint();
    1121                 child->repaintFloatingDescendants();
     1121                child->repaintOverhangingFloats();
    11221122            }
    11231123        }
     
    11841184}
    11851185
    1186 void RenderBlock::repaintFloatingDescendants()
     1186void RenderBlock::repaintOverhangingFloats(bool paintAllDescendants)
    11871187{
    11881188    // Repaint any overhanging floats (if we know we're the one to paint them).
     
    11971197        DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
    11981198        for ( ; (r = it.current()); ++it) {
    1199             // Only repaint the object if our noPaint flag isn't set and if it isn't in
    1200             // its own layer.
    1201             if (!r->noPaint && !r->node->layer()) {               
     1199            // Only repaint the object if it is overhanging, is not in its own layer, and
     1200            // is our responsibility to paint (noPaint isn't set). When paintAllDescendants is true, the latter
     1201            // condition is replaced with being a descendant of us.
     1202            if (r->endY > m_height && (paintAllDescendants && r->node->hasAncestor(this) || !r->noPaint) && !r->node->layer()) {               
    12021203                r->node->repaint();
    1203                 r->node->repaintFloatingDescendants();
     1204                r->node->repaintOverhangingFloats();
    12041205            }
    12051206        }
  • trunk/WebCore/rendering/RenderBlock.h

    r14899 r15121  
    108108
    109109    virtual void repaintObjectsBeforeLayout();
    110     virtual void repaintFloatingDescendants();
     110    virtual void repaintOverhangingFloats(bool paintAllDescendants);
    111111    virtual void getAbsoluteRepaintRectIncludingFloats(IntRect& bounds, IntRect& fullBounds);
    112112
  • trunk/WebCore/rendering/RenderBox.cpp

    r15105 r15121  
    934934        m_x = oldX; m_y = oldY;
    935935        repaint();
    936         repaintFloatingDescendants();
     936        repaintOverhangingFloats(true);
    937937        m_x = newX; m_y = newY;
    938938        repaint();
    939         repaintFloatingDescendants();
     939        repaintOverhangingFloats(true);
    940940    }
    941941}
  • trunk/WebCore/rendering/RenderObject.cpp

    r15038 r15121  
    17211721}
    17221722
    1723 void RenderObject::repaintFloatingDescendants()
     1723void RenderObject::repaintOverhangingFloats(bool paintAllDescendants)
    17241724{
    17251725}
  • trunk/WebCore/rendering/RenderObject.h

    r15079 r15121  
    723723
    724724    // Called to repaint a block's floats.
    725     virtual void repaintFloatingDescendants();
     725    virtual void repaintOverhangingFloats(bool paintAllDescendants = false);
    726726
    727727    // Called before layout to repaint all dirty children (with selfNeedsLayout() set).
Note: See TracChangeset for help on using the changeset viewer.