Changeset 40238 in webkit
- Timestamp:
- Jan 25, 2009 7:38:55 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r40236 r40238 1 2009-01-25 David Hyatt <hyatt@apple.com> 2 3 Add layout test for https://bugs.webkit.org/show_bug.cgi?id=23524. 4 5 Reviewed by Oliver Hunt 6 7 * fast/repaint/dynamic-table-vertical-alignment-change.html: Added. 8 * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.checksum: Added. 9 * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.png: Added. 10 * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt: Added. 11 1 12 2009-01-25 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/WebCore/ChangeLog
r40237 r40238 1 2009-01-25 David Hyatt <hyatt@apple.com> 2 3 Fix for https://bugs.webkit.org/show_bug.cgi?id=23524, lots of missing content in table sections. 4 5 The new table code created a bug involving markAllDescendantsWithFloatsForLayout, namely that it could 6 end up marking ancestors of a block as needing layout when that block was still in the process of 7 doing a layout. 8 9 The fix is to add a parameter to markAllDescendantsWithFloatsForLayout that says whether or not 10 we are "mid-layout." If this flag is set, then the method will make sure to do only local dirtying 11 of objects to avoid accidentally marking a clean ancestor as needing layout again. 12 13 Ultimately the second parameter to setNeedsLayout and setChildNeedsLayout should just be removed, 14 with a check of whether or not we are mid-layout being done by those methods instead. 15 16 Reviewed by Oliver Hunt 17 18 Added fast/repaint/dynamic-table-vertical-alignment-change.html 19 20 * rendering/RenderBlock.cpp: 21 (WebCore::RenderBlock::collapseMargins): 22 (WebCore::RenderBlock::clearFloatsIfNeeded): 23 (WebCore::RenderBlock::layoutBlockChildren): 24 (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): 25 * rendering/RenderBlock.h: 26 * rendering/RenderObject.cpp: 27 (WebCore::RenderObject::removeFromObjectLists): 28 * rendering/RenderObject.h: 29 * rendering/RenderTableSection.cpp: 30 (WebCore::RenderTableSection::layoutRows): 31 1 32 2009-01-25 Darin Adler <darin@apple.com> 2 33 -
trunk/WebCore/rendering/RenderBlock.cpp
r40231 r40238 1067 1067 1068 1068 if (!child->avoidsFloats() && child->containsFloats()) 1069 child->markAllDescendantsWithFloatsForLayout();1069 static_cast<RenderBlock*>(child)->markAllDescendantsWithFloatsForLayout(); 1070 1070 1071 1071 // Our guess was wrong. Make the child lay itself out again. … … 1122 1122 child->setChildNeedsLayout(true, false); 1123 1123 if (!child->avoidsFloats() && child->containsFloats()) 1124 child->markAllDescendantsWithFloatsForLayout();1124 static_cast<RenderBlock*>(child)->markAllDescendantsWithFloatsForLayout(); 1125 1125 child->layoutIfNeeded(); 1126 1126 } … … 1343 1343 1344 1344 if (markDescendantsWithFloats) 1345 child->markAllDescendantsWithFloatsForLayout();1345 static_cast<RenderBlock*>(child)->markAllDescendantsWithFloatsForLayout(); 1346 1346 1347 1347 if (child->isRenderBlock()) … … 3053 3053 } 3054 3054 3055 void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove )3056 { 3057 setChildNeedsLayout(true );3055 void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove, bool inLayout) 3056 { 3057 setChildNeedsLayout(true, !inLayout); 3058 3058 3059 3059 if (floatToRemove) … … 3065 3065 if (isBlockFlow() && !child->isFloatingOrPositioned() && 3066 3066 ((floatToRemove ? child->containsFloat(floatToRemove) : child->containsFloats()) || child->shrinkToAvoidFloats())) 3067 child->markAllDescendantsWithFloatsForLayout(floatToRemove);3067 static_cast<RenderBlock*>(child)->markAllDescendantsWithFloatsForLayout(floatToRemove, inLayout); 3068 3068 } 3069 3069 } -
trunk/WebCore/rendering/RenderBlock.h
r40180 r40238 178 178 void clearFloats(); 179 179 int getClearDelta(RenderBox* child); 180 v irtual void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0);180 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, bool inLayout = true); 181 181 void markPositionedObjectsForLayout(); 182 182 -
trunk/WebCore/rendering/RenderObject.cpp
r40235 r40238 507 507 { 508 508 return (style()->top().isAuto() && style()->bottom().isAuto()) || style()->top().isStatic(); 509 }510 511 void RenderObject::markAllDescendantsWithFloatsForLayout(RenderBox*)512 {513 509 } 514 510 … … 2272 2268 2273 2269 if (outermostBlock) 2274 outermostBlock->markAllDescendantsWithFloatsForLayout(toRenderBox(this) );2270 outermostBlock->markAllDescendantsWithFloatsForLayout(toRenderBox(this), false); 2275 2271 } 2276 2272 -
trunk/WebCore/rendering/RenderObject.h
r40235 r40238 363 363 RenderObject* hoverAncestor() const; 364 364 365 virtual void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0);366 365 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0); 367 366 void setNeedsLayout(bool b, bool markParents = true); -
trunk/WebCore/rendering/RenderSVGRoot.cpp
r40143 r40238 108 108 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 109 109 if (selfNeedsLayout()) // either bounds or transform changed, force kids to relayout 110 child->setNeedsLayout(true );110 child->setNeedsLayout(true, false); 111 111 112 112 child->layoutIfNeeded(); -
trunk/WebCore/rendering/RenderTable.cpp
r40143 r40238 296 296 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 297 297 // FIXME: What about a form that has a display value that makes it a table section? 298 if (child->needsLayout() && !(child->element() && child->element()->hasTagName(formTag) ))298 if (child->needsLayout() && !(child->element() && child->element()->hasTagName(formTag) && !child->isTableSection())) 299 299 child->layout(); 300 300 if (child->isTableSection()) { -
trunk/WebCore/rendering/RenderTableSection.cpp
r40192 r40238 588 588 } 589 589 590 ASSERT(!needsLayout()); 591 590 592 statePusher.pop(); 591 593
Note: See TracChangeset
for help on using the changeset viewer.