[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 11:48:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2ef4491c8eb50038a0c4bc1aea34458b6fb76760
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 7 21:41:06 2010 +0000

    <rdar://problem/8285090> First word on a line doesn’t hyphenate properly
    https://bugs.webkit.org/show_bug.cgi?id=43679
    
    Reviewed by Anders Carlsson.
    
    WebCore:
    
    Test: fast/text/hyphenate-first-word.html
    
    * rendering/RenderBlockLineLayout.cpp:
    (WebCore::tryHyphenating): The character at lastSpace is not necessarily a whitespace character
    before the current word. It can also be part of the word, such as when the word is the first
    one on the line. Include the charcater at lastSpace in the string passed to lastHyphenLocation().
    
    LayoutTests:
    
    * fast/text/hyphenate-first-word.html: Added.
    * platform/mac/fast/text/hyphenate-first-word-expected.checksum: Added.
    * platform/mac/fast/text/hyphenate-first-word-expected.png: Added.
    * platform/mac/fast/text/hyphenate-first-word-expected.txt: Added.
    * platform/mac/fast/text/hyphenate-locale-expected.checksum:
    * platform/mac/fast/text/hyphenate-locale-expected.png:
    * platform/mac/fast/text/hyphenate-locale-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b5ff0ef..e7f696e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-07  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/8285090> First word on a line doesn’t hyphenate properly
+        https://bugs.webkit.org/show_bug.cgi?id=43679
+
+        * fast/text/hyphenate-first-word.html: Added.
+        * platform/mac/fast/text/hyphenate-first-word-expected.checksum: Added.
+        * platform/mac/fast/text/hyphenate-first-word-expected.png: Added.
+        * platform/mac/fast/text/hyphenate-first-word-expected.txt: Added.
+        * platform/mac/fast/text/hyphenate-locale-expected.checksum:
+        * platform/mac/fast/text/hyphenate-locale-expected.png:
+        * platform/mac/fast/text/hyphenate-locale-expected.txt:
+
 2010-08-07  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/text/hyphenate-first-word.html b/LayoutTests/fast/text/hyphenate-first-word.html
new file mode 100644
index 0000000..d834300
--- /dev/null
+++ b/LayoutTests/fast/text/hyphenate-first-word.html
@@ -0,0 +1 @@
+<div style="font-size: 96px; border: solid; width: 220px; -webkit-hyphens: auto; -webkit-hyphenate-locale: 'en_US'">declination</div>
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.checksum b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.checksum
new file mode 100644
index 0000000..a12fb7c
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.checksum
@@ -0,0 +1 @@
+7ee0b8d95d296cf3119e0f6a20900885
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.png b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.png
new file mode 100644
index 0000000..2bf8ab3
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.txt b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.txt
new file mode 100644
index 0000000..1907f13
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/hyphenate-first-word-expected.txt
@@ -0,0 +1,10 @@
+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 {DIV} at (0,0) size 226x336 [border: (3px solid #000000)]
+        RenderText {#text} at (3,3) size 177x330
+          text run at (3,3) width 166: "dec"
+          text run at (3,113) width 177: "lina"
+          text run at (3,223) width 150: "tion"
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum
index fe996c1..64832b9 100644
--- a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum
+++ b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum
@@ -1 +1 @@
-d109cac1345539a0091c08f3deccdd47
\ No newline at end of file
+23ced8a73b7111987f71f5121b86de66
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png
index 796aea7..8a2755e 100644
Binary files a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png and b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt
index 92cde36..205f305 100644
--- a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt
+++ b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt
@@ -25,21 +25,21 @@ layer at (0,0) size 785x754
             text run at (0,0) width 158: "throughout"
       RenderBlock {DIV} at (0,369) size 135x369
         RenderBlock {DIV} at (0,0) size 135x82
-          RenderText {#text} at (0,0) size 130x82
-            text run at (0,0) width 130: "reciproc"
-            text run at (0,41) width 38: "ity"
+          RenderText {#text} at (0,0) size 102x82
+            text run at (0,0) width 66: "reci"
+            text run at (0,41) width 102: "procity"
         RenderBlock {DIV} at (0,82) size 135x82
-          RenderText {#text} at (0,0) size 130x82
-            text run at (0,0) width 130: "reciproc"
-            text run at (0,41) width 38: "ity"
+          RenderText {#text} at (0,0) size 102x82
+            text run at (0,0) width 66: "reci"
+            text run at (0,41) width 102: "procity"
         RenderBlock {DIV} at (0,164) size 135x82
-          RenderText {#text} at (0,0) size 130x82
-            text run at (0,0) width 130: "reciproc"
-            text run at (0,41) width 38: "ity"
+          RenderText {#text} at (0,0) size 102x82
+            text run at (0,0) width 66: "reci"
+            text run at (0,41) width 102: "procity"
         RenderBlock {DIV} at (0,246) size 135x82
-          RenderText {#text} at (0,0) size 130x82
-            text run at (0,0) width 130: "reciproc"
-            text run at (0,41) width 38: "ity"
+          RenderText {#text} at (0,0) size 102x82
+            text run at (0,0) width 66: "reci"
+            text run at (0,41) width 102: "procity"
         RenderBlock {DIV} at (0,328) size 135x41
           RenderText {#text} at (0,0) size 156x41
             text run at (0,0) width 156: "reciprocity"
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b3014d6..ca5d9ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,19 @@
 2010-08-07  Dan Bernstein  <mitz at apple.com>
 
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/8285090> First word on a line doesn’t hyphenate properly
+        https://bugs.webkit.org/show_bug.cgi?id=43679
+
+        Test: fast/text/hyphenate-first-word.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::tryHyphenating): The character at lastSpace is not necessarily a whitespace character
+        before the current word. It can also be part of the word, such as when the word is the first
+        one on the line. Include the charcater at lastSpace in the string passed to lastHyphenLocation().
+
+2010-08-07  Dan Bernstein  <mitz at apple.com>
+
         Build fix
 
         * platform/graphics/SimpleFontData.h:
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index db09c50..6b06a12 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1331,8 +1331,8 @@ static void tryHyphenating(RenderText* text, const Font& font, const AtomicStrin
     if (!prefixLength)
         return;
 
-    prefixLength = 1 + lastHyphenLocation(text->characters() + lastSpace + 1, pos - lastSpace - 1, prefixLength, localeIdentifier);
-    if (prefixLength <= 1)
+    prefixLength = lastHyphenLocation(text->characters() + lastSpace, pos - lastSpace, prefixLength + 1, localeIdentifier);
+    if (!prefixLength)
         return;
 
 #if !ASSERT_DISABLED

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list