Changeset 19493 in webkit


Ignore:
Timestamp:
Feb 7, 2007 9:12:58 PM (17 years ago)
Author:
bdash
Message:

2007-02-07 Mitz Pettel <mitz@webkit.org>

Reviewed by Maciej.

Test: fast/block/float/nowrap-clear-min-width.html

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlineMinMaxWidth):

2007-02-07 Mitz Pettel <mitz@webkit.org>

Reviewed by Maciej.

  • fast/block/float/nowrap-clear-min-width-expected.checksum: Added.
  • fast/block/float/nowrap-clear-min-width-expected.png: Added.
  • fast/block/float/nowrap-clear-min-width-expected.txt: Added.
  • fast/block/float/nowrap-clear-min-width.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19492 r19493  
     12007-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
    1132007-02-07  Mitz Pettel  <mitz@webkit.org>
    214
  • trunk/WebCore/ChangeLog

    r19492 r19493  
     12007-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
    1132007-02-07  Mitz Pettel  <mitz@webkit.org>
    214
  • trunk/WebCore/rendering/RenderBlock.cpp

    r19492 r19493  
    35063506                childMax += child->maxWidth();
    35073507
     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               
    35083517                bool growForPrevious = shouldGrowTableCellForImage(this, child, previousLeaf);
    3509                 if (!growForPrevious && (autoWrap || oldAutoWrap)) {
     3518                if (!growForPrevious && (autoWrap || oldAutoWrap) || clearPreviousFloat) {
    35103519                    if (m_minWidth < inlineMin)
    35113520                        m_minWidth = inlineMin;
     
    35133522                }
    35143523
    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;
    35253528                }
    35263529               
Note: See TracChangeset for help on using the changeset viewer.