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

oliver at apple.com oliver at apple.com
Thu Apr 8 01:11:50 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 6b5c60ed34805341610aef034844bd8855a71282
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 18 03:59:54 2010 +0000

    2010-01-17  Oliver Hunt  <oliver at apple.com>
    
            Reviewed by Dan Bernstein.
    
            REGRESSION (r52449): SVG mask wrongly clipped when not at origin for recent nightly build
            https://bugs.webkit.org/show_bug.cgi?id=33782
    
            Testcase for a mask containing transformed elements
    
            * platform/mac/svg/custom/transformedMaskFails-expected.png: Added.
            * svg/custom/transformedMaskFails-expected.txt: Added.
            * svg/custom/transformedMaskFails.svg: Added.
    2010-01-17  Oliver Hunt  <oliver at apple.com>
    
            Reviewed by Dan Bernstein.
    
            REGRESSION (r52449): SVG mask wrongly clipped when not at origin for recent nightly build
            https://bugs.webkit.org/show_bug.cgi?id=33782
    
            Test: svg/custom/transformedMaskFails.svg
    
            When computing the bounds for elements in a mask, we iterate through
            all of our children requesting their repaint bounds using
            repaintRectInLocalCoordinates(), but we were not converting that
            rect into our own coordinate system, thus leading to an incorrect
            repaint rect.  This patch simply adds the missing localToParent
            transform.
    
            * svg/SVGMaskElement.cpp:
            (WebCore::SVGMaskElement::drawMaskerContent):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53388 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9b5a170..545c45c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-17  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        REGRESSION (r52449): SVG mask wrongly clipped when not at origin for recent nightly build
+        https://bugs.webkit.org/show_bug.cgi?id=33782
+
+        Testcase for a mask containing transformed elements
+
+        * platform/mac/svg/custom/transformedMaskFails-expected.png: Added.
+        * svg/custom/transformedMaskFails-expected.txt: Added.
+        * svg/custom/transformedMaskFails.svg: Added.
+
 2010-01-15  Jon Honeycutt  <jhoneycutt at apple.com>
 
         MSAA: Screen rect for <option> elements is always the zero rect
diff --git a/LayoutTests/platform/mac/svg/custom/transformedMaskFails-expected.png b/LayoutTests/platform/mac/svg/custom/transformedMaskFails-expected.png
new file mode 100644
index 0000000..cd5ec1a
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/transformedMaskFails-expected.png differ
diff --git a/LayoutTests/svg/custom/transformedMaskFails-expected.txt b/LayoutTests/svg/custom/transformedMaskFails-expected.txt
new file mode 100644
index 0000000..04f9995
--- /dev/null
+++ b/LayoutTests/svg/custom/transformedMaskFails-expected.txt
@@ -0,0 +1,11 @@
+KCanvasResource {id="mask" [type=MASKER]}
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (100,100) size 100x100
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {mask} at (100,100) size 150x150
+        RenderSVGContainer {g} at (100,100) size 150x150 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}]
+          RenderPath {rect} at (100,100) size 150x150 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M0.00,0.00 L150.00,0.00 L150.00,150.00 L0.00,150.00 Z"]
+    RenderPath {rect} at (100,100) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
+    RenderPath {rect} at (100,100) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M100.00,100.00 L200.00,100.00 L200.00,200.00 L100.00,200.00 Z"]
diff --git a/LayoutTests/svg/custom/transformedMaskFails.svg b/LayoutTests/svg/custom/transformedMaskFails.svg
new file mode 100644
index 0000000..3165ded
--- /dev/null
+++ b/LayoutTests/svg/custom/transformedMaskFails.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<defs>
+    <mask id="mask">
+    <g transform="translate(100,100)">
+        <rect width="150" height="150" fill="white" />
+    </g>
+    </mask>
+</defs>
+
+<rect x="100" y="100" width="100" height="100" fill="red"/>
+<rect x="100" y="100" width="100" height="100" fill="green" mask="url(#mask)" />
+
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fad5743..4e39701 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-01-17  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        REGRESSION (r52449): SVG mask wrongly clipped when not at origin for recent nightly build
+        https://bugs.webkit.org/show_bug.cgi?id=33782
+
+        Test: svg/custom/transformedMaskFails.svg
+
+        When computing the bounds for elements in a mask, we iterate through
+        all of our children requesting their repaint bounds using
+        repaintRectInLocalCoordinates(), but we were not converting that
+        rect into our own coordinate system, thus leading to an incorrect
+        repaint rect.  This patch simply adds the missing localToParent
+        transform.
+
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::drawMaskerContent):
+
 2010-01-17  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index e7e3e4b..63bd9e6 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -169,7 +169,7 @@ PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const RenderObject* ob
             continue;
 
         rendererList.append(node->renderer());
-        repaintRect.unite(node->renderer()->repaintRectInLocalCoordinates());
+        repaintRect.unite(node->renderer()->localToParentTransform().mapRect(node->renderer()->repaintRectInLocalCoordinates()));
     }
 
     TransformationMatrix contextTransform;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list