Changeset 153061 in webkit


Ignore:
Timestamp:
Jul 23, 2013 12:47:34 PM (11 years ago)
Author:
Alan Bujtas
Message:

REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435

Reviewed by David Hyatt.

When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.

Source/WebCore:

Test: fast/text/whitespace/inline-whitespace-wrapping-12.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::canBreakAtThisPosition):

LayoutTests:

  • fast/text/whitespace/inline-whitespace-wrapping-12-expected.html: Added.
  • fast/text/whitespace/inline-whitespace-wrapping-12.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r153060 r153061  
     12013-07-23  Zalan Bujtas  <zalan@apple.com>
     2
     3        REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
     4        https://bugs.webkit.org/show_bug.cgi?id=118435
     5
     6        Reviewed by David Hyatt.
     7
     8        When we find an empty inline in the middle of the word, prefer breaking it before
     9        instead of after to match other browsers' rendering.
     10
     11        * fast/text/whitespace/inline-whitespace-wrapping-12-expected.html: Added.
     12        * fast/text/whitespace/inline-whitespace-wrapping-12.html: Added.
     13
    1142013-07-23  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r153060 r153061  
     12013-07-23  Zalan Bujtas  <zalan@apple.com>
     2
     3        REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
     4        https://bugs.webkit.org/show_bug.cgi?id=118435
     5
     6        Reviewed by David Hyatt.
     7
     8        When we find an empty inline in the middle of the word, prefer breaking it before
     9        instead of after to match other browsers' rendering.
     10
     11        Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
     12
     13        * rendering/RenderBlockLineLayout.cpp:
     14        (WebCore::canBreakAtThisPosition):
     15
    1162013-07-23  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r153058 r153061  
    29082908    bool canPlaceOnLine = width.fitsOnLine() || !autoWrapWasEverTrueOnLine;
    29092909
    2910     // If we are an empty inline in the middle of a word and don't fit on the line then clear any line break we have and find
    2911     // one in the following text instead.
    2912     if (!canPlaceOnLine && !canBreakHere && isEmptyInline(current.m_obj))
    2913         lBreak.clear();
    2914     else if (canPlaceOnLine && canBreakHere)
     2910    if (canPlaceOnLine && canBreakHere)
    29152911        commitLineBreakAtCurrentWidth(width, lBreak, next);
    29162912
Note: See TracChangeset for help on using the changeset viewer.