[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

commit-queue at webkit.org commit-queue at webkit.org
Sun Feb 20 23:10:21 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit f58122875cb1ef4d83844f79082a82dfc2944f5f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 17:19:15 2011 +0000

    2011-01-18  Helder Correia  <helder at sencha.com>
    
            Reviewed by Dirk Schulze.
    
            REGRESSION(75139): SVG gradients are not applied to texts
            https://bugs.webkit.org/show_bug.cgi?id=52531
    
            r75139 caused a problem with filling and stroking text with a gradient
            fill in SVG. The order of CGContextConcatCTM and CGContextClipToRect
            was mixed up.
    
            * platform/mac/svg/css/text-gradient-shadow-expected.checksum: Added.
            * platform/mac/svg/css/text-gradient-shadow-expected.png: Added.
            * platform/mac/svg/css/text-gradient-shadow-expected.txt: Added.
            * svg/css/text-gradient-shadow.svg: Added.
    2011-01-18  Helder Correia  <helder at sencha.com>
    
            Reviewed by Dirk Schulze.
    
            REGRESSION(75139): SVG gradients are not applied to texts
            https://bugs.webkit.org/show_bug.cgi?id=52531
    
            r75139 caused a problem with filling and stroking text with a gradient
            fill in SVG. The order of CGContextConcatCTM and CGContextClipToRect
            was mixed up.
    
            Test: svg/css/text-gradient-shadow.svg
    
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::fillRect):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3397bda..9c72dc5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-18  Helder Correia  <helder at sencha.com>
+
+        Reviewed by Dirk Schulze.
+
+        REGRESSION(75139): SVG gradients are not applied to texts
+        https://bugs.webkit.org/show_bug.cgi?id=52531
+
+        r75139 caused a problem with filling and stroking text with a gradient
+        fill in SVG. The order of CGContextConcatCTM and CGContextClipToRect
+        was mixed up.
+
+        * platform/mac/svg/css/text-gradient-shadow-expected.checksum: Added.
+        * platform/mac/svg/css/text-gradient-shadow-expected.png: Added.
+        * platform/mac/svg/css/text-gradient-shadow-expected.txt: Added.
+        * svg/css/text-gradient-shadow.svg: Added.
+
 2011-01-18  John Knottenbelt  <jknotten at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.checksum b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.checksum
new file mode 100644
index 0000000..0236a09
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.checksum
@@ -0,0 +1 @@
+28e820701fc837bb1b5d92175e7dfee8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png
new file mode 100644
index 0000000..bebad9b
Binary files /dev/null and b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.txt b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.txt
new file mode 100644
index 0000000..d8687b8
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (200,20) size 439x270
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceLinearGradient {linearGradient} [id="gradient"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,0)]
+        RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
+        RenderSVGGradientStop {stop} [offset=1.00] [color=#0000FF]
+    RenderSVGText {text} at (200,20) size 399x230 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 399x230
+        chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 3 width 399.00: "SVG"
diff --git a/LayoutTests/svg/css/text-gradient-shadow.svg b/LayoutTests/svg/css/text-gradient-shadow.svg
new file mode 100644
index 0000000..24ddc17
--- /dev/null
+++ b/LayoutTests/svg/css/text-gradient-shadow.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
+<defs>
+<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%">
+<stop offset="0%" stop-color="red"/>
+<stop offset="100%" stop-color="blue"/>
+</linearGradient>
+</defs>
+<text x="200" y="200" style="font-size: 200px; text-shadow: #000 20px 20px 20px;" fill="url(#gradient)">SVG</text>
+</svg>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index ba795b9..1c5763a 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-18  Helder Correia  <helder at sencha.com>
+
+        Reviewed by Dirk Schulze.
+
+        REGRESSION(75139): SVG gradients are not applied to texts
+        https://bugs.webkit.org/show_bug.cgi?id=52531
+
+        r75139 caused a problem with filling and stroking text with a gradient
+        fill in SVG. The order of CGContextConcatCTM and CGContextClipToRect
+        was mixed up.
+
+        Test: svg/css/text-gradient-shadow.svg
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::fillRect):
+
 2011-01-18  Leo Yang  <leo.yang at torchmobile.com.cn>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index eddf735..bcfc37b 100644
--- a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -625,8 +625,8 @@ void GraphicsContext::fillRect(const FloatRect& rect)
 
     if (m_state.fillGradient) {
         CGContextSaveGState(context);
-        CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());
         if (hasShadow()) {
+            CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());
             CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0);
             CGContextRef layerContext = CGLayerGetContext(layer);
             m_state.fillGradient->paint(layerContext);
@@ -634,6 +634,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
             CGLayerRelease(layer);
         } else {
             CGContextClipToRect(context, rect);
+            CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());
             m_state.fillGradient->paint(this);
         }
         CGContextRestoreGState(context);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list