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


The following commit has been merged in the webkit-1.3 branch:
commit 7c90805c0a43340936cd892f20ca63af60a6b8e8
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 25 18:54:30 2011 +0000

    2011-01-25  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
    
            CGContextConcatCTM should use the CGLayer context, not the
            GraphicsContext. Also, the CTM needs to be adjusted (translated).
            This fixes SVG text gradient fill.
    
            Test: svg/css/composite-shadow-text.svg
    
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::fillRect):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index bb2c9c4..71adaab 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-25  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
+
+        CGContextConcatCTM should use the CGLayer context, not the
+        GraphicsContext. Also, the CTM needs to be adjusted (translated).
+        This fixes SVG text gradient fill.
+
+        Test: svg/css/composite-shadow-text.svg
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::fillRect):
+
 2011-01-25  Benjamin Kalman  <kalman at chromium.org>
 
         Reviewed by Ryosuke Niwa.
diff --git a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index bcfc37b..6142569 100644
--- a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -626,9 +626,14 @@ void GraphicsContext::fillRect(const FloatRect& rect)
     if (m_state.fillGradient) {
         CGContextSaveGState(context);
         if (hasShadow()) {
-            CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());
             CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0);
             CGContextRef layerContext = CGLayerGetContext(layer);
+
+            CGContextTranslateCTM(layerContext, -rect.x(), -rect.y());
+            CGContextAddRect(layerContext, rect);
+            CGContextClip(layerContext);
+
+            CGContextConcatCTM(layerContext, m_state.fillGradient->gradientSpaceTransform());
             m_state.fillGradient->paint(layerContext);
             CGContextDrawLayerAtPoint(context, CGPointMake(rect.left(), rect.top()), layer);
             CGLayerRelease(layer);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list