Title: [128692] trunk
Revision
128692
Author
[email protected]
Date
2012-09-15 12:20:13 -0700 (Sat, 15 Sep 2012)

Log 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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128691 => 128692)


--- trunk/LayoutTests/ChangeLog	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/LayoutTests/ChangeLog	2012-09-15 19:20:13 UTC (rev 128692)
@@ -1,5 +1,17 @@
 2012-09-15  Dan Bernstein  <[email protected]>
 
+        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.
+
+        * 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.
+
+2012-09-15  Dan Bernstein  <[email protected]>
+
         REGRESSION (r125578): The Mac complex text code path disagrees with the fast path on word spacing
         https://bugs.webkit.org/show_bug.cgi?id=96857
 

Modified: trunk/LayoutTests/fast/text/atsui-negative-spacing-features.html (128691 => 128692)


--- trunk/LayoutTests/fast/text/atsui-negative-spacing-features.html	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/LayoutTests/fast/text/atsui-negative-spacing-features.html	2012-09-15 19:20:13 UTC (rev 128692)
@@ -26,7 +26,16 @@
 <td>
 <div class="word">
 <div class="test rtl">
-&#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>
+&#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>
 <div class="test">
 Lore&#x0300;m ipsum dolor sit ame&#x0300;t, consectetuer adipiscing e&#x0300;lit.
 </div>

Modified: trunk/LayoutTests/fast/text/atsui-spacing-features.html (128691 => 128692)


--- trunk/LayoutTests/fast/text/atsui-spacing-features.html	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/LayoutTests/fast/text/atsui-spacing-features.html	2012-09-15 19:20:13 UTC (rev 128692)
@@ -28,7 +28,16 @@
 <td>
 <div class="word">
 <div class="test rtl">
-&#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>
+&#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>
 <div class="test">
 Lore&#x0300;m ipsum dolor sit ame&#x0300;t, consectetuer adipiscing e&#x0300;lit.
 </div>

Modified: trunk/LayoutTests/platform/mac/TestExpectations (128691 => 128692)


--- trunk/LayoutTests/platform/mac/TestExpectations	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2012-09-15 19:20:13 UTC (rev 128692)
@@ -317,9 +317,6 @@
 // (r125185) http/tests/images/jpg-img-partial-load.html timeout on Lion
 BUGWK93636 : http/tests/images/jpg-img-partial-load.html = TEXT
 
-// Require rebaselining after  https://bugs.webkit.org/show_bug.cgi?id=89826
-BUGWK89826 : fast/css/word-space-extra.html = TEXT
-
 // Added by bug 89826 
 BUGWK94008 : fast/css/word-spacing-characters.html = IMAGE
 

Modified: trunk/Source/WebCore/ChangeLog (128691 => 128692)


--- trunk/Source/WebCore/ChangeLog	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/Source/WebCore/ChangeLog	2012-09-15 19:20:13 UTC (rev 128692)
@@ -1,5 +1,20 @@
 2012-09-15  Dan Bernstein  <[email protected]>
 
+        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.
+
+        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.
+
+2012-09-15  Dan Bernstein  <[email protected]>
+
         REGRESSION (r125578): The Mac complex text code path disagrees with the fast path on word spacing
         https://bugs.webkit.org/show_bug.cgi?id=96857
 

Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (128691 => 128692)


--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp	2012-09-15 19:20:13 UTC (rev 128692)
@@ -181,8 +181,7 @@
 
                 // Account for word spacing.
                 // We apply additional space between "words" by adding width to the space character.
-                // Word-spacing affects each space (U+0020) and non-breaking space (U+00A0).
-                if ((character == noBreakSpace || character == ' ') && textIterator.currentCharacter() && m_font->wordSpacing())
+                if (treatAsSpace && (character != '\t' || !m_run.allowTabs()) && textIterator.currentCharacter() && m_font->wordSpacing())
                     width += m_font->wordSpacing();
             } else
                 m_isAfterExpansion = false;

Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (128691 => 128692)


--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2012-09-15 16:27:08 UTC (rev 128691)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp	2012-09-15 19:20:13 UTC (rev 128692)
@@ -635,7 +635,7 @@
                         m_afterExpansion = false;
 
                     // Account for word-spacing.
-                    if ((ch == noBreakSpace || ch == ' ') && (characterIndex > 0 || r > 0) && m_font.wordSpacing())
+                    if (treatAsSpace && (ch != '\t' || !m_run.allowTabs()) && (characterIndex > 0 || r > 0) && m_font.wordSpacing())
                         advance.width += m_font.wordSpacing();
                 } else
                     m_afterExpansion = false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to