2006-09-19 Eric Seidel <eric@eseidel.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2006 09:20:39 +0000 (09:20 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Sep 2006 09:20:39 +0000 (09:20 +0000)
        Reviewed by hyatt.

        Split KCanvasResources.* into multiple files (and some other minor spacing changes).

        No tests were harmed in the making of this patch.

        * WebCore.xcodeproj/project.pbxproj:
        * kcanvas/KCanvasClipper.cpp: Added.
        (WebCore::operator<<):
        * kcanvas/KCanvasClipper.h: Added.
        * kcanvas/KCanvasFilters.h:
        * kcanvas/KCanvasImage.h:
        * kcanvas/KCanvasMarker.cpp: Added.
        * kcanvas/KCanvasMarker.h: Added.
        * kcanvas/KCanvasMasker.cpp: Added.
        (WebCore::KCanvasMasker::KCanvasMasker):
        (WebCore::KCanvasMasker::setMask):
        (WebCore::KCanvasMasker::externalRepresentation):
        (WebCore::getMaskerById):
        * kcanvas/KCanvasMasker.h: Added.
        * kcanvas/KCanvasResource.cpp: Added.
        (WebCore::KCanvasResource::invalidate):
        (WebCore::KCanvasResource::externalRepresentation):
        (WebCore::getResourceById):
        (WebCore::getPaintServerById):
        * kcanvas/KCanvasResource.h: Added.
        * kcanvas/KCanvasResources.cpp: Removed.
        * kcanvas/KCanvasResources.h: Removed.
        * kcanvas/RenderPath.cpp:
        * kcanvas/RenderSVGContainer.cpp:
        * kcanvas/RenderSVGImage.cpp:
        * kcanvas/RenderSVGText.cpp:
        * kcanvas/device/KRenderingPaintServer.h:
        * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
        * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
        * ksvg2/svg/SVGClipPathElement.h:
        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
        * ksvg2/svg/SVGFECompositeElement.cpp:
        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
        * ksvg2/svg/SVGFELightElement.cpp:
        * ksvg2/svg/SVGFEOffsetElement.cpp:
        * ksvg2/svg/SVGFETurbulenceElement.cpp:
        * ksvg2/svg/SVGFilterElement.cpp:
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        * ksvg2/svg/SVGMarkerElement.h:
        * ksvg2/svg/SVGMaskElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/kcanvas/KCanvasClipper.cpp [new file with mode: 0644]
WebCore/kcanvas/KCanvasClipper.h [new file with mode: 0644]
WebCore/kcanvas/KCanvasFilters.h
WebCore/kcanvas/KCanvasImage.h
WebCore/kcanvas/KCanvasMarker.cpp [moved from WebCore/kcanvas/KCanvasResources.cpp with 50% similarity]
WebCore/kcanvas/KCanvasMarker.h [new file with mode: 0644]
WebCore/kcanvas/KCanvasMasker.cpp [new file with mode: 0644]
WebCore/kcanvas/KCanvasMasker.h [new file with mode: 0644]
WebCore/kcanvas/KCanvasResource.cpp [new file with mode: 0644]
WebCore/kcanvas/KCanvasResource.h [new file with mode: 0644]
WebCore/kcanvas/KCanvasResources.h [deleted file]
WebCore/kcanvas/KCanvasTreeDebug.cpp
WebCore/kcanvas/RenderPath.cpp
WebCore/kcanvas/RenderSVGContainer.cpp
WebCore/kcanvas/RenderSVGImage.cpp
WebCore/kcanvas/RenderSVGText.cpp
WebCore/kcanvas/device/KRenderingPaintServer.h
WebCore/kcanvas/device/quartz/KCanvasMaskerQuartz.h
WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h
WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.mm
WebCore/ksvg2/svg/SVGClipPathElement.h
WebCore/ksvg2/svg/SVGFEColorMatrixElement.cpp
WebCore/ksvg2/svg/SVGFEComponentTransferElement.cpp
WebCore/ksvg2/svg/SVGFECompositeElement.cpp
WebCore/ksvg2/svg/SVGFEGaussianBlurElement.cpp
WebCore/ksvg2/svg/SVGFELightElement.cpp
WebCore/ksvg2/svg/SVGFEOffsetElement.cpp
WebCore/ksvg2/svg/SVGFETurbulenceElement.cpp
WebCore/ksvg2/svg/SVGFilterElement.cpp
WebCore/ksvg2/svg/SVGLinearGradientElement.cpp
WebCore/ksvg2/svg/SVGMarkerElement.h
WebCore/ksvg2/svg/SVGMaskElement.h

index c5ae54604de1facaf8aee34ae0398b892dec4112..01c2942b537c7458d63ba5def74dc2927b0d4f25 100644 (file)
@@ -1,3 +1,54 @@
+2006-09-19  Eric Seidel  <eric@eseidel.com>
+
+        Reviewed by hyatt.
+
+        Split KCanvasResources.* into multiple files (and some other minor spacing changes).
+        
+        No tests were harmed in the making of this patch.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * kcanvas/KCanvasClipper.cpp: Added.
+        (WebCore::operator<<):
+        * kcanvas/KCanvasClipper.h: Added.
+        * kcanvas/KCanvasFilters.h:
+        * kcanvas/KCanvasImage.h:
+        * kcanvas/KCanvasMarker.cpp: Added.
+        * kcanvas/KCanvasMarker.h: Added.
+        * kcanvas/KCanvasMasker.cpp: Added.
+        (WebCore::KCanvasMasker::KCanvasMasker):
+        (WebCore::KCanvasMasker::setMask):
+        (WebCore::KCanvasMasker::externalRepresentation):
+        (WebCore::getMaskerById):
+        * kcanvas/KCanvasMasker.h: Added.
+        * kcanvas/KCanvasResource.cpp: Added.
+        (WebCore::KCanvasResource::invalidate):
+        (WebCore::KCanvasResource::externalRepresentation):
+        (WebCore::getResourceById):
+        (WebCore::getPaintServerById):
+        * kcanvas/KCanvasResource.h: Added.
+        * kcanvas/KCanvasResources.cpp: Removed.
+        * kcanvas/KCanvasResources.h: Removed.
+        * kcanvas/RenderPath.cpp:
+        * kcanvas/RenderSVGContainer.cpp:
+        * kcanvas/RenderSVGImage.cpp:
+        * kcanvas/RenderSVGText.cpp:
+        * kcanvas/device/KRenderingPaintServer.h:
+        * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
+        * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
+        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
+        * ksvg2/svg/SVGClipPathElement.h:
+        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
+        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
+        * ksvg2/svg/SVGFECompositeElement.cpp:
+        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
+        * ksvg2/svg/SVGFELightElement.cpp:
+        * ksvg2/svg/SVGFEOffsetElement.cpp:
+        * ksvg2/svg/SVGFETurbulenceElement.cpp:
+        * ksvg2/svg/SVGFilterElement.cpp:
+        * ksvg2/svg/SVGLinearGradientElement.cpp:
+        * ksvg2/svg/SVGMarkerElement.h:
+        * ksvg2/svg/SVGMaskElement.h:
+
 2006-09-19  Brady Eidson <beidson@apple.com>
 
         Reviewed by Sarge Decker
index e3e70b2e59383a21ca99cd112dbb54c4c484f61e..0c26708d44588e15d6cc8846937a29663342e1a5 100644 (file)
                A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A833C80A0A2CF25600D57664 /* XMLNames.cpp */; };
                A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A833C80B0A2CF25600D57664 /* XMLNames.h */; };
                A833C8520A2CF52800D57664 /* SVGElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */; };
+               A8415F9A0AC10C5D00F7D0DF /* KCanvasClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */; };
+               A8415F9B0AC10C5D00F7D0DF /* KCanvasClipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */; };
+               A8415F9C0AC10C5D00F7D0DF /* KCanvasResource.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */; };
+               A8415F9D0AC10C5D00F7D0DF /* KCanvasResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */; };
+               A8415F9E0AC10C5D00F7D0DF /* KCanvasMasker.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */; };
+               A8415F9F0AC10C5D00F7D0DF /* KCanvasMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */; };
+               A8415FA00AC10C5D00F7D0DF /* KCanvasMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */; };
+               A8415FA10AC10C5D00F7D0DF /* KCanvasMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */; };
+               A8415FA20AC10C5D00F7D0DF /* KCanvasFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */; };
                A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629C909DA2B47009633A5 /* JSUIEvent.h */; };
                A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CA09DA2B47009633A5 /* JSUIEvent.cpp */; };
                A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CB09DA2B47009633A5 /* JSMouseEvent.h */; };
                A88AD3B60952486E001DD196 /* QuartzSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB77089701F800BA5114 /* QuartzSupport.mm */; };
                A88AD3B90952486E001DD196 /* RenderSVGContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */; };
                A88AD3BA0952486E001DD196 /* RenderSVGContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */; };
-               A88AD3BD0952486E001DD196 /* KCanvasFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */; };
                A88AD3BE0952486E001DD196 /* KCanvasFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */; };
                A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB81089701F800BA5114 /* KCanvasImage.h */; };
                A88AD3C10952486E001DD196 /* RenderPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB82089701F800BA5114 /* RenderPath.cpp */; };
                A88AD3C20952486E001DD196 /* RenderPath.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB83089701F800BA5114 /* RenderPath.h */; };
                A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */; };
-               A88AD3C80952486E001DD196 /* KCanvasResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */; };
-               A88AD3C90952486E001DD196 /* KCanvasResources.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB8B089701F800BA5114 /* KCanvasResources.h */; };
                A88AD3CB0952486E001DD196 /* KCanvasTreeDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */; };
                A88AD3CC0952486E001DD196 /* KCanvasTreeDebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */; };
                A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */; };
                A833C7F60A2CF1D800D57664 /* xmlattrs.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = xmlattrs.in; sourceTree = "<group>"; };
                A833C80A0A2CF25600D57664 /* XMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNames.cpp; sourceTree = "<group>"; };
                A833C80B0A2CF25600D57664 /* XMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLNames.h; sourceTree = "<group>"; };
+               A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasClipper.h; sourceTree = "<group>"; };
+               A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasClipper.cpp; sourceTree = "<group>"; };
+               A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResource.h; sourceTree = "<group>"; };
+               A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasResource.cpp; sourceTree = "<group>"; };
+               A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasMasker.h; sourceTree = "<group>"; };
+               A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasMasker.cpp; sourceTree = "<group>"; };
+               A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasMarker.h; sourceTree = "<group>"; };
+               A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasMarker.cpp; sourceTree = "<group>"; };
+               A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasFilters.cpp; sourceTree = "<group>"; };
                A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
                A85D7A8C0879EC64006A9172 /* AffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AffineTransform.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A85D7A8D0879EC64006A9172 /* AffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = AffineTransform.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB77089701F800BA5114 /* QuartzSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuartzSupport.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGContainer.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGContainer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasFilters.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasFilters.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB81089701F800BA5114 /* KCanvasImage.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasImage.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB82089701F800BA5114 /* RenderPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderPath.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB83089701F800BA5114 /* RenderPath.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RenderPath.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResourceListener.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasResources.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               A8C0FB8B089701F800BA5114 /* KCanvasResources.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResources.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C32920093BB732000B9CAC /* WKArithmeticFilter.cikernel */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = WKArithmeticFilter.cikernel; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C32921093BB732000B9CAC /* WKArithmeticFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WKArithmeticFilter.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C32922093BB732000B9CAC /* WKArithmeticFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WKArithmeticFilter.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                        isa = PBXGroup;
                        children = (
                                A8C0FB53089701F700BA5114 /* device */,
-                               A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */,
-                               A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */,
-                               A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */,
+                               A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */,
+                               A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */,
+                               A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */,
                                A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */,
                                A8C0FB81089701F800BA5114 /* KCanvasImage.h */,
+                               A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */,
+                               A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */,
+                               A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */,
+                               A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */,
+                               A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */,
+                               A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */,
                                A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */,
-                               A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */,
-                               A8C0FB8B089701F800BA5114 /* KCanvasResources.h */,
                                A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */,
                                A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */,
                                A8FEFB090979F472005839FD /* RenderForeignObject.cpp */,
                                A8FEFB080979F472005839FD /* RenderForeignObject.h */,
                                A8C0FB82089701F800BA5114 /* RenderPath.cpp */,
                                A8C0FB83089701F800BA5114 /* RenderPath.h */,
+                               A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */,
+                               A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */,
                                FAE0418A09759694000540BE /* RenderSVGImage.cpp */,
                                FAE0418909759694000540BE /* RenderSVGImage.h */,
                                65743B50097076F8001E7CEF /* RenderSVGText.cpp */,
                                A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */,
                                A88AD3C20952486E001DD196 /* RenderPath.h in Headers */,
                                A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */,
-                               A88AD3C90952486E001DD196 /* KCanvasResources.h in Headers */,
                                A88AD3CB0952486E001DD196 /* KCanvasTreeDebug.h in Headers */,
                                A88AD402095248F0001DD196 /* SVGRenderStyle.h in Headers */,
                                A88AD404095248F0001DD196 /* SVGRenderStyleDefs.h in Headers */,
                                851EE8210ABCA58100A6AA33 /* DOMRangeException.h in Headers */,
                                858015CE0ABCA75D0080588D /* DOMXPathException.h in Headers */,
                                85C78A680ABDE1B40044FC16 /* DOMException.h in Headers */,
+                               A8415F9A0AC10C5D00F7D0DF /* KCanvasClipper.h in Headers */,
+                               A8415F9C0AC10C5D00F7D0DF /* KCanvasResource.h in Headers */,
+                               A8415F9E0AC10C5D00F7D0DF /* KCanvasMasker.h in Headers */,
+                               A8415FA00AC10C5D00F7D0DF /* KCanvasMarker.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A88AD3B40952486E001DD196 /* KRenderingPaintServerQuartz.mm in Sources */,
                                A88AD3B60952486E001DD196 /* QuartzSupport.mm in Sources */,
                                A88AD3B90952486E001DD196 /* RenderSVGContainer.cpp in Sources */,
-                               A88AD3BD0952486E001DD196 /* KCanvasFilters.cpp in Sources */,
                                A88AD3C10952486E001DD196 /* RenderPath.cpp in Sources */,
-                               A88AD3C80952486E001DD196 /* KCanvasResources.cpp in Sources */,
                                A88AD3CC0952486E001DD196 /* KCanvasTreeDebug.cpp in Sources */,
                                A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */,
                                A88AD403095248F0001DD196 /* SVGRenderStyleDefs.cpp in Sources */,
                                853BF4DC0ABB6B55008647BB /* DOMNode.mm in Sources */,
                                85BCBC140ABBA87D00381160 /* DOMHTMLDocument.mm in Sources */,
                                851EE80D0ABCA28F00A6AA33 /* DOMAbstractView.mm in Sources */,
+                               A8415F9B0AC10C5D00F7D0DF /* KCanvasClipper.cpp in Sources */,
+                               A8415F9D0AC10C5D00F7D0DF /* KCanvasResource.cpp in Sources */,
+                               A8415F9F0AC10C5D00F7D0DF /* KCanvasMasker.cpp in Sources */,
+                               A8415FA10AC10C5D00F7D0DF /* KCanvasMarker.cpp in Sources */,
+                               A8415FA20AC10C5D00F7D0DF /* KCanvasFilters.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/kcanvas/KCanvasClipper.cpp b/WebCore/kcanvas/KCanvasClipper.cpp
new file mode 100644 (file)
index 0000000..2a9feb9
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasClipper.h"
+
+#include "TextStream.h"
+#include "KCanvasTreeDebug.h"
+
+namespace WebCore {
+
+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 KCClipData &d)
+{
+    ts << "[winding=" << d.windRule() << "]";
+    if (d.bboxUnits)
+        ts << " [bounding box mode=" << d.bboxUnits  << "]";    
+    ts << " [path=" << d.path.debugString() << "]";
+    return ts;
+}
+
+KCanvasClipper::KCanvasClipper() : KCanvasResource()
+{
+}
+
+KCanvasClipper::~KCanvasClipper()
+{
+}
+
+void KCanvasClipper::resetClipData()
+{
+    m_clipData.clear();
+}
+
+void KCanvasClipper::addClipData(const Path& path, WindRule rule, bool bboxUnits)
+{
+    m_clipData.addPath(path, rule, bboxUnits);
+}
+
+KCClipDataList KCanvasClipper::clipData() const
+{
+    return m_clipData;
+}
+
+TextStream& KCanvasClipper::externalRepresentation(TextStream &ts) const
+{
+    ts << "[type=CLIPPER]";
+    ts << " [clip data=" << clipData() << "]";
+    return ts;
+}
+
+KCanvasClipper *getClipperById(Document *document, const AtomicString &id)
+{
+    KCanvasResource *resource = getResourceById(document, id);
+    if (resource && resource->isClipper())
+        return static_cast<KCanvasClipper *>(resource);
+    return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
diff --git a/WebCore/kcanvas/KCanvasClipper.h b/WebCore/kcanvas/KCanvasClipper.h
new file mode 100644 (file)
index 0000000..a652657
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasClipper_h
+#define KCanvasClipper_h
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+typedef DeprecatedValueList<const RenderPath *> RenderPathList;
+
+class TextStream;
+
+struct KCClipData
+{
+    WindRule windRule() const { return m_windRule; }
+    WindRule m_windRule;
+    bool bboxUnits : 1;
+    Path path;
+};
+
+class KCClipDataList : public DeprecatedValueList<KCClipData>
+{
+public:
+    KCClipDataList() { }
+
+    inline void addPath(const Path& pathData, WindRule windRule, bool bboxUnits)
+    {
+        KCClipData clipData;
+        clipData.bboxUnits = bboxUnits;
+        clipData.m_windRule = windRule;
+        clipData.path = pathData;
+        append(clipData);
+    }
+};
+
+class KCanvasClipper : public KCanvasResource
+{
+public:
+    KCanvasClipper();
+    virtual ~KCanvasClipper();
+    
+    virtual bool isClipper() const { return true; }
+
+    void resetClipData();
+    void addClipData(const Path&, WindRule, bool bboxUnits);
+    
+    virtual void applyClip(const FloatRect& boundingBox) const = 0;
+
+    KCClipDataList clipData() const;
+
+    TextStream& externalRepresentation(TextStream &) const; 
+protected:
+    KCClipDataList m_clipData;
+};
+
+TextStream& operator<<(TextStream&, WindRule);
+TextStream& operator<<(TextStream&, const KCClipData&);
+
+KCanvasClipper* getClipperById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
index 638be867801b2213f1e2dcb3d5f43e6ea83fedf9..e4fb72a56c1eea463bfdca066e72f99bc6235124 100644 (file)
@@ -25,7 +25,7 @@
 #define KCanvasFilters_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasResources.h"
+#include "KCanvasResource.h"
 
 #ifdef __OBJC__
 @class CIFilter;
index daf7ce8450dc48b2deb3172db7b3ad052fad2930..7e1e6bd91a5c1982259a66df5147f3edf8fd0470 100644 (file)
@@ -25,7 +25,7 @@
 #define KCanvasImage_H
 #ifdef SVG_SUPPORT
 
-#include <kcanvas/KCanvasResources.h>
+#include "KCanvasResource.h"
 
 namespace WebCore {
 class Image;
similarity index 50%
rename from WebCore/kcanvas/KCanvasResources.cpp
rename to WebCore/kcanvas/KCanvasMarker.cpp
index 91d9adea1e73f031b6741462f7f5731dc6ee7c98..4c08432fbd87ce91780ebeffa1b8866c1f429705 100644 (file)
 
 #include "config.h"
 #ifdef SVG_SUPPORT
-#include "KCanvasResources.h"
+#include "KCanvasMarker.h"
 
-#include "Document.h"
-#include "GraphicsContext.h"
-#include "IntRect.h"
 #include "RenderSVGContainer.h"
-#include "KCanvasImage.h"
-#include "KCanvasTreeDebug.h"
-#include "KRenderingDevice.h"
-#include "RenderPath.h"
-#include "SVGStyledElement.h"
+#include "GraphicsContext.h"
 #include "TextStream.h"
 
 namespace WebCore {
 
-TextStream &operator<<(TextStream& ts, const KCanvasResource& r) 
-{ 
-    return r.externalRepresentation(ts); 
-}
-
-//WindRule
-TextStream &operator<<(TextStream &ts, WindRule rule)
-{
-    switch (rule) 
-    {
-        case RULE_NONZERO:
-            ts << "NON-ZERO"; break;
-        case RULE_EVENODD:
-            ts << "EVEN-ODD"; break;
-    }
-    return ts;
-}
-
-//KCClipData
-TextStream &operator<<(TextStream &ts, const KCClipData &d)
-{
-    ts << "[winding=" << d.windRule() << "]";
-    if (d.bboxUnits)
-        ts << " [bounding box mode=" << d.bboxUnits  << "]";    
-    ts << " [path=" << d.path.debugString() << "]";
-    return ts;
-}
-
-// KCanvasResource
-KCanvasResource::KCanvasResource()
-{
-}
-
-KCanvasResource::~KCanvasResource()
-{
-}
-
-void KCanvasResource::addClient(const RenderPath *item)
-{
-    if(m_clients.find(item) != m_clients.end())
-        return;
-
-    m_clients.append(item);
-}
-
-const RenderPathList &KCanvasResource::clients() const
-{
-    return m_clients;
-}
-
-void KCanvasResource::invalidate()
-{
-    RenderPathList::ConstIterator it = m_clients.begin();
-    RenderPathList::ConstIterator end = m_clients.end();
-
-    for(; it != end; ++it)
-        const_cast<RenderPath *>(*it)->repaint();
-}
-
-String KCanvasResource::idInRegistry() const
-{
-    return m_registryId;
-}
-
-void KCanvasResource::setIdInRegistry(const String& newId)
-{
-    m_registryId = newId;
-} 
-
-TextStream& KCanvasResource::externalRepresentation(TextStream &ts) const
-{
-    return ts;
-}
-
-// KCanvasClipper
-KCanvasClipper::KCanvasClipper() : KCanvasResource()
-{
-}
-
-KCanvasClipper::~KCanvasClipper()
-{
-}
-
-void KCanvasClipper::resetClipData()
-{
-    m_clipData.clear();
-}
-
-void KCanvasClipper::addClipData(const Path& path, WindRule rule, bool bboxUnits)
-{
-    m_clipData.addPath(path, rule, bboxUnits);
-}
-
-KCClipDataList KCanvasClipper::clipData() const
-{
-    return m_clipData;
-}
-
-TextStream& KCanvasClipper::externalRepresentation(TextStream &ts) const
-{
-    ts << "[type=CLIPPER]";
-    ts << " [clip data=" << clipData() << "]";
-    return ts;
-}
-
-// KCanvasMasker
-KCanvasMasker::KCanvasMasker() : KCanvasResource(), m_mask(0)
-{
-}
-
-KCanvasMasker::~KCanvasMasker()
-{
-    delete m_mask;
-}
-
-void KCanvasMasker::setMask(KCanvasImage *mask)
-{
-    if (m_mask != mask) {
-        delete m_mask;
-        m_mask = mask;
-    }
-}
-
-TextStream& KCanvasMasker::externalRepresentation(TextStream &ts) const
-{
-    ts << "[type=MASKER]";
-    return ts;
-}
-
 // KCanvasMarker
 KCanvasMarker::KCanvasMarker(RenderSVGContainer* marker)
     : KCanvasResource()
@@ -274,17 +138,6 @@ TextStream& KCanvasMarker::externalRepresentation(TextStream &ts) const
     return ts;
 }
 
-KCanvasResource *getResourceById(Document *document, const AtomicString &id)
-{
-    if (id.isEmpty())
-        return 0;
-    Element *element = document->getElementById(id);
-    SVGElement *svgElement = svg_dynamic_cast(element);
-    if (svgElement && svgElement->isStyled())
-        return static_cast<SVGStyledElement *>(svgElement)->canvasResource();
-    return 0;
-}
-
 KCanvasMarker *getMarkerById(Document *document, const AtomicString &id)
 {
     KCanvasResource *resource = getResourceById(document, id);
@@ -293,30 +146,6 @@ KCanvasMarker *getMarkerById(Document *document, const AtomicString &id)
     return 0;
 }
 
-KCanvasClipper *getClipperById(Document *document, const AtomicString &id)
-{
-    KCanvasResource *resource = getResourceById(document, id);
-    if (resource && resource->isClipper())
-        return static_cast<KCanvasClipper *>(resource);
-    return 0;
-}
-
-KCanvasMasker *getMaskerById(Document *document, const AtomicString &id)
-{
-    KCanvasResource *resource = getResourceById(document, id);
-    if (resource && resource->isMasker())
-        return static_cast<KCanvasMasker *>(resource);
-    return 0;
-}
-
-KRenderingPaintServer *getPaintServerById(Document *document, const AtomicString &id)
-{
-    KCanvasResource *resource = getResourceById(document, id);
-    if (resource && resource->isPaintServer())
-        return static_cast<KRenderingPaintServer *>(resource);
-    return 0;
-}
-
 }
 
 // vim:ts=4:noet
diff --git a/WebCore/kcanvas/KCanvasMarker.h b/WebCore/kcanvas/KCanvasMarker.h
new file mode 100644 (file)
index 0000000..e01031d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasMarker_H
+#define KCanvasMarker_H
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+class KCanvasMarker : public KCanvasResource
+{
+public:
+    KCanvasMarker(RenderSVGContainer* = 0);
+    virtual ~KCanvasMarker();
+    
+    virtual bool isMarker() const { return true; }
+
+    void setMarker(RenderSVGContainer*);
+    
+    void setRef(double refX, double refY);
+    double refX() const;    
+    double refY() const;
+    
+    void setAngle(float angle);
+    void setAutoAngle();
+    float angle() const;
+
+    void setUseStrokeWidth(bool useStrokeWidth = true);
+    bool useStrokeWidth() const;
+
+    void draw(GraphicsContext*, const FloatRect&, double x, double y, double strokeWidth = 1, double angle = 0);
+
+    TextStream& externalRepresentation(TextStream &) const; 
+
+private:
+    double m_refX, m_refY;
+    float m_angle;
+    RenderSVGContainer* m_marker;
+    bool m_useStrokeWidth;
+};
+
+KCanvasMarker* getMarkerById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
diff --git a/WebCore/kcanvas/KCanvasMasker.cpp b/WebCore/kcanvas/KCanvasMasker.cpp
new file mode 100644 (file)
index 0000000..fd09b8c
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasMasker.h"
+
+#include "KCanvasImage.h"
+#include "TextStream.h"
+
+namespace WebCore {
+
+KCanvasMasker::KCanvasMasker()
+    : KCanvasResource()
+    , m_mask(0)
+{
+}
+
+KCanvasMasker::~KCanvasMasker()
+{
+    delete m_mask;
+}
+
+void KCanvasMasker::setMask(KCanvasImage* mask)
+{
+    if (m_mask != mask) {
+        delete m_mask;
+        m_mask = mask;
+    }
+}
+
+TextStream& KCanvasMasker::externalRepresentation(TextStream& ts) const
+{
+    ts << "[type=MASKER]";
+    return ts;
+}
+
+KCanvasMasker* getMaskerById(Document* document, const AtomicString& id)
+{
+    KCanvasResource* resource = getResourceById(document, id);
+    if (resource && resource->isMasker())
+        return static_cast<KCanvasMasker*>(resource);
+    return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
diff --git a/WebCore/kcanvas/KCanvasMasker.h b/WebCore/kcanvas/KCanvasMasker.h
new file mode 100644 (file)
index 0000000..e2e8752
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasMasker_H
+#define KCanvasMasker_H
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+class TextStream;
+class KCanvasImage;
+
+class KCanvasMasker : public KCanvasResource
+{
+public:
+    KCanvasMasker();
+    virtual ~KCanvasMasker();
+    
+    virtual bool isMasker() const { return true; }
+    void setMask(KCanvasImage*);
+    KCanvasImage* mask() const { return m_mask; }
+    
+    virtual void applyMask(const FloatRect& boundingBox) const = 0;
+
+    TextStream& externalRepresentation(TextStream&) const; 
+protected:
+    KCanvasImage* m_mask;
+};
+
+KCanvasMasker* getMaskerById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
diff --git a/WebCore/kcanvas/KCanvasResource.cpp b/WebCore/kcanvas/KCanvasResource.cpp
new file mode 100644 (file)
index 0000000..f407a6f
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasResource.h"
+
+#include "Document.h"
+#include "KRenderingPaintServer.h"
+#include "SVGStyledElement.h"
+
+namespace WebCore {
+
+TextStream &operator<<(TextStream& ts, const KCanvasResource& r) 
+{ 
+    return r.externalRepresentation(ts); 
+}
+
+KCanvasResource::KCanvasResource()
+{
+}
+
+KCanvasResource::~KCanvasResource()
+{
+}
+
+void KCanvasResource::addClient(const RenderPath *item)
+{
+    if(m_clients.find(item) != m_clients.end())
+        return;
+
+    m_clients.append(item);
+}
+
+const RenderPathList &KCanvasResource::clients() const
+{
+    return m_clients;
+}
+
+void KCanvasResource::invalidate()
+{
+    RenderPathList::ConstIterator it = m_clients.begin();
+    RenderPathList::ConstIterator end = m_clients.end();
+
+    for(; it != end; ++it)
+        const_cast<RenderPath*>(*it)->repaint();
+}
+
+String KCanvasResource::idInRegistry() const
+{
+    return m_registryId;
+}
+
+void KCanvasResource::setIdInRegistry(const String& newId)
+{
+    m_registryId = newId;
+} 
+
+TextStream& KCanvasResource::externalRepresentation(TextStream& ts) const
+{
+    return ts;
+}
+
+KCanvasResource* getResourceById(Document* document, const AtomicString& id)
+{
+    if (id.isEmpty())
+        return 0;
+    Element *element = document->getElementById(id);
+    SVGElement *svgElement = svg_dynamic_cast(element);
+    if (svgElement && svgElement->isStyled())
+        return static_cast<SVGStyledElement*>(svgElement)->canvasResource();
+    return 0;
+}
+
+KRenderingPaintServer* getPaintServerById(Document* document, const AtomicString& id)
+{
+    KCanvasResource* resource = getResourceById(document, id);
+    if (resource && resource->isPaintServer())
+        return static_cast<KRenderingPaintServer*>(resource);
+    return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
diff --git a/WebCore/kcanvas/KCanvasResource.h b/WebCore/kcanvas/KCanvasResource.h
new file mode 100644 (file)
index 0000000..b2bdd17
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+                  2004, 2005 Rob Buis <buis@kde.org>
+
+    This file is part of the KDE project
+
+    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
+    aint with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasResource_H
+#define KCanvasResource_H
+#ifdef SVG_SUPPORT
+
+#include "DeprecatedValueList.h"
+#include "Path.h"
+#include "RenderPath.h"
+#include "KCanvasResourceListener.h"
+
+namespace WebCore {
+
+typedef DeprecatedValueList<const RenderPath *> RenderPathList;
+
+class TextStream;
+
+typedef enum
+{
+    // Painting mode
+    RS_CLIPPER = 0,
+    RS_MARKER = 1,
+    RS_IMAGE = 2,
+    RS_FILTER = 3,
+    RS_MASKER = 4
+} KCResourceType;
+
+class KRenderingPaintServer;
+
+class KCanvasResource
+{
+public:
+    KCanvasResource();
+    virtual ~KCanvasResource();
+
+    virtual void invalidate();
+    void addClient(const RenderPath*);
+
+    const RenderPathList &clients() const;
+    
+    String idInRegistry() const;
+    void setIdInRegistry(const String&);
+    
+    virtual bool isPaintServer() const { return false; }
+    virtual bool isFilter() const { return false; }
+    virtual bool isClipper() const { return false; }
+    virtual bool isMarker() const { return false; }
+    virtual bool isMasker() const { return false; }
+    
+    virtual TextStream& externalRepresentation(TextStream &) const; 
+private:
+    RenderPathList m_clients;
+    String m_registryId;
+};
+
+KCanvasResource* getResourceById(Document*, const AtomicString&);
+KRenderingPaintServer* getPaintServerById(Document*, const AtomicString&);
+
+TextStream &operator<<(TextStream&, const KCanvasResource&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
diff --git a/WebCore/kcanvas/KCanvasResources.h b/WebCore/kcanvas/KCanvasResources.h
deleted file mode 100644 (file)
index 373eb44..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
-                  2004, 2005 Rob Buis <buis@kde.org>
-
-    This file is part of the KDE project
-
-    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
-    aint with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-    Boston, MA 02111-1307, USA.
-*/
-
-#ifndef KCanvasResources_H
-#define KCanvasResources_H
-#ifdef SVG_SUPPORT
-
-#include "DeprecatedValueList.h"
-#include "Path.h"
-#include "RenderPath.h"
-#include "KCanvasResourceListener.h"
-
-namespace WebCore {
-
-typedef DeprecatedValueList<const RenderPath *> RenderPathList;
-
-class TextStream;
-
-// Enumerations
-typedef enum
-{
-    // Painting mode
-    RS_CLIPPER = 0,
-    RS_MARKER = 1,
-    RS_IMAGE = 2,
-    RS_FILTER = 3,
-    RS_MASKER = 4
-} KCResourceType;
-
-class KRenderingPaintServer;
-
-class KCanvasResource
-{
-public:
-    KCanvasResource();
-    virtual ~KCanvasResource();
-
-    virtual void invalidate();
-    void addClient(const RenderPath*);
-
-    const RenderPathList &clients() const;
-    
-    String idInRegistry() const;
-    void setIdInRegistry(const String&);
-    
-    virtual bool isPaintServer() const { return false; }
-    virtual bool isFilter() const { return false; }
-    virtual bool isClipper() const { return false; }
-    virtual bool isMarker() const { return false; }
-    virtual bool isMasker() const { return false; }
-    
-    virtual TextStream& externalRepresentation(TextStream &) const; 
-private:
-    RenderPathList m_clients;
-    String m_registryId;
-};
-
-// Clipping paths
-struct KCClipData
-{
-    WindRule windRule() const { return m_windRule; }
-    WindRule m_windRule;
-    bool bboxUnits : 1;
-    Path path;
-};
-
-class KCClipDataList : public DeprecatedValueList<KCClipData>
-{
-public:
-    KCClipDataList() { }
-
-    inline void addPath(const Path& pathData, WindRule windRule, bool bboxUnits)
-    {
-        KCClipData clipData;
-        clipData.bboxUnits = bboxUnits;
-        clipData.m_windRule = windRule;
-        clipData.path = pathData;
-        append(clipData);
-    }
-};
-
-class KCanvasClipper : public KCanvasResource
-{
-public:
-    KCanvasClipper();
-    virtual ~KCanvasClipper();
-    
-    virtual bool isClipper() const { return true; }
-
-    void resetClipData();
-    void addClipData(const Path&, WindRule, bool bboxUnits);
-    
-    virtual void applyClip(const FloatRect& boundingBox) const = 0;
-
-    KCClipDataList clipData() const;
-
-    TextStream& externalRepresentation(TextStream &) const; 
-protected:
-    KCClipDataList m_clipData;
-};
-
-class KCanvasImage;
-
-class KCanvasMasker : public KCanvasResource
-{
-public:
-    KCanvasMasker();
-    virtual ~KCanvasMasker();
-    
-    virtual bool isMasker() const { return true; }
-    void setMask(KCanvasImage*);
-    KCanvasImage* mask() const { return m_mask; }
-    
-    virtual void applyMask(const FloatRect& boundingBox) const = 0;
-
-    TextStream& externalRepresentation(TextStream &) const; 
-protected:
-    KCanvasImage *m_mask;
-};
-
-class KCanvasMarker : public KCanvasResource
-{
-public:
-    KCanvasMarker(RenderSVGContainer* = 0);
-    virtual ~KCanvasMarker();
-    
-    virtual bool isMarker() const { return true; }
-
-    void setMarker(RenderSVGContainer*);
-    
-    void setRef(double refX, double refY);
-    double refX() const;    
-    double refY() const;
-    
-    void setAngle(float angle);
-    void setAutoAngle();
-    float angle() const;
-
-    void setUseStrokeWidth(bool useStrokeWidth = true);
-    bool useStrokeWidth() const;
-
-    void draw(GraphicsContext*, const FloatRect&, double x, double y, double strokeWidth = 1, double angle = 0);
-
-    TextStream& externalRepresentation(TextStream &) const; 
-
-private:
-    double m_refX, m_refY;
-    float m_angle;
-    RenderSVGContainer* m_marker;
-    bool m_useStrokeWidth;
-};
-
-
-
-KCanvasResource *getResourceById(Document *document, const AtomicString &id);
-KCanvasMarker *getMarkerById(Document *document, const AtomicString &id);
-KCanvasClipper *getClipperById(Document *document, const AtomicString &id);
-KCanvasMasker *getMaskerById(Document *document, const AtomicString &id);
-KRenderingPaintServer *getPaintServerById(Document *document, const AtomicString &id);
-
-TextStream &operator<<(TextStream &ts, const KCanvasResource &r);
-TextStream &operator<<(TextStream &ts, WindRule rule);
-TextStream &operator<<(TextStream &ts, const KCClipData &d);
-
-}
-
-#endif // SVG_SUPPORT
-#endif
-
-// vim:ts=4:noet
index 4b7320b9002a45769de9e0ba6007738242b21cfe..e338f3bb3ca096b0b4808380465adf33d9d8f727 100644 (file)
 
 #include "HTMLNames.h"
 #include "RenderTreeAsText.h"
-#include <kcanvas/RenderSVGContainer.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingFillPainter.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
-#include <kcanvas/device/KRenderingPaintServerPattern.h>
-#include <kcanvas/device/KRenderingPaintServerSolid.h>
-#include <kcanvas/device/KRenderingStrokePainter.h>
-#include <ksvg2/svg/SVGStyledElement.h>
+#include "RenderSVGContainer.h"
+#include "KCanvasClipper.h"
+#include "KRenderingDevice.h"
+#include "KRenderingFillPainter.h"
+#include "KRenderingPaintServerGradient.h"
+#include "KRenderingPaintServerPattern.h"
+#include "KRenderingPaintServerSolid.h"
+#include "KRenderingStrokePainter.h"
+#include "SVGStyledElement.h"
 #include <math.h>
 
 namespace WebCore {
index 05dd294ed3b7701a78a6e8460fd1b4b1c6f05a38..bd903fb6a1708d5705b0e5d8f72fb4b1f27862c4 100644 (file)
@@ -29,6 +29,9 @@
 
 #include "GraphicsContext.h"
 #include "RenderSVGContainer.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
+#include "KCanvasMarker.h"
 #include "KRenderingDevice.h"
 #include "KRenderingFillPainter.h"
 #include "KRenderingStrokePainter.h"
index 45cc88001597495aa0dc040657360feae17147f7..bfc5445eb11b83179f62677e97b6afb3c847826f 100644 (file)
 
 #include "config.h"
 #ifdef SVG_SUPPORT
+#include "RenderSVGContainer.h"
+
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
-#include "RenderSVGContainer.h"
 #include "SVGStyledElement.h"
 #include "GraphicsContext.h"
 #include "SVGStyledTransformableElement.h"
index 2387b2c304a942c219d32e640b531f1e5e2c7627..8e3b801f0585b3786357b7aaec732d476601224f 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "Attr.h"
 #include "GraphicsContext.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "SVGLength.h"
index bff2b98f8733106061f65474d4d261f9b7adb771..fc1dc36719b9525dff21ce02de5329f07c2ba73b 100644 (file)
@@ -26,6 +26,8 @@
 #include "RenderSVGText.h"
 
 #include "GraphicsContext.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "SVGLengthList.h"
index e81d0b76218d6c6b41417038e1a85bdc69354bba..45e7b7bf4fc85c017e519f56750b8a64196234ba 100644 (file)
@@ -25,7 +25,7 @@
 #define KRenderingPaintServer_H
 #ifdef SVG_SUPPORT
 
-#include <kcanvas/KCanvasResources.h>
+#include "KCanvasResource.h"
 
 namespace WebCore {
 
@@ -85,6 +85,8 @@ private:
 
 TextStream &operator<<(TextStream &, const KRenderingPaintServer &);
 
+KRenderingPaintServer* getPaintServerById(Document*, const AtomicString&);
+
 }
 
 #endif // SVG_SUPPORT
index b91d80f2c81c84f23cf582479bb2bc93d46c37f9..4f7914b01e54fb7614c60f8c215d9c8796a0c806 100644 (file)
@@ -24,7 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#import "KCanvasImage.h"
+#include "KCanvasMasker.h"
+#include "KCanvasImage.h"
 
 namespace WebCore {
 
index 274ed0f0c1c8ba7ee55e0f65a4c3d9cc869b8e9d..d1c9c433e0e3cdbe8bc3659f1a25a49ab0b36eba 100644 (file)
 #ifndef KCanvasResourcesQuartz_h
 #define KCanvasResourcesQuartz_h
 
-#import "KCanvasImage.h"
-#import "RenderSVGContainer.h"
-#import "AffineTransform.h"
+#include "KCanvasClipper.h"
+
+#include "KCanvasImage.h"
+#include "RenderSVGContainer.h"
+#include "AffineTransform.h"
 
 typedef struct CGContext *CGContextRef;
 typedef struct CGLayer *CGLayerRef;
index 98ec4a8418816215acd030936e28c06fcfd7ef88..e30b9a3252a6577f11c569faefc86e6da43ed97c 100644 (file)
@@ -30,6 +30,7 @@
 
 #import "FoundationExtras.h"
 #import "GraphicsContext.h"
+#include "KCanvasMarker.h"
 #import "KCanvasFilterQuartz.h"
 #import "KCanvasMaskerQuartz.h"
 #import "KCanvasResourcesQuartz.h"
index 68f7fa5dd36a80250ddc4428a0e52ec96136018a..e5ca42865ae7757bb053f2a790c61a193bd02a0b 100644 (file)
@@ -29,7 +29,7 @@
 #include "SVGStyledTransformableElement.h"
 #include "SVGExternalResourcesRequired.h"
 
-#include "KCanvasResources.h"
+#include "KCanvasClipper.h"
 
 namespace WebCore
 {
index 062297be68d505021190fd09e24c108d85f451b1..8a2b03ef7a701c93af3b1b50bab30533f1c180ca 100644 (file)
 
 #include "Attr.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
 
 #include "ksvg.h"
 #include "SVGNames.h"
@@ -38,7 +37,7 @@
 #include "SVGFEColorMatrixElement.h"
 #include "SVGNumberList.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document *doc)
     : SVGFilterPrimitiveStandardAttributes(tagName, doc)
@@ -100,6 +99,8 @@ KCanvasFEColorMatrix *SVGFEColorMatrixElement::filterEffect() const
     return m_filterEffect;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index b68e67641d5124f5e8867457cbd79169a6295fb6..3118e05510949dd7b152fb4c62e19977cd2bcff0 100644 (file)
@@ -24,7 +24,6 @@
 #ifdef SVG_SUPPORT
 #include "Attr.h"
 
-#include "KCanvasResources.h"
 #include "KCanvasFilters.h"
 #include "KRenderingDevice.h"
 
index 68eee2676a0d0b2d467a5f7d0ba854a68d1f8d86..88ee978d6850f23c9cce83ec447b4f3b346fb355 100644 (file)
@@ -24,7 +24,6 @@
 #ifdef SVG_SUPPORT
 #include "Attr.h"
 
-#include "KCanvasResources.h"
 #include "KCanvasFilters.h"
 #include "KRenderingDevice.h"
 #include "KRenderingPaintServerGradient.h"
@@ -35,7 +34,7 @@
 #include "SVGRenderStyle.h"
 #include "SVGFECompositeElement.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document *doc)
     : SVGFilterPrimitiveStandardAttributes(tagName, doc)
@@ -112,6 +111,8 @@ KCanvasFEComposite *SVGFECompositeElement::filterEffect() const
     return m_filterEffect;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index 7711e18006152e1a6b0fa888d00d11f39f312939..5a587f01f071f75dd51fc45d11c160adf236b2b8 100644 (file)
 
 #include "Attr.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
 
 #include "SVGNames.h"
 #include "SVGHelper.h"
 #include "SVGRenderStyle.h"
 #include "SVGFEGaussianBlurElement.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document *doc)
     : SVGFilterPrimitiveStandardAttributes(tagName, doc)
@@ -89,6 +88,8 @@ KCanvasFEGaussianBlur *SVGFEGaussianBlurElement::filterEffect() const
     return m_filterEffect;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index f399b9e063edb8cf284f910e070f6e7e8ec6fbc7..78e771177a09a137c7e61d0bc6cbacd6a0ba6027 100644 (file)
@@ -23,7 +23,6 @@
 #ifdef SVG_SUPPORT
 #include "Attr.h"
 
-#include "KCanvasResources.h"
 #include "KCanvasFilters.h"
 #include "KRenderingDevice.h"
 
index 581c417b0a9457f6891d76488b2b473b7295454c..bc3d8bcdbbd2605a2455a95380813bc4c2f7cee9 100644 (file)
 
 #include "Attr.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
 
 #include "SVGHelper.h"
 #include "SVGRenderStyle.h"
 #include "SVGFEOffsetElement.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document *doc)
     : SVGFilterPrimitiveStandardAttributes(tagName, doc)
@@ -80,6 +79,8 @@ KCanvasFEOffset *SVGFEOffsetElement::filterEffect() const
     return m_filterEffect;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index 06d6bb231ee053c7fb5d6b58626070eaad9e7af3..43fdfcebad0e09bb1cd687533470aa055de7f761 100644 (file)
 
 #include "Attr.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
 
 #include "ksvg.h"
 #include "SVGHelper.h"
 #include "SVGRenderStyle.h"
 #include "SVGFETurbulenceElement.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document *doc)
     : SVGFilterPrimitiveStandardAttributes(tagName, doc)
@@ -113,6 +112,8 @@ KCanvasFETurbulence *SVGFETurbulenceElement::filterEffect() const
     return m_filterEffect;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index 87a9a828643b49aad15e9de280467bae3730c497..86d370d171a03564e9f8b3b5c4613b4c44771f33 100644 (file)
@@ -24,9 +24,8 @@
 #ifdef SVG_SUPPORT
 #include "Attr.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/KCanvasFilters.h>
+#include "KRenderingDevice.h"
+#include "KCanvasFilters.h"
 #include "SVGUnitTypes.h"
 #include "SVGNames.h"
 #include "SVGHelper.h"
@@ -35,7 +34,7 @@
 #include "SVGLength.h"
 #include "KCanvasRenderingStyle.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document *doc)
     : SVGStyledElement(tagName, doc)
@@ -150,6 +149,8 @@ KCanvasFilter *SVGFilterElement::canvasResource()
     return m_filter;
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index 684907c5a5c444f42b6d9756773a32d817efde2b..f91505ceff94bea52bb406213b9c2f4236dc5ea4 100644 (file)
 #include "SVGLinearGradientElement.h"
 #include "SVGTransformList.h"
 
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document *doc)
     : SVGGradientElement(tagName, doc)
@@ -165,6 +164,8 @@ void SVGLinearGradientElement::buildGradient(KRenderingPaintServerGradient *_gra
     grad->setGradientEnd(FloatPoint(_x2, _y2));
 }
 
+}
+
 // vim:ts=4:noet
 #endif // SVG_SUPPORT
 
index aa4457cb530f3bb7b2126f27e95c10f33bd58af7..a97b175ad7d792c329f1725cf01700ec2fe2baa6 100644 (file)
     Boston, MA 02111-1307, USA.
 */
 
-#ifndef KSVG_SVGMarkerElementImpl_H
-#define KSVG_SVGMarkerElementImpl_H
+#ifndef SVGMarkerElement_H
+#define SVGMarkerElement_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasResources.h"
+#include "KCanvasMarker.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
 #include "SVGLangSpace.h"
index 5a23518ba3acb8ca713158a4bc5dee05de59e247..b2a57be54a485704bf86f53ba221c4b74d4a3186 100644 (file)
@@ -19,8 +19,8 @@
     Boston, MA 02111-1307, USA.
 */
 
-#ifndef KSVG_SVGMaskElementImpl_H
-#define KSVG_SVGMaskElementImpl_H
+#ifndef SVGMaskElement_H
+#define SVGMaskElement_H
 #ifdef SVG_SUPPORT
 
 #include "SVGTests.h"
@@ -29,9 +29,7 @@
 #include "SVGStyledLocatableElement.h"
 #include "SVGExternalResourcesRequired.h"
 
-#include "KCanvasResources.h"
-
-class KCanvasImage;
+#include "KCanvasMasker.h"
 
 namespace WebCore
 {