[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 16:15:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 375b7b0bc689e8cdf05cfce01cea2e39742ceb3b
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 20 01:52:03 2010 +0000

    2010-11-19  James Simonsen  <simonjam at chromium.org>
    
            Reviewed by Tony Chang.
    
            [chromium] Fix whitespace character handling in complex text on linux
            https://bugs.webkit.org/show_bug.cgi?id=49771
    
            * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum: Remove null glyph from expected output.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png: Ditto.
            * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt: Ditto.
            * platform/chromium-linux/fast/text/wide-zero-width-space-expected.checksum: Added. Now passes on Linux.
            * platform/chromium-linux/fast/text/wide-zero-width-space-expected.png: Added.
            * platform/chromium-linux/fast/text/wide-zero-width-space-expected.txt: Added.
            * platform/chromium/test_expectations.txt: Removed LINUX from wide-zero-width-space.
    2010-11-19  James Simonsen  <simonjam at chromium.org>
    
            Reviewed by Tony Chang.
    
            [chromium] Fix whitespace character handling in complex text on linux
            https://bugs.webkit.org/show_bug.cgi?id=49771
    
            * platform/graphics/SimpleFontData.h:
            (WebCore::SimpleFontData::isZeroWidthSpaceGlyph): Added.
            (WebCore::SimpleFontData::boundsForGlyph): Use isZeroWidthSpaceGlyph().
            (WebCore::SimpleFontData::widthForGlyph): Use isZeroWidthSpaceGlyph().
            * platform/graphics/chromium/FontLinux.cpp:
            (WebCore::TextRunWalker::nextScriptRun): Cache currently used font data.
            (WebCore::TextRunWalker::setGlyphXPositions): Skip zero width spaces.
            (WebCore::TextRunWalker::normalizeSpacesAndMirrorChars): Normalize zero width spaces.
            (WebCore::TextRunWalker::getNormalizedTextRun):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6cbae85..961cfe8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-19  James Simonsen  <simonjam at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [chromium] Fix whitespace character handling in complex text on linux
+        https://bugs.webkit.org/show_bug.cgi?id=49771
+
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum: Remove null glyph from expected output.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png: Ditto.
+        * platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt: Ditto.
+        * platform/chromium-linux/fast/text/wide-zero-width-space-expected.checksum: Added. Now passes on Linux.
+        * platform/chromium-linux/fast/text/wide-zero-width-space-expected.png: Added.
+        * platform/chromium-linux/fast/text/wide-zero-width-space-expected.txt: Added.
+        * platform/chromium/test_expectations.txt: Removed LINUX from wide-zero-width-space.
+
 2010-11-19  Mihai Parparita  <mihaip at chromium.org>
 
         Unreviewed Chromium/Mac rebaseline.
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum
index 49b05f9..4abb9b4 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.checksum
@@ -1 +1 @@
-1142fd714fd855c17175c5e206d83087
\ No newline at end of file
+25f7911d4440b5415ffb5d0447e6c421
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png
index b938889..7fa2e13 100644
Binary files a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt
index efbbfc7..907edcb 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-001-expected.txt
@@ -13,7 +13,7 @@ layer at (0,0) size 800x164
           text run at (281,0) width 30 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
           text run at (311,0) width 170: "\", separated with line-break."
       RenderBlock {P} at (0,92) size 784x40
-        RenderText {#text} at (0,0) size 70x39
+        RenderText {#text} at (0,0) size 60x39
           text run at (0,0) width 30 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
           text run at (30,0) width 0: " "
-          text run at (0,20) width 70 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
+          text run at (0,20) width 60 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum
index f2dbfcb..5f3017f 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.checksum
@@ -1 +1 @@
-fb218de9f6d39ee4f23cfae12c210ff0
\ No newline at end of file
+55d9ff5b1bdc9b173773f33696833b50
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png
index 55c5840..ca5a623 100644
Binary files a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt
index 23de4da..3a734c9 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-002-expected.txt
@@ -13,5 +13,5 @@ layer at (0,0) size 800x144
           text run at (281,0) width 30 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
           text run at (311,0) width 144: "\", separated with space."
       RenderBlock {P} at (0,92) size 784x20
-        RenderText {#text} at (0,0) size 104x19
-          text run at (0,0) width 104 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4} \x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
+        RenderText {#text} at (0,0) size 94x19
+          text run at (0,0) width 94 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4} \x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum
index f2dbfcb..5f3017f 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.checksum
@@ -1 +1 @@
-fb218de9f6d39ee4f23cfae12c210ff0
\ No newline at end of file
+55d9ff5b1bdc9b173773f33696833b50
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png
index 55c5840..ca5a623 100644
Binary files a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt
index 23de4da..3a734c9 100644
--- a/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt
+++ b/LayoutTests/platform/chromium-linux/fast/text/international/bidi-linebreak-003-expected.txt
@@ -13,5 +13,5 @@ layer at (0,0) size 800x144
           text run at (281,0) width 30 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
           text run at (311,0) width 144: "\", separated with space."
       RenderBlock {P} at (0,92) size 784x20
-        RenderText {#text} at (0,0) size 104x19
-          text run at (0,0) width 104 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4} \x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
+        RenderText {#text} at (0,0) size 94x19
+          text run at (0,0) width 94 RTL: "\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4} \x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}\x{D}\x{5E9}\x{5D5}\x{5BC}\x{5E8}\x{5D4}"
diff --git a/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.checksum
new file mode 100644
index 0000000..14aeef2
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.checksum
@@ -0,0 +1 @@
+3d1f4bf1b915ec56d6b8df42d7f05d84
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.png b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.png
new file mode 100644
index 0000000..1427dac
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.txt
new file mode 100644
index 0000000..ee661d4
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/wide-zero-width-space-expected.txt
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 51x19
+          text run at (0,0) width 51: "Test for "
+        RenderInline {I} at (0,0) size 608x19
+          RenderInline {A} at (0,0) size 305x19 [color=#0000EE]
+            RenderText {#text} at (51,0) size 305x19
+              text run at (51,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=13178"
+          RenderText {#text} at (356,0) size 303x19
+            text run at (356,0) width 4: " "
+            text run at (360,0) width 299: "Helvetica zero-width space has non-zero width"
+        RenderText {#text} at (659,0) size 4x19
+          text run at (659,0) width 4: "."
+      RenderBlock {P} at (0,36) size 784x20
+        RenderText {#text} at (0,0) size 247x19
+          text run at (0,0) width 247: "The following lines should all be identical."
+      RenderBlock {DIV} at (0,72) size 784x42
+        RenderText {#text} at (0,0) size 384x41
+          text run at (0,0) width 384: "Lor\x{E9}m\x{200B}ipsum\x{200E}dolor\x{1F}sit"
+      RenderBlock {DIV} at (0,114) size 784x42
+        RenderText {#text} at (0,0) size 384x41
+          text run at (0,0) width 384: "Lore\x{301}m\x{200B}ipsum\x{200E}dolor\x{1F}sit"
+      RenderBlock {DIV} at (0,156) size 784x42
+        RenderText {#text} at (0,0) size 384x41
+          text run at (0,0) width 384: "Lor\x{E9}mipsumdolorsit"
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index ed4e670..e830726 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -579,7 +579,7 @@ BUG20521 LINUX WIN : fast/text/atsui-pointtooffset-calls-cg.html = FAIL TIMEOUT
 BUG20521 LINUX WIN : fast/text/atsui-rtl-override-selection.html = FAIL
 
 // This test checks that we hack around a bug in helvetica.  We fail to.
-BUG20519 LINUX WIN : fast/text/wide-zero-width-space.html = FAIL
+BUG20519 WIN : fast/text/wide-zero-width-space.html = FAIL
 
 // There's a missing glyph box in "full-time".
 BUG20547 WIN : fast/text/capitalize-boundaries.html = FAIL
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 11cea40..7eecbf4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-19  James Simonsen  <simonjam at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [chromium] Fix whitespace character handling in complex text on linux
+        https://bugs.webkit.org/show_bug.cgi?id=49771
+
+        * platform/graphics/SimpleFontData.h:
+        (WebCore::SimpleFontData::isZeroWidthSpaceGlyph): Added.
+        (WebCore::SimpleFontData::boundsForGlyph): Use isZeroWidthSpaceGlyph().
+        (WebCore::SimpleFontData::widthForGlyph): Use isZeroWidthSpaceGlyph().
+        * platform/graphics/chromium/FontLinux.cpp:
+        (WebCore::TextRunWalker::nextScriptRun): Cache currently used font data.
+        (WebCore::TextRunWalker::setGlyphXPositions): Skip zero width spaces.
+        (WebCore::TextRunWalker::normalizeSpacesAndMirrorChars): Normalize zero width spaces.
+        (WebCore::TextRunWalker::getNormalizedTextRun):
+
 2010-11-19  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/platform/graphics/SimpleFontData.h b/WebCore/platform/graphics/SimpleFontData.h
index 432a164..ea053cd 100644
--- a/WebCore/platform/graphics/SimpleFontData.h
+++ b/WebCore/platform/graphics/SimpleFontData.h
@@ -106,6 +106,7 @@ public:
 #endif
 
     Glyph spaceGlyph() const { return m_spaceGlyph; }
+    bool isZeroWidthSpaceGlyph(Glyph glyph) const { return glyph == m_zeroWidthSpaceGlyph && glyph; }
 
     virtual const SimpleFontData* fontDataForCharacter(UChar32) const;
     virtual bool containsCharacters(const UChar*, int length) const;
@@ -267,7 +268,7 @@ private:
 #if !PLATFORM(QT)
 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
 {
-    if (glyph == m_zeroWidthSpaceGlyph && glyph)
+    if (isZeroWidthSpaceGlyph(glyph))
         return FloatRect();
 
     FloatRect bounds;
@@ -286,7 +287,7 @@ ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
 
 ALWAYS_INLINE float SimpleFontData::widthForGlyph(Glyph glyph) const
 {
-    if (glyph == m_zeroWidthSpaceGlyph && glyph)
+    if (isZeroWidthSpaceGlyph(glyph))
         return 0;
 
     float width = m_glyphToWidthMap.metricsForGlyph(glyph);
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index 9fc7558..79b2caf 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -234,6 +234,7 @@ private:
     static bool isCodepointSpace(HB_UChar16 c) { return c == ' ' || c == '\t'; }
 
     const Font* const m_font;
+    const SimpleFontData* m_currentFontData;
     HB_ShaperItem m_item;
     uint16_t* m_glyphs16; // A vector of 16-bit glyph ids.
     SkScalar* m_xPositions; // A vector of x positions for each glyph.
@@ -381,6 +382,7 @@ bool TextRunWalker::nextScriptRun()
         // (and the glyphs in each A, C and T section are backwards too)
         if (!hb_utf16_script_run_prev(&m_numCodePoints, &m_item.item, m_run.characters(), m_run.length(), &m_indexOfNextScriptRun))
             return false;
+        m_currentFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, false).fontData;
     } else {
         if (!hb_utf16_script_run_next(&m_numCodePoints, &m_item.item, m_run.characters(), m_run.length(), &m_indexOfNextScriptRun))
             return false;
@@ -392,11 +394,11 @@ bool TextRunWalker::nextScriptRun()
         // in the harfbuzz data structures to e.g. pick the correct script's shaper.
         // So we allow that to run first, then do a second pass over the range it
         // found and take the largest subregion that stays within a single font.
-        const FontData* glyphData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, false).fontData;
+        m_currentFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, false).fontData;
         unsigned endOfRun;
         for (endOfRun = 1; endOfRun < m_item.item.length; ++endOfRun) {
-            const FontData* nextGlyphData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false, false).fontData;
-            if (nextGlyphData != glyphData)
+            const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false, false).fontData;
+            if (nextFontData != m_currentFontData)
                 break;
         }
         m_item.item.length = endOfRun;
@@ -518,13 +520,15 @@ void TextRunWalker::setGlyphXPositions(bool isRTL)
         // Glyphs are stored in logical order, but for layout purposes we
         // always go left to right.
         for (int i = m_item.num_glyphs - 1; i >= 0; --i) {
-            // Whitespace must be laid out in logical order, so when inserting
-            // spaces in RTL (but iterating in LTR order) we must insert spaces
-            // _before_ the next glyph.
-            if (i + 1 >= m_item.num_glyphs || m_item.attributes[i + 1].clusterStart)
-                position += m_letterSpacing;
-
-            position += determineWordBreakSpacing(logClustersIndex);
+            if (!m_currentFontData->isZeroWidthSpaceGlyph(m_glyphs16[i])) {
+                // Whitespace must be laid out in logical order, so when inserting
+                // spaces in RTL (but iterating in LTR order) we must insert spaces
+                // _before_ the next glyph.
+                if (i + 1 >= m_item.num_glyphs || m_item.attributes[i + 1].clusterStart)
+                    position += m_letterSpacing;
+
+                position += determineWordBreakSpacing(logClustersIndex);
+            }
 
             m_glyphs16[i] = m_item.glyphs[i];
             double offsetX = truncateFixedPointToInteger(m_item.offsets[i].x);
@@ -533,7 +537,8 @@ void TextRunWalker::setGlyphXPositions(bool isRTL)
             while (logClustersIndex > 0 && logClusters()[logClustersIndex] == i)
                 logClustersIndex--;
 
-            position += truncateFixedPointToInteger(m_item.advances[i]);
+            if (!m_currentFontData->isZeroWidthSpaceGlyph(m_glyphs16[i]))
+                position += truncateFixedPointToInteger(m_item.advances[i]);
         }
     } else {
         for (int i = 0; i < m_item.num_glyphs; ++i) {
@@ -541,6 +546,9 @@ void TextRunWalker::setGlyphXPositions(bool isRTL)
             double offsetX = truncateFixedPointToInteger(m_item.offsets[i].x);
             m_xPositions[i] = m_offsetX + position + offsetX;
 
+            if (m_currentFontData->isZeroWidthSpaceGlyph(m_glyphs16[i]))
+                continue;
+
             double advance = truncateFixedPointToInteger(m_item.advances[i]);
 
             advance += determineWordBreakSpacing(logClustersIndex);
@@ -569,6 +577,8 @@ void TextRunWalker::normalizeSpacesAndMirrorChars(const UChar* source, bool rtl,
         U16_NEXT(source, nextPosition, length, character);
         if (Font::treatAsSpace(character))
             character = ' ';
+        else if (Font::treatAsZeroWidthSpace(character))
+            character = zeroWidthSpace;
         else if (rtl)
             character = u_charMirror(character);
         U16_APPEND(destination, position, length, character, error);
@@ -592,7 +602,7 @@ const TextRun& TextRunWalker::getNormalizedTextRun(const TextRun& originalRun, O
     // 2) Convert spacing characters into plain spaces, as some fonts will provide glyphs
     // for characters like '\n' otherwise.
     // 3) Convert mirrored characters such as parenthesis for rtl text.
- 
+
     // Convert to NFC form if the text has diacritical marks.
     icu::UnicodeString normalizedString;
     UErrorCode error = U_ZERO_ERROR;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list