Changeset 136034 in webkit


Ignore:
Timestamp:
Nov 28, 2012, 11:43:24 AM (12 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/12645085> REGRESSION (r130851): With kerning enabled, a white-space: pre-wrap inline starting with tab+space has the wrong width
https://bugs.webkit.org/show_bug.cgi?id=103541

Reviewed by Anders Carlsson.

Source/WebCore:

Test: fast/text/tab-with-kerning.html

When kerning is enabled, words are measured with their trailing space, then the width of a
space is subtracted. The logic to do this was incorrectly being invoked even when the
trailing whitespace character was a tab or a newline.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to check only for the space
character, not other space-like characters.

LayoutTests:

  • fast/text/tab-with-kerning-expected.html: Added.
  • fast/text/tab-with-kerning.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r136031 r136034  
     12012-11-28  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/12645085> REGRESSION (r130851): With kerning enabled, a white-space: pre-wrap inline starting with tab+space has the wrong width
     4        https://bugs.webkit.org/show_bug.cgi?id=103541
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * fast/text/tab-with-kerning-expected.html: Added.
     9        * fast/text/tab-with-kerning.html: Added.
     10
    1112012-11-28  Nate Chapin  <japhet@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r136031 r136034  
     12012-11-28  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/12645085> REGRESSION (r130851): With kerning enabled, a white-space: pre-wrap inline starting with tab+space has the wrong width
     4        https://bugs.webkit.org/show_bug.cgi?id=103541
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Test: fast/text/tab-with-kerning.html
     9
     10        When kerning is enabled, words are measured with their trailing space, then the width of a
     11        space is subtracted. The logic to do this was incorrectly being invoked even when the
     12        trailing whitespace character was a tab or a newline.
     13
     14        * rendering/RenderBlockLineLayout.cpp:
     15        (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to check only for the space
     16        character, not other space-like characters.
     17
    1182012-11-28  Nate Chapin  <japhet@chromium.org>
    219
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r135750 r136034  
    26372637                   
    26382638                    float additionalTmpW;
    2639                     if (wordTrailingSpaceWidth && currentCharacterIsSpace)
     2639                    if (wordTrailingSpaceWidth && c == ' ')
    26402640                        additionalTmpW = textWidth(t, lastSpace, current.m_pos + 1 - lastSpace, f, width.currentWidth(), isFixedPitch, collapseWhiteSpace, &wordMeasurement.fallbackFonts, textLayout) - wordTrailingSpaceWidth;
    26412641                    else
Note: See TracChangeset for help on using the changeset viewer.