Changeset 35354 in webkit


Ignore:
Timestamp:
Jul 25, 2008 1:21:06 PM (16 years ago)
Author:
mitz@apple.com
Message:

WebCore:

2008-07-25 Jacob Refstrup <jacob.refstrup@hp.com>

Reviewed by mitz.


Test: fast/block/float/editable-text-overlapping-float.html

  • rendering/RenderBlock.h:
  • rendering/bidi.cpp: (WebCore::RenderBlock::skipTrailingWhitespace):
  • renamed to reflect usage and removed call to position floats; they only get added (WebCore::RenderBlock::skipLeadingWhitespace):
  • renamed to reflect usage (WebCore::RenderBlock::findNextLineBreak):
  • use skipTrailingWhitespace at end of line (as before but with new name)

LayoutTests:

2008-07-25 Jacob Refstrup <jacob.refstrup@hp.com>

Reviewed by mitz.


  • fast/block/float/editable-text-overlapping-float.html: Added.
  • platform/mac/fast/block/float/editable-text-overlapping-float-expected.checksum: Added.
  • platform/mac/fast/block/float/editable-text-overlapping-float-expected.png: Added.
  • platform/mac/fast/block/float/editable-text-overlapping-float-expected.txt: Added.
  • platform/qt/fast/block/float/editable-text-overlapping-float-expected.txt: Added.
Location:
trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r35351 r35354  
     12008-07-25  Jacob Refstrup  <jacob.refstrup@hp.com>
     2
     3        Reviewed by mitz.
     4       
     5        - added test case for float being added in trailing whitespace
     6          of an already full line (with pre-wrap or after-white-space set).
     7          <rdar://problem/5805741> https://bugs.webkit.org/show_bug.cgi?id=17906
     8
     9        * fast/block/float/editable-text-overlapping-float.html: Added.
     10        * platform/mac/fast/block/float/editable-text-overlapping-float-expected.checksum: Added.
     11        * platform/mac/fast/block/float/editable-text-overlapping-float-expected.png: Added.
     12        * platform/mac/fast/block/float/editable-text-overlapping-float-expected.txt: Added.
     13        * platform/qt/fast/block/float/editable-text-overlapping-float-expected.txt: Added.
     14
    1152008-07-24  David Hyatt  <hyatt@apple.com>
    216
  • trunk/WebCore/ChangeLog

    r35352 r35354  
     12008-07-25  Jacob Refstrup  <jacob.refstrup@hp.com>
     2
     3        Reviewed by mitz.
     4
     5        - fix https://bugs.webkit.org/show_bug.cgi?id=17906
     6        <rdar://problem/5805741> white-space: pre-wrap or -webkit-line-break: after-white-space text can overlap float at end of line
     7       
     8        Test: fast/block/float/editable-text-overlapping-float.html
     9
     10        * rendering/RenderBlock.h:
     11        * rendering/bidi.cpp:
     12        (WebCore::RenderBlock::skipTrailingWhitespace):
     13        - renamed to reflect usage and removed call to position floats;
     14          they only get added
     15        (WebCore::RenderBlock::skipLeadingWhitespace):
     16        - renamed to reflect usage
     17        (WebCore::RenderBlock::findNextLineBreak):
     18        - use skipTrailingWhitespace at end of line (as before but with new
     19          name)
     20
    1212008-07-25  Dan Bernstein  <mitz@apple.com>
    222
  • trunk/WebCore/rendering/RenderBlock.h

    r35015 r35354  
    146146                        RootInlineBox*& endLine, int& endYPos, int& repaintBottom, int& repaintTop);
    147147    bool generatesLineBoxesForInlineChild(RenderObject*);
    148     int skipWhitespace(InlineIterator&);
    149     int skipWhitespace(InlineBidiResolver&);
     148    void skipTrailingWhitespace(InlineIterator&);
     149    int skipLeadingWhitespace(InlineBidiResolver&);
    150150    void fitBelowFloats(int widthToFit, int& availableWidth);
    151151    InlineIterator findNextLineBreak(InlineBidiResolver&, EClear* clear = 0);
  • trunk/WebCore/rendering/bidi.cpp

    r35148 r35354  
    14371437}
    14381438
    1439 // FIXME: The entire concept of the skipWhitespace function is flawed, since we really need to be building
     1439// FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building
    14401440// line boxes even for containers that may ultimately collapse away.  Otherwise we'll never get positioned
    14411441// elements quite right.  In other words, we need to build this function's work into the normal line
    14421442// object iteration process.
    1443 int RenderBlock::skipWhitespace(InlineIterator& iterator)
    1444 {
    1445     int availableWidth = lineWidth(m_height);
     1443// NB. this function will insert any floating elements that would otherwise
     1444// be skipped but it will not position them.
     1445void RenderBlock::skipTrailingWhitespace(InlineIterator& iterator)
     1446{
    14461447    while (!iterator.atEnd() && !requiresLineBox(iterator)) {
    14471448        RenderObject* object = iterator.obj;
    14481449        if (object->isFloating()) {
    14491450            insertFloatingObject(object);
    1450             positionNewFloats();
    1451             availableWidth = lineWidth(m_height);
    14521451        } else if (object->isPositioned()) {
    14531452            // FIXME: The math here is actually not really right.  It's a best-guess approximation that
     
    14741473        iterator.increment();
    14751474    }
    1476     return availableWidth;
    1477 }
    1478 
    1479 int RenderBlock::skipWhitespace(InlineBidiResolver& resolver)
     1475}
     1476
     1477int RenderBlock::skipLeadingWhitespace(InlineBidiResolver& resolver)
    14801478{
    14811479    int availableWidth = lineWidth(m_height);
     
    15601558    bool appliedStartWidth = resolver.position().pos > 0;
    15611559
    1562     int width = skipWhitespace(resolver);
     1560    int width = skipLeadingWhitespace(resolver);
    15631561
    15641562    int w = 0;
     
    18791877                                lBreak.obj = o;
    18801878                                lBreak.pos = pos;
    1881                                 skipWhitespace(lBreak);
     1879                                skipTrailingWhitespace(lBreak);
    18821880                            }
    18831881                        }
Note: See TracChangeset for help on using the changeset viewer.