[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

krit at webkit.org krit at webkit.org
Thu Oct 29 20:47:17 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit e832ff461fadc9633b6c10270d8845524fbea6c7
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Oct 18 21:15:59 2009 +0000

    2009-10-18  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            REGRESSION: SVG Mask doesn't work for maskContentUnits="objectBoundingBox"
            [https://bugs.webkit.org/show_bug.cgi?id=30480]
    
            Patch for SVGMaskElement landed in r49598 should correct the location of
            the mask image graphics context. It only corrects the location for userSpaceOnUse
            mode in maskContentUnits but breaks objectBoundingBoxMode.
            The maskDestRect shouldn't be moved. It is not responsible for the correct context
            postioin but for the correct position of the mask image.
            This patch calculates the context postion independently from the maskDestRect.
            It also uses lineareRGB color space for masking on CG now. This is the default
            color space for masking operations.
            We already have tests for both maskContentUnits modes.
    
                *svg/W3C-SVG-1.1/masking-intro-01-f.svg
                *svg/custom/mask-with-default-value.svg
    
            Some tests needed new pixel tests because of the new color space.
    
            * svg/SVGMaskElement.cpp:
            (WebCore::SVGMaskElement::drawMaskerContent):
    
            The color space of masking operations in SVG changed to linearSVG.
            This needs an update of some masking pixel tests.
    
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png:
            * platform/mac/svg/batik/masking/maskRegions-expected.checksum:
            * platform/mac/svg/batik/masking/maskRegions-expected.png:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49757 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 81c47b2..4fce1ce 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-18  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        The color space of masking operations in SVG changed to linearSVG.
+        This needs an update of some masking pixel tests.
+
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png:
+        * platform/mac/svg/batik/masking/maskRegions-expected.checksum:
+        * platform/mac/svg/batik/masking/maskRegions-expected.png:
+        * platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum:
+        * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
+
 2009-10-18  Jan Michael Alonzo  <jmalonzo at webkit.org>
 
         Reviewed by Holger Freyther.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
index d0284db..ee125f1 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum
@@ -1 +1 @@
-a5b5e66a48e29db54be7db6db3e56d56
\ No newline at end of file
+a7bb2e35279390f23a9de7171762eb20
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png
index 1254b03..92bdd7e 100644
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
index dcb8b09..a612e0d 100644
--- a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
+++ b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.checksum
@@ -1 +1 @@
-ea221a26f3f8644afb47a41d25d899b9
\ No newline at end of file
+707af5beecfe3ba1edf84fc86b3d3380
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png
index d0f1cb6..82c53a3 100644
Binary files a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png and b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
index ed9cc5a..e82adc9 100644
--- a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
+++ b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum
@@ -1 +1 @@
-1519d3f4cf6dac5fdd22dedb4425b1cf
\ No newline at end of file
+be34b730a32f893fe0a40bd849607645
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png
index 6d59109..0a4be0a 100644
Binary files a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png and b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 65efa48..d1fae52 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2009-10-18  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        REGRESSION: SVG Mask doesn't work for maskContentUnits="objectBoundingBox"
+        [https://bugs.webkit.org/show_bug.cgi?id=30480]
+
+        Patch for SVGMaskElement landed in r49598 should correct the location of
+        the mask image graphics context. It only corrects the location for userSpaceOnUse
+        mode in maskContentUnits but breaks objectBoundingBoxMode.
+        The maskDestRect shouldn't be moved. It is not responsible for the correct context
+        postioin but for the correct position of the mask image.
+        This patch calculates the context postion independently from the maskDestRect.
+        It also uses lineareRGB color space for masking on CG now. This is the default
+        color space for masking operations.
+        We already have tests for both maskContentUnits modes.
+
+            *svg/W3C-SVG-1.1/masking-intro-01-f.svg
+            *svg/custom/mask-with-default-value.svg
+
+        Some tests needed new pixel tests because of the new color space.
+
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::drawMaskerContent):
+
 2009-10-18  Anton Muhin  <antonm at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index 4b4833b..127f6f4 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -150,18 +150,25 @@ PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const FloatRect& targe
     if (imageSize.height() < static_cast<int>(maskDestRect.height()))
         maskDestRect.setHeight(imageSize.height());
 
-    OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(imageSize);
+    // FIXME: This changes color space to linearRGB, the default color space
+    // for masking operations in SVG. We need a switch for the other color-space
+    // attribute values sRGB, inherit and auto.
+    OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(imageSize, LinearRGB);
     if (!maskImage)
         return 0;
 
+    FloatPoint maskContextLocation = maskDestRect.location();
     if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
         maskDestRect.move(targetRect.x(), targetRect.y());
 
+    if (maskContentUnits() != SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+        maskContextLocation.move(targetRect.x(), targetRect.y());
+
     GraphicsContext* maskImageContext = maskImage->context();
     ASSERT(maskImageContext);
 
     maskImageContext->save();
-    maskImageContext->translate(-maskDestRect.x(), -maskDestRect.y());
+    maskImageContext->translate(-maskContextLocation.x(), -maskContextLocation.y());
 
     if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
         maskImageContext->save();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list