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

mitz at apple.com mitz at apple.com
Wed Dec 22 15:43:14 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 392280341e18e3cfc005fbc604de9e14fe4e1da0
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 00:40:04 2010 +0000

    <rdar://problem/8647848> REGRESSION (r68551): Spaces shown at soft hyphens with complex justification
    https://bugs.webkit.org/show_bug.cgi?id=49352
    
    Reviewed by Simon Fraser.
    
    WebCore:
    
    Test: fast/text/justification-padding-mid-word.html
    
    * platform/graphics/mac/ComplexTextController.cpp:
    (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to add justification padding
    and word spacing only at characters that are treated as space, instead of all characters that
    use the space glyph (which includes characters treated as zero-width space as well).
    
    LayoutTests:
    
    * fast/text/justification-padding-mid-word-expected.txt: Added.
    * fast/text/justification-padding-mid-word.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8f53859..5670ff6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-10  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/8647848> REGRESSION (r68551): Spaces shown at soft hyphens with complex justification
+        https://bugs.webkit.org/show_bug.cgi?id=49352
+
+        * fast/text/justification-padding-mid-word-expected.txt: Added.
+        * fast/text/justification-padding-mid-word.html: Added.
+
 2010-11-10  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Simon Fraser.
diff --git a/LayoutTests/fast/text/justification-padding-mid-word-expected.txt b/LayoutTests/fast/text/justification-padding-mid-word-expected.txt
new file mode 100644
index 0000000..d6612ee
--- /dev/null
+++ b/LayoutTests/fast/text/justification-padding-mid-word-expected.txt
@@ -0,0 +1,3 @@
+a­b c de
+a­b c de
+PASS
diff --git a/LayoutTests/fast/text/justification-padding-mid-word.html b/LayoutTests/fast/text/justification-padding-mid-word.html
new file mode 100644
index 0000000..e793b95
--- /dev/null
+++ b/LayoutTests/fast/text/justification-padding-mid-word.html
@@ -0,0 +1,18 @@
+<div id="test" style="width: 200px; font-family: ahem; font-size: 40px; text-rendering: optimizelegibility; text-align: justify;">a&shy;b c de</div>
+<div id="reference" style="width: 200px; font-family: ahem; font-size: 40px; text-align: justify;">a&shy;b c de</div>
+<div id="result"></div>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    function widthOfFirstThreeCharacters(id)
+    {
+        var text = document.getElementById(id).firstChild;
+        var range = document.createRange();
+        range.setStart(text, 0);
+        range.setEnd(text, 3);
+        return range.getBoundingClientRect().width;
+    }
+
+    document.getElementById("result").innerText = widthOfFirstThreeCharacters("test") === widthOfFirstThreeCharacters("reference") ? "PASS" : "FAIL";
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cb302f5..84b92ba 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-10  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/8647848> REGRESSION (r68551): Spaces shown at soft hyphens with complex justification
+        https://bugs.webkit.org/show_bug.cgi?id=49352
+
+        Test: fast/text/justification-padding-mid-word.html
+
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to add justification padding
+        and word spacing only at characters that are treated as space, instead of all characters that
+        use the space glyph (which includes characters treated as zero-width space as well).
+
 2010-11-10  Matthew Delaney  <mdelaney at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/mac/ComplexTextController.cpp b/WebCore/platform/graphics/mac/ComplexTextController.cpp
index a2733f8..e6a7bef 100644
--- a/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -487,7 +487,7 @@ void ComplexTextController::adjustGlyphsAndAdvances()
                     advance.width += m_font.letterSpacing();
 
                 // Handle justification and word-spacing.
-                if (glyph == fontData->spaceGlyph()) {
+                if (treatAsSpace) {
                     // Account for padding. WebCore uses space padding to justify text.
                     // We distribute the specified padding over the available spaces in the run.
                     if (m_padding) {
@@ -503,7 +503,7 @@ void ComplexTextController::adjustGlyphsAndAdvances()
                     }
 
                     // Account for word-spacing.
-                    if (treatAsSpace && characterIndex > 0 && !Font::treatAsSpace(*m_run.data(characterIndex - 1)) && m_font.wordSpacing())
+                    if (characterIndex > 0 && !Font::treatAsSpace(*m_run.data(characterIndex - 1)) && m_font.wordSpacing())
                         advance.width += m_font.wordSpacing();
                 }
             }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list