[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:14:21 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5dbb877946f2e308a8c89306c63a47d3a6786e50
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 20:02:04 2010 +0000

    2010-07-15  Alex Nicolaou  <anicolao at chromium.org>
    
            Reviewed by Dirk Schulze.
    
            https://bugs.webkit.org/show_bug.cgi?id=42228
    
            SVG Masks were in the wrong colour space for non-CG graphics layers,
            because for those cases ImageBuffer needs to be explicitly told to
            convert the pixels. This change adds a test that demonstrates the
            problem and the conversion call to make the mask LinearRGB.
    
            * platform/mac/svg/custom/mask-colorspace-expected.checksum: Added.
            * platform/mac/svg/custom/mask-colorspace-expected.png: Added.
            * platform/mac/svg/custom/mask-colorspace-expected.txt: Added.
            * svg/custom/mask-colorspace.svg: Added.
    2010-07-15  Alex Nicolaou  <anicolao at chromium.org>
    
            Reviewed by Dirk Schulze.
    
            https://bugs.webkit.org/show_bug.cgi?id=42228
    
            SVG Masks were in the wrong colour space for non-CG graphics layers,
            because for those cases ImageBuffer needs to be explicitly told to
            convert the pixels. This change adds a test that demonstrates the
            problem and the conversion call to make the mask LinearRGB.
    
            Test: svg/custom/mask-colorspace.svg
    
            * rendering/RenderSVGResourceMasker.cpp:
            (WebCore::RenderSVGResourceMasker::createMaskImage):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63450 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e07eb8e..15db718 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-15  Alex Nicolaou  <anicolao at chromium.org>
+
+        Reviewed by Dirk Schulze.
+
+        https://bugs.webkit.org/show_bug.cgi?id=42228
+        
+        SVG Masks were in the wrong colour space for non-CG graphics layers,
+        because for those cases ImageBuffer needs to be explicitly told to
+        convert the pixels. This change adds a test that demonstrates the
+        problem and the conversion call to make the mask LinearRGB.
+
+        * platform/mac/svg/custom/mask-colorspace-expected.checksum: Added.
+        * platform/mac/svg/custom/mask-colorspace-expected.png: Added.
+        * platform/mac/svg/custom/mask-colorspace-expected.txt: Added.
+        * svg/custom/mask-colorspace.svg: Added.
+
 2010-07-15  Ojan Vafai  <ojan at chromium.org>
 
         Unreviewed.
diff --git a/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.checksum b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.checksum
new file mode 100644
index 0000000..ad51413
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.checksum
@@ -0,0 +1 @@
+17b0a6317452a58d5a85f7142d6989a4
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.png b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.png
new file mode 100644
index 0000000..964776e
Binary files /dev/null and b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.txt b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.txt
new file mode 100644
index 0000000..c57e89e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/custom/mask-colorspace-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (20,20) size 230x100
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+        RenderPath {rect} at (0,0) size 140x140 [fill={[type=SOLID] [color=#00E600]}] [data="M0.00,0.00 L140.00,0.00 L140.00,140.00 L0.00,140.00 Z"]
+        RenderPath {circle} at (30,30) size 80x80 [fill={[type=SOLID] [color=#00FD00]}] [data="M110.00,70.00 L109.92,72.51 L109.68,75.01 L109.29,77.50 L108.74,79.95 L108.04,82.36 L107.19,84.72 L106.19,87.03 L105.05,89.27 L103.77,91.43 L102.36,93.51 L100.82,95.50 L99.16,97.38 L97.38,99.16 L95.50,100.82 L93.51,102.36 L91.43,103.77 L89.27,105.05 L87.03,106.19 L84.72,107.19 L82.36,108.04 L79.95,108.74 L77.50,109.29 L75.01,109.68 L72.51,109.92 L70.00,110.00 L67.49,109.92 L64.99,109.68 L62.50,109.29 L60.05,108.74 L57.64,108.04 L55.28,107.19 L52.97,106.19 L50.73,105.05 L48.57,103.77 L46.49,102.36 L44.50,100.82 L42.62,99.16 L40.84,97.38 L39.18,95.50 L37.64,93.51 L36.23,91.43 L34.95,89.27 L33.81,87.03 L32.81,84.72 L31.96,82.36 L31.26,79.95 L30.71,77.50 L30.32,75.01 L30.08,72.51 L30.00,70.00 L30.08,67.49 L30.32,64.99 L30.71,62.50 L31.26,60.05 L31.96,57.64 L32.81,55.28 L33.81,52.97 L34.95,50.73 L36.23,48.57 L37.64,46.49 L39.18,44.50 L40.84,42.62 L42.62,40.84 L44.50,39.18 L46.49,37.64 L48.57,36.23 L50.73,34.95 L52.97,33.81 L55.28,32.81 L57.64,31.96 L60.05,31.26 L62.50,30.71 L64.99,30.32 L67.49,30.08 L70.00,30.00 L72.51,30.08 L75.01,30.32 L77.50,30.71 L79.95,31.26 L82.36,31.96 L84.72,32.81 L87.03,33.81 L89.27,34.95 L91.43,36.23 L93.51,37.64 L95.50,39.18 L97.38,40.84 L99.16,42.62 L100.82,44.50 L102.36,46.49 L103.77,48.57 L105.05,50.73 L106.19,52.97 L107.19,55.28 L108.04,57.64 L108.74,60.05 L109.29,62.50 L109.68,64.99 L109.92,67.49 Z"]
+    RenderPath {rect} at (20,20) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M20.00,20.00 L120.00,20.00 L120.00,120.00 L20.00,120.00 Z"]
+      [masker="mask"] RenderSVGResourceMasker {mask} at (10,10) size 120x120
+    RenderPath {rect} at (150,20) size 100x100 [fill={[type=SOLID] [color=#6F6F6F]}] [data="M150.00,20.00 L250.00,20.00 L250.00,120.00 L150.00,120.00 Z"]
+    RenderPath {circle} at (160,30) size 80x80 [fill={[type=SOLID] [color=#4C4C4C]}] [data="M240.00,70.00 L239.92,72.51 L239.68,75.01 L239.29,77.50 L238.74,79.95 L238.04,82.36 L237.19,84.72 L236.19,87.03 L235.05,89.27 L233.77,91.43 L232.36,93.51 L230.82,95.50 L229.16,97.38 L227.38,99.16 L225.50,100.82 L223.51,102.36 L221.43,103.77 L219.27,105.05 L217.03,106.19 L214.72,107.19 L212.36,108.04 L209.95,108.74 L207.50,109.29 L205.01,109.68 L202.51,109.92 L200.00,110.00 L197.49,109.92 L194.99,109.68 L192.50,109.29 L190.05,108.74 L187.64,108.04 L185.28,107.19 L182.97,106.19 L180.73,105.05 L178.57,103.77 L176.49,102.36 L174.50,100.82 L172.62,99.16 L170.84,97.38 L169.18,95.50 L167.64,93.51 L166.23,91.43 L164.95,89.27 L163.81,87.03 L162.81,84.72 L161.96,82.36 L161.26,79.95 L160.71,77.50 L160.32,75.01 L160.08,72.51 L160.00,70.00 L160.08,67.49 L160.32,64.99 L160.71,62.50 L161.26,60.05 L161.96,57.64 L162.81,55.28 L163.81,52.97 L164.95,50.73 L166.23,48.57 L167.64,46.49 L169.18,44.50 L170.84,42.62 L172.62,40.84 L174.50,39.18 L176.49,37.64 L178.57,36.23 L180.73,34.95 L182.97,33.81 L185.28,32.81 L187.64,31.96 L190.05,31.26 L192.50,30.71 L194.99,30.32 L197.49,30.08 L200.00,30.00 L202.51,30.08 L205.01,30.32 L207.50,30.71 L209.95,31.26 L212.36,31.96 L214.72,32.81 L217.03,33.81 L219.27,34.95 L221.43,36.23 L223.51,37.64 L225.50,39.18 L227.38,40.84 L229.16,42.62 L230.82,44.50 L232.36,46.49 L233.77,48.57 L235.05,50.73 L236.19,52.97 L237.19,55.28 L238.04,57.64 L238.74,60.05 L239.29,62.50 L239.68,64.99 L239.92,67.49 Z"]
diff --git a/LayoutTests/svg/custom/mask-colorspace.svg b/LayoutTests/svg/custom/mask-colorspace.svg
new file mode 100644
index 0000000..6ce3c23
--- /dev/null
+++ b/LayoutTests/svg/custom/mask-colorspace.svg
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<mask id="mask">
+    <rect x="0" y="0" width="140" height="140" fill="rgb(0%,90%,0%)"/>
+    <circle cx="70" cy="70" r="40" fill="rgb(0%, 99%, 0%)"/>
+</mask>
+</defs>
+<rect x="20" y="20" width="100" height="100" style="fill:black;mask:url(#mask)"/>
+
+<!-- reference image - should be identical to above -->
+<rect x="150" y="20" width="100" height="100" fill="rgb(111,111,111)"/>
+<circle cx="200" cy="70" r="40" fill="rgb(76,76,76)"/>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 15dd5b3..92c203a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-15  Alex Nicolaou  <anicolao at chromium.org>
+
+        Reviewed by Dirk Schulze.
+
+        https://bugs.webkit.org/show_bug.cgi?id=42228
+        
+        SVG Masks were in the wrong colour space for non-CG graphics layers,
+        because for those cases ImageBuffer needs to be explicitly told to
+        convert the pixels. This change adds a test that demonstrates the
+        problem and the conversion call to make the mask LinearRGB.
+
+        Test: svg/custom/mask-colorspace.svg
+
+        * rendering/RenderSVGResourceMasker.cpp:
+        (WebCore::RenderSVGResourceMasker::createMaskImage):
+
 2010-07-15  Daniel Bates  <dbates at rim.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/rendering/RenderSVGResourceMasker.cpp b/WebCore/rendering/RenderSVGResourceMasker.cpp
index 352ea56..5052e86 100644
--- a/WebCore/rendering/RenderSVGResourceMasker.cpp
+++ b/WebCore/rendering/RenderSVGResourceMasker.cpp
@@ -190,6 +190,10 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
 
     maskImageContext->restore();
 
+#if !PLATFORM(CG)
+    maskerData->maskImage->transformColorSpace(DeviceRGB, LinearRGB);
+#endif
+
     // create the luminance mask
     RefPtr<ImageData> imageData(maskerData->maskImage->getUnmultipliedImageData(maskImageRect));
     CanvasPixelArray* srcPixelArray(imageData->data());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list