Changeset 131999 in webkit


Ignore:
Timestamp:
Oct 21, 2012 3:27:50 AM (11 years ago)
Author:
robert@webkit.org
Message:

In some float situations, the original layout is wrong and only corrects itself on repaint
https://bugs.webkit.org/show_bug.cgi?id=18939

Reviewed by Levi Weintraub.

Source/WebCore:

A <br> that follows collapsing spaces and has clearance set always needs to get a run and a linebox of its own.
This allows the line below it to check for clearance from the <br> if it gets dirtied but the line with the <br>
does not.

Test: fast/block/br-with-clearance-after-collapsing-space.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::LineBreaker::nextLineBreak):

LayoutTests:

  • fast/block/br-with-clearance-after-collapsing-space-expected.html: Added.
  • fast/block/br-with-clearance-after-collapsing-space.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r131998 r131999  
     12012-10-08  Robert Hogan  <robert@webkit.org>
     2
     3        In some float situations, the original layout is wrong and only corrects itself on repaint
     4        https://bugs.webkit.org/show_bug.cgi?id=18939
     5
     6        Reviewed by Levi Weintraub.
     7
     8        * fast/block/br-with-clearance-after-collapsing-space-expected.html: Added.
     9        * fast/block/br-with-clearance-after-collapsing-space.html: Added.
     10
    1112012-10-08  Robert Hogan  <robert@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r131998 r131999  
     12012-10-08  Robert Hogan  <robert@webkit.org>
     2
     3        In some float situations, the original layout is wrong and only corrects itself on repaint
     4        https://bugs.webkit.org/show_bug.cgi?id=18939
     5
     6        Reviewed by Levi Weintraub.
     7
     8        A <br> that follows collapsing spaces and has clearance set always needs to get a run and a linebox of its own.
     9        This allows the line below it to check for clearance from the <br> if it gets dirtied but the line with the <br>
     10        does not.
     11
     12        Test: fast/block/br-with-clearance-after-collapsing-space.html
     13
     14        * rendering/RenderBlockLineLayout.cpp:
     15        (WebCore::RenderBlock::LineBreaker::nextLineBreak):
     16
    1172012-10-08  Robert Hogan  <robert@webkit.org>
    218
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r131998 r131999  
    24042404                trailingObjects.clear();
    24052405                lineInfo.setPreviousLineBrokeCleanly(true);
     2406
     2407                // A <br> with clearance always needs a linebox in case the lines below it get dirtied later and
     2408                // need to check for floats to clear - so if we're ignoring spaces, stop ignoring them and add a
     2409                // run for this object.
     2410                if (ignoringSpaces && currentStyle->clear() != CNONE) {
     2411                    addMidpoint(lineMidpointState, InlineIterator(0, current.m_obj, 0)); // Stop ignoring spaces.
     2412                    addMidpoint(lineMidpointState, InlineIterator(0, current.m_obj, 0)); // Start ignoring again.
     2413                }
    24062414
    24072415                if (!lineInfo.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.