[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

krit at webkit.org krit at webkit.org
Thu Apr 8 02:21:36 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 65316421029bedee670cc075d9ec300894c78579
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Mar 13 07:07:43 2010 +0000

    2010-03-12  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG Glyphs - transform path not context
            https://bugs.webkit.org/show_bug.cgi?id=36070
    
            SVGFont should transform the path of a glyph, not the context. Modifying
            the context causes wrong gradient transformations. This bug doesn't
            influence CG because we generally fill or stroke texts with a mask image.
            All other platforms provide a direct way to make the drawings.
    
            * svg/SVGFont.cpp:
            (WebCore::Font::drawTextUsingSVGFont):
    2010-03-12  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVG Glyphs - transform path not context
            https://bugs.webkit.org/show_bug.cgi?id=36070
    
            Some tests don't look pixel perfect after the SVGFont changes (difference of 0.1%).
            They just need an update.
            Tests for the changes on other platforms than CG are
                * svg/batik/text/textEffect.svg
                * svg/batik/text/textEffect3.svg
                * svg/W3C-SVG-1.1/pservers-grad-08-b.svg
    
            * platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum:
            * platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png:
            * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
            * platform/mac/svg/batik/text/textEffect-expected.checksum:
            * platform/mac/svg/batik/text/textEffect-expected.png:
            * platform/mac/svg/batik/text/textEffect3-expected.checksum:
            * platform/mac/svg/batik/text/textEffect3-expected.png:
            * platform/mac/svg/text/selection-doubleclick-expected.png:
            * platform/mac/svg/text/selection-tripleclick-expected.png:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1f0c3ea..379992e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,34 @@
+2010-03-12  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG Glyphs - transform path not context
+        https://bugs.webkit.org/show_bug.cgi?id=36070
+
+        Some tests don't look pixel perfect after the SVGFont changes (difference of 0.1%).
+        They just need an update.
+        Tests for the changes on other platforms than CG are
+            * svg/batik/text/textEffect.svg
+            * svg/batik/text/textEffect3.svg
+            * svg/W3C-SVG-1.1/pservers-grad-08-b.svg
+
+        * platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum:
+        * platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
+        * platform/mac/svg/batik/text/textEffect-expected.checksum:
+        * platform/mac/svg/batik/text/textEffect-expected.png:
+        * platform/mac/svg/batik/text/textEffect3-expected.checksum:
+        * platform/mac/svg/batik/text/textEffect3-expected.png:
+        * platform/mac/svg/text/selection-doubleclick-expected.png:
+        * platform/mac/svg/text/selection-tripleclick-expected.png:
+
 2010-03-12  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum b/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum
index 20f4b1c..792d3ff 100644
--- a/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum
+++ b/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.checksum
@@ -1 +1 @@
-7eb935f50fa8d28f77764806f42db2e7
\ No newline at end of file
+28c0d6305c1f0c064015177e725c877b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png b/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png
index 66bddc3..2b41a73 100644
Binary files a/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png and b/LayoutTests/platform/mac-leopard/svg/custom/svg-fonts-in-html-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum
index c469ff9..7585ccb 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum
@@ -1 +1 @@
-25e8155e853f84f24b8fee6d44bfca28
\ No newline at end of file
+2700ef95357f49203d5ad3b3a200bc33
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png
index 00f9fc1..10f5902 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum
index 4990699..90b0304 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum
@@ -1 +1 @@
-6401ffb9c48a543836bced04aca42b19
\ No newline at end of file
+39465072d46accc011bb8c74a1ffbef0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png
index d6807e4..98eaa93 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum
index 2bc28f0..1329e3a 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum
@@ -1 +1 @@
-d02b0c5a824b946118112cb43682d2cf
\ No newline at end of file
+8a223479ab3868054ed1e3ecce18e150
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png
index d5a10b4..02d320b 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum
index 9c898d6..b15c7e4 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum
@@ -1 +1 @@
-c20724b86fc042efc5b8885ae96555be
\ No newline at end of file
+a7ac274b1c9b01997afc4fd8fb806a9c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png
index 3918791..b19bda5 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.checksum b/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.checksum
index 671b8f1..6773fd4 100644
--- a/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.checksum
+++ b/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.checksum
@@ -1 +1 @@
-ce9ad62697190c25783eac8c958517bf
\ No newline at end of file
+a9173017ad8129b9759bed91b7e888dd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.png b/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.png
index 4fe67c9..b78c9b9 100644
Binary files a/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.png and b/LayoutTests/platform/mac/svg/batik/text/textEffect-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.checksum b/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.checksum
index 45827f3..597945d 100644
--- a/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.checksum
+++ b/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.checksum
@@ -1 +1 @@
-263252e4e22836a27381a99586b82ede
\ No newline at end of file
+16a59caf983f9383a59c06baabfb34fd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.png b/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.png
index 01b819c..cc1d236 100644
Binary files a/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.png and b/LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png
index 1c6c6fa..e90a905 100644
Binary files a/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png and b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png
index 19ea2e5..cfd4753 100644
Binary files a/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png and b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3158e1c..e76b667 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-12  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG Glyphs - transform path not context
+        https://bugs.webkit.org/show_bug.cgi?id=36070
+
+        SVGFont should transform the path of a glyph, not the context. Modifying
+        the context causes wrong gradient transformations. This bug doesn't
+        influence CG because we generally fill or stroke texts with a mask image.
+        All other platforms provide a direct way to make the drawings.
+
+        * svg/SVGFont.cpp:
+        (WebCore::Font::drawTextUsingSVGFont):
+
 2010-03-12  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp
index b7ca5f2..dacbac2 100644
--- a/WebCore/svg/SVGFont.cpp
+++ b/WebCore/svg/SVGFont.cpp
@@ -1,5 +1,6 @@
 /**
  * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -528,22 +529,16 @@ void Font::drawTextUsingSVGFont(GraphicsContext* context, const TextRun& run,
                         glyphOrigin.setY(identifier.verticalOriginY * scale);
                     }
 
-                    context->translate(xStartOffset + currentPoint.x() + glyphOrigin.x(), currentPoint.y() + glyphOrigin.y());
-                    context->scale(FloatSize(scale, -scale));
+                    AffineTransform glyphPathTransform;
+                    glyphPathTransform.translate(xStartOffset + currentPoint.x() + glyphOrigin.x(), currentPoint.y() + glyphOrigin.y());
+                    glyphPathTransform.scale(scale, -scale);
 
-                    context->beginPath();
-                    context->addPath(identifier.pathData);
+                    Path glyphPath = identifier.pathData;
+                    glyphPath.transform(glyphPathTransform);
 
-                    // FIXME: setup() tries to get objectBoundingBox() from run.referencingRenderObject()
-                    // which is wrong.  We need to change setup() to take a bounding box instead, or pass
-                    // a RenderObject which would return the bounding box for identifier.pathData
+                    context->beginPath();
+                    context->addPath(glyphPath);
                     if (activePaintServer->setup(context, run.referencingRenderObject(), targetType)) {
-                        // Spec: Any properties specified on a text elements which represents a length, such as the
-                        // 'stroke-width' property, might produce surprising results since the length value will be
-                        // processed in the coordinate system of the glyph. (TODO: What other lengths? miter-limit? dash-offset?)
-                        if (targetType == ApplyToStrokeTargetType && scale != 0.0f)
-                            context->setStrokeThickness(context->strokeThickness() / scale);
-
                         activePaintServer->renderPath(context, run.referencingRenderObject(), targetType);
                         activePaintServer->teardown(context, run.referencingRenderObject(), targetType);
                     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list