[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

mitz at apple.com mitz at apple.com
Fri Jan 21 14:58:00 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 2e09ed2f6475476137c700595179de3060551a4a
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 5 18:03:09 2011 +0000

    <rdar://problem/8799835> hyphenate-character: auto should fall back to hyphen-minus if the primary font lacks a hyphen glyph
    https://bugs.webkit.org/show_bug.cgi?id=51915
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    This changes the results of existing tests in fast/text.
    
    * platform/graphics/Font.h:
    * platform/graphics/FontFastPath.cpp:
    (WebCore::Font::primaryFontHasGlyphForCharacter): Added.
    * rendering/style/RenderStyle.cpp:
    * platform/graphics/qt/FontQt.cpp:
    (WebCore::Font::primaryFontHasGlyphForCharacter): Added a stub.
    (WebCore::RenderStyle::hyphenString): For hyphenate-character: auto, return a
    hyphen only if the primary font has a hyphen glyph, and otherwise return a
    hyphen-minus.
    
    LayoutTests:
    
    * platform/mac/fast/text/basic/014-expected.checksum:
    * platform/mac/fast/text/basic/014-expected.png:
    * platform/mac/fast/text/basic/014-expected.txt:
    * platform/mac/fast/text/capitalize-boundaries-expected.checksum:
    * platform/mac/fast/text/capitalize-boundaries-expected.png:
    * platform/mac/fast/text/capitalize-boundaries-expected.txt:
    * platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum:
    * platform/mac/fast/text/midword-break-after-breakable-char-expected.png:
    * platform/mac/fast/text/midword-break-after-breakable-char-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75077 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e0294d1..8c6cee9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-05  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/8799835> hyphenate-character: auto should fall back to hyphen-minus if the primary font lacks a hyphen glyph
+        https://bugs.webkit.org/show_bug.cgi?id=51915
+
+        * platform/mac/fast/text/basic/014-expected.checksum:
+        * platform/mac/fast/text/basic/014-expected.png:
+        * platform/mac/fast/text/basic/014-expected.txt:
+        * platform/mac/fast/text/capitalize-boundaries-expected.checksum:
+        * platform/mac/fast/text/capitalize-boundaries-expected.png:
+        * platform/mac/fast/text/capitalize-boundaries-expected.txt:
+        * platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum:
+        * platform/mac/fast/text/midword-break-after-breakable-char-expected.png:
+        * platform/mac/fast/text/midword-break-after-breakable-char-expected.txt:
+
 2011-01-05  Leo Yang  <leo.yang at torchmobile.com.cn>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/platform/mac/fast/text/basic/014-expected.checksum b/LayoutTests/platform/mac/fast/text/basic/014-expected.checksum
index 5be98d4..4cfcf6c 100644
--- a/LayoutTests/platform/mac/fast/text/basic/014-expected.checksum
+++ b/LayoutTests/platform/mac/fast/text/basic/014-expected.checksum
@@ -1 +1 @@
-dc5803e5d1c97daeeac4f91bcf3e5597
\ No newline at end of file
+2e0da5328fe71a77cbdc22db7f96aa26
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/basic/014-expected.png b/LayoutTests/platform/mac/fast/text/basic/014-expected.png
index 7e5be22..c897b61 100644
Binary files a/LayoutTests/platform/mac/fast/text/basic/014-expected.png and b/LayoutTests/platform/mac/fast/text/basic/014-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/basic/014-expected.txt b/LayoutTests/platform/mac/fast/text/basic/014-expected.txt
index 8fa7a3b..1d84970 100644
--- a/LayoutTests/platform/mac/fast/text/basic/014-expected.txt
+++ b/LayoutTests/platform/mac/fast/text/basic/014-expected.txt
@@ -5,16 +5,16 @@ layer at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x576
       RenderBlock {DIV} at (0,0) size 396x194 [border: (2px solid #FF0000)]
         RenderBlock {P} at (2,18) size 392x36
-          RenderText {#text} at (0,0) size 388x36
-            text run at (0,0) width 388: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
+          RenderText {#text} at (0,0) size 387x36
+            text run at (0,0) width 387: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
             text run at (0,18) width 160: "dis\x{AD}est\x{AD}ab\x{AD}lish\x{AD}ment\x{AD}arian\x{AD}ism."
         RenderBlock {P} at (2,70) size 392x36
-          RenderText {#text} at (0,0) size 388x36
-            text run at (0,0) width 388: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
+          RenderText {#text} at (0,0) size 387x36
+            text run at (0,0) width 387: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
             text run at (0,18) width 160: "dis\x{AD}est\x{AD}ab\x{AD}lish\x{AD}ment\x{AD}arian\x{AD}ism."
         RenderBlock {P} at (2,122) size 392x54
-          RenderText {#text} at (0,0) size 388x36
-            text run at (0,0) width 388: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
+          RenderText {#text} at (0,0) size 387x36
+            text run at (0,0) width 387: "I\x{2019}m told this is the longest word in the English language: anti\x{AD}"
             text run at (0,18) width 50: "dis\x{AD}est\x{AD}ab\x{AD}"
           RenderBR {BR} at (50,32) size 0x0
           RenderText {#text} at (0,36) size 110x18
diff --git a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.checksum b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.checksum
index 6f9e522..2772275 100644
--- a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.checksum
+++ b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.checksum
@@ -1 +1 @@
-2ccf69c8ba374f9285d308e77ce33bce
\ No newline at end of file
+a1f16296023b629a1e89bb5469a7a4fe
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.png b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.png
index 76d7a66..caf7b14 100644
Binary files a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.png and b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.txt b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.txt
index 21e5de9..bf42ce5 100644
--- a/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.txt
+++ b/LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.txt
@@ -27,9 +27,9 @@ layer at (0,0) size 785x1198
               RenderText {#text} at (2,2) size 49x18
                 text run at (2,2) width 49: "generic"
             RenderTableCell {TD} at (57,2) size 710x58 [border: (1px solid #EEEEEE)] [r=0 c=1 rs=1 cs=1]
-              RenderText {#text} at (2,2) size 706x54
-                text run at (2,2) width 670: "lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
-                text run at (2,20) width 706: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
+              RenderText {#text} at (2,2) size 705x54
+                text run at (2,2) width 669: "lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
+                text run at (2,20) width 705: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
                 text run at (2,38) width 580: "thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin"
           RenderTableRow {TR} at (0,62) size 769x22
             RenderTableCell {TH} at (2,62) size 53x22 [bgcolor=#F8F8F8] [border: (1px solid #EEEEEE)] [r=1 c=0 rs=1 cs=1]
@@ -136,9 +136,9 @@ layer at (0,0) size 785x1198
               RenderText {#text} at (2,2) size 49x18
                 text run at (2,2) width 49: "generic"
             RenderTableCell {TD} at (57,2) size 710x58 [border: (1px solid #EEEEEE)] [r=0 c=1 rs=1 cs=1]
-              RenderText {#text} at (2,2) size 706x54
-                text run at (2,2) width 676: "Lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
-                text run at (2,20) width 706: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
+              RenderText {#text} at (2,2) size 705x54
+                text run at (2,2) width 675: "Lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
+                text run at (2,20) width 705: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
                 text run at (2,38) width 580: "thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin"
           RenderTableRow {TR} at (0,62) size 769x22
             RenderTableCell {TH} at (2,62) size 53x22 [bgcolor=#F8F8F8] [border: (1px solid #EEEEEE)] [r=1 c=0 rs=1 cs=1]
@@ -229,9 +229,9 @@ layer at (0,0) size 785x1198
               RenderText {#text} at (2,2) size 49x18
                 text run at (2,2) width 49: "generic"
             RenderTableCell {TD} at (57,2) size 710x58 [border: (1px solid #EEEEEE)] [r=0 c=1 rs=1 cs=1]
-              RenderText {#text} at (2,2) size 706x54
-                text run at (2,2) width 676: "Lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
-                text run at (2,20) width 706: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
+              RenderText {#text} at (2,2) size 705x54
+                text run at (2,2) width 675: "Lip\x{AD}smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}"
+                text run at (2,20) width 705: "smackin\x{AD}thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin\x{AD}lip\x{AD}smackin\x{AD}"
                 text run at (2,38) width 580: "thirst\x{AD}quenchin\x{AD}acetastin\x{AD}motivatin\x{AD}good\x{AD}buzzin\x{AD}cool\x{AD}talkin\x{AD}high\x{AD}walkin\x{AD}fast\x{AD}livin\x{AD}ever\x{AD}givin\x{AD}cool\x{AD}fizzin"
           RenderTableRow {TR} at (0,62) size 769x22
             RenderTableCell {TH} at (2,62) size 53x22 [bgcolor=#F8F8F8] [border: (1px solid #EEEEEE)] [r=1 c=0 rs=1 cs=1]
diff --git a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum
index e44be53..59a5279 100644
--- a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum
+++ b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.checksum
@@ -1 +1 @@
-110b8fefa4bdff1134f06f588b257b4e
\ No newline at end of file
+7a7e5d48b51ae3c07e8e916e1c855f42
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.png b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.png
index 0553c3e..8e6d08d 100644
Binary files a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.png and b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.txt b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.txt
index 84208fc..ef4570b 100644
--- a/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.txt
+++ b/LayoutTests/platform/mac/fast/text/midword-break-after-breakable-char-expected.txt
@@ -31,7 +31,7 @@ layer at (0,0) size 800x600
           text run at (0,54) width 300: "Quisqueeunullanonnisimolestieaccumsan.Etiam"
           text run at (0,72) width 191: "tellusurna,laoreetac,laoreetnon"
           text run at (0,90) width 298: "suscipitsed,sapien.Phasellusvehicula,sematposu"
-          text run at (0,108) width 222: "erevehicula,auguenibhmolestienisl\x{AD}"
+          text run at (0,108) width 221: "erevehicula,auguenibhmolestienisl\x{AD}"
           text run at (0,126) width 298: "necullamcorperlacusantevulputatepede.Nascetu"
           text run at (0,144) width 89: "rridiculusmus."
       RenderBlock (floating) {DIV} at (312,142) size 300x162 [bgcolor=#FFFFE0]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6b25592..5736fdb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-05  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Darin Adler.
+
+        <rdar://problem/8799835> hyphenate-character: auto should fall back to hyphen-minus if the primary font lacks a hyphen glyph
+        https://bugs.webkit.org/show_bug.cgi?id=51915
+
+        This changes the results of existing tests in fast/text.
+
+        * platform/graphics/Font.h:
+        * platform/graphics/FontFastPath.cpp:
+        (WebCore::Font::primaryFontHasGlyphForCharacter): Added.
+        * rendering/style/RenderStyle.cpp:
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::Font::primaryFontHasGlyphForCharacter): Added a stub.
+        (WebCore::RenderStyle::hyphenString): For hyphenate-character: auto, return a
+        hyphen only if the primary font has a hyphen glyph, and otherwise return a
+        hyphen-minus.
+
 2011-01-05  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebCore/platform/graphics/Font.h b/WebCore/platform/graphics/Font.h
index 225bb32..40a8828 100644
--- a/WebCore/platform/graphics/Font.h
+++ b/WebCore/platform/graphics/Font.h
@@ -144,6 +144,7 @@ public:
     const SimpleFontData* primaryFont() const;
     const FontData* fontDataAt(unsigned) const;
     GlyphData glyphDataForCharacter(UChar32, bool mirror, FontDataVariant = AutoVariant) const;
+    bool primaryFontHasGlyphForCharacter(UChar32) const;
     // Used for complex text, and does not utilize the glyph map cache.
     const FontData* fontDataForCharacters(const UChar*, int length) const;
 
diff --git a/WebCore/platform/graphics/FontFastPath.cpp b/WebCore/platform/graphics/FontFastPath.cpp
index 73904e0..367c8a2 100644
--- a/WebCore/platform/graphics/FontFastPath.cpp
+++ b/WebCore/platform/graphics/FontFastPath.cpp
@@ -197,6 +197,16 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant va
     return data;
 }
 
+bool Font::primaryFontHasGlyphForCharacter(UChar32 character) const
+{
+    unsigned pageNumber = (character / GlyphPage::size);
+
+    GlyphPageTreeNode* node = GlyphPageTreeNode::getRootChild(primaryFont(), pageNumber);
+    GlyphPage* page = node->page();
+
+    return page && page->fontDataForCharacter(character);
+}
+
 // FIXME: This function may not work if the emphasis mark uses a complex script, but none of the
 // standard emphasis marks do so.
 bool Font::getEmphasisMarkGlyphData(const AtomicString& mark, GlyphData& glyphData) const
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 969a2aa..f1ced2b 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -412,6 +412,12 @@ bool Font::canReturnFallbackFontsForComplexText()
     return false;
 }
 
+bool Font::primaryFontHasGlyphForCharacter(UChar32) const
+{
+    notImplemented();
+    return true;
+}
+
 QFont Font::font() const
 {
     QFont f = primaryFont()->getQtFont();
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index 37ed391..881818c 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -843,8 +843,9 @@ const AtomicString& RenderStyle::hyphenString() const
         return hyphenationString;
 
     // FIXME: This should depend on locale.
-    DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphen, 1));
-    return hyphenMinusString;
+    DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphenMinus, 1));
+    DEFINE_STATIC_LOCAL(AtomicString, hyphenString, (&hyphen, 1));
+    return font().primaryFontHasGlyphForCharacter(hyphen) ? hyphenString : hyphenMinusString;
 }
 
 const AtomicString& RenderStyle::textEmphasisMarkString() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list