Changeset 148223 in webkit


Ignore:
Timestamp:
Apr 11, 2013 12:17:12 PM (11 years ago)
Author:
robert@webkit.org
Message:

REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
https://bugs.webkit.org/show_bug.cgi?id=114311

Reviewed by Emil A Eklund.

Source/WebCore:

When we hit an empty inline in line layout and try to detect whether it has any whitespace after it that we ought to ignore, then
we need to skip past out-of-flow and floating objects when looking for that whitespace. Failure to do so will result in us
adding the width from the first space we encounter to our line width and over-estimating the real width of the line.

We're hitting this bug now because we have broadened the category of empty inlines that get lineboxes so we go into line layout
and have to deal with them and their subsequent whitespace there. Previously this sort of whitespace would have been simply
consumed by |skipLeadingWhitespace|.

Test: fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::shouldSkipWhitespaceAfterStartObject):

LayoutTests:

  • fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline-expected.txt: Added.
  • fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148221 r148223  
     12013-04-11  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
     4        https://bugs.webkit.org/show_bug.cgi?id=114311
     5
     6        Reviewed by Emil A Eklund.
     7
     8        * fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline-expected.txt: Added.
     9        * fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html: Added.
     10
    1112013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r148221 r148223  
     12013-04-11  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
     4        https://bugs.webkit.org/show_bug.cgi?id=114311
     5
     6        Reviewed by Emil A Eklund.
     7
     8        When we hit an empty inline in line layout and try to detect whether it has any whitespace after it that we ought to ignore, then
     9        we need to skip past out-of-flow and floating objects when looking for that whitespace. Failure to do so will result in us
     10        adding the width from the first space we encounter to our line width and over-estimating the real width of the line.
     11
     12        We're hitting this bug now because we have broadened the category of empty inlines that get lineboxes so we go into line layout
     13        and have to deal with them and their subsequent whitespace there. Previously this sort of whitespace would have been simply
     14        consumed by |skipLeadingWhitespace|.
     15
     16        Test: fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html
     17
     18        * rendering/RenderBlockLineLayout.cpp:
     19        (WebCore::shouldSkipWhitespaceAfterStartObject):
     20
    1212013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
    222
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r148121 r148223  
    24482448{
    24492449    RenderObject* next = bidiNextSkippingEmptyInlines(block, o);
     2450    while (next && next->isFloatingOrOutOfFlowPositioned())
     2451        next = bidiNextSkippingEmptyInlines(block, next);
     2452
    24502453    if (next && !next->isBR() && next->isText() && toRenderText(next)->textLength() > 0) {
    24512454        RenderText* nextText = toRenderText(next);
Note: See TracChangeset for help on using the changeset viewer.