Changeset 132205 in webkit


Ignore:
Timestamp:
Oct 23, 2012 5:10:10 AM (12 years ago)
Author:
allan.jensen@digia.com
Message:

[Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails
https://bugs.webkit.org/show_bug.cgi?id=98876

Reviewed by Simon Hausmann.

Source/WebCore:

Do not add word-spacing for leading space. This matches what simple path font-width does.

Tested by existing tests.

  • platform/graphics/qt/FontQt.cpp:

(WebCore::Font::floatWidthForComplexText):

LayoutTests:

Unskip passing word-width tests.

  • platform/qt/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r132204 r132205  
     12012-10-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=98876
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Unskip passing word-width tests.
     9
     10        * platform/qt/TestExpectations:
     11
    1122012-10-23  Dongwoo Joshua Im  <dw.im@samsung.com>
    213
  • trunk/LayoutTests/platform/qt/TestExpectations

    r132190 r132205  
    17481748fast/text/wide-zero-width-space.html
    17491749fast/text/word-break-soft-hyphen.html
    1750 fast/text/word-space.html
    17511750
    17521751# ------- failures due to missing support for particular XSLT features
     
    18671866# https://bugs.webkit.org/show_bug.cgi?id=98751
    18681867fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
    1869 
    1870 # [Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails
    1871 # https://bugs.webkit.org/show_bug.cgi?id=98876
    1872 fast/text/word-space-with-kerning.html
    18731868
    18741869# ============================================================================= #
  • trunk/Source/WebCore/ChangeLog

    r132202 r132205  
     12012-10-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=98876
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Do not add word-spacing for leading space. This matches what simple path font-width does.
     9
     10        Tested by existing tests.
     11
     12        * platform/graphics/qt/FontQt.cpp:
     13        (WebCore::Font::floatWidthForComplexText):
     14
    1152012-10-23  Alexander Pavlov  <apavlov@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/qt/FontQt.cpp

    r127801 r132205  
    211211    float x1 = line.cursorToX(0);
    212212    float x2 = line.cursorToX(run.length());
    213     const float width = qAbs(x2 - x1);
     213    float width = qAbs(x2 - x1);
     214    // RenderBlockLineLayout expects us to only add word-spacing for trailing spaces, not for leading spaces.
     215    if (treatAsSpace(run[0]))
     216        width -= m_wordSpacing;
    214217
    215218    return width + run.expansion();
Note: See TracChangeset for help on using the changeset viewer.