Changeset 19492 in webkit
- Timestamp:
- Feb 7, 2007 9:10:34 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19490 r19492 1 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Dave Hyatt. 4 5 - repaint test for http://bugs.webkit.org/show_bug.cgi?id=10522 6 REGRESSION: Incomplete repaint after table relayout that decreases height 7 8 * fast/repaint/intermediate-layout-position-expected.checksum: Added. 9 * fast/repaint/intermediate-layout-position-expected.png: Added. 10 * fast/repaint/intermediate-layout-position-expected.txt: Added. 11 * fast/repaint/intermediate-layout-position.html: Added. 12 1 13 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r19491 r19492 1 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Dave Hyatt. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=10522 6 REGRESSION: Incomplete repaint after table relayout that decreases height 7 8 Test: fast/repaint/intermediate-layout-position.html 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::layoutBlock): Adjust the old bounds by the layout delta, 12 to get the block's absolute bounds as they were before its ancestors moved it 13 during layout. 14 (WebCore::RenderBlock::collapseMargins): Update the layout delta for the child 15 when moving it. 16 (WebCore::RenderBlock::clearFloatsIfNeeded): Ditto. 17 (WebCore::RenderBlock::determineHorizontalPosition): Ditto. 18 (WebCore::RenderBlock::layoutBlockChildren): Ditto. 19 * rendering/RenderFlexibleBox.cpp: 20 (WebCore::RenderFlexibleBox::layoutBlock): Adjust the old bounds by the current 21 layout delta. 22 * rendering/RenderHTMLCanvas.cpp: 23 (WebCore::RenderHTMLCanvas::layout): Ditto. 24 * rendering/RenderImage.cpp: 25 (WebCore::RenderImage::layout): Ditto. 26 * rendering/RenderTable.cpp: 27 (WebCore::RenderTable::layout): Ditto. 28 * rendering/RenderView.h: 29 (WebCore::RenderView::layoutDelta): Added. Keeps track of the offset between 30 the position of the object currently being laid out and its position at the 31 end of the last layout. 32 (WebCore::RenderView::addLayoutDelta): Added. 33 1 34 2007-02-07 Christopher Brichford <chrisb@adobe.com> 2 35 -
trunk/WebCore/rendering/RenderBlock.cpp
r19413 r19492 469 469 IntRect oldBounds, oldFullBounds; 470 470 bool checkForRepaint = checkForRepaintDuringLayout(); 471 if (checkForRepaint) 471 if (checkForRepaint) { 472 472 getAbsoluteRepaintRectIncludingFloats(oldBounds, oldFullBounds); 473 oldBounds.move(view()->layoutDelta()); 474 oldFullBounds.move(view()->layoutDelta()); 475 } 473 476 474 477 int oldWidth = m_width; … … 880 883 } 881 884 885 view()->addLayoutDelta(IntSize(0, yPosEstimate - ypos)); 882 886 child->setPos(child->xPos(), ypos); 883 887 if (ypos != yPosEstimate) { … … 902 906 if (heightIncrease) { 903 907 // The child needs to be lowered. Move the child so that it just clears the float. 908 view()->addLayoutDelta(IntSize(0, -heightIncrease)); 904 909 child->setPos(child->xPos(), child->yPos() + heightIncrease); 905 910 … … 987 992 } 988 993 } 994 view()->addLayoutDelta(IntSize(child->xPos() - chPos, 0)); 989 995 child->setPos(chPos, child->yPos()); 990 996 } else { … … 1007 1013 } 1008 1014 } 1015 view()->addLayoutDelta(IntSize(child->xPos() - chPos, 0)); 1009 1016 child->setPos(chPos, child->yPos()); 1010 1017 } … … 1126 1133 1127 1134 // Go ahead and position the child as though it didn't collapse with the top. 1135 view()->addLayoutDelta(IntSize(0, child->yPos() - yPosEstimate)); 1128 1136 child->setPos(child->xPos(), yPosEstimate); 1129 1137 if (yPosEstimate != oldRect.y() && !child->avoidsFloats() && child->containsFloats()) … … 1170 1178 // Insert our compact into the block margin if we have one. 1171 1179 insertCompactIfNeeded(child, compactInfo); 1180 1181 view()->addLayoutDelta(IntSize(child->xPos() - oldRect.x(), child->yPos() - oldRect.y())); 1172 1182 1173 1183 // If the child moved, we have to repaint it as well as any floating/positioned … … 1180 1190 child->repaintDuringLayoutIfMoved(oldRect); 1181 1191 else if (finalChildY != yPosEstimate || finalChildY != postCollapseChildY) { 1182 // The child 's repaints during layout were done before it reached its finalposition,1183 // so they were wrong.1192 // The child invalidated itself during layout at an intermediate position, 1193 // but not at its final position. Take care of it now. 1184 1194 child->repaint(); 1185 1195 child->repaintOverhangingFloats(); -
trunk/WebCore/rendering/RenderFlexibleBox.cpp
r18819 r19492 254 254 IntRect oldBounds; 255 255 bool checkForRepaint = checkForRepaintDuringLayout(); 256 if (checkForRepaint) 256 if (checkForRepaint) { 257 257 oldBounds = getAbsoluteRepaintRect(); 258 258 oldBounds.move(view()->layoutDelta()); 259 } 260 259 261 int previousWidth = m_width; 260 262 int previousHeight = m_height; -
trunk/WebCore/rendering/RenderHTMLCanvas.cpp
r18654 r19492 31 31 #include "HTMLCanvasElement.h" 32 32 #include "HTMLNames.h" 33 #include "RenderView.h" 33 34 34 35 namespace WebCore { … … 83 84 IntRect oldBounds; 84 85 bool checkForRepaint = checkForRepaintDuringLayout(); 85 if (checkForRepaint) 86 if (checkForRepaint) { 86 87 oldBounds = getAbsoluteRepaintRect(); 88 oldBounds.move(view()->layoutDelta()); 89 } 87 90 calcWidth(); 88 91 calcHeight(); -
trunk/WebCore/rendering/RenderImage.cpp
r18755 r19492 305 305 IntRect oldBounds; 306 306 bool checkForRepaint = checkForRepaintDuringLayout(); 307 if (checkForRepaint) 307 if (checkForRepaint) { 308 308 oldBounds = getAbsoluteRepaintRect(); 309 oldBounds.move(view()->layoutDelta()); 310 } 309 311 310 312 // minimum height -
trunk/WebCore/rendering/RenderTable.cpp
r19100 r19492 279 279 IntRect oldFullBounds; 280 280 bool checkForRepaint = checkForRepaintDuringLayout(); 281 if (checkForRepaint) 281 if (checkForRepaint) { 282 282 getAbsoluteRepaintRectIncludingFloats(oldBounds, oldFullBounds); 283 oldBounds.move(view()->layoutDelta()); 284 oldFullBounds.move(view()->layoutDelta()); 285 } 283 286 284 287 m_height = 0; -
trunk/WebCore/rendering/RenderView.h
r18918 r19492 94 94 RenderObject* flexBoxInFirstLayout() { return m_flexBoxInFirstLayout; } 95 95 96 const IntSize& layoutDelta() const { return m_layoutDelta; } 97 void addLayoutDelta(const IntSize& delta) { m_layoutDelta += delta; } 98 96 99 protected: 97 100 FrameView* m_frameView; … … 119 122 int m_truncatorWidth; 120 123 bool m_forcedPageBreak; 124 IntSize m_layoutDelta; 121 125 }; 122 126
Note: See TracChangeset
for help on using the changeset viewer.