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

eric at webkit.org eric at webkit.org
Thu Apr 8 00:43:39 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 0448fcdb6f4a60de769741db4f2a7687f5862a7f
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 19 21:35:59 2009 +0000

    2009-12-19  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add tests to check filter, mask, clip, opacity and marker ordering
            https://bugs.webkit.org/show_bug.cgi?id=14010
    
            Tests the right order of filter and clipper/masker aplied to a SVG
            object.
    
            * platform/mac/svg/filters/filter-clip-expected.checksum: Added.
            * platform/mac/svg/filters/filter-clip-expected.png: Added.
            * platform/mac/svg/filters/filter-clip-expected.txt: Added.
            * svg/filters/filter-clip.svg: Added.
    2009-12-19  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add tests to check filter, mask, clip, opacity and marker ordering
            https://bugs.webkit.org/show_bug.cgi?id=14010
    
            The right ordering for applying effects on objects in SVG is filters,
            clipper/masker and opacity. This patch fixes the order of filter and
            clipper/masker. Opacity and marker need another test.
            This change is according to the SVG Specification:
            http://www.w3.org/TR/SVG11/render.html#Elements
    
            Test: svg/filters/filter-clip.svg
    
            * rendering/SVGRenderSupport.cpp:
            (WebCore::SVGRenderBase::prepareToRenderSVGContent):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52394 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2e458c5..bdb87d2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-19  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add tests to check filter, mask, clip, opacity and marker ordering
+        https://bugs.webkit.org/show_bug.cgi?id=14010
+
+        Tests the right order of filter and clipper/masker aplied to a SVG
+        object.
+
+        * platform/mac/svg/filters/filter-clip-expected.checksum: Added.
+        * platform/mac/svg/filters/filter-clip-expected.png: Added.
+        * platform/mac/svg/filters/filter-clip-expected.txt: Added.
+        * svg/filters/filter-clip.svg: Added.
+
 2009-12-19  Benjamin Otte  <otte at gnome.org>
 
         Reviewed by Gustavo Noronha.
diff --git a/LayoutTests/platform/mac/svg/filters/filter-clip-expected.checksum b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.checksum
new file mode 100644
index 0000000..76dd1cb
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.checksum
@@ -0,0 +1 @@
+ec96e2d00a49a65735379eebbdbc29c8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/filters/filter-clip-expected.png b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.png
new file mode 100644
index 0000000..883c542
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
new file mode 100644
index 0000000..8e61414
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
@@ -0,0 +1,12 @@
+KCanvasResource {id="mask" [type=MASKER]}
+KCanvasResource {id="blur" [type=FILTER]  [bounding box=at (-20.00%,-20.00%) size 140.00%x140.00%]}
+KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M120.00,70.00 L119.90,73.14 L119.61,76.27 L119.11,79.37 L118.43,82.43 L117.55,85.45 L116.49,88.41 L115.24,91.29 L113.82,94.09 L112.22,96.79 L110.45,99.39 L108.53,101.87 L106.45,104.23 L104.23,106.45 L101.87,108.53 L99.39,110.45 L96.79,112.22 L94.09,113.82 L91.29,115.24 L88.41,116.49 L85.45,117.55 L82.43,118.43 L79.37,119.11 L76.27,119.61 L73.14,119.90 L70.00,120.00 L66.86,119.90 L63.73,119.61 L60.63,119.11 L57.57,118.43 L54.55,117.55 L51.59,116.49 L48.71,115.24 L45.91,113.82 L43.21,112.22 L40.61,110.45 L38.13,108.53 L35.77,106.45 L33.55,104.23 L31.47,101.87 L29.55,99.39 L27.78,96.79 L26.18,94.09 L24.76,91.29 L23.51,88.41 L22.45,85.45 L21.57,82.43 L20.89,79.37 L20.39,76.27 L20.10,73.14 L20.00,70.00 L20.10,66.86 L20.39,63.73 L20.89,60.63 L21.57,57.57 L22.45,54.55 L23.51,51.59 L24.76,48.71 L26.18,45.91 L27.78,43.21 L29.55,40.61 L31.47,38.13 L33.55,35.77 L35.77,33.55 L38.13,31.47 L40.61,29.55 L43.21,27.78 L45.91,26.18 L48.71,24.76 L51.59,23.51 L54.55,22.45 L57.57,21.57 L60.63,20.89 L63.73,20.39 L66.86,20.10 L70.00,20.00 L73.14,20.10 L76.27,20.39 L79.37,20.89 L82.43,21.57 L85.45,22.45 L88.41,23.51 L91.29,24.76 L94.09,26.18 L96.79,27.78 L99.39,29.55 L101.87,31.47 L104.23,33.55 L106.45,35.77 L108.53,38.13 L110.45,40.61 L112.22,43.21 L113.82,45.91 L115.24,48.71 L116.49,51.59 L117.55,54.55 L118.43,57.57 L119.11,60.63 L119.61,63.73 L119.90,66.86 Z]]]}
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (20,20) size 100x100
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {mask} at (0,0) size 140x140
+        RenderPath {rect} at (0,0) size 140x140 [fill={[type=SOLID] [color=#008000]}] [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=#FFFF00]}] [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=#008000]}] [clip path="clip"] [filter=blur] [data="M20.00,20.00 L120.00,20.00 L120.00,120.00 L20.00,120.00 Z"]
diff --git a/LayoutTests/svg/filters/filter-clip.svg b/LayoutTests/svg/filters/filter-clip.svg
new file mode 100644
index 0000000..1cd42f4
--- /dev/null
+++ b/LayoutTests/svg/filters/filter-clip.svg
@@ -0,0 +1,15 @@
+<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="green"/>
+    <circle cx="70" cy="70" r="40" fill="yellow"/>
+</mask>
+<filter id="blur" x="-20%" y="-20%" width="140%" height="140%">
+    <feGaussianBlur stdDeviation="10"/>
+</filter>
+<clipPath id="clip">
+    <circle cx="70" cy="70" r="50"/>
+</clipPath>
+</defs>
+<rect x="20" y="20" width="100" height="100" style="fill:green;filter:url(#blur);clip-path:url(#clip);mask:url(#mask)"/>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1595777..9f5a14f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-19  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add tests to check filter, mask, clip, opacity and marker ordering
+        https://bugs.webkit.org/show_bug.cgi?id=14010
+
+        The right ordering for applying effects on objects in SVG is filters,
+        clipper/masker and opacity. This patch fixes the order of filter and
+        clipper/masker. Opacity and marker need another test.
+        This change is according to the SVG Specification:
+        http://www.w3.org/TR/SVG11/render.html#Elements
+
+        Test: svg/filters/filter-clip.svg
+
+        * rendering/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+
 2009-12-19  Evan Martin  <evan at chromium.org>
 
         Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index a594410..1935a22 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -129,13 +129,11 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
     SVGResourceClipper* clipper = getClipperById(document, clipperId);
     SVGResourceMasker* masker = getMaskerById(document, maskerId);
 
-#if ENABLE(FILTERS)
-    if (filter) {
-        filter->addClient(styledElement);
-        filter->prepareFilter(paintInfo.context, object);
-    } else if (!filterId.isEmpty())
-        svgElement->document()->accessSVGExtensions()->addPendingResource(filterId, styledElement);
-#endif
+    if (masker) {
+        masker->addClient(styledElement);
+        masker->applyMask(paintInfo.context, boundingBox);
+    } else if (!maskerId.isEmpty())
+        svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
 
     if (clipper) {
         clipper->addClient(styledElement);
@@ -143,11 +141,13 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
     } else if (!clipperId.isEmpty())
         svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
 
-    if (masker) {
-        masker->addClient(styledElement);
-        masker->applyMask(paintInfo.context, boundingBox);
-    } else if (!maskerId.isEmpty())
-        svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
+#if ENABLE(FILTERS)
+    if (filter) {
+        filter->addClient(styledElement);
+        filter->prepareFilter(paintInfo.context, object);
+    } else if (!filterId.isEmpty())
+        svgElement->document()->accessSVGExtensions()->addPendingResource(filterId, styledElement);
+#endif
 }
 
 void SVGRenderBase::finishRenderSVGContent(RenderObject* object, RenderObject::PaintInfo& paintInfo, SVGResourceFilter*& filter, GraphicsContext* savedContext)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list