Changeset 19493 in webkit
- Timestamp:
- Feb 7, 2007 9:12:58 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19492 r19493 1 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Maciej. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=12608 6 Incorrect min. width calculation of a series of floats with clear:both and white-space:nowrap 7 8 * fast/block/float/nowrap-clear-min-width-expected.checksum: Added. 9 * fast/block/float/nowrap-clear-min-width-expected.png: Added. 10 * fast/block/float/nowrap-clear-min-width-expected.txt: Added. 11 * fast/block/float/nowrap-clear-min-width.html: Added. 12 1 13 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r19492 r19493 1 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Maciej. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=12608 6 Incorrect min. width calculation of a series of floats with clear:both and white-space:nowrap 7 8 Test: fast/block/float/nowrap-clear-min-width.html 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::calcInlineMinMaxWidth): 12 1 13 2007-02-07 Mitz Pettel <mitz@webkit.org> 2 14 -
trunk/WebCore/rendering/RenderBlock.cpp
r19492 r19493 3506 3506 childMax += child->maxWidth(); 3507 3507 3508 bool clearPreviousFloat; 3509 if (child->isFloating()) { 3510 clearPreviousFloat = (prevFloat 3511 && (prevFloat->style()->floating() == FLEFT && (child->style()->clear() & CLEFT) 3512 || prevFloat->style()->floating() == FRIGHT && (child->style()->clear() & CRIGHT))); 3513 prevFloat = child; 3514 } else 3515 clearPreviousFloat = false; 3516 3508 3517 bool growForPrevious = shouldGrowTableCellForImage(this, child, previousLeaf); 3509 if (!growForPrevious && (autoWrap || oldAutoWrap) ) {3518 if (!growForPrevious && (autoWrap || oldAutoWrap) || clearPreviousFloat) { 3510 3519 if (m_minWidth < inlineMin) 3511 3520 m_minWidth = inlineMin; … … 3513 3522 } 3514 3523 3515 // Check our "clear" setting. If we're supposed to clear the previous float, then 3516 // go ahead and terminate maxwidth as well. 3517 if (child->isFloating()) { 3518 if (prevFloat && 3519 ((prevFloat->style()->floating() == FLEFT && (child->style()->clear() & CLEFT)) || 3520 (prevFloat->style()->floating() == FRIGHT && (child->style()->clear() & CRIGHT)))) { 3521 m_maxWidth = max(inlineMax, m_maxWidth); 3522 inlineMax = 0; 3523 } 3524 prevFloat = child; 3524 // If we're supposed to clear the previous float, then terminate maxwidth as well. 3525 if (clearPreviousFloat) { 3526 m_maxWidth = max(inlineMax, m_maxWidth); 3527 inlineMax = 0; 3525 3528 } 3526 3529
Note: See TracChangeset
for help on using the changeset viewer.