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

morrita at google.com morrita at google.com
Wed Dec 22 11:13:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6f5175f64ffdfc9ddec54e981ec725f1b54bcd4c
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 12:53:13 2010 +0000

    2010-07-15  MORITA Hajime  <morrita at google.com>
    
            Text layout is wrong with a SVG Font that lacks <missing-glyph> element
            https://bugs.webkit.org/show_bug.cgi?id=42352
    
            * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.checksum: Added.
            * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.png: Added.
            * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.txt: Added.
            * svg/custom/svg-fonts-without-missing-glyph.xhtml: Added.
    2010-07-15  MORITA Hajime  <morrita at google.com>
    
            Text layout is wrong with a SVG Font that lacks <missing-glyph> element
            https://bugs.webkit.org/show_bug.cgi?id=42352
    
            floatWidthOfSubStringUsingSVGFont() calculated a wrong value for a
            sub-run, and a fallback to system font triggers such a computation.
            This change made floatWidthOfSubStringUsingSVGFont() to deal with
            sub-runs.
    
            Test: svg/custom/svg-fonts-without-missing-glyph.xhtml
    
            * svg/SVGFont.cpp:
            (WebCore::floatWidthOfSubStringUsingSVGFont):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63422 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d8cf19e..fd4fd7c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-15  MORITA Hajime  <morrita at google.com>
+
+        Text layout is wrong with a SVG Font that lacks <missing-glyph> element
+        https://bugs.webkit.org/show_bug.cgi?id=42352
+        
+        * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.checksum: Added.
+        * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.png: Added.
+        * platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.txt: Added.
+        * svg/custom/svg-fonts-without-missing-glyph.xhtml: Added.
+
 2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.checksum b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.checksum
new file mode 100644
index 0000000..a030c77
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.checksum
@@ -0,0 +1 @@
+365aa91d56141671987e1296891083f2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.png b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.png
new file mode 100644
index 0000000..fd1a833
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.txt b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.txt
new file mode 100644
index 0000000..fc3bb1f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/svg-fonts-without-missing-glyph-expected.txt
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x273
+  RenderBlock {html} at (0,0) size 800x273
+    RenderBody {body} at (8,21) size 784x236
+      RenderBlock {h1} at (0,0) size 784x37
+        RenderText {#text} at (0,0) size 115x37
+          text run at (0,0) width 115: "Test for "
+        RenderInline {a} at (0,0) size 143x37 [color=#0000EE]
+          RenderText {#text} at (115,0) size 143x37
+            text run at (115,0) width 143: "Bug 42352"
+      RenderBlock {p} at (0,58) size 784x18
+        RenderText {#text} at (0,0) size 506x18
+          text run at (0,0) width 506: "Following text should be rendered as usual. Only \"A\" has a glyph in SVG Font."
+      RenderBlock {p} at (0,92) size 784x16
+        RenderText {#text} at (0,0) size 37x15
+          text run at (0,0) width 37: "XXA"
+      RenderBlock {p} at (0,124) size 784x16
+        RenderText {#text} at (0,0) size 37x15
+          text run at (0,0) width 37: "XAX"
+      RenderBlock {p} at (0,156) size 784x16
+        RenderText {#text} at (0,0) size 37x15
+          text run at (0,0) width 37: "AXX"
+      RenderBlock {p} at (0,188) size 784x16
+        RenderText {#text} at (0,0) size 36x15
+          text run at (0,0) width 36: "XXX"
+      RenderBlock {p} at (0,220) size 784x16
+        RenderText {#text} at (0,0) size 38x15
+          text run at (0,0) width 38: "AAA"
diff --git a/LayoutTests/svg/custom/svg-fonts-without-missing-glyph.xhtml b/LayoutTests/svg/custom/svg-fonts-without-missing-glyph.xhtml
new file mode 100644
index 0000000..b7cc4fc
--- /dev/null
+++ b/LayoutTests/svg/custom/svg-fonts-without-missing-glyph.xhtml
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+                      "http://www.w3.org/TR/html4/loose.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<style><![CDATA[
+ at font-face {
+  font-family: MyFont;
+  src: url("#foo") format("svg");
+}
+
+.target {
+  font-family: MyFont;
+}
+]]></style>
+</head>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="display:none;">
+   <defs>
+    <font id="foo">
+      <font-face font-family="bar" />
+      <glyph unicode="A" horiz-adv-x="800"
+         d="m 78,11 c -22,-0 -45,11 -41,31 49,234 137,473 241,714 5,14 22,21 39,21 23,-0 55,-25 67,-40 C 476,531 677,283 764,70 779,33 698,20 683,56 648,146 591,244 528,346 417,332 303,348 204,343 170,243 141,140 119,36 116,19 97,11 78,11 z m 249,385 c 57,-0 114,0 169,1 -56,90 -115,184 -166,277 -37,-91 -74,-184 -107,-278 35,-0 70,-0 105,-0 z" />
+    </font>
+  </defs>
+</svg>
+<h1>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=42352">Bug 42352</a></h1>
+<p>Following text should be rendered as usual. Only "A" has a glyph in SVG Font.</p>
+<p class="target">XXA</p>
+<p class="target">XAX</p>
+<p class="target">AXX</p>
+<p class="target">XXX</p>
+<p class="target">AAA</p>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d9c09dc..05d6733 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-15  MORITA Hajime  <morrita at google.com>
+
+        Text layout is wrong with a SVG Font that lacks <missing-glyph> element
+        https://bugs.webkit.org/show_bug.cgi?id=42352
+
+        floatWidthOfSubStringUsingSVGFont() calculated a wrong value for a
+        sub-run, and a fallback to system font triggers such a computation.
+        This change made floatWidthOfSubStringUsingSVGFont() to deal with
+        sub-runs.
+        
+        Test: svg/custom/svg-fonts-without-missing-glyph.xhtml
+
+        * svg/SVGFont.cpp:
+        (WebCore::floatWidthOfSubStringUsingSVGFont):
+
 2010-07-15  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp
index 5436688..6abea60 100644
--- a/WebCore/svg/SVGFont.cpp
+++ b/WebCore/svg/SVGFont.cpp
@@ -413,7 +413,7 @@ static float floatWidthOfSubStringUsingSVGFont(const Font* font, const TextRun&
         }
 
         SVGTextRunWalker<SVGTextRunWalkerMeasuredLengthData> runWalker(fontData, fontElement, data, floatWidthUsingSVGFontCallback, floatWidthMissingGlyphCallback);
-        runWalker.walk(run, isVerticalText, language, 0, run.length());
+        runWalker.walk(run, isVerticalText, language, from, to);
         charsConsumed = data.charsConsumed;
         glyphName = data.glyphName;
         return data.length;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list