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

krit at webkit.org krit at webkit.org
Thu Apr 8 02:00:57 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 6e42616833d7af488ac53069cab9b0d6195c740f
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 26 18:02:26 2010 +0000

    2010-02-26  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVGResourceClipper needs to be moved to RenderSVGResourceClipper
            https://bugs.webkit.org/show_bug.cgi?id=35421
    
            Move SVGResourceClipper to RenderSVGResourceClipper. This follows the changes
            of Masker and helps to clean up the SVG code. Code snippets from SVGClipPathElement
            and SVGResourceClipper got combined in RenderSVGResourceClipper. DRT results are
            more readable for clipPath's now. It's possible to see the unit type of clipper, as
            well as it's childs instead of just one path.
    
            * Android.mk:
            * GNUmakefile.am:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * rendering/RenderSVGResource.h:
            (WebCore::):
            * rendering/RenderSVGResourceClipper.cpp: Added.
            (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper):
            (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
            (WebCore::RenderSVGResourceClipper::invalidateClients):
            (WebCore::RenderSVGResourceClipper::invalidateClient):
            (WebCore::RenderSVGResourceClipper::applyResource):
            (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
            * rendering/RenderSVGResourceClipper.h: Added.
            (WebCore::RenderSVGResourceClipper::renderName):
            (WebCore::RenderSVGResourceClipper::resourceType):
            (WebCore::RenderSVGResourceClipper::clipPathUnits):
            * rendering/SVGRenderSupport.cpp:
            (WebCore::SVGRenderBase::prepareToRenderSVGContent):
            (WebCore::SVGRenderBase::clipperBoundingBoxForRenderer):
            (WebCore::SVGRenderBase::deregisterFromResources):
            * rendering/SVGRenderTreeAsText.cpp:
            (WebCore::operator<<):
            (WebCore::writeStyle):
            (WebCore::writeSVGResource):
            (WebCore::writeResources):
            * svg/SVGClipPathElement.cpp:
            (WebCore::SVGClipPathElement::svgAttributeChanged):
            (WebCore::SVGClipPathElement::childrenChanged):
            (WebCore::SVGClipPathElement::createRenderer):
            * svg/SVGClipPathElement.h:
            (WebCore::SVGClipPathElement::isValid):
            * svg/SVGStyledElement.cpp:
            (WebCore::SVGStyledElement::invalidateResources):
            * svg/graphics/SVGResource.h:
            (WebCore::):
            (WebCore::SVGResource::isPaintServer):
            (WebCore::SVGResource::isFilter):
            (WebCore::SVGResource::isMarker):
            * svg/graphics/SVGResourceClipper.cpp: Removed.
            * svg/graphics/SVGResourceClipper.h: Removed.
    
    2010-02-26  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            SVGResourceClipper needs to be moved to RenderSVGResourceClipper
            https://bugs.webkit.org/show_bug.cgi?id=35421
    
            Update results after the move of SVGResourceClipper. Results are better
            readable and more sensible now.
    
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt:
            * platform/mac/svg/batik/text/textEffect2-expected.txt:
            * platform/mac/svg/batik/text/textProperties-expected.txt:
            * platform/mac/svg/css/clippath-with-shadow-expected.txt:
            * platform/mac/svg/custom/clip-path-child-changes-expected.txt:
            * platform/mac/svg/custom/clip-path-display-none-child-expected.txt:
            * platform/mac/svg/custom/clip-path-href-changes-expected.txt:
            * platform/mac/svg/custom/clip-path-referencing-use-expected.txt:
            * platform/mac/svg/custom/clip-path-referencing-use2-expected.txt:
            * platform/mac/svg/custom/clip-path-units-changes-expected.txt:
            * platform/mac/svg/custom/clip-path-with-transform-expected.txt:
            * platform/mac/svg/custom/empty-clip-path-expected.txt:
            * platform/mac/svg/custom/focus-ring-expected.txt:
            * platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt:
            * platform/mac/svg/custom/invalid-css-expected.txt:
            * platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt:
            * platform/mac/svg/custom/js-late-clipPath-creation-expected.txt:
            * platform/mac/svg/custom/recursive-clippath-expected.txt:
            * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt:
            * platform/mac/svg/custom/text-clip-expected.txt:
            * platform/mac/svg/custom/visibility-override-clip-expected.txt:
            * platform/mac/svg/filters/filter-clip-expected.txt:
            * svg/custom/use-clipped-transform-expected.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a7ae376..c884ac1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,42 @@
+2010-02-26  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVGResourceClipper needs to be moved to RenderSVGResourceClipper
+        https://bugs.webkit.org/show_bug.cgi?id=35421
+
+        Update results after the move of SVGResourceClipper. Results are better
+        readable and more sensible now.
+
+        * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt:
+        * platform/mac/svg/batik/text/textEffect2-expected.txt:
+        * platform/mac/svg/batik/text/textProperties-expected.txt:
+        * platform/mac/svg/css/clippath-with-shadow-expected.txt:
+        * platform/mac/svg/custom/clip-path-child-changes-expected.txt:
+        * platform/mac/svg/custom/clip-path-display-none-child-expected.txt:
+        * platform/mac/svg/custom/clip-path-href-changes-expected.txt:
+        * platform/mac/svg/custom/clip-path-referencing-use-expected.txt:
+        * platform/mac/svg/custom/clip-path-referencing-use2-expected.txt:
+        * platform/mac/svg/custom/clip-path-units-changes-expected.txt:
+        * platform/mac/svg/custom/clip-path-with-transform-expected.txt:
+        * platform/mac/svg/custom/empty-clip-path-expected.txt:
+        * platform/mac/svg/custom/focus-ring-expected.txt:
+        * platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt:
+        * platform/mac/svg/custom/invalid-css-expected.txt:
+        * platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt:
+        * platform/mac/svg/custom/js-late-clipPath-creation-expected.txt:
+        * platform/mac/svg/custom/recursive-clippath-expected.txt:
+        * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt:
+        * platform/mac/svg/custom/text-clip-expected.txt:
+        * platform/mac/svg/custom/visibility-override-clip-expected.txt:
+        * platform/mac/svg/filters/filter-clip-expected.txt:
+        * svg/custom/use-clipped-transform-expected.txt:
+
 2010-02-26  Ben Murdoch  <benm at google.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt
index e059fb8..29ad338 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.txt
@@ -1,4 +1,3 @@
-KCanvasResource {id="one" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [bounding box mode=1] [path=M0.50,0.50 L0.50,0.51 L0.50,0.53 L0.50,0.54 L0.49,0.55 L0.49,0.56 L0.49,0.57 L0.48,0.59 L0.48,0.60 L0.47,0.61 L0.46,0.62 L0.45,0.63 L0.45,0.64 L0.44,0.65 L0.43,0.65 L0.42,0.66 L0.41,0.67 L0.40,0.68 L0.39,0.68 L0.37,0.69 L0.36,0.69 L0.35,0.69 L0.34,0.70 L0.33,0.70 L0.31,0.70 L0.30,0.70 L0.29,0.70 L0.27,0.70 L0.26,0.70 L0.25,0.69 L0.24,0.69 L0.23,0.69 L0.21,0.68 L0.20,0.68 L0.19,0.67 L0.18,0.66 L0.17,0.65 L0.16,0.65 L0.15,0.64 L0.15,0.63 L0.14,0.62 L0.13,0.61 L0.12,0.60 L0.12,0.59 L0.11,0.57 L0.11,0.56 L0.11,0.55 L0.10,0.54 L0.10,0.53 L0.10,0.51 L0.10,0.50 L0.10,0.49 L0.10,0.47 L0.10,0.46 L0.11,0.45 L0.11,0.44 L0.11,0.43 L0.12,0.41 L0.12,0.40 L0.13,0.39 L0.14,0.38 L0.15,0.37 L0.15,0.36 L0.16,0.35 L0.17,0.35 L0.18,0.34 L0.19,0.33 L0.20,0.32 L0.21,0.32 L0.23,0.31 L0.24,0.31 L0.25,0.31 L0.26,0.30 L0.27,0.30 L0.29,0.30 L0.30,0.30 L0.31,0.30 L0.33,0.30 L0.34,0.30 L0.35,0.31 L0.36,0.31 L0.37,0.31 L0.39,0.32 L0.40,0.32 L0.41,0.33 L0.42,0.34 L0.43,0.35 L0.44,0.35 L0.45,0.36 L0.45,0.37 L0.46,0.38 L0.47,0.39 L0.48,0.40 L0.48,0.41 L0.49,0.43 L0.49,0.44 L0.49,0.45 L0.50,0.46 L0.50,0.47 L0.50,0.49 Z], [winding=NON-ZERO] [bounding box mode=1] [path=M0.90,0.50 L0.90,0.51 L0.90,0.53 L0.90,0.54 L0.89,0.55 L0.89,0.56 L0.89,0.57 L0.88,0.59 L0.88,0.60 L0.87,0.61 L0.86,0.62 L0.85,0.63 L0.85,0.64 L0.84,0.65 L0.83,0.65 L0.82,0.66 L0.81,0.67 L0.80,0.68 L0.79,0.68 L0.77,0.69 L0.76,0.69 L0.75,0.69 L0.74,0.70 L0.73,0.70 L0.71,0.70 L0.70,0.70 L0.69,0.70 L0.67,0.70 L0.66,0.70 L0.65,0.69 L0.64,0.69 L0.63,0.69 L0.61,0.68 L0.60,0.68 L0.59,0.67 L0.58,0.66 L0.57,0.65 L0.56,0.65 L0.55,0.64 L0.55,0.63 L0.54,0.62 L0.53,0.61 L0.52,0.60 L0.52,0.59 L0.51,0.57 L0.51,0.56 L0.51,0.55 L0.50,0.54 L0.50,0.53 L0.50,0.51 L0.50,0.50 L0.50,0.49 L0.50,0.47 L0.50,0.46 L0.51,0.45 L0.51,0.44 L0.51,0.43 L0.52,0.41 L0.52,0.40 L0.53,0.39 L0.54,0.38 L0.55,0.37 L0.55,0.36 L0.56,0.35 L0.57,0.35 L0.58,0.34 L0.59,0.33 L0.60,0.32 L0.61,0.32 L0.63,0.31 L0.64,0.31 L0.65,0.31 L0.66,0.30 L0.67,0.30 L0.69,0.30 L0.70,0.30 L0.71,0.30 L0.73,0.30 L0.74,0.30 L0.75,0.31 L0.76,0.31 L0.77,0.31 L0.79,0.32 L0.80,0.32 L0.81,0.33 L0.82,0.34 L0.83,0.35 L0.84,0.35 L0.85,0.36 L0.85,0.37 L0.86,0.38 L0.87,0.39 L0.88,0.40 L0.88,0.41 L0.89,0.43 L0.89,0.44 L0.89,0.45 L0.90,0.46 L0.90,0.47 L0.90,0.49 Z]]]}
 layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
@@ -7,10 +6,11 @@ layer at (0,0) size 480x360
       RenderSVGInlineText {#text} at (0,-17) size 356x22
         chunk 1 (middle anchor) text run 1 at (62.50,35.00) startOffset 0 endOffset 51 width 355.00: "Testing stroke inclusion for 'clip-path' and 'mask'"
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="one"] [clipPathUnits=objectBoundingBox]
         RenderPath {circle} at (0,0) size 1x1 [stroke={[type=SOLID] [color=#FF0000] [stroke width=0.15]}] [data="M0.50,0.50 L0.50,0.51 L0.50,0.53 L0.50,0.54 L0.49,0.55 L0.49,0.56 L0.49,0.57 L0.48,0.59 L0.48,0.60 L0.47,0.61 L0.46,0.62 L0.45,0.63 L0.45,0.64 L0.44,0.65 L0.43,0.65 L0.42,0.66 L0.41,0.67 L0.40,0.68 L0.39,0.68 L0.37,0.69 L0.36,0.69 L0.35,0.69 L0.34,0.70 L0.33,0.70 L0.31,0.70 L0.30,0.70 L0.29,0.70 L0.27,0.70 L0.26,0.70 L0.25,0.69 L0.24,0.69 L0.23,0.69 L0.21,0.68 L0.20,0.68 L0.19,0.67 L0.18,0.66 L0.17,0.65 L0.16,0.65 L0.15,0.64 L0.15,0.63 L0.14,0.62 L0.13,0.61 L0.12,0.60 L0.12,0.59 L0.11,0.57 L0.11,0.56 L0.11,0.55 L0.10,0.54 L0.10,0.53 L0.10,0.51 L0.10,0.50 L0.10,0.49 L0.10,0.47 L0.10,0.46 L0.11,0.45 L0.11,0.44 L0.11,0.43 L0.12,0.41 L0.12,0.40 L0.13,0.39 L0.14,0.38 L0.15,0.37 L0.15,0.36 L0.16,0.35 L0.17,0.35 L0.18,0.34 L0.19,0.33 L0.20,0.32 L0.21,0.32 L0.23,0.31 L0.24,0.31 L0.25,0.31 L0.26,0.30 L0.27,0.30 L0.29,0.30 L0.30,0.30 L0.31,0.30 L0.33,0.30 L0.34,0.30 L0.35,0.31 L0.36,0.31 L0.37,0.31 L0.39,0.32 L0.40,0.32 L0.41,0.33 L0.42,0.34 L0.43,0.35 L0.44,0.35 L0.45,0.36 L0.45,0.37 L0.46,0.38 L0.47,0.39 L0.48,0.40 L0.48,0.41 L0.49,0.43 L0.49,0.44 L0.49,0.45 L0.50,0.46 L0.50,0.47 L0.50,0.49 Z"]
         RenderPath {circle} at (0,0) size 1x1 [data="M0.90,0.50 L0.90,0.51 L0.90,0.53 L0.90,0.54 L0.89,0.55 L0.89,0.56 L0.89,0.57 L0.88,0.59 L0.88,0.60 L0.87,0.61 L0.86,0.62 L0.85,0.63 L0.85,0.64 L0.84,0.65 L0.83,0.65 L0.82,0.66 L0.81,0.67 L0.80,0.68 L0.79,0.68 L0.77,0.69 L0.76,0.69 L0.75,0.69 L0.74,0.70 L0.73,0.70 L0.71,0.70 L0.70,0.70 L0.69,0.70 L0.67,0.70 L0.66,0.70 L0.65,0.69 L0.64,0.69 L0.63,0.69 L0.61,0.68 L0.60,0.68 L0.59,0.67 L0.58,0.66 L0.57,0.65 L0.56,0.65 L0.55,0.64 L0.55,0.63 L0.54,0.62 L0.53,0.61 L0.52,0.60 L0.52,0.59 L0.51,0.57 L0.51,0.56 L0.51,0.55 L0.50,0.54 L0.50,0.53 L0.50,0.51 L0.50,0.50 L0.50,0.49 L0.50,0.47 L0.50,0.46 L0.51,0.45 L0.51,0.44 L0.51,0.43 L0.52,0.41 L0.52,0.40 L0.53,0.39 L0.54,0.38 L0.55,0.37 L0.55,0.36 L0.56,0.35 L0.57,0.35 L0.58,0.34 L0.59,0.33 L0.60,0.32 L0.61,0.32 L0.63,0.31 L0.64,0.31 L0.65,0.31 L0.66,0.30 L0.67,0.30 L0.69,0.30 L0.70,0.30 L0.71,0.30 L0.73,0.30 L0.74,0.30 L0.75,0.31 L0.76,0.31 L0.77,0.31 L0.79,0.32 L0.80,0.32 L0.81,0.33 L0.82,0.34 L0.83,0.35 L0.84,0.35 L0.85,0.36 L0.85,0.37 L0.86,0.38 L0.87,0.39 L0.88,0.40 L0.88,0.41 L0.89,0.43 L0.89,0.44 L0.89,0.45 L0.90,0.46 L0.90,0.47 L0.90,0.49 Z"]
-    RenderPath {rect} at (170,60) size 160x80 [fill={[type=SOLID] [color=#00008B]}] [clip path="one"] [data="M150.00,0.00 L350.00,0.00 L350.00,200.00 L150.00,200.00 Z"]
+    RenderPath {rect} at (170,60) size 160x80 [fill={[type=SOLID] [color=#00008B]}] [data="M150.00,0.00 L350.00,0.00 L350.00,200.00 L150.00,200.00 Z"]
+      [clipPath="one"] RenderSVGResourceClipper {clipPath} at (170,60) size 160x80
     RenderSVGText {text} at (50,110) size 111x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-14) size 111x18
         chunk 1 text run 1 at (50.00,110.00) startOffset 0 endOffset 19 width 111.00: "With a 'clip-path':"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt
index 837938e..84422f9 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.txt
@@ -1,21 +1,21 @@
-KCanvasResource {id="clip1" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M200.00,10.00 L260.00,10.00 L260.00,110.00 L200.00,110.00 Z]]]}
-KCanvasResource {id="clip2" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M90.00,150.00 L265.00,150.00 L265.00,250.00 L90.00,250.00 Z], [winding=NON-ZERO] [path=M225.00,160.00 L320.00,160.00 L320.00,235.00 L225.00,235.00 Z]]]}
 layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (0,0) size 480x360
     RenderSVGContainer {g} at (20,17) size 325x269
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="clip1"] [clipPathUnits=userSpaceOnUse]
           RenderPath {rect} at (200,10) size 60x100 [fill={[type=SOLID] [color=#000000]}] [data="M200.00,10.00 L260.00,10.00 L260.00,110.00 L200.00,110.00 Z"]
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="clip2"] [clipPathUnits=userSpaceOnUse]
           RenderPath {rect} at (90,150) size 175x100 [fill={[type=SOLID] [color=#000000]}] [data="M90.00,150.00 L265.00,150.00 L265.00,250.00 L90.00,250.00 Z"]
           RenderPath {rect} at (225,160) size 95x75 [fill={[type=SOLID] [color=#000000]}] [data="M225.00,160.00 L320.00,160.00 L320.00,235.00 L225.00,235.00 Z"]
-      RenderPath {rect} at (200,17) size 60x66 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [clip path="clip1"] [data="M20.00,20.00 L460.00,20.00 L460.00,80.00 L20.00,80.00 Z"]
+      RenderPath {rect} at (200,17) size 60x66 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [data="M20.00,20.00 L460.00,20.00 L460.00,80.00 L20.00,80.00 Z"]
+        [clipPath="clip1"] RenderSVGResourceClipper {clipPath} at (200,10) size 60x100
       RenderSVGText {text} at (20,130) size 325x33 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-27) size 325x33
           chunk 1 text run 1 at (20.00,130.00) startOffset 0 endOffset 23 width 325.00: "Rectangle being clipped"
-      RenderSVGContainer {g} at (112,153) size 208x97 [clip path="clip2"]
+      RenderSVGContainer {g} at (112,153) size 208x97
+        [clipPath="clip2"] RenderSVGResourceClipper {clipPath} at (90,150) size 230x100
         RenderPath {rect} at (112,187) size 231x46 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#00FFFF]}] [data="M115.00,190.00 L340.00,190.00 L340.00,230.00 L115.00,230.00 Z"]
         RenderPath {rect} at (112,237) size 231x46 [stroke={[type=SOLID] [color=#008000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#00FF00]}] [data="M115.00,240.00 L340.00,240.00 L340.00,280.00 L115.00,280.00 Z"]
         RenderSVGText {text} at (115,180) size 327x33 contains 1 chunk(s)
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt
index c35d602..7343217 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-02-b-expected.txt
@@ -1,19 +1,19 @@
-KCanvasResource {id="clip1" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [bounding box mode=1] [path=M0.25,0.50 L0.85,0.50 L0.85,1.50 L0.25,1.50 Z]]]}
-KCanvasResource {id="clip2" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M60.00,60.00 L140.00,60.00 L140.00,140.00 L60.00,140.00 Z]]]}
 layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (0,0) size 480x360
     RenderSVGContainer {g} at (20,50) size 457x236
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip1"] [clipPathUnits=objectBoundingBox]
         RenderPath {rect} at (0,0) size 1x2 [fill={[type=SOLID] [color=#000000]}] [data="M0.25,0.50 L0.85,0.50 L0.85,1.50 L0.25,1.50 Z"]
-      RenderPath {rect} at (117,50) size 259x40 [fill={[type=SOLID] [color=#FF0000]}] [clip path="clip1"] [data="M10.00,10.00 L440.00,10.00 L440.00,90.00 L10.00,90.00 Z"]
+      RenderPath {rect} at (117,50) size 259x40 [fill={[type=SOLID] [color=#FF0000]}] [data="M10.00,10.00 L440.00,10.00 L440.00,90.00 L10.00,90.00 Z"]
+        [clipPath="clip1"] RenderSVGResourceClipper {clipPath} at (117.50,50) size 258x80
       RenderSVGText {text} at (20,130) size 457x33 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-27) size 457x33
           chunk 1 text run 1 at (20.00,130.00) startOffset 0 endOffset 31 width 457.00: "clipPathUnits=objectBoundingBox"
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip2"] [clipPathUnits=userSpaceOnUse]
         RenderPath {rect} at (60,60) size 80x80 [fill={[type=SOLID] [color=#000000]}] [data="M60.00,60.00 L140.00,60.00 L140.00,140.00 L60.00,140.00 Z"]
-      RenderPath {rect} at (184,157) size 86x86 [transform={m=((0.71,-0.71)(0.71,0.71)) t=(100.00,200.00)}] [fill={[type=SOLID] [color=#0000FF]}] [clip path="clip2"] [data="M0.00,0.00 L120.00,0.00 L120.00,120.00 L0.00,120.00 Z"]
+      RenderPath {rect} at (184,157) size 86x86 [transform={m=((0.71,-0.71)(0.71,0.71)) t=(100.00,200.00)}] [fill={[type=SOLID] [color=#0000FF]}] [data="M0.00,0.00 L120.00,0.00 L120.00,120.00 L0.00,120.00 Z"]
+        [clipPath="clip2"] RenderSVGResourceClipper {clipPath} at (60,60) size 80x80
       RenderSVGText {text} at (20,280) size 434x33 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-27) size 434x33
           chunk 1 text run 1 at (20.00,280.00) startOffset 0 endOffset 28 width 434.00: "clipPathUnits=userSpaceOnUse"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt
index 1fcae12..10e63ae 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-04-b-expected.txt
@@ -1,11 +1,10 @@
-KCanvasResource {id="sample" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
 layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (0,0) size 480x360
     RenderSVGContainer {g} at (20,20) size 420x310
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="sample"] [clipPathUnits=userSpaceOnUse]
           RenderSVGText {text} at (45,270) size 353x122 contains 1 chunk(s)
             RenderSVGInlineText {#text} at (0,-101) size 353x122
               chunk 1 text run 1 at (45.00,270.00) startOffset 0 endOffset 9 width 353.00: "Clip Test"
@@ -15,7 +14,8 @@ layer at (0,0) size 480x360
           RenderSVGInlineText {#text} at (0,-101) size 353x122
             chunk 1 text run 1 at (55.00,130.00) startOffset 0 endOffset 9 width 353.00: "Clip Test"
       RenderSVGContainer {g} at (20,170) size 410x160
-        RenderSVGImage {image} at (20,170) size 410x160 [clip path="sample"]
+        RenderSVGImage {image} at (20,170) size 410x160
+          [clipPath="sample"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
     RenderSVGText {text} at (10,340) size 264x46 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-36) size 264x46
         chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 264.00: "$Revision: 1.8 $"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt
index 80a55c8..40244ae 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-05-f-expected.txt
@@ -1,5 +1,3 @@
-KCanvasResource {id="clip1" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M200.00,40.00 L220.00,40.00 L220.00,100.00 L240.00,100.00 L240.00,80.00 L180.00,80.00 L180.00,60.00 L260.00,60.00 L260.00,120.00 L200.00,120.00 L200.00,40.00 Z]]]}
-KCanvasResource {id="clip2" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M200.00,170.00 L220.00,170.00 L220.00,230.00 L240.00,230.00 L240.00,210.00 L180.00,210.00 L180.00,190.00 L260.00,190.00 L260.00,250.00 L200.00,250.00 L200.00,170.00 Z]]]}
 layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
@@ -8,15 +6,17 @@ layer at (0,0) size 480x360
       RenderSVGText {text} at (150,20) size 164x16 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-13) size 164x16
           chunk 1 text run 1 at (150.00,20.00) startOffset 0 endOffset 28 width 164.00: "Test for clip-rule property."
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
-        RenderPath {path} at (180,40) size 80x80 [fill={[type=SOLID] [color=#000000]}] [data="M200.00,40.00 L220.00,40.00 L220.00,100.00 L240.00,100.00 L240.00,80.00 L180.00,80.00 L180.00,60.00 L260.00,60.00 L260.00,120.00 L200.00,120.00 L200.00,40.00 Z"]
-      RenderPath {rect} at (180,40) size 80x80 [fill={[type=SOLID] [color=#FF0000]}] [clip path="clip1"] [data="M50.00,30.00 L400.00,30.00 L400.00,130.00 L50.00,130.00 Z"]
+      RenderSVGResourceClipper {clipPath} [id="clip1"] [clipPathUnits=userSpaceOnUse]
+        RenderPath {path} at (180,40) size 80x80 [fill={[type=SOLID] [color=#000000]}] [clip rule=EVEN-ODD] [data="M200.00,40.00 L220.00,40.00 L220.00,100.00 L240.00,100.00 L240.00,80.00 L180.00,80.00 L180.00,60.00 L260.00,60.00 L260.00,120.00 L200.00,120.00 L200.00,40.00 Z"]
+      RenderPath {rect} at (180,40) size 80x80 [fill={[type=SOLID] [color=#FF0000]}] [data="M50.00,30.00 L400.00,30.00 L400.00,130.00 L50.00,130.00 Z"]
+        [clipPath="clip1"] RenderSVGResourceClipper {clipPath} at (180,40) size 80x80
       RenderSVGText {text} at (100,140) size 99x14 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-11) size 99x14
           chunk 1 text run 1 at (100.00,140.00) startOffset 0 endOffset 17 width 99.00: "clip-rule=evenodd"
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip2"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (180,170) size 80x80 [fill={[type=SOLID] [color=#000000]}] [data="M200.00,170.00 L220.00,170.00 L220.00,230.00 L240.00,230.00 L240.00,210.00 L180.00,210.00 L180.00,190.00 L260.00,190.00 L260.00,250.00 L200.00,250.00 L200.00,170.00 Z"]
-      RenderPath {rect} at (180,170) size 80x80 [fill={[type=SOLID] [color=#0000FF]}] [clip path="clip2"] [data="M50.00,160.00 L400.00,160.00 L400.00,260.00 L50.00,260.00 Z"]
+      RenderPath {rect} at (180,170) size 80x80 [fill={[type=SOLID] [color=#0000FF]}] [data="M50.00,160.00 L400.00,160.00 L400.00,260.00 L50.00,260.00 Z"]
+        [clipPath="clip2"] RenderSVGResourceClipper {clipPath} at (180,170) size 80x80
       RenderSVGText {text} at (100,270) size 92x14 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-11) size 92x14
           chunk 1 text run 1 at (100.00,270.00) startOffset 0 endOffset 16 width 92.00: "cliprule=nonzero"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt
index 74cc53e..d042357 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-02-f-expected.txt
@@ -1,5 +1,3 @@
-KCanvasResource {id="overflowHiddenClip1" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L2.00,0.00 L2.00,2.00 L0.00,2.00 Z]]]}
-KCanvasResource {id="overflowHiddenClip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L4.00,0.00 L4.00,4.00 L0.00,4.00 Z]]]}
 KCanvasResource {id="marker1" [type=MARKER] [angle=0.00] [ref x=5.00 y=5.00]}
 KCanvasResource {id="marker2" [type=MARKER] [angle=0.00] [ref x=10.00 y=10.00]}
 KCanvasResource {id="marker3" [type=MARKER] [angle=0.00] [ref x=10.00 y=10.00]}
@@ -10,9 +8,9 @@ layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (0,0) size 480x360
     RenderSVGContainer {g} at (0,0) size 448x272
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="overflowHiddenClip1"] [clipPathUnits=userSpaceOnUse]
           RenderPath {rect} at (0,0) size 2x2 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L2.00,0.00 L2.00,2.00 L0.00,2.00 Z"]
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="overflowHiddenClip"] [clipPathUnits=userSpaceOnUse]
           RenderPath {rect} at (0,0) size 4x4 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4.00,0.00 L4.00,4.00 L0.00,4.00 Z"]
       RenderSVGText {text} at (125,30) size 184x16 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-13) size 184x16
@@ -27,15 +25,18 @@ layer at (0,0) size 480x360
         RenderSVGContainer {g} at (142,52) size 66x66 [transform={m=((1.00,0.00)(0.00,1.00)) t=(120.00,0.00)}]
           RenderPath {path} at (150,60) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M30.00,60.00 L80.00,60.00 L80.00,110.00 Z"]
           RenderSVGContainer {g} at (142,52) size 16x16 [transform={m=((8.00,0.00)(0.00,8.00)) t=(22.00,52.00)}]
-            RenderSVGContainer {g} at (142,52) size 16x16 [clip path="overflowHiddenClip1"]
+            RenderSVGContainer {g} at (142,52) size 16x16
+              [clipPath="overflowHiddenClip1"] RenderSVGResourceClipper {clipPath} at (0,0) size 2x2
               RenderSVGContainer {g} at (142,52) size 16x16 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (142,52) size 16x16 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
           RenderSVGContainer {g} at (192,52) size 16x16 [transform={m=((8.00,0.00)(0.00,8.00)) t=(72.00,52.00)}]
-            RenderSVGContainer {g} at (192,52) size 16x16 [clip path="overflowHiddenClip1"]
+            RenderSVGContainer {g} at (192,52) size 16x16
+              [clipPath="overflowHiddenClip1"] RenderSVGResourceClipper {clipPath} at (0,0) size 2x2
               RenderSVGContainer {g} at (192,52) size 16x16 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (192,52) size 16x16 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
           RenderSVGContainer {g} at (192,102) size 16x16 [transform={m=((8.00,0.00)(0.00,8.00)) t=(72.00,102.00)}]
-            RenderSVGContainer {g} at (192,102) size 16x16 [clip path="overflowHiddenClip1"]
+            RenderSVGContainer {g} at (192,102) size 16x16
+              [clipPath="overflowHiddenClip1"] RenderSVGResourceClipper {clipPath} at (0,0) size 2x2
               RenderSVGContainer {g} at (192,102) size 16x16 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (192,102) size 16x16 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
       RenderSVGContainer {g} at (0,0) size 448x142
@@ -48,15 +49,18 @@ layer at (0,0) size 480x360
         RenderSVGContainer {g} at (382,52) size 66x66 [transform={m=((1.00,0.00)(0.00,1.00)) t=(120.00,0.00)}]
           RenderPath {path} at (385,58) size 57x57 [stroke={[type=SOLID] [color=#000000] [stroke width=4.00]}] [data="M270.00,60.00 L320.00,60.00 L320.00,110.00 Z"]
           RenderSVGContainer {g} at (382,52) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(262.00,52.00)}]
-            RenderSVGContainer {g} at (382,52) size 16x16 [clip path="overflowHiddenClip"]
+            RenderSVGContainer {g} at (382,52) size 16x16
+              [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
               RenderSVGContainer {g} at (378,48) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (378,48) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=4.00]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
           RenderSVGContainer {g} at (432,52) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(312.00,52.00)}]
-            RenderSVGContainer {g} at (432,52) size 16x16 [clip path="overflowHiddenClip"]
+            RenderSVGContainer {g} at (432,52) size 16x16
+              [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
               RenderSVGContainer {g} at (428,48) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (428,48) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=4.00]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
           RenderSVGContainer {g} at (432,102) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(312.00,102.00)}]
-            RenderSVGContainer {g} at (432,102) size 16x16 [clip path="overflowHiddenClip"]
+            RenderSVGContainer {g} at (432,102) size 16x16
+              [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
               RenderSVGContainer {g} at (428,98) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                 RenderPath {rect} at (428,98) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=4.00]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
       RenderSVGContainer {g} at (0,0) size 5x5
@@ -73,15 +77,18 @@ layer at (0,0) size 480x360
           RenderPath {path} at (145,188) size 57x57 [stroke={[type=SOLID] [color=#800080] [stroke width=4.00]}] [fill={[type=SOLID] [color=#FF0000]}] [data="M30.00,190.00 L80.00,190.00 L80.00,240.00 Z"]
           RenderSVGContainer {g} at (142,182) size 66x66
             RenderSVGContainer {g} at (142,182) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(22.00,182.00)}]
-              RenderSVGContainer {g} at (142,182) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (142,182) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (138,178) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                   RenderPath {rect} at (138,178) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=8.00]}] [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
             RenderSVGContainer {g} at (192,182) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(72.00,182.00)}]
-              RenderSVGContainer {g} at (192,182) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (192,182) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (188,178) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                   RenderPath {rect} at (188,178) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=8.00]}] [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
             RenderSVGContainer {g} at (192,232) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(72.00,232.00)}]
-              RenderSVGContainer {g} at (192,232) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (192,232) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (188,228) size 24x24 [transform={m=((0.20,0.00)(0.00,0.20)) t=(0.00,0.00)}]
                   RenderPath {rect} at (188,228) size 24x24 [stroke={[type=SOLID] [color=#000000] [stroke width=8.00]}] [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L20.00,0.00 L20.00,20.00 L0.00,20.00 Z"]
       RenderSVGContainer {g} at (258,178) size 190x94
@@ -93,15 +100,18 @@ layer at (0,0) size 480x360
           RenderPath {path} at (385,188) size 57x57 [stroke={[type=SOLID] [color=#800080] [stroke width=4.00]}] [fill={[type=SOLID] [color=#FF0000]}] [data="M270.00,190.00 L320.00,190.00 L320.00,240.00 Z"]
           RenderSVGContainer {g} at (382,182) size 66x66
             RenderSVGContainer {g} at (382,182) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(262.00,182.00)}]
-              RenderSVGContainer {g} at (382,182) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (382,182) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (378,178) size 24x24 [transform={m=((0.40,0.00)(0.00,0.40)) t=(0.00,0.00)}]
                   RenderPath {rect} at (378,178) size 24x24 [stroke={[type=SOLID] [color=#0000FF] [stroke width=4.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
             RenderSVGContainer {g} at (432,182) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(312.00,182.00)}]
-              RenderSVGContainer {g} at (432,182) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (432,182) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (428,178) size 24x24 [transform={m=((0.40,0.00)(0.00,0.40)) t=(0.00,0.00)}]
                   RenderPath {rect} at (428,178) size 24x24 [stroke={[type=SOLID] [color=#0000FF] [stroke width=4.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
             RenderSVGContainer {g} at (432,232) size 16x16 [transform={m=((4.00,0.00)(0.00,4.00)) t=(312.00,232.00)}]
-              RenderSVGContainer {g} at (432,232) size 16x16 [clip path="overflowHiddenClip"]
+              RenderSVGContainer {g} at (432,232) size 16x16
+                [clipPath="overflowHiddenClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 4x4
                 RenderSVGContainer {g} at (428,228) size 24x24 [transform={m=((0.40,0.00)(0.00,0.40)) t=(0.00,0.00)}]
                   RenderPath {rect} at (428,228) size 24x24 [stroke={[type=SOLID] [color=#0000FF] [stroke width=4.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L10.00,0.00 L10.00,10.00 L0.00,10.00 Z"]
     RenderSVGText {text} at (10,340) size 264x46 contains 1 chunk(s)
diff --git a/LayoutTests/platform/mac/svg/batik/text/textEffect2-expected.txt b/LayoutTests/platform/mac/svg/batik/text/textEffect2-expected.txt
index 13ea90e..1a484c2 100644
--- a/LayoutTests/platform/mac/svg/batik/text/textEffect2-expected.txt
+++ b/LayoutTests/platform/mac/svg/batik/text/textEffect2-expected.txt
@@ -1,6 +1,4 @@
 KRenderingPaintServer {id="grad" [type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
-KCanvasResource {id="svgClip" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 450x500
@@ -17,19 +15,21 @@ layer at (0,0) size 450x500
           RenderSVGGradientStop {stop} at (0,0) size 0x0
           RenderSVGGradientStop {stop} at (0,0) size 0x0
           RenderSVGGradientStop {stop} at (0,0) size 0x0
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
           RenderSVGText {text} at (100,200) size 152x59 contains 1 chunk(s)
             RenderSVGInlineText {#text} at (0,-48) size 152x59
               chunk 1 text run 1 at (100.00,200.00) startOffset 0 endOffset 5 width 152.00: "BATIK"
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="svgClip"] [clipPathUnits=userSpaceOnUse]
           RenderSVGText {text} at (100,300) size 152x59 contains 1 chunk(s)
             RenderSVGInlineText {#text} at (0,-48) size 152x59
               chunk 1 text run 1 at (100.00,300.00) startOffset 0 endOffset 5 width 152.00: "BATIK"
-      RenderPath {rect} at (100,160) size 200x45 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}] [clip path="clip"] [data="M100.00,160.00 L300.00,160.00 L300.00,205.00 L100.00,205.00 Z"]
+      RenderPath {rect} at (100,160) size 200x45 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}] [data="M100.00,160.00 L300.00,160.00 L300.00,205.00 L100.00,205.00 Z"]
+        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
       RenderSVGText {text} at (300,200) size 65x14 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-11) size 65x14
           chunk 1 text run 1 at (300.00,200.00) startOffset 0 endOffset 13 width 65.00: "(System font)"
-      RenderPath {rect} at (100,260) size 200x45 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}] [clip path="svgClip"] [data="M100.00,260.00 L300.00,260.00 L300.00,305.00 L100.00,305.00 Z"]
+      RenderPath {rect} at (100,260) size 200x45 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}] [data="M100.00,260.00 L300.00,260.00 L300.00,305.00 L100.00,305.00 Z"]
+        [clipPath="svgClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
       RenderSVGText {text} at (300,300) size 55x14 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-11) size 55x14
           chunk 1 text run 1 at (300.00,300.00) startOffset 0 endOffset 10 width 55.00: "(SVG font)"
diff --git a/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt b/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt
index 163c371..ae50fe2 100644
--- a/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt
+++ b/LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt
@@ -1,5 +1,4 @@
 KCanvasResource {id="gaussianBlur" [type=FILTER]  [bounding box=at (-100,-100) size 200x200] [bounding box mode=0]}
-KCanvasResource {id="textClip" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
 KRenderingPaintServer {id="gradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#0000FF), (1.00,#008000)]] [bounding box mode=0] [start=(-50,-25)] [end=(50,25)]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
@@ -132,7 +131,7 @@ layer at (0,0) size 450x500
           RenderSVGInlineText {#text} at (0,-14) size 150x18
             chunk 1 (middle anchor) text run 1 at (-74.50,25.00) startOffset 0 endOffset 21 width 149.00: "stroke=\"MidnightBlue\""
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-        RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+        RenderSVGResourceClipper {clipPath} [id="textClip"] [clipPathUnits=userSpaceOnUse]
           RenderSVGText {text} at (-42,0) size 84x36 contains 1 chunk(s)
             RenderSVGInlineText {#text} at (0,-28) size 84x36
               chunk 1 (middle anchor) text run 1 at (-42.00,0.00) startOffset 0 endOffset 6 width 84.00: "sample"
@@ -140,7 +139,8 @@ layer at (0,0) size 450x500
           RenderSVGGradientStop {stop} at (0,0) size 0x0
           RenderSVGGradientStop {stop} at (0,0) size 0x0
       RenderSVGContainer {g} at (300,345) size 100x50 [transform={m=((1.00,0.00)(0.00,1.00)) t=(350.00,370.00)}]
-        RenderPath {rect} at (300,345) size 100x50 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#0000FF), (1.00,#008000)]] [bounding box mode=0] [start=(-50,-25)] [end=(50,25)]}] [clip path="textClip"] [data="M-50.00,-25.00 L50.00,-25.00 L50.00,25.00 L-50.00,25.00 Z"]
+        RenderPath {rect} at (300,345) size 100x50 [fill={[type=LINEAR-GRADIENT] [stops=[(0.00,#0000FF), (1.00,#008000)]] [bounding box mode=0] [start=(-50,-25)] [end=(50,25)]}] [data="M-50.00,-25.00 L50.00,-25.00 L50.00,25.00 L-50.00,25.00 Z"]
+          [clipPath="textClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
         RenderSVGText {text} at (-50,15) size 100x18 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-14) size 100x18
             chunk 1 (middle anchor) text run 1 at (-49.50,15.00) startOffset 0 endOffset 17 width 99.00: "text as clip-path"
diff --git a/LayoutTests/platform/mac/svg/css/clippath-with-shadow-expected.txt b/LayoutTests/platform/mac/svg/css/clippath-with-shadow-expected.txt
index bd42e70..f2fd76c 100644
--- a/LayoutTests/platform/mac/svg/css/clippath-with-shadow-expected.txt
+++ b/LayoutTests/platform/mac/svg/css/clippath-with-shadow-expected.txt
@@ -1,12 +1,12 @@
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
     RenderPath {rect} at (0,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [data="M200.00,0.00 L400.00,0.00 L400.00,200.00 L200.00,200.00 Z"]
-    RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+    RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
       RenderSVGContainer {use} at (0,0) size 210x210
         RenderSVGContainer {g} at (0,0) size 210x210
           RenderPath {rect} at (0,0) size 210x210 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [data="M200.00,0.00 L400.00,0.00 L400.00,200.00 L200.00,200.00 Z"]
-    RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [clip path="clip"] [data="M0.00,0.00 L400.00,0.00 L400.00,200.00 L0.00,200.00 Z"]
+    RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L400.00,0.00 L400.00,200.00 L0.00,200.00 Z"]
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-child-changes-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-child-changes-expected.txt
index 924b888..de2a443 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-child-changes-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-child-changes-expected.txt
@@ -1,11 +1,11 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="myclip"]
+    RenderSVGContainer {g} at (0,0) size 200x200
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-display-none-child-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-display-none-child-expected.txt
index aa730e9..cd49768 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-display-none-child-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-display-none-child-expected.txt
@@ -1,12 +1,12 @@
-KCanvasResource {id="c" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="c"] [clipPathUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="c"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="c"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
       RenderPath {rect} at (0,0) size 200x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,100.00 L0.00,100.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderSVGContainer {g} at (0,116) size 356x78
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-href-changes-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-href-changes-expected.txt
index 924b888..de2a443 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-href-changes-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-href-changes-expected.txt
@@ -1,11 +1,11 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="myclip"]
+    RenderSVGContainer {g} at (0,0) size 200x200
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use-expected.txt
index 206070b..e0f5f7a 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use-expected.txt
@@ -1,15 +1,15 @@
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
         RenderSVGContainer {use} at (0,0) size 100x100
           RenderSVGContainer {g} at (0,0) size 100x100
             RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="clip"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderSVGText {text} at (10,120) size 489x18 contains 1 chunk(s)
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use2-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use2-expected.txt
index 83c894b..0c30d3a 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use2-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-referencing-use2-expected.txt
@@ -19,7 +19,6 @@ CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-p
 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
 CONSOLE MESSAGE: line 1: Error: Not allowed to use indirect reference in <clip-path>
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
@@ -29,13 +28,14 @@ layer at (0,0) size 800x600
       RenderSVGContainer {use} at (0,0) size 50x50
         RenderSVGContainer {g} at (0,0) size 50x50
           RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
         RenderSVGContainer {use} at (0,0) size 50x50
           RenderSVGContainer {g} at (0,0) size 50x50
             RenderSVGContainer {g} at (0,0) size 50x50
               RenderPath {rect} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="clip"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderSVGText {text} at (10,120) size 377x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-14) size 377x18
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-units-changes-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-units-changes-expected.txt
index 924b888..de2a443 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-units-changes-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-units-changes-expected.txt
@@ -1,11 +1,11 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="myclip"]
+    RenderSVGContainer {g} at (0,0) size 200x200
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/clip-path-with-transform-expected.txt b/LayoutTests/platform/mac/svg/custom/clip-path-with-transform-expected.txt
index 924b888..de2a443 100644
--- a/LayoutTests/platform/mac/svg/custom/clip-path-with-transform-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/clip-path-with-transform-expected.txt
@@ -1,11 +1,11 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 100x100 [transform={m=((0.50,0.00)(0.00,0.50)) t=(0.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="myclip"]
+    RenderSVGContainer {g} at (0,0) size 200x200
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
       RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/empty-clip-path-expected.txt b/LayoutTests/platform/mac/svg/custom/empty-clip-path-expected.txt
index 90d396a..dfe4d99 100644
--- a/LayoutTests/platform/mac/svg/custom/empty-clip-path-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/empty-clip-path-expected.txt
@@ -1,17 +1,17 @@
-KCanvasResource {id="nothing" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
-KCanvasResource {id="emptyrect" [type=CLIPPER] [clip data=[[winding=EVEN-ODD] [path=M0.00,0.00 L0.00,0.00 L0.00,0.00 L0.00,0.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="nothing"] [clipPathUnits=userSpaceOnUse]
+      RenderSVGResourceClipper {clipPath} [id="emptyrect"] [clipPathUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#000000]}] [data=""]
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="nothing"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="nothing"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="emptyrect"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="emptyrect"] RenderSVGResourceClipper {clipPath} at (0,0) size 0x0
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderSVGContainer {g} at (0,116) size 452x38
       RenderSVGText {text} at (0,130) size 287x18 contains 1 chunk(s)
diff --git a/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt b/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
index 518fa29..acb8819 100644
--- a/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
@@ -1,4 +1,3 @@
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
@@ -22,9 +21,12 @@ layer at (0,0) size 800x600
       RenderSVGText {text} at (0,0) size 76x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-14) size 76x18
           chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 12 width 76.00: "focused text"
-    RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+    RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
       RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGImage {image} at (0,0) size 0x0 [clip path="clip"]
-    RenderSVGImage {image} at (150,400) size 137x137 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,400.00)}] [clip path="clip"]
+    RenderSVGImage {image} at (0,0) size 0x0
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
+    RenderSVGImage {image} at (150,400) size 137x137 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,400.00)}]
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
     RenderSVGContainer {g} at (310,400) size 137x137 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(360.00,400.00)}]
-      RenderSVGImage {image} at (310,400) size 137x137 [clip path="clip"]
+      RenderSVGImage {image} at (310,400) size 137x137
+        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
diff --git a/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt b/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt
index c2be237..9027e6a 100644
--- a/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt
@@ -1,13 +1,13 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 KCanvasResource {id="myfilter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGImage {image} at (0,0) size 100x75 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,-25.00)}] [clip path="myclip"] [filter=myfilter]
+    RenderSVGImage {image} at (0,0) size 100x75 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,-25.00)}] [filter=myfilter]
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
     RenderSVGText {text} at (0,125) size 542x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,-14) size 542x18
         chunk 1 text run 1 at (0.00,125.00) startOffset 0 endOffset 84 width 542.00: "You should see a solid green block above (a blurred and clipped green checkerboard)."
diff --git a/LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt b/LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt
index 273b75a..aa07f0c 100644
--- a/LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt
@@ -1,4 +1,3 @@
-KCanvasResource {id="clip1" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M40.00,40.00 L39.98,40.63 L39.92,41.25 L39.82,41.87 L39.69,42.49 L39.51,43.09 L39.30,43.68 L39.05,44.26 L38.76,44.82 L38.44,45.36 L38.09,45.88 L37.71,46.37 L37.29,46.85 L36.85,47.29 L36.37,47.71 L35.88,48.09 L35.36,48.44 L34.82,48.76 L34.26,49.05 L33.68,49.30 L33.09,49.51 L32.49,49.69 L31.87,49.82 L31.25,49.92 L30.63,49.98 L30.00,50.00 L29.37,49.98 L28.75,49.92 L28.13,49.82 L27.51,49.69 L26.91,49.51 L26.32,49.30 L25.74,49.05 L25.18,48.76 L24.64,48.44 L24.12,48.09 L23.63,47.71 L23.15,47.29 L22.71,46.85 L22.29,46.37 L21.91,45.88 L21.56,45.36 L21.24,44.82 L20.95,44.26 L20.70,43.68 L20.49,43.09 L20.31,42.49 L20.18,41.87 L20.08,41.25 L20.02,40.63 L20.00,40.00 L20.02,39.37 L20.08,38.75 L20.18,38.13 L20.31,37.51 L20.49,36.91 L20.70,36.32 L20.95,35.74 L21.24,35.18 L21.56,34.64 L21.91,34.12 L22.29,33.63 L22.71,33.15 L23.15,32.71 L23.63,32.29 L24.12,31.91 L24.64,31.56 L25.18,31.24 L25.74,30.95 L26.32,30.70 L26.91,30.49 L27.51,30.31 L28.13,30.18 L28.75,30.08 L29.37,30.02 L30.00,30.00 L30.63,30.02 L31.25,30.08 L31.87,30.18 L32.49,30.31 L33.09,30.49 L33.68,30.70 L34.26,30.95 L34.82,31.24 L35.36,31.56 L35.88,31.91 L36.37,32.29 L36.85,32.71 L37.29,33.15 L37.71,33.63 L38.09,34.12 L38.44,34.64 L38.76,35.18 L39.05,35.74 L39.30,36.32 L39.51,36.91 L39.69,37.51 L39.82,38.13 L39.92,38.75 L39.98,39.37 Z]]]}
 KRenderingPaintServer {id="grad" [type=LINEAR-GRADIENT] [stops=[(0.00,#008000)]] [start=(0,0)] [end=(1,0)]}
 KCanvasResource {id="blurxy" [type=FILTER]  [bounding box=at (0,0) size 0x0] [bounding box mode=0]}
 KCanvasResource {id="marker1" [type=MARKER] [angle=0.00] [ref x=5.00 y=5.00]}
@@ -7,7 +6,7 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip1"] [clipPathUnits=userSpaceOnUse]
         RenderPath {circle} at (33,50) size 34x34 [fill={[type=SOLID] [color=#000000]}] [data="M40.00,40.00 L39.98,40.63 L39.92,41.25 L39.82,41.87 L39.69,42.49 L39.51,43.09 L39.30,43.68 L39.05,44.26 L38.76,44.82 L38.44,45.36 L38.09,45.88 L37.71,46.37 L37.29,46.85 L36.85,47.29 L36.37,47.71 L35.88,48.09 L35.36,48.44 L34.82,48.76 L34.26,49.05 L33.68,49.30 L33.09,49.51 L32.49,49.69 L31.87,49.82 L31.25,49.92 L30.63,49.98 L30.00,50.00 L29.37,49.98 L28.75,49.92 L28.13,49.82 L27.51,49.69 L26.91,49.51 L26.32,49.30 L25.74,49.05 L25.18,48.76 L24.64,48.44 L24.12,48.09 L23.63,47.71 L23.15,47.29 L22.71,46.85 L22.29,46.37 L21.91,45.88 L21.56,45.36 L21.24,44.82 L20.95,44.26 L20.70,43.68 L20.49,43.09 L20.31,42.49 L20.18,41.87 L20.08,41.25 L20.02,40.63 L20.00,40.00 L20.02,39.37 L20.08,38.75 L20.18,38.13 L20.31,37.51 L20.49,36.91 L20.70,36.32 L20.95,35.74 L21.24,35.18 L21.56,34.64 L21.91,34.12 L22.29,33.63 L22.71,33.15 L23.15,32.71 L23.63,32.29 L24.12,31.91 L24.64,31.56 L25.18,31.24 L25.74,30.95 L26.32,30.70 L26.91,30.49 L27.51,30.31 L28.13,30.18 L28.75,30.08 L29.37,30.02 L30.00,30.00 L30.63,30.02 L31.25,30.08 L31.87,30.18 L32.49,30.31 L33.09,30.49 L33.68,30.70 L34.26,30.95 L34.82,31.24 L35.36,31.56 L35.88,31.91 L36.37,32.29 L36.85,32.71 L37.29,33.15 L37.71,33.63 L38.09,34.12 L38.44,34.64 L38.76,35.18 L39.05,35.74 L39.30,36.32 L39.51,36.91 L39.69,37.51 L39.82,38.13 L39.92,38.75 L39.98,39.37 Z"]
       RenderSVGHiddenContainer {linearGradient} at (0,0) size 0x0
         RenderSVGGradientStop {stop} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt b/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
index 92629ba..473a6c8 100644
--- a/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt
@@ -1,11 +1,12 @@
-KCanvasResource {id="dynClip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGContainer {g} at (16,40) size 318x174 [transform={m=((1.00,0.00)(0.00,1.50)) t=(0.00,0.00)}]
       RenderSVGText {text} at (10,70) size 529x69 contains 1 chunk(s)
+        [clipPath="dynClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
         RenderSVGInlineText {#text} at (0,-54) size 529x69
+          [clipPath="dynClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
           chunk 1 text run 1 at (10.00,70.00) startOffset 0 endOffset 19 width 529.00: "Clipped. INVISIBLE."
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="dynClip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 334x500 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt b/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
index 92629ba..473a6c8 100644
--- a/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt
@@ -1,11 +1,12 @@
-KCanvasResource {id="dynClip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGContainer {g} at (16,40) size 318x174 [transform={m=((1.00,0.00)(0.00,1.50)) t=(0.00,0.00)}]
       RenderSVGText {text} at (10,70) size 529x69 contains 1 chunk(s)
+        [clipPath="dynClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
         RenderSVGInlineText {#text} at (0,-54) size 529x69
+          [clipPath="dynClip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
           chunk 1 text run 1 at (10.00,70.00) startOffset 0 endOffset 19 width 529.00: "Clipped. INVISIBLE."
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="dynClip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (0,0) size 334x500 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
index b17333c..20d12c8 100644
--- a/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/recursive-clippath-expected.txt
@@ -1,9 +1,10 @@
-KCanvasResource {id="clipPath_0" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
-      RenderPath {rect} at (0,0) size 100x100 [clip path="clipPath_0"] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [clip path="clipPath_0"] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
+    RenderSVGResourceClipper {clipPath} [id="clipPath_0"] [clipPathUnits=userSpaceOnUse]
+      RenderPath {rect} at (0,0) size 100x100 [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+        [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
+    RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
+      [clipPath="clipPath_0"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt b/LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt
index 3092c0e..e2f31f1 100644
--- a/LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt
@@ -1,16 +1,16 @@
 KCanvasResource {id="filter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%]}
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [bounding box mode=1] [path=M1.00,0.50 L1.00,0.53 L1.00,0.56 L0.99,0.59 L0.98,0.62 L0.98,0.65 L0.96,0.68 L0.95,0.71 L0.94,0.74 L0.92,0.77 L0.90,0.79 L0.89,0.82 L0.86,0.84 L0.84,0.86 L0.82,0.89 L0.79,0.90 L0.77,0.92 L0.74,0.94 L0.71,0.95 L0.68,0.96 L0.65,0.98 L0.62,0.98 L0.59,0.99 L0.56,1.00 L0.53,1.00 L0.50,1.00 L0.47,1.00 L0.44,1.00 L0.41,0.99 L0.38,0.98 L0.35,0.98 L0.32,0.96 L0.29,0.95 L0.26,0.94 L0.23,0.92 L0.21,0.90 L0.18,0.89 L0.16,0.86 L0.14,0.84 L0.11,0.82 L0.10,0.79 L0.08,0.77 L0.06,0.74 L0.05,0.71 L0.04,0.68 L0.02,0.65 L0.02,0.62 L0.01,0.59 L0.00,0.56 L0.00,0.53 L0.00,0.50 L0.00,0.47 L0.00,0.44 L0.01,0.41 L0.02,0.38 L0.02,0.35 L0.04,0.32 L0.05,0.29 L0.06,0.26 L0.08,0.23 L0.10,0.21 L0.11,0.18 L0.14,0.16 L0.16,0.14 L0.18,0.11 L0.21,0.10 L0.23,0.08 L0.26,0.06 L0.29,0.05 L0.32,0.04 L0.35,0.02 L0.38,0.02 L0.41,0.01 L0.44,0.00 L0.47,0.00 L0.50,0.00 L0.53,0.00 L0.56,0.00 L0.59,0.01 L0.62,0.02 L0.65,0.02 L0.68,0.04 L0.71,0.05 L0.74,0.06 L0.77,0.08 L0.79,0.10 L0.82,0.11 L0.84,0.14 L0.86,0.16 L0.89,0.18 L0.90,0.21 L0.92,0.23 L0.94,0.26 L0.95,0.29 L0.96,0.32 L0.98,0.35 L0.98,0.38 L0.99,0.41 L1.00,0.44 L1.00,0.47 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=objectBoundingBox]
         RenderPath {circle} at (0,0) size 1x1 [fill={[type=SOLID] [color=#000000]}] [data="M1.00,0.50 L1.00,0.53 L1.00,0.56 L0.99,0.59 L0.98,0.62 L0.98,0.65 L0.96,0.68 L0.95,0.71 L0.94,0.74 L0.92,0.77 L0.90,0.79 L0.89,0.82 L0.86,0.84 L0.84,0.86 L0.82,0.89 L0.79,0.90 L0.77,0.92 L0.74,0.94 L0.71,0.95 L0.68,0.96 L0.65,0.98 L0.62,0.98 L0.59,0.99 L0.56,1.00 L0.53,1.00 L0.50,1.00 L0.47,1.00 L0.44,1.00 L0.41,0.99 L0.38,0.98 L0.35,0.98 L0.32,0.96 L0.29,0.95 L0.26,0.94 L0.23,0.92 L0.21,0.90 L0.18,0.89 L0.16,0.86 L0.14,0.84 L0.11,0.82 L0.10,0.79 L0.08,0.77 L0.06,0.74 L0.05,0.71 L0.04,0.68 L0.02,0.65 L0.02,0.62 L0.01,0.59 L0.00,0.56 L0.00,0.53 L0.00,0.50 L0.00,0.47 L0.00,0.44 L0.01,0.41 L0.02,0.38 L0.02,0.35 L0.04,0.32 L0.05,0.29 L0.06,0.26 L0.08,0.23 L0.10,0.21 L0.11,0.18 L0.14,0.16 L0.16,0.14 L0.18,0.11 L0.21,0.10 L0.23,0.08 L0.26,0.06 L0.29,0.05 L0.32,0.04 L0.35,0.02 L0.38,0.02 L0.41,0.01 L0.44,0.00 L0.47,0.00 L0.50,0.00 L0.53,0.00 L0.56,0.00 L0.59,0.01 L0.62,0.02 L0.65,0.02 L0.68,0.04 L0.71,0.05 L0.74,0.06 L0.77,0.08 L0.79,0.10 L0.82,0.11 L0.84,0.14 L0.86,0.16 L0.89,0.18 L0.90,0.21 L0.92,0.23 L0.94,0.26 L0.95,0.29 L0.96,0.32 L0.98,0.35 L0.98,0.38 L0.99,0.41 L1.00,0.44 L1.00,0.47 Z"]
       RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=objectBoundingBox]
         RenderPath {circle} at (0,0) size 1x1 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M1.00,0.50 L1.00,0.53 L1.00,0.56 L0.99,0.59 L0.98,0.62 L0.98,0.65 L0.96,0.68 L0.95,0.71 L0.94,0.74 L0.92,0.77 L0.90,0.79 L0.89,0.82 L0.86,0.84 L0.84,0.86 L0.82,0.89 L0.79,0.90 L0.77,0.92 L0.74,0.94 L0.71,0.95 L0.68,0.96 L0.65,0.98 L0.62,0.98 L0.59,0.99 L0.56,1.00 L0.53,1.00 L0.50,1.00 L0.47,1.00 L0.44,1.00 L0.41,0.99 L0.38,0.98 L0.35,0.98 L0.32,0.96 L0.29,0.95 L0.26,0.94 L0.23,0.92 L0.21,0.90 L0.18,0.89 L0.16,0.86 L0.14,0.84 L0.11,0.82 L0.10,0.79 L0.08,0.77 L0.06,0.74 L0.05,0.71 L0.04,0.68 L0.02,0.65 L0.02,0.62 L0.01,0.59 L0.00,0.56 L0.00,0.53 L0.00,0.50 L0.00,0.47 L0.00,0.44 L0.01,0.41 L0.02,0.38 L0.02,0.35 L0.04,0.32 L0.05,0.29 L0.06,0.26 L0.08,0.23 L0.10,0.21 L0.11,0.18 L0.14,0.16 L0.16,0.14 L0.18,0.11 L0.21,0.10 L0.23,0.08 L0.26,0.06 L0.29,0.05 L0.32,0.04 L0.35,0.02 L0.38,0.02 L0.41,0.01 L0.44,0.00 L0.47,0.00 L0.50,0.00 L0.53,0.00 L0.56,0.00 L0.59,0.01 L0.62,0.02 L0.65,0.02 L0.68,0.04 L0.71,0.05 L0.74,0.06 L0.77,0.08 L0.79,0.10 L0.82,0.11 L0.84,0.14 L0.86,0.16 L0.89,0.18 L0.90,0.21 L0.92,0.23 L0.94,0.26 L0.95,0.29 L0.96,0.32 L0.98,0.35 L0.98,0.38 L0.99,0.41 L1.00,0.44 L1.00,0.47 Z"]
     RenderSVGContainer {g} at (0,10) size 121x350
       RenderPath {rect} at (10,10) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,10.00 L110.00,10.00 L110.00,110.00 L10.00,110.00 Z"]
         [masker="mask"] RenderSVGResourceMasker {mask} at (0,0) size 120x120
-      RenderPath {rect} at (10,130) size 100x100 [fill={[type=SOLID] [color=#008000]}] [clip path="clip"] [data="M10.00,130.00 L110.00,130.00 L110.00,230.00 L10.00,230.00 Z"]
+      RenderPath {rect} at (10,130) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M10.00,130.00 L110.00,130.00 L110.00,230.00 L10.00,230.00 Z"]
+        [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (10,130) size 100x100
       RenderPath {rect} at (0,240) size 121x120 [fill={[type=SOLID] [color=#008000]}] [filter=filter] [data="M10.00,250.00 L110.00,250.00 L110.00,350.00 L10.00,350.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/custom/text-clip-expected.txt b/LayoutTests/platform/mac/svg/custom/text-clip-expected.txt
index cc07ca7..ba0eb5d 100644
--- a/LayoutTests/platform/mac/svg/custom/text-clip-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/text-clip-expected.txt
@@ -1,15 +1,16 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M200.00,200.00 L300.00,200.00 L300.00,400.00 L200.00,400.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {path} at (200,200) size 100x200 [fill={[type=SOLID] [color=#000000]}] [data="M200.00,200.00 L300.00,200.00 L300.00,400.00 L200.00,400.00 Z"]
     RenderSVGContainer {g} at (0,76) size 133x63
       RenderSVGText {text} at (0,125) size 133x63 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-49) size 133x63
           chunk 1 text run 1 at (0.00,125.00) startOffset 0 endOffset 4 width 133.00: "PASS"
       RenderSVGText {text} at (0,125) size 648x63 contains 1 chunk(s)
+        [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (200,200) size 100x200
         RenderSVGInlineText {#text} at (0,-49) size 648x63
+          [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (200,200) size 100x200
           chunk 1 text run 1 at (0.00,125.00) startOffset 0 endOffset 28 width 648.00: "FAIL (should be clipped out)"
diff --git a/LayoutTests/platform/mac/svg/custom/visibility-override-clip-expected.txt b/LayoutTests/platform/mac/svg/custom/visibility-override-clip-expected.txt
index 5669001..4b4ff84 100644
--- a/LayoutTests/platform/mac/svg/custom/visibility-override-clip-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/visibility-override-clip-expected.txt
@@ -1,13 +1,13 @@
-KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="myclip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
     RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
-    RenderSVGContainer {g} at (0,0) size 100x100 [clip path="myclip"]
+    RenderSVGContainer {g} at (0,0) size 100x100
+      [clipPath="myclip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100
       RenderSVGContainer {g} at (0,0) size 200x200
         RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
         RenderPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
index c8d71e9..8e4b1bd 100644
--- a/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
+++ b/LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
@@ -1,5 +1,4 @@
 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
@@ -8,7 +7,8 @@ layer at (0,0) size 800x600
       RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
         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"]
-      RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
         RenderPath {circle} at (20,20) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="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"]
-    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"]
+    RenderPath {rect} at (20,20) size 100x100 [fill={[type=SOLID] [color=#008000]}] [filter=blur] [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
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (20,20) size 100x100
diff --git a/LayoutTests/svg/custom/use-clipped-transform-expected.txt b/LayoutTests/svg/custom/use-clipped-transform-expected.txt
index d5f5cc7..d7d23cd 100644
--- a/LayoutTests/svg/custom/use-clipped-transform-expected.txt
+++ b/LayoutTests/svg/custom/use-clipped-transform-expected.txt
@@ -1,12 +1,12 @@
-KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z]]]}
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (0,0) size 800x600
     RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00 Z"]
     RenderPath {rect} at (0,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [data="M200.00,0.00 L400.00,0.00 L400.00,200.00 L200.00,200.00 Z"]
-    RenderSVGHiddenContainer {clipPath} at (0,0) size 0x0
+    RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse]
       RenderSVGContainer {use} at (0,0) size 200x200
         RenderSVGContainer {g} at (0,0) size 200x200
           RenderPath {rect} at (0,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(-200.00,0.00)}] [data="M200.00,0.00 L400.00,0.00 L400.00,200.00 L200.00,200.00 Z"]
-    RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [clip path="clip"] [data="M0.00,0.00 L400.00,0.00 L400.00,200.00 L0.00,200.00 Z"]
+    RenderPath {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L400.00,0.00 L400.00,200.00 L0.00,200.00 Z"]
+      [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 200x200
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index c2411b1..f2675e0 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -603,6 +603,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	rendering/RenderSVGInline.cpp \
 	rendering/RenderSVGInlineText.cpp \
 	rendering/RenderSVGModelObject.cpp \
+	rendering/RenderSVGResourceClipper.cpp \
 	rendering/RenderSVGResourceMasker.cpp \
 	rendering/RenderSVGRoot.cpp \
 	rendering/RenderSVGShadowTreeRootContainer.cpp \
@@ -856,7 +857,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	svg/graphics/SVGPaintServerRadialGradient.cpp \
 	svg/graphics/SVGPaintServerSolid.cpp \
 	svg/graphics/SVGResource.cpp \
-	svg/graphics/SVGResourceClipper.cpp \
 	svg/graphics/SVGResourceFilter.cpp \
 	svg/graphics/SVGResourceMarker.cpp \
 	\
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 18c0c35..41b627c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,58 @@
+2010-02-26  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVGResourceClipper needs to be moved to RenderSVGResourceClipper
+        https://bugs.webkit.org/show_bug.cgi?id=35421
+
+        Move SVGResourceClipper to RenderSVGResourceClipper. This follows the changes
+        of Masker and helps to clean up the SVG code. Code snippets from SVGClipPathElement
+        and SVGResourceClipper got combined in RenderSVGResourceClipper. DRT results are
+        more readable for clipPath's now. It's possible to see the unit type of clipper, as
+        well as it's childs instead of just one path.
+
+        * Android.mk:
+        * GNUmakefile.am:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderSVGResource.h:
+        (WebCore::):
+        * rendering/RenderSVGResourceClipper.cpp: Added.
+        (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper):
+        (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
+        (WebCore::RenderSVGResourceClipper::invalidateClients):
+        (WebCore::RenderSVGResourceClipper::invalidateClient):
+        (WebCore::RenderSVGResourceClipper::applyResource):
+        (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
+        * rendering/RenderSVGResourceClipper.h: Added.
+        (WebCore::RenderSVGResourceClipper::renderName):
+        (WebCore::RenderSVGResourceClipper::resourceType):
+        (WebCore::RenderSVGResourceClipper::clipPathUnits):
+        * rendering/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
+        (WebCore::SVGRenderBase::clipperBoundingBoxForRenderer):
+        (WebCore::SVGRenderBase::deregisterFromResources):
+        * rendering/SVGRenderTreeAsText.cpp:
+        (WebCore::operator<<):
+        (WebCore::writeStyle):
+        (WebCore::writeSVGResource):
+        (WebCore::writeResources):
+        * svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::svgAttributeChanged):
+        (WebCore::SVGClipPathElement::childrenChanged):
+        (WebCore::SVGClipPathElement::createRenderer):
+        * svg/SVGClipPathElement.h:
+        (WebCore::SVGClipPathElement::isValid):
+        * svg/SVGStyledElement.cpp:
+        (WebCore::SVGStyledElement::invalidateResources):
+        * svg/graphics/SVGResource.h:
+        (WebCore::):
+        (WebCore::SVGResource::isPaintServer):
+        (WebCore::SVGResource::isFilter):
+        (WebCore::SVGResource::isMarker):
+        * svg/graphics/SVGResourceClipper.cpp: Removed.
+        * svg/graphics/SVGResourceClipper.h: Removed.
+
 2010-02-26  Ben Murdoch  <benm at google.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index f54c2f9..3ecc636 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3009,6 +3009,8 @@ webcore_sources += \
 	WebCore/rendering/RenderSVGModelObject.cpp \
 	WebCore/rendering/RenderSVGModelObject.h \
 	WebCore/rendering/RenderSVGResource.h \
+	WebCore/rendering/RenderSVGResourceClipper.cpp \
+	WebCore/rendering/RenderSVGResourceClipper.h \
 	WebCore/rendering/RenderSVGResourceMasker.cpp \
 	WebCore/rendering/RenderSVGResourceMasker.h \
 	WebCore/rendering/RenderSVGRoot.cpp \
@@ -3346,8 +3348,6 @@ webcore_sources += \
 	WebCore/svg/graphics/SVGPaintServerSolid.h \
 	WebCore/svg/graphics/SVGResource.cpp \
 	WebCore/svg/graphics/SVGResource.h \
-	WebCore/svg/graphics/SVGResourceClipper.cpp \
-	WebCore/svg/graphics/SVGResourceClipper.h \
 	WebCore/svg/graphics/SVGResourceFilter.cpp \
 	WebCore/svg/graphics/SVGResourceFilter.h \
 	WebCore/svg/graphics/SVGResourceListener.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index ed196f4..f8a280e 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3103,6 +3103,8 @@
             'rendering/RenderSVGModelObject.cpp',
             'rendering/RenderSVGModelObject.h',
             'rendering/RenderSVGResource.h',
+            'rendering/RenderSVGResourceClipper.cpp',
+            'rendering/RenderSVGResourceClipper.h',
             'rendering/RenderSVGResourceMasker.cpp',
             'rendering/RenderSVGResourceMasker.h',
             'rendering/RenderSVGRoot.cpp',
@@ -3324,8 +3326,6 @@
             'svg/graphics/SVGPaintServerSolid.h',
             'svg/graphics/SVGResource.cpp',
             'svg/graphics/SVGResource.h',
-            'svg/graphics/SVGResourceClipper.cpp',
-            'svg/graphics/SVGResourceClipper.h',
             'svg/graphics/SVGResourceFilter.cpp',
             'svg/graphics/SVGResourceFilter.h',
             'svg/graphics/SVGResourceListener.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 071ecca..d068c04 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1674,6 +1674,7 @@ HEADERS += \
     rendering/RenderSVGInlineText.h \
     rendering/RenderSVGModelObject.h \
     rendering/RenderSVGResource.h \
+    rendering/RenderSVGResourceClipper.h \
     rendering/RenderSVGResourceMasker.h \
     rendering/RenderSVGRoot.h \
     rendering/RenderSVGShadowTreeRootContainer.h \
@@ -1762,7 +1763,6 @@ HEADERS += \
     svg/graphics/SVGPaintServerPattern.h \
     svg/graphics/SVGPaintServerRadialGradient.h \
     svg/graphics/SVGPaintServerSolid.h \
-    svg/graphics/SVGResourceClipper.h \
     svg/graphics/SVGResourceFilter.h \
     svg/graphics/SVGResource.h \
     svg/graphics/SVGResourceMarker.h \
@@ -2620,7 +2620,6 @@ contains(DEFINES, ENABLE_SVG=1) {
         svg/graphics/SVGPaintServerPattern.cpp \
         svg/graphics/SVGPaintServerRadialGradient.cpp \
         svg/graphics/SVGPaintServerSolid.cpp \
-        svg/graphics/SVGResourceClipper.cpp \
         svg/graphics/SVGResource.cpp \
         svg/graphics/SVGResourceFilter.cpp \
         svg/graphics/SVGResourceMarker.cpp \
@@ -2634,6 +2633,7 @@ contains(DEFINES, ENABLE_SVG=1) {
         rendering/RenderSVGInline.cpp \
         rendering/RenderSVGInlineText.cpp \
         rendering/RenderSVGModelObject.cpp \
+        rendering/RenderSVGResourceClipper.cpp \
         rendering/RenderSVGResourceMasker.cpp \
         rendering/RenderSVGRoot.cpp \
         rendering/RenderSVGShadowTreeRootContainer.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 254015d..9bfcb27 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -27633,6 +27633,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\rendering\RenderSVGResourceClipper.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\rendering\RenderSVGResourceClipper.h"
+				>
+			</File>
+			<File
 				RelativePath="..\rendering\RenderSVGResourceMasker.cpp"
 				>
 			</File>
@@ -41780,14 +41788,6 @@
 					>
 				</File>
 				<File
-					RelativePath="..\svg\graphics\SVGResourceClipper.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\svg\graphics\SVGResourceClipper.h"
-					>
-				</File>
-				<File
 					RelativePath="..\svg\graphics\SVGResourceFilter.cpp"
 					>
 				</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index e2680f9..1960cd4 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1319,6 +1319,8 @@
 		84A81F3E0FC7DFF000955300 /* SourceAlpha.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A81F3C0FC7DFF000955300 /* SourceAlpha.h */; };
 		84A81F410FC7E02700955300 /* SourceGraphic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A81F3F0FC7E02700955300 /* SourceGraphic.cpp */; };
 		84A81F420FC7E02700955300 /* SourceGraphic.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A81F400FC7E02700955300 /* SourceGraphic.h */; };
+		84BDA16B11358D2A00DBF64C /* RenderSVGResourceClipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BDA16911358D2A00DBF64C /* RenderSVGResourceClipper.cpp */; };
+		84BDA16C11358D2A00DBF64C /* RenderSVGResourceClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BDA16A11358D2A00DBF64C /* RenderSVGResourceClipper.h */; };
 		84D0C4041115F1D40018AA34 /* AffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D0C4031115F1D40018AA34 /* AffineTransform.cpp */; };
 		84D0C4061115F1EA0018AA34 /* AffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D0C4051115F1EA0018AA34 /* AffineTransform.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		85004D940ACEEAEF00C438F6 /* DOMSVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85004D880ACEEAEF00C438F6 /* DOMSVGDefsElement.h */; };
@@ -3688,8 +3690,6 @@
 		B25599B10D00D8BA00BB825C /* SVGPaintServerSolid.h in Headers */ = {isa = PBXBuildFile; fileRef = B25599190D00D8B900BB825C /* SVGPaintServerSolid.h */; };
 		B25599B20D00D8BA00BB825C /* SVGResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B255991A0D00D8B900BB825C /* SVGResource.cpp */; };
 		B25599B30D00D8BA00BB825C /* SVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = B255991B0D00D8B900BB825C /* SVGResource.h */; };
-		B25599B40D00D8BA00BB825C /* SVGResourceClipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B255991C0D00D8B900BB825C /* SVGResourceClipper.cpp */; };
-		B25599B50D00D8BA00BB825C /* SVGResourceClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = B255991D0D00D8B900BB825C /* SVGResourceClipper.h */; };
 		B25599B60D00D8BA00BB825C /* SVGResourceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B255991E0D00D8B900BB825C /* SVGResourceFilter.cpp */; };
 		B25599B70D00D8BA00BB825C /* SVGResourceFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = B255991F0D00D8B900BB825C /* SVGResourceFilter.h */; };
 		B25599B80D00D8BA00BB825C /* SVGResourceListener.h in Headers */ = {isa = PBXBuildFile; fileRef = B25599200D00D8B900BB825C /* SVGResourceListener.h */; };
@@ -6755,6 +6755,8 @@
 		84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreKeyGenerator.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		84B2B1F8056BEF3A00D2B771 /* WebCoreKeyGenerator.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebCoreKeyGenerator.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SSLKeyGeneratorMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		84BDA16911358D2A00DBF64C /* RenderSVGResourceClipper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceClipper.cpp; sourceTree = "<group>"; };
+		84BDA16A11358D2A00DBF64C /* RenderSVGResourceClipper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceClipper.h; sourceTree = "<group>"; };
 		84D0C4031115F1D40018AA34 /* AffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AffineTransform.cpp; path = transforms/AffineTransform.cpp; sourceTree = "<group>"; };
 		84D0C4051115F1EA0018AA34 /* AffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AffineTransform.h; path = transforms/AffineTransform.h; sourceTree = "<group>"; };
 		85004D880ACEEAEF00C438F6 /* DOMSVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGDefsElement.h; sourceTree = "<group>"; };
@@ -8936,8 +8938,6 @@
 		B25599190D00D8B900BB825C /* SVGPaintServerSolid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGPaintServerSolid.h; sourceTree = "<group>"; };
 		B255991A0D00D8B900BB825C /* SVGResource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResource.cpp; sourceTree = "<group>"; };
 		B255991B0D00D8B900BB825C /* SVGResource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResource.h; sourceTree = "<group>"; };
-		B255991C0D00D8B900BB825C /* SVGResourceClipper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceClipper.cpp; sourceTree = "<group>"; };
-		B255991D0D00D8B900BB825C /* SVGResourceClipper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceClipper.h; sourceTree = "<group>"; };
 		B255991E0D00D8B900BB825C /* SVGResourceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceFilter.cpp; sourceTree = "<group>"; };
 		B255991F0D00D8B900BB825C /* SVGResourceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceFilter.h; sourceTree = "<group>"; };
 		B25599200D00D8B900BB825C /* SVGResourceListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceListener.h; sourceTree = "<group>"; };
@@ -14293,8 +14293,6 @@
 				B25599190D00D8B900BB825C /* SVGPaintServerSolid.h */,
 				B255991A0D00D8B900BB825C /* SVGResource.cpp */,
 				B255991B0D00D8B900BB825C /* SVGResource.h */,
-				B255991C0D00D8B900BB825C /* SVGResourceClipper.cpp */,
-				B255991D0D00D8B900BB825C /* SVGResourceClipper.h */,
 				B255991E0D00D8B900BB825C /* SVGResourceFilter.cpp */,
 				B255991F0D00D8B900BB825C /* SVGResourceFilter.h */,
 				B25599200D00D8B900BB825C /* SVGResourceListener.h */,
@@ -15605,6 +15603,8 @@
 		F523D2F302DE443B018635CA /* rendering */ = {
 			isa = PBXGroup;
 			children = (
+				84BDA16911358D2A00DBF64C /* RenderSVGResourceClipper.cpp */,
+				84BDA16A11358D2A00DBF64C /* RenderSVGResourceClipper.h */,
 				BC8C8FAA0DDCD2F200B592F4 /* style */,
 				A8CFF04B0A154F09000A4234 /* AutoTableLayout.cpp */,
 				A8CFF0490A154F09000A4234 /* AutoTableLayout.h */,
@@ -17986,6 +17986,7 @@
 				853CA9DD0AEEC5E9002372DC /* RenderSVGInlineText.h in Headers */,
 				A8F5C0B80F9285AC0098E06B /* RenderSVGModelObject.h in Headers */,
 				083192AA112B43050083C3B9 /* RenderSVGResource.h in Headers */,
+ 				84BDA16C11358D2A00DBF64C /* RenderSVGResourceClipper.h in Headers */,
 				083192AC112B43050083C3B9 /* RenderSVGResourceMasker.h in Headers */,
 				AA31B5B50C1DFD1000AE7083 /* RenderSVGRoot.h in Headers */,
 				08DAB9BB1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.h in Headers */,
@@ -18307,7 +18308,6 @@
 				A8F4FB940C169E7B002AFED5 /* SVGRenderSupport.h in Headers */,
 				B2EBDC9D0AF77E3400AE4A68 /* SVGRenderTreeAsText.h in Headers */,
 				B25599B30D00D8BA00BB825C /* SVGResource.h in Headers */,
-				B25599B50D00D8BA00BB825C /* SVGResourceClipper.h in Headers */,
 				B25599B70D00D8BA00BB825C /* SVGResourceFilter.h in Headers */,
 				B25599B80D00D8BA00BB825C /* SVGResourceListener.h in Headers */,
 				B25599BA0D00D8BA00BB825C /* SVGResourceMarker.h in Headers */,
@@ -20235,6 +20235,7 @@
 				853CA9DA0AEEC5E9002372DC /* RenderSVGInline.cpp in Sources */,
 				853CA9DC0AEEC5E9002372DC /* RenderSVGInlineText.cpp in Sources */,
 				A8F5C0B90F9285AC0098E06B /* RenderSVGModelObject.cpp in Sources */,
+ 				84BDA16B11358D2A00DBF64C /* RenderSVGResourceClipper.cpp in Sources */,
 				083192AB112B43050083C3B9 /* RenderSVGResourceMasker.cpp in Sources */,
 				AA31B5B40C1DFD1000AE7083 /* RenderSVGRoot.cpp in Sources */,
 				08DAB9BA1103D9A5003E7ABA /* RenderSVGShadowTreeRootContainer.cpp in Sources */,
@@ -20533,7 +20534,6 @@
 				A8F4FB960C169E85002AFED5 /* SVGRenderSupport.cpp in Sources */,
 				B2EBDC9C0AF77E3400AE4A68 /* SVGRenderTreeAsText.cpp in Sources */,
 				B25599B20D00D8BA00BB825C /* SVGResource.cpp in Sources */,
-				B25599B40D00D8BA00BB825C /* SVGResourceClipper.cpp in Sources */,
 				B25599B60D00D8BA00BB825C /* SVGResourceFilter.cpp in Sources */,
 				B25599B90D00D8BA00BB825C /* SVGResourceMarker.cpp in Sources */,
 				853CA9E80AEEC608002372DC /* SVGRootInlineBox.cpp in Sources */,
diff --git a/WebCore/rendering/RenderSVGResource.h b/WebCore/rendering/RenderSVGResource.h
index 38c6c09..184ffe3 100644
--- a/WebCore/rendering/RenderSVGResource.h
+++ b/WebCore/rendering/RenderSVGResource.h
@@ -28,7 +28,8 @@
 namespace WebCore {
 
 enum RenderSVGResourceType {
-    MaskerResourceType
+    MaskerResourceType,
+    ClipperResourceType
 };
 
 class RenderSVGResource : public RenderSVGHiddenContainer {
diff --git a/WebCore/rendering/RenderSVGResourceClipper.cpp b/WebCore/rendering/RenderSVGResourceClipper.cpp
new file mode 100644
index 0000000..dfc4b1e
--- /dev/null
+++ b/WebCore/rendering/RenderSVGResourceClipper.cpp
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
+ *               2004, 2005, 2006, 2007, 2008 Rob Buis <buis at kde.org>
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "RenderSVGResourceClipper.h"
+
+#include "AffineTransform.h"
+#include "FloatRect.h"
+#include "GraphicsContext.h"
+#include "RenderSVGResource.h"
+#include "SVGClipPathElement.h"
+#include "SVGElement.h"
+#include "SVGRenderSupport.h"
+#include "SVGStyledElement.h"
+#include "SVGStyledTransformableElement.h"
+#include "SVGUnitTypes.h"
+
+namespace WebCore {
+
+RenderSVGResourceType RenderSVGResourceClipper::s_resourceType = ClipperResourceType;
+
+RenderSVGResourceClipper::RenderSVGResourceClipper(SVGStyledElement* node)
+    : RenderSVGResource(node)
+{
+}
+
+RenderSVGResourceClipper::~RenderSVGResourceClipper()
+{
+    m_clipper.clear();
+}
+
+void RenderSVGResourceClipper::invalidateClients()
+{
+    HashSet<RenderObject*>::const_iterator end = m_clipper.end();
+    for (HashSet<RenderObject*>::const_iterator it = m_clipper.begin(); it != end; ++it)
+        (*it)->setNeedsLayout(true);
+    m_clipper.clear();
+}
+
+void RenderSVGResourceClipper::invalidateClient(RenderObject* object)
+{
+    ASSERT(object);
+
+    // FIXME: The HashSet should always contain the object on calling invalidateClient. A race condition
+    // during the parsing can causes a call of invalidateClient right before the call of applyResource.
+    // We return earlier for the moment. This bug should be fixed in:
+    // https://bugs.webkit.org/show_bug.cgi?id=35181
+    if (!m_clipper.contains(object))
+        return;
+
+    m_clipper.remove(object);
+}
+
+bool RenderSVGResourceClipper::applyResource(RenderObject* object, GraphicsContext* context)
+{
+    ASSERT(object);
+    ASSERT(context);
+
+    m_clipper.add(object);
+
+    context->beginPath();
+
+    AffineTransform obbTransform;
+    FloatRect objectBoundingBox = object->objectBoundingBox();
+    bool bbox = static_cast<SVGClipPathElement*>(node())->clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
+    if (bbox) {
+        obbTransform.translate(objectBoundingBox.x(), objectBoundingBox.y());
+        obbTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
+    }
+
+    bool hasClipPath = false;
+    WindRule clipRule = RULE_EVENODD;
+    for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
+        if (!childNode->isSVGElement() || !static_cast<SVGElement*>(childNode)->isStyledTransformable())
+            continue;
+        SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(childNode);
+        RenderStyle* style = styled->renderer() ? styled->renderer()->style() : 0;
+        if (!style || style->display() == NONE)
+            continue;
+        Path pathData = styled->toClipPath();
+        if (pathData.isEmpty())
+            continue;
+        if (bbox)
+            pathData.transform(obbTransform);
+        hasClipPath = true;
+        context->addPath(pathData);
+        clipRule = style->svgStyle()->clipRule();
+    }
+
+    if (!hasClipPath) {
+        Path clipPath;
+        clipPath.addRect(FloatRect());
+        context->addPath(clipPath);
+    }
+
+    // FIXME!
+    // We don't currently allow for heterogenous clip rules.
+    // we would have to detect such, draw to a mask, and then clip
+    // to that mask
+    context->clipPath(clipRule);
+
+    return true;
+}
+
+FloatRect RenderSVGResourceClipper::resourceBoundingBox(const FloatRect& objectBoundingBox) const
+{
+    FloatRect clipRect;
+    for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
+        if (!childNode->isSVGElement() || !static_cast<SVGElement*>(childNode)->isStyledTransformable())
+            continue;
+        SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(childNode);
+        RenderStyle* style = styled->renderer() ? styled->renderer()->style() : 0;
+        if (!style || style->display() == NONE || styled->toClipPath().isEmpty())
+            continue;
+        clipRect.unite(styled->renderer()->objectBoundingBox());
+    }
+
+    if (clipRect.isEmpty())
+        return FloatRect();
+
+    if (static_cast<SVGClipPathElement*>(node())->clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+        AffineTransform obbTransform;
+        obbTransform.translate(objectBoundingBox.x(), objectBoundingBox.y());
+        obbTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
+        return obbTransform.mapRect(clipRect);
+    }
+
+    return clipRect;
+}
+
+}
diff --git a/WebCore/rendering/RenderSVGResourceClipper.h b/WebCore/rendering/RenderSVGResourceClipper.h
new file mode 100644
index 0000000..0e1d2b5
--- /dev/null
+++ b/WebCore/rendering/RenderSVGResourceClipper.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef RenderSVGResourceClipper_h
+#define RenderSVGResourceClipper_h
+
+#if ENABLE(SVG)
+#include "FloatRect.h"
+#include "GraphicsContext.h"
+#include "RenderSVGResource.h"
+#include "SVGClipPathElement.h"
+#include "SVGUnitTypes.h"
+
+#include <wtf/HashSet.h>
+
+namespace WebCore {
+
+class RenderSVGResourceClipper : public RenderSVGResource {
+
+public:
+    RenderSVGResourceClipper(SVGStyledElement*);
+    virtual ~RenderSVGResourceClipper();
+
+    virtual const char* renderName() const { return "RenderSVGResourceClipper"; }
+
+    virtual void invalidateClients();
+    virtual void invalidateClient(RenderObject*);
+
+    virtual bool applyResource(RenderObject*, GraphicsContext*);
+    virtual FloatRect resourceBoundingBox(const FloatRect&) const;
+
+    virtual RenderSVGResourceType resourceType() const { return ClipperResourceType; }
+
+    SVGUnitTypes::SVGUnitType clipPathUnits() const { return toUnitType(static_cast<SVGClipPathElement*>(node())->clipPathUnits()); }
+
+    static RenderSVGResourceType s_resourceType;
+private:
+    HashSet<RenderObject*> m_clipper;
+};
+
+}
+
+#endif
+#endif
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index dc54586..284a9da 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -4,6 +4,7 @@
  *           (C) 2007 Eric Seidel <eric at webkit.org>
  *           (C) 2009 Google, Inc.  All rights reserved.
  *           (C) 2009 Dirk Schulze <krit at webkit.org>
+ * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -33,9 +34,9 @@
 #include "RenderObject.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGResource.h"
+#include "RenderSVGResourceClipper.h"
 #include "RenderSVGResourceMasker.h"
 #include "RenderView.h"
-#include "SVGResourceClipper.h"
 #include "SVGResourceFilter.h"
 #include "SVGStyledElement.h"
 #include "SVGURIReference.h"
@@ -129,17 +130,15 @@ bool SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
         filter = newFilter;
 #endif
 
-    // apply Masker
     if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, maskerId)) {
         if (!masker->applyResource(object, paintInfo.context))
             return false;
     } else if (!maskerId.isEmpty())
         svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
 
-    if (SVGResourceClipper* clipper = getClipperById(document, clipperId, object)) {
-        clipper->addClient(styledElement);
-        clipper->applyClip(paintInfo.context, object->objectBoundingBox());
-    } else if (!clipperId.isEmpty())
+    if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(document, clipperId))
+        clipper->applyResource(object, paintInfo.context);
+    else if (!clipperId.isEmpty())
         svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
 
 #if ENABLE(FILTERS)
@@ -287,9 +286,8 @@ FloatRect SVGRenderBase::filterBoundingBoxForRenderer(const RenderObject* object
 
 FloatRect SVGRenderBase::clipperBoundingBoxForRenderer(const RenderObject* object) const
 {
-    SVGResourceClipper* clipper = getClipperById(object->document(), object->style()->svgStyle()->clipPath(), object);
-    if (clipper)
-        return clipper->clipperBoundingBox(object->objectBoundingBox());
+    if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(object->document(), object->style()->svgStyle()->clipPath()))
+        return clipper->resourceBoundingBox(object->objectBoundingBox());
 
     return FloatRect();
 }
@@ -304,9 +302,11 @@ FloatRect SVGRenderBase::maskerBoundingBoxForRenderer(const RenderObject* object
 
 void SVGRenderBase::deregisterFromResources(RenderObject* object)
 {
-    // We only have a renderer for masker at the moment.
-    if (RenderSVGResourceMasker* resource = getRenderSVGResourceById<RenderSVGResourceMasker>(object->document(), object->style()->svgStyle()->maskElement()))
-        resource->invalidateClient(object);
+    // We only have the renderer for masker and clipper at the moment.
+    if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(object->document(), object->style()->svgStyle()->maskElement()))
+        masker->invalidateClient(object);
+    if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(object->document(), object->style()->svgStyle()->clipPath()))
+        clipper->invalidateClient(object);
 }
 
 void applyTransformToPaintInfo(RenderObject::PaintInfo& paintInfo, const AffineTransform& localToAncestorTransform)
@@ -328,6 +328,6 @@ const RenderObject* findTextRootObject(const RenderObject* start)
     return start;
 }
 
-} // namespace WebCore
+}
 
-#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index f892144..5d70505 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -34,10 +34,12 @@
 #include "HTMLNames.h"
 #include "InlineTextBox.h"
 #include "NodeRenderStyle.h"
+#include "Path.h"
 #include "RenderImage.h"
 #include "RenderPath.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGInlineText.h"
+#include "RenderSVGResourceClipper.h"
 #include "RenderSVGResourceMasker.h"
 #include "RenderSVGRoot.h"
 #include "RenderSVGText.h"
@@ -47,7 +49,6 @@
 #include "SVGPaintServerGradient.h"
 #include "SVGPaintServerPattern.h"
 #include "SVGPaintServerSolid.h"
-#include "SVGResourceClipper.h"
 #include "SVGRootInlineBox.h"
 #include "SVGStyledElement.h"
 #include <math.h>
@@ -196,6 +197,20 @@ TextStream& operator<<(TextStream& ts, const AffineTransform& transform)
     return ts;
 }
 
+static TextStream& operator<<(TextStream& ts, const WindRule rule)
+{
+    switch (rule) {
+    case RULE_NONZERO:
+        ts << "NON-ZERO";
+        break;
+    case RULE_EVENODD:
+        ts << "EVEN-ODD";
+        break;
+    }
+
+    return ts;
+}
+
 static TextStream& operator<<(TextStream& ts, const SVGUnitTypes::SVGUnitType& unitType)
 {
     switch (unitType) {
@@ -316,10 +331,9 @@ static void writeStyle(TextStream& ts, const RenderObject& object)
             writeIfNotDefault(ts, "fill rule", svgStyle->fillRule(), RULE_NONZERO);
             ts << "}]";
         }
+        writeIfNotDefault(ts, "clip rule", svgStyle->clipRule(), RULE_NONZERO);
     }
 
-    if (!svgStyle->clipPath().isEmpty())
-        writeNameAndQuotedValue(ts, "clip path", svgStyle->clipPath());
     writeIfNotEmpty(ts, "start marker", svgStyle->startMarker());
     writeIfNotEmpty(ts, "middle marker", svgStyle->midMarker());
     writeIfNotEmpty(ts, "end marker", svgStyle->endMarker());
@@ -496,6 +510,10 @@ void writeSVGResource(TextStream& ts, const RenderObject& object, int indent)
         ASSERT(masker);
         writeNameValuePair(ts, "maskUnits", masker->maskUnits());
         writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits());
+    } else if (resource->resourceType() == ClipperResourceType) {
+        RenderSVGResourceClipper* clipper = static_cast<RenderSVGResourceClipper*>(resource);
+        ASSERT(clipper);
+        writeNameValuePair(ts, "clipPathUnits", clipper->clipPathUnits());
     }
 
     // FIXME: Handle other RenderSVGResource* classes here, after converting them from SVGResource*.
@@ -568,6 +586,16 @@ void writeResources(TextStream& ts, const RenderObject& object, int indent)
             ts << " " << masker->resourceBoundingBox(object.objectBoundingBox()) << "\n";
         }
     }
+    if (!svgStyle->clipPath().isEmpty()) {
+        if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(object.document(), svgStyle->clipPath())) {
+            writeIndent(ts, indent);
+            ts << " ";
+            writeNameAndQuotedValue(ts, "clipPath", svgStyle->clipPath());
+            ts << " ";
+            writeStandardPrefix(ts, *clipper, 0);
+            ts << " " << clipper->resourceBoundingBox(object.objectBoundingBox()) << "\n";
+        }
+    }
     // FIXME: Handle other RenderSVGResource* classes here, after converting them from SVGResource*.
 }
 
diff --git a/WebCore/svg/SVGClipPathElement.cpp b/WebCore/svg/SVGClipPathElement.cpp
index 0fa12ff..694e0bc 100644
--- a/WebCore/svg/SVGClipPathElement.cpp
+++ b/WebCore/svg/SVGClipPathElement.cpp
@@ -1,6 +1,7 @@
 /*
     Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann at kde.org>
                   2004, 2005, 2006, 2007, 2008 Rob Buis <buis at kde.org>
+    Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
@@ -26,7 +27,7 @@
 #include "CSSStyleSelector.h"
 #include "Document.h"
 #include "MappedAttribute.h"
-#include "RenderSVGHiddenContainer.h"
+#include "RenderSVGResourceClipper.h"
 #include "SVGNames.h"
 #include "SVGTransformList.h"
 #include "SVGUnitTypes.h"
@@ -68,15 +69,12 @@ void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     SVGStyledTransformableElement::svgAttributeChanged(attrName);
 
-    if (!m_clipper)
-        return;
-
     if (attrName == SVGNames::clipPathUnitsAttr ||
         SVGTests::isKnownAttribute(attrName) || 
         SVGLangSpace::isKnownAttribute(attrName) ||
         SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
         SVGStyledTransformableElement::isKnownAttribute(attrName))
-        m_clipper->invalidate();
+        invalidateCanvasResources();
 }
 
 void SVGClipPathElement::synchronizeProperty(const QualifiedName& attrName)
@@ -98,45 +96,12 @@ void SVGClipPathElement::synchronizeProperty(const QualifiedName& attrName)
 void SVGClipPathElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
     SVGStyledTransformableElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-
-    if (!m_clipper)
-        return;
-
-    m_clipper->invalidate();
+    invalidateCanvasResources();
 }
 
 RenderObject* SVGClipPathElement::createRenderer(RenderArena* arena, RenderStyle*)
 {
-    return new (arena) RenderSVGHiddenContainer(this);
-}
-
-SVGResource* SVGClipPathElement::canvasResource(const RenderObject*)
-{
-    if (!m_clipper)
-        m_clipper = SVGResourceClipper::create();
-    else
-        m_clipper->resetClipData();
-
-    bool bbox = clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
-
-    for (Node* node = firstChild(); node; node = node->nextSibling()) {
-        if (!node->isSVGElement() || !static_cast<SVGElement*>(node)->isStyledTransformable())
-            continue;
-        SVGStyledTransformableElement* styled = static_cast<SVGStyledTransformableElement*>(node);
-        RenderStyle* style = styled->renderer() ? styled->renderer()->style() : 0;
-        if (!style || style->display() == NONE)
-            continue;
-        Path pathData = styled->toClipPath();
-        if (pathData.isEmpty())
-            continue;
-        m_clipper->addClipData(pathData, style->svgStyle()->clipRule(), bbox);
-    }
-    if (m_clipper->clipData().isEmpty()) {
-        Path pathData;
-        pathData.addRect(FloatRect());
-        m_clipper->addClipData(pathData, RULE_EVENODD, bbox);
-    }
-    return m_clipper.get();
+    return new (arena) RenderSVGResourceClipper(this);
 }
 
 }
diff --git a/WebCore/svg/SVGClipPathElement.h b/WebCore/svg/SVGClipPathElement.h
index cf7ff2b..dbf5380 100644
--- a/WebCore/svg/SVGClipPathElement.h
+++ b/WebCore/svg/SVGClipPathElement.h
@@ -25,40 +25,35 @@
 #include "RenderObject.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGLangSpace.h"
-#include "SVGResourceClipper.h"
 #include "SVGStyledTransformableElement.h"
 #include "SVGTests.h"
 
 namespace WebCore {
+class SVGClipPathElement : public SVGStyledTransformableElement,
+                           public SVGTests,
+                           public SVGLangSpace,
+                           public SVGExternalResourcesRequired {
+public:
+    SVGClipPathElement(const QualifiedName&, Document*);
+    virtual ~SVGClipPathElement();
 
-    class SVGClipPathElement : public SVGStyledTransformableElement,
-                               public SVGTests,
-                               public SVGLangSpace,
-                               public SVGExternalResourcesRequired {
-    public:
-        SVGClipPathElement(const QualifiedName&, Document*);
-        virtual ~SVGClipPathElement();
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual void parseMappedAttribute(MappedAttribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
-        virtual void parseMappedAttribute(MappedAttribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
-        virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual SVGResource* canvasResource(const RenderObject*);
+private:
+    DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
 
-    private:
-        DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+}
 
-        RefPtr<SVGResourceClipper> m_clipper;
-    };
-
-} // namespace WebCore
-
-#endif // ENABLE(SVG)
+#endif
 #endif
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index ff94c7d..e0dbabd 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -33,13 +33,13 @@
 #include "PlatformString.h"
 #include "RenderObject.h"
 #include "RenderSVGResource.h"
+#include "RenderSVGResourceClipper.h"
 #include "RenderSVGResourceMasker.h"
 #include "SVGElement.h"
 #include "SVGElementInstance.h"
 #include "SVGElementRareData.h"
 #include "SVGNames.h"
 #include "SVGRenderStyle.h"
-#include "SVGResourceClipper.h"
 #include "SVGResourceFilter.h"
 #include "SVGSVGElement.h"
 #include <wtf/Assertions.h>
@@ -238,9 +238,8 @@ void SVGStyledElement::invalidateResources()
     if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVGResourceMasker>(document, svgStyle->maskElement()))
         masker->invalidateClient(object);
 
-    SVGResourceClipper* clipper = getClipperById(document, svgStyle->clipPath(), object);
-    if (clipper)
-        clipper->invalidate();
+    if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(document, svgStyle->clipPath()))
+        clipper->invalidateClient(object);
 }
 
 void SVGStyledElement::invalidateResourcesInAncestorChain() const
diff --git a/WebCore/svg/graphics/SVGResource.h b/WebCore/svg/graphics/SVGResource.h
index b231b89..6ddb907 100644
--- a/WebCore/svg/graphics/SVGResource.h
+++ b/WebCore/svg/graphics/SVGResource.h
@@ -37,64 +37,60 @@
 
 namespace WebCore {
 
-    class AtomicString; 
-    class Document;
-    class SVGStyledElement;
-    class TextStream;
-
-    enum SVGResourceType {
-        // Painting mode
-        ClipperResourceType = 0,
-        ImageResourceType,
-        FilterResourceType,
-        MarkerResourceType,
-        PaintServerResourceType,
-        
-        // For resource tracking we need to know how many types of resource there are
-        _ResourceTypeCount
-    };
-
-    // The SVGResource file represent various graphics resources:
-    // - Filter resource
-    // - Clipper resource
-    // - Masker resource
-    // - Marker resource
-    // - Pattern resource
-    // - Linear/Radial gradient resource
-    //
-    // SVG creates/uses these resources.
-
-    class SVGResource : public RefCounted<SVGResource> {
-    public:
-        virtual ~SVGResource();
-      
-        virtual void invalidate();
-
-        void addClient(SVGStyledElement*);
-        virtual SVGResourceType resourceType() const = 0;
-        
-        bool isPaintServer() const { return resourceType() == PaintServerResourceType; }
-        bool isFilter() const { return resourceType() == FilterResourceType; }
-        bool isClipper() const { return resourceType() == ClipperResourceType; }
-        bool isMarker() const { return resourceType() == MarkerResourceType; }
-
-        virtual TextStream& externalRepresentation(TextStream&) const;
-
-        static void invalidateClients(HashSet<SVGStyledElement*>);
-        static void removeClient(SVGStyledElement*);
-
-    protected:
-        SVGResource();
-
-    private:
-        HashSet<SVGStyledElement*> m_clients;
-    };
-
-    SVGResource* getResourceById(Document*, const AtomicString&, const RenderObject*);
+class AtomicString; 
+class Document;
+class SVGStyledElement;
+class TextStream;
+
+enum SVGResourceType {
+    // Painting mode
+    ImageResourceType,
+    FilterResourceType,
+    MarkerResourceType,
+    PaintServerResourceType,
     
-    TextStream& operator<<(TextStream&, const SVGResource&);
+    // For resource tracking we need to know how many types of resource there are
+    _ResourceTypeCount
+};
+
+// The SVGResource file represent various graphics resources:
+// - Filter resource
+// - Marker resource
+// - Pattern resource
+// - Linear/Radial gradient resource
+//
+// SVG creates/uses these resources.
+
+class SVGResource : public RefCounted<SVGResource> {
+public:
+    virtual ~SVGResource();
+  
+    virtual void invalidate();
+
+    void addClient(SVGStyledElement*);
+    virtual SVGResourceType resourceType() const = 0;
+    
+    bool isPaintServer() const { return resourceType() == PaintServerResourceType; }
+    bool isFilter() const { return resourceType() == FilterResourceType; }
+    bool isMarker() const { return resourceType() == MarkerResourceType; }
+
+    virtual TextStream& externalRepresentation(TextStream&) const;
+
+    static void invalidateClients(HashSet<SVGStyledElement*>);
+    static void removeClient(SVGStyledElement*);
+
+protected:
+    SVGResource();
 
-} // namespace WebCore
+private:
+    HashSet<SVGStyledElement*> m_clients;
+};
 
+SVGResource* getResourceById(Document*, const AtomicString&, const RenderObject*);
+
+TextStream& operator<<(TextStream&, const SVGResource&);
+
+}
+
+#endif
 #endif
-#endif // SVGResource_h
diff --git a/WebCore/svg/graphics/SVGResourceClipper.cpp b/WebCore/svg/graphics/SVGResourceClipper.cpp
deleted file mode 100644
index 5316c95..0000000
--- a/WebCore/svg/graphics/SVGResourceClipper.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2006 Nikolas Zimmermann <zimmermann at kde.org>
- *           (C) 2009 Dirk Schulze <krit at webkit.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SVGResourceClipper.h"
-
-#include "AffineTransform.h"
-#include "GraphicsContext.h"
-#include "SVGRenderTreeAsText.h"
-
-#if PLATFORM(CG)
-#include <ApplicationServices/ApplicationServices.h>
-#endif
-
-namespace WebCore {
-
-SVGResourceClipper::SVGResourceClipper()
-    : SVGResource()
-{
-}
-
-SVGResourceClipper::~SVGResourceClipper()
-{
-}
-
-void SVGResourceClipper::resetClipData()
-{
-    m_clipData.clear();
-    m_clipperBoundingBox = FloatRect();
-}
-
-void SVGResourceClipper::invalidate()
-{
-    SVGResource::invalidate();
-    resetClipData();
-}
-
-FloatRect SVGResourceClipper::clipperBoundingBox(const FloatRect& objectBoundingBox)
-{
-    // FIXME: We need a different calculation for other clip content than paths.
-    if (!m_clipperBoundingBox.isEmpty())
-        return m_clipperBoundingBox;
-
-    if (m_clipData.clipData().isEmpty())
-        return FloatRect();
-
-    for (unsigned x = 0; x < m_clipData.clipData().size(); x++) {
-        ClipData clipData = m_clipData.clipData()[x];
-
-        FloatRect clipPathRect = clipData.path.boundingRect();
-        if (clipData.bboxUnits) {
-            clipPathRect.scale(objectBoundingBox.width(), objectBoundingBox.height());
-            clipPathRect.move(objectBoundingBox.x(), objectBoundingBox.y());
-        }
-        m_clipperBoundingBox.unite(clipPathRect);
-    }
-
-    return m_clipperBoundingBox;
-}
-
-void SVGResourceClipper::applyClip(GraphicsContext* context, const FloatRect& boundingBox) const
-{
-    if (m_clipData.clipData().isEmpty())
-        return;
-
-    bool heterogenousClipRules = false;
-    WindRule clipRule = m_clipData.clipData()[0].windRule;
-
-    context->beginPath();
-
-    for (unsigned x = 0; x < m_clipData.clipData().size(); x++) {
-        ClipData clipData = m_clipData.clipData()[x];
-        if (clipData.windRule != clipRule)
-            heterogenousClipRules = true;
-        
-        Path clipPath = clipData.path;
-
-        if (clipData.bboxUnits) {
-            AffineTransform transform;
-            transform.translate(boundingBox.x(), boundingBox.y());
-            transform.scaleNonUniform(boundingBox.width(), boundingBox.height());
-            clipPath.transform(transform);
-        }
-        context->addPath(clipPath);
-    }
-
-    // FIXME!
-    // We don't currently allow for heterogenous clip rules.
-    // we would have to detect such, draw to a mask, and then clip
-    // to that mask
-    context->clipPath(clipRule);
-}
-
-void SVGResourceClipper::addClipData(const Path& path, WindRule rule, bool bboxUnits)
-{
-    m_clipData.addPath(path, rule, bboxUnits);
-}
-
-const ClipDataList& SVGResourceClipper::clipData() const
-{
-    return m_clipData;
-}
-
-TextStream& SVGResourceClipper::externalRepresentation(TextStream& ts) const
-{
-    ts << "[type=CLIPPER]";
-    ts << " [clip data=" << clipData().clipData() << "]";
-    return ts;
-}
-
-TextStream& operator<<(TextStream& ts, WindRule rule)
-{
-    switch (rule) {
-        case RULE_NONZERO:
-            ts << "NON-ZERO"; break;
-        case RULE_EVENODD:
-            ts << "EVEN-ODD"; break;
-    }
-
-    return ts;
-}
-
-TextStream& operator<<(TextStream& ts, const ClipData& d)
-{
-    ts << "[winding=" << d.windRule << "]";
-
-    if (d.bboxUnits)
-        ts << " [bounding box mode=" << d.bboxUnits << "]";
-
-    ts << " [path=" << d.path.debugString() << "]";
-    return ts;
-}
-
-SVGResourceClipper* getClipperById(Document* document, const AtomicString& id, const RenderObject* object)
-{
-    SVGResource* resource = getResourceById(document, id, object);
-    if (resource && resource->isClipper())
-        return static_cast<SVGResourceClipper*>(resource);
-
-    return 0;
-}
-
-} // namespace WebCore
-
-#endif
diff --git a/WebCore/svg/graphics/SVGResourceClipper.h b/WebCore/svg/graphics/SVGResourceClipper.h
deleted file mode 100644
index df5562d..0000000
--- a/WebCore/svg/graphics/SVGResourceClipper.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2006 Nikolas Zimmermann <zimmermann at kde.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef SVGResourceClipper_h
-#define SVGResourceClipper_h
-
-#if ENABLE(SVG)
-#include "FloatRect.h"
-#include "Path.h"
-#include "RenderObject.h"
-#include "SVGResource.h"
-
-namespace WebCore {
-
-    struct ClipData {
-        Path path;
-        WindRule windRule;
-        bool bboxUnits : 1;
-    };
-
-    class ClipDataList { 
-    public:
-        void addPath(const Path& pathData, WindRule windRule, bool bboxUnits)
-        {
-            ClipData clipData;
-            
-            clipData.path = pathData;
-            clipData.windRule = windRule;
-            clipData.bboxUnits = bboxUnits;
-            
-            m_clipData.append(clipData);
-        }
-        
-        void clear() { m_clipData.clear(); }
-        const Vector<ClipData>& clipData() const { return m_clipData; }
-        bool isEmpty() const { return m_clipData.isEmpty(); }
-    private:
-        Vector<ClipData> m_clipData;
-    };  
-
-    class GraphicsContext;
-
-    class SVGResourceClipper : public SVGResource {
-    public:
-        static PassRefPtr<SVGResourceClipper> create() { return adoptRef(new SVGResourceClipper); }
-        virtual ~SVGResourceClipper();
-
-        virtual void invalidate();
-
-        void resetClipData();
-        void addClipData(const Path&, WindRule, bool bboxUnits);
-
-        const ClipDataList& clipData() const;
-        
-        virtual SVGResourceType resourceType() const { return ClipperResourceType; }
-        virtual TextStream& externalRepresentation(TextStream&) const;
-
-        // To be implemented by the specific rendering devices
-        void applyClip(GraphicsContext*, const FloatRect& boundingBox) const;
-        FloatRect clipperBoundingBox(const FloatRect& oob);
-    private:
-        SVGResourceClipper();
-        ClipDataList m_clipData;
-        FloatRect m_clipperBoundingBox;
-    };
-
-    TextStream& operator<<(TextStream&, WindRule);
-    TextStream& operator<<(TextStream&, const ClipData&);
-
-    SVGResourceClipper* getClipperById(Document*, const AtomicString&, const RenderObject*);
-
-} // namespace WebCore
-
-#endif
-
-#endif // SVGResourceClipper_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list