Changeset 30551 in webkit


Ignore:
Timestamp:
Feb 24, 2008 10:48:27 AM (16 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Darin Adler.

  • fix float positioning when a float that does not fit on the line is followed by a float that does

Test: fast/block/float/narrow-after-wide.html

  • rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Changed to not position any more floats on the line once a float that does not fit is encountered. That float should be pushed to the next line, and so should all floats that follow, regardless of whether they can fit on the current line.

LayoutTests:

Reviewed by Darin Adler.

  • test float positioning when a float that does not fit on the line is followed by a float that does
  • fast/block/float/narrow-after-wide.html: Added.
  • platform/mac/fast/block/float/narrow-after-wide-expected.checksum: Added.
  • platform/mac/fast/block/float/narrow-after-wide-expected.png: Added.
  • platform/mac/fast/block/float/narrow-after-wide-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r30549 r30551  
     12008-02-24  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - test float positioning when a float that does not fit on the line is
     6          followed by a float that does
     7
     8        * fast/block/float/narrow-after-wide.html: Added.
     9        * platform/mac/fast/block/float/narrow-after-wide-expected.checksum: Added.
     10        * platform/mac/fast/block/float/narrow-after-wide-expected.png: Added.
     11        * platform/mac/fast/block/float/narrow-after-wide-expected.txt: Added.
     12
    1132008-02-24  Darin Adler  <darin@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r30549 r30551  
     12008-02-24  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix float positioning when a float that does not fit on the line is
     6          followed by a float that does
     7
     8        Test: fast/block/float/narrow-after-wide.html
     9
     10        * rendering/bidi.cpp:
     11        (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
     12        more floats on the line once a float that does not fit is encountered.
     13        That float should be pushed to the next line, and so should all floats
     14        that follow, regardless of whether they can fit on the current line.
     15
    1162008-02-24  Darin Adler  <darin@apple.com>
    217
  • trunk/WebCore/rendering/bidi.cpp

    r30530 r30551  
    14081408
    14091409    bool autoWrapWasEverTrueOnLine = false;
     1410    bool floatsFitOnLine = true;
    14101411   
    14111412    // Firefox and Opera will allow a table cell to grow to fit an image inside it under
    1412     // very specific cirucumstances (in order to match common WinIE renderings).
     1413    // very specific circumstances (in order to match common WinIE renderings).
    14131414    // Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
    14141415    bool allowImagesToBreak = !style()->htmlHacks() || !isTableCell() || !style()->width().isIntrinsicOrAuto();
     
    14641465                // If it does, position it now, otherwise, position
    14651466                // it after moving to next line (in newLine() func)
    1466                 if (o->width() + o->marginLeft() + o->marginRight() + w + tmpW <= width) {
     1467                if (floatsFitOnLine && o->width() + o->marginLeft() + o->marginRight() + w + tmpW <= width) {
    14671468                    positionNewFloats();
    14681469                    width = lineWidth(m_height);
    1469                 }
     1470                } else
     1471                    floatsFitOnLine = false;
    14701472            } else if (o->isPositioned()) {
    14711473                // If our original display wasn't an inline type, then we can
Note: See TracChangeset for help on using the changeset viewer.