Changeset 128692 in webkit


Ignore:
Timestamp:
Sep 15, 2012 12:20:13 PM (12 years ago)
Author:
mitz@apple.com
Message:

REGRESSION (r125578): Word spacing not applied to newline and tab characters that are treated as spaces
https://bugs.webkit.org/show_bug.cgi?id=96865

Reviewed by Sam Weinig.

Source/WebCore:

Fixes fast/css/word-space-extra.html.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal): Changed back to apply word spacing to all characters
that are treated as spaces, except for tab characters when there are tab stops.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.

LayoutTests:

  • fast/text/atsui-negative-spacing-features.html: Reverted changes made in r128691, now that

both code paths handle newlines correctly.

  • fast/text/atsui-spacing-features.html: Ditto.
  • platform/mac/TestExpectations: Removed fast/css/word-space-extra.html.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128691 r128692  
     12012-09-15  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r125578): Word spacing not applied to newline and tab characters that are treated as spaces
     4        https://bugs.webkit.org/show_bug.cgi?id=96865
     5
     6        Reviewed by Sam Weinig.
     7
     8        * fast/text/atsui-negative-spacing-features.html: Reverted changes made in r128691, now that
     9        both code paths handle newlines correctly.
     10        * fast/text/atsui-spacing-features.html: Ditto.
     11        * platform/mac/TestExpectations: Removed fast/css/word-space-extra.html.
     12
    1132012-09-15  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/LayoutTests/fast/text/atsui-negative-spacing-features.html

    r128691 r128692  
    2727<div class="word">
    2828<div class="test rtl">
    29 &#x05d9;&#x05b0;&#x05d4;&#x05b4;&#x05d9;, &#x05d0;&#x05b8;&#x05d7;&#x05b4;&#x05d9;, &#x05dc;&#x05b0;&#x05da;&#x05b8; &#x05e1;&#x05b5;&#x05e4;&#x05b6;&#x05e8; &#x05e9;&#x05c1;&#x05b0;&#x05dc;&#x05b7;&#x05d7;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;  &#x05d5;&#x05bc;&#x05de;&#x05b4;&#x05de;&#x05b0;&#x05db;&#x05bc;&#x05b6;&#x05e8;&#x05b6;&#x05ea;  &#x05e6;&#x05b0;&#x05de;&#x05b4;&#x05d9;&#x05ea;&#x05d5;&#x05bc;&#x05ea; &#x05dc;&#x05b8;&#x05da;&#x05b0; &#x05de;&#x05b0;&#x05db;&#x05b7;&#x05e8;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;.</div>
     29&#x05d9;&#x05b0;&#x05d4;&#x05b4;&#x05d9;,
     30&#x05d0;&#x05b8;&#x05d7;&#x05b4;&#x05d9;,
     31&#x05dc;&#x05b0;&#x05da;&#x05b8;
     32&#x05e1;&#x05b5;&#x05e4;&#x05b6;&#x05e8;
     33&#x05e9;&#x05c1;&#x05b0;&#x05dc;&#x05b7;&#x05d7;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;
     34&#x05d5;&#x05bc;&#x05de;&#x05b4;&#x05de;&#x05b0;&#x05db;&#x05bc;&#x05b6;&#x05e8;&#x05b6;&#x05ea;
     35&#x05e6;&#x05b0;&#x05de;&#x05b4;&#x05d9;&#x05ea;&#x05d5;&#x05bc;&#x05ea;
     36&#x05dc;&#x05b8;&#x05da;&#x05b0;
     37&#x05de;&#x05b0;&#x05db;&#x05b7;&#x05e8;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;.
     38</div>
    3039<div class="test">
    3140Lore&#x0300;m ipsum dolor sit ame&#x0300;t, consectetuer adipiscing e&#x0300;lit.
  • trunk/LayoutTests/fast/text/atsui-spacing-features.html

    r128691 r128692  
    2929<div class="word">
    3030<div class="test rtl">
    31 &#x05d9;&#x05b0;&#x05d4;&#x05b4;&#x05d9;, &#x05d0;&#x05b8;&#x05d7;&#x05b4;&#x05d9;, &#x05dc;&#x05b0;&#x05da;&#x05b8; &#x05e1;&#x05b5;&#x05e4;&#x05b6;&#x05e8; &#x05e9;&#x05c1;&#x05b0;&#x05dc;&#x05b7;&#x05d7;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5; &#x05d5;&#x05bc;&#x05de;&#x05b4;&#x05de;&#x05b0;&#x05db;&#x05bc;&#x05b6;&#x05e8;&#x05b6;&#x05ea;  &#x05e6;&#x05b0;&#x05de;&#x05b4;&#x05d9;&#x05ea;&#x05d5;&#x05bc;&#x05ea; &#x05dc;&#x05b8;&#x05da;&#x05b0; &#x05de;&#x05b0;&#x05db;&#x05b7;&#x05e8;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;.</div>
     31&#x05d9;&#x05b0;&#x05d4;&#x05b4;&#x05d9;,
     32&#x05d0;&#x05b8;&#x05d7;&#x05b4;&#x05d9;,
     33&#x05dc;&#x05b0;&#x05da;&#x05b8;
     34&#x05e1;&#x05b5;&#x05e4;&#x05b6;&#x05e8;
     35&#x05e9;&#x05c1;&#x05b0;&#x05dc;&#x05b7;&#x05d7;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;
     36&#x05d5;&#x05bc;&#x05de;&#x05b4;&#x05de;&#x05b0;&#x05db;&#x05bc;&#x05b6;&#x05e8;&#x05b6;&#x05ea;
     37&#x05e6;&#x05b0;&#x05de;&#x05b4;&#x05d9;&#x05ea;&#x05d5;&#x05bc;&#x05ea;
     38&#x05dc;&#x05b8;&#x05da;&#x05b0;
     39&#x05de;&#x05b0;&#x05db;&#x05b7;&#x05e8;&#x05b0;&#x05ea;&#x05bc;&#x05b4;&#x05d9;&#x05d5;.
     40</div>
    3241<div class="test">
    3342Lore&#x0300;m ipsum dolor sit ame&#x0300;t, consectetuer adipiscing e&#x0300;lit.
  • trunk/LayoutTests/platform/mac/TestExpectations

    r128691 r128692  
    318318BUGWK93636 : http/tests/images/jpg-img-partial-load.html = TEXT
    319319
    320 // Require rebaselining after  https://bugs.webkit.org/show_bug.cgi?id=89826
    321 BUGWK89826 : fast/css/word-space-extra.html = TEXT
    322 
    323320// Added by bug 89826
    324321BUGWK94008 : fast/css/word-spacing-characters.html = IMAGE
  • trunk/Source/WebCore/ChangeLog

    r128691 r128692  
     12012-09-15  Dan Bernstein  <mitz@apple.com>
     2
     3        REGRESSION (r125578): Word spacing not applied to newline and tab characters that are treated as spaces
     4        https://bugs.webkit.org/show_bug.cgi?id=96865
     5
     6        Reviewed by Sam Weinig.
     7
     8        Fixes fast/css/word-space-extra.html.
     9
     10        * platform/graphics/WidthIterator.cpp:
     11        (WebCore::WidthIterator::advanceInternal): Changed back to apply word spacing to all characters
     12        that are treated as spaces, except for tab characters when there are tab stops.
     13        * platform/graphics/mac/ComplexTextController.cpp:
     14        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
     15
    1162012-09-15  Dan Bernstein  <mitz@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r128504 r128692  
    182182                // Account for word spacing.
    183183                // We apply additional space between "words" by adding width to the space character.
    184                 // Word-spacing affects each space (U+0020) and non-breaking space (U+00A0).
    185                 if ((character == noBreakSpace || character == ' ') && textIterator.currentCharacter() && m_font->wordSpacing())
     184                if (treatAsSpace && (character != '\t' || !m_run.allowTabs()) && textIterator.currentCharacter() && m_font->wordSpacing())
    186185                    width += m_font->wordSpacing();
    187186            } else
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r128691 r128692  
    636636
    637637                    // Account for word-spacing.
    638                     if ((ch == noBreakSpace || ch == ' ') && (characterIndex > 0 || r > 0) && m_font.wordSpacing())
     638                    if (treatAsSpace && (ch != '\t' || !m_run.allowTabs()) && (characterIndex > 0 || r > 0) && m_font.wordSpacing())
    639639                        advance.width += m_font.wordSpacing();
    640640                } else
Note: See TracChangeset for help on using the changeset viewer.