Changeset 52566 in webkit
- Timestamp:
- Dec 26, 2009 5:27:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52565 r52566 1 2009-12-26 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 REGRESSION (r47255): Extra Large Amount of Empty Space 6 https://bugs.webkit.org/show_bug.cgi?id=32690 7 8 * fast/block/float/clear-to-fit-expected.checksum: Added. 9 * fast/block/float/clear-to-fit-expected.png: Added. 10 * fast/block/float/clear-to-fit-expected.txt: Added. 11 * fast/block/float/clear-to-fit.html: Added. 12 1 13 2009-12-26 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r52564 r52566 1 2009-12-26 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 REGRESSION (r47255): Extra Large Amount of Empty Space 6 https://bugs.webkit.org/show_bug.cgi?id=32690 7 8 Test: fast/block/float/clear-to-fit.html 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::getClearDelta): Only clear floats as needed to 12 fit the child on the line. 13 1 14 2009-12-25 Kent Tamura <tkent@chromium.org> 2 15 -
trunk/WebCore/rendering/RenderBlock.cpp
r52127 r52566 3192 3192 3193 3193 // We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default). 3194 // FIXME: Note that the remaining space checks aren't quite accurate, since you should be able to clear only some floats (the minimum # needed3195 // to fit) and not all (we should be using nextFloatBottomBelow and looping).3196 3194 int result = clearSet ? max(0, bottom - yPos) : 0; 3197 3195 if (!result && child->avoidsFloats()) { 3198 int widthAtCurrentHeight = lineWidth(yPos, false);3199 3196 int availableWidth = this->availableWidth(); 3200 if (widthAtCurrentHeight < availableWidth) { 3201 int oldYPos = child->y(); 3202 int oldWidth = child->width(); 3203 child->setY(yPos); 3197 if (child->minPrefWidth() > availableWidth) 3198 return 0; 3199 3200 int y = yPos; 3201 while (true) { 3202 int widthAtY = lineWidth(y, false); 3203 if (widthAtY == availableWidth) 3204 return y - yPos; 3205 3206 int oldChildY = child->y(); 3207 int oldChildWidth = child->width(); 3208 child->setY(y); 3204 3209 child->calcWidth(); 3205 if (child->width() > widthAtCurrentHeight && child->minPrefWidth() <= availableWidth) 3206 result = max(0, floatBottom() - yPos); 3207 child->setY(oldYPos); 3208 child->setWidth(oldWidth); 3209 } 3210 int childWidthAtY = child->width(); 3211 child->setY(oldChildY); 3212 child->setWidth(oldChildWidth); 3213 3214 if (childWidthAtY <= widthAtY) 3215 return y - yPos; 3216 3217 y = nextFloatBottomBelow(y); 3218 ASSERT(y >= yPos); 3219 if (y < yPos) 3220 break; 3221 } 3222 ASSERT_NOT_REACHED(); 3210 3223 } 3211 3224 return result;
Note: See TracChangeset
for help on using the changeset viewer.