2006-10-31 Nikolas Zimmermann <zimmermann@kde.org>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 01:46:33 +0000 (01:46 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2006 01:46:33 +0000 (01:46 +0000)
        Reviewed by Oliver.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=11436
        Better SVG integration in WebKit, Part I.

        The patch is mostly about creating a new platform/graphics directory, and
        moving the kcanvas resources (clipper/masker/marker) there (in svg budir),
        with a new name (KCanvasClipper -> SVGResourceClipper). Also fix several ownership
        issues, by using ref counting (the SVG classes now store RefPtrs to the resources).

        KCanvasFilters is still left in kcanvas/ subdirectory, to be converted in a next patch.
        All details of the patch, and upcoming patches can be found in the bug report.

        * CMakeLists.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * kcanvas/KCanvasClipper.cpp: Removed.
        * kcanvas/KCanvasClipper.h: Removed.
        * kcanvas/KCanvasCreator.cpp: Removed.
        * kcanvas/KCanvasCreator.h: Removed.
        * kcanvas/KCanvasFilters.cpp:
        (WebCore::getFilterById):
        * kcanvas/KCanvasFilters.h:
        * kcanvas/KCanvasImage.h: Removed.
        * kcanvas/KCanvasMarker.cpp: Removed.
        * kcanvas/KCanvasMarker.h: Removed.
        * kcanvas/KCanvasMasker.cpp: Removed.
        * kcanvas/KCanvasMasker.h: Removed.
        * kcanvas/KCanvasResource.cpp: Removed.
        * kcanvas/KCanvasResource.h: Removed.
        * kcanvas/KCanvasResourceListener.h: Removed.
        * kcanvas/KCanvasTreeDebug.cpp:
        (WebCore::writeRenderResources):
        * kcanvas/device/KRenderingDevice.h:
        * kcanvas/device/KRenderingPaintServer.h:
        (WebCore::KRenderingPaintServer::KRenderingPaintServer):
        * kcanvas/device/KRenderingPaintServerGradient.cpp:
        (WebCore::KRenderingPaintServerGradient::listener):
        (WebCore::KRenderingPaintServerGradient::setListener):
        * kcanvas/device/KRenderingPaintServerGradient.h:
        * kcanvas/device/KRenderingPaintServerPattern.cpp:
        (WebCore::KRenderingPaintServerPattern::KRenderingPaintServerPattern):
        (WebCore::KRenderingPaintServerPattern::~KRenderingPaintServerPattern):
        (WebCore::KRenderingPaintServerPattern::tile):
        (WebCore::KRenderingPaintServerPattern::setTile):
        (WebCore::KRenderingPaintServerPattern::listener):
        (WebCore::KRenderingPaintServerPattern::setListener):
        * kcanvas/device/KRenderingPaintServerPattern.h:
        * kcanvas/device/KRenderingPaintServerSolid.h:
        * kcanvas/device/qt/KCanvasClipperQt.cpp: Removed.
        * kcanvas/device/qt/KCanvasClipperQt.h: Removed.
        * kcanvas/device/qt/KRenderingDeviceQt.cpp:
        (WebCore::KRenderingDeviceQt::contextForImage):
        (WebCore::KRenderingDeviceQt::createResource):
        (WebCore::KRenderingDeviceQt::createPaintServer):
        * kcanvas/device/qt/KRenderingDeviceQt.h:
        * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
        * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
        * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
        * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
        * kcanvas/device/qt/RenderPathQt.h: Removed.
        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
        (WebCore::KCanvasFilterQuartz::getCIFilterStack):
        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
        * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Removed.
        * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Removed.
        * kcanvas/device/quartz/KCanvasResourcesQuartz.h: Removed.
        * kcanvas/device/quartz/KCanvasResourcesQuartz.mm: Removed.
        * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
        (WebCore::KRenderingDeviceQuartz::contextForImage):
        (WebCore::KRenderingDeviceQuartz::createPaintServer):
        (WebCore::KRenderingDeviceQuartz::createResource):
        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
        (WebCore::KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz):
        (WebCore::KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz):
        (WebCore::KRenderingPaintServerGradientQuartz::setup):
        (WebCore::KRenderingPaintServerGradientQuartz::teardown):
        * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
        (WebCore::patternCallback):
        (WebCore::KRenderingPaintServerPatternQuartz::setup):
        * kcanvas/device/quartz/QuartzSupport.mm:
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        (WebCore::sharedSolidPaintServer):
        * ksvg2/svg/SVGClipPathElement.cpp:
        (WebCore::SVGClipPathElement::SVGClipPathElement):
        (WebCore::SVGClipPathElement::~SVGClipPathElement):
        (WebCore::SVGClipPathElement::canvasResource):
        * ksvg2/svg/SVGClipPathElement.h:
        * ksvg2/svg/SVGFEImageElement.cpp:
        * ksvg2/svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::SVGFilterElement):
        (WebCore::SVGFilterElement::~SVGFilterElement):
        (WebCore::SVGFilterElement::canvasResource):
        * ksvg2/svg/SVGFilterElement.h:
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::SVGGradientElement):
        (WebCore::SVGGradientElement::~SVGGradientElement):
        (WebCore::SVGGradientElement::canvasResource):
        (WebCore::SVGGradientElement::resourceNotification):
        * ksvg2/svg/SVGGradientElement.h:
        * ksvg2/svg/SVGImageElement.cpp:
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::buildGradient):
        * ksvg2/svg/SVGLinearGradientElement.h:
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::SVGMarkerElement):
        (WebCore::SVGMarkerElement::~SVGMarkerElement):
        (WebCore::SVGMarkerElement::canvasResource):
        * ksvg2/svg/SVGMarkerElement.h:
        * ksvg2/svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::SVGMaskElement):
        (WebCore::SVGMaskElement::~SVGMaskElement):
        (WebCore::SVGMaskElement::drawMaskerContent):
        (WebCore::SVGMaskElement::canvasResource):
        * ksvg2/svg/SVGMaskElement.h:
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::SVGPatternElement):
        (WebCore::SVGPatternElement::~SVGPatternElement):
        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
        (WebCore::SVGPatternElement::drawPatternContentIntoTile):
        (WebCore::SVGPatternElement::canvasResource):
        * ksvg2/svg/SVGPatternElement.h:
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * ksvg2/svg/SVGRadialGradientElement.h:
        * ksvg2/svg/SVGStyledElement.h:
        (WebCore::SVGStyledElement::canvasResource):
        * platform/GraphicsContext.cpp: Removed.
        * platform/GraphicsContext.h: Removed.
        * platform/GraphicsTypes.cpp: Removed.
        * platform/GraphicsTypes.h: Removed.
        * platform/graphics/GraphicsContext.cpp: Added.
        (WebCore::GraphicsContextState::GraphicsContextState):
        (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
        (WebCore::GraphicsContext::createGraphicsContextPrivate):
        (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
        (WebCore::GraphicsContext::save):
        (WebCore::GraphicsContext::restore):
        (WebCore::GraphicsContext::font):
        (WebCore::GraphicsContext::setFont):
        (WebCore::GraphicsContext::pen):
        (WebCore::GraphicsContext::setPen):
        (WebCore::GraphicsContext::setFillColor):
        (WebCore::GraphicsContext::fillColor):
        (WebCore::GraphicsContext::updatingControlTints):
        (WebCore::GraphicsContext::setUpdatingControlTints):
        (WebCore::GraphicsContext::setPaintingDisabled):
        (WebCore::GraphicsContext::paintingDisabled):
        (WebCore::GraphicsContext::drawImage):
        (WebCore::GraphicsContext::drawText):
        (WebCore::GraphicsContext::drawHighlightForText):
        (WebCore::GraphicsContext::initFocusRing):
        (WebCore::GraphicsContext::clearFocusRing):
        (WebCore::GraphicsContext::focusRingBoundingRect):
        (WebCore::GraphicsContext::addFocusRingRect):
        (WebCore::GraphicsContext::focusRingWidth):
        (WebCore::GraphicsContext::focusRingOffset):
        (WebCore::GraphicsContext::focusRingRects):
        (WebCore::GraphicsContext::drawTiledImage):
        * platform/graphics/GraphicsContext.h: Added.
        * platform/graphics/GraphicsTypes.cpp: Added.
        (WebCore::):
        (WebCore::parseCompositeOperator):
        (WebCore::compositeOperatorName):
        (WebCore::parseLineCap):
        (WebCore::lineCapName):
        (WebCore::parseLineJoin):
        (WebCore::lineJoinName):
        * platform/graphics/GraphicsTypes.h: Added.
        (WebCore::):
        * platform/graphics/svg/SVGResource.cpp: Added.
        (WebCore::SVGResource::SVGResource):
        (WebCore::SVGResource::~SVGResource):
        (WebCore::SVGResource::invalidate):
        (WebCore::SVGResource::addClient):
        (WebCore::SVGResource::clients):
        (WebCore::SVGResource::idInRegistry):
        (WebCore::SVGResource::setIdInRegistry):
        (WebCore::SVGResource::externalRepresentation):
        (WebCore::getResourceById):
        (WebCore::getPaintServerById):
        (WebCore::operator<<):
        * platform/graphics/svg/SVGResource.h: Added.
        (WebCore::):
        (WebCore::SVGResource::isPaintServer):
        (WebCore::SVGResource::isFilter):
        (WebCore::SVGResource::isClipper):
        (WebCore::SVGResource::isMarker):
        (WebCore::SVGResource::isMasker):
        (WebCore::SVGResourceListener::~SVGResourceListener):
        * platform/graphics/svg/SVGResourceClipper.cpp: Added.
        (WebCore::SVGResourceClipper::SVGResourceClipper):
        (WebCore::SVGResourceClipper::~SVGResourceClipper):
        (WebCore::SVGResourceClipper::resetClipData):
        (WebCore::SVGResourceClipper::addClipData):
        (WebCore::SVGResourceClipper::clipData):
        (WebCore::SVGResourceClipper::externalRepresentation):
        (WebCore::operator<<):
        (WebCore::getClipperById):
        * platform/graphics/svg/SVGResourceClipper.h: Added.
        (WebCore::ClipDataList::addPath):
        (WebCore::SVGResourceClipper::isClipper):
        * platform/graphics/svg/SVGResourceImage.h: Added.
        * platform/graphics/svg/SVGResourceMarker.cpp: Added.
        (WebCore::SVGResourceMarker::SVGResourceMarker):
        (WebCore::SVGResourceMarker::~SVGResourceMarker):
        (WebCore::SVGResourceMarker::setMarker):
        (WebCore::SVGResourceMarker::setRef):
        (WebCore::SVGResourceMarker::draw):
        (WebCore::SVGResourceMarker::externalRepresentation):
        (WebCore::getMarkerById):
        * platform/graphics/svg/SVGResourceMarker.h: Added.
        (WebCore::SVGResourceMarker::refX):
        (WebCore::SVGResourceMarker::refY):
        (WebCore::SVGResourceMarker::setAngle):
        (WebCore::SVGResourceMarker::setAutoAngle):
        (WebCore::SVGResourceMarker::angle):
        (WebCore::SVGResourceMarker::setUseStrokeWidth):
        (WebCore::SVGResourceMarker::useStrokeWidth):
        (WebCore::SVGResourceMarker::isMarker):
        * platform/graphics/svg/SVGResourceMasker.cpp: Added.
        (WebCore::SVGResourceMasker::SVGResourceMasker):
        (WebCore::SVGResourceMasker::~SVGResourceMasker):
        (WebCore::SVGResourceMasker::setMask):
        (WebCore::SVGResourceMasker::mask):
        (WebCore::SVGResourceMasker::externalRepresentation):
        (WebCore::getMaskerById):
        * platform/graphics/svg/SVGResourceMasker.h: Added.
        (WebCore::SVGResourceMasker::isMasker):
        * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Added.
        (WebCore::SVGResourceClipper::applyClip):
        * platform/graphics/svg/cg/SVGResourceImageCg.mm: Added.
        (WebCore::SVGResourceImage::SVGResourceImage):
        (WebCore::SVGResourceImage::~SVGResourceImage):
        (WebCore::SVGResourceImage::init):
        (WebCore::SVGResourceImage::size):
        (WebCore::SVGResourceImage::cgLayer):
        (WebCore::SVGResourceImage::setCGLayer):
        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: Added.
        (WebCore::applyLuminanceToAlphaFilter):
        (WebCore::applyExpandAlphatoGrayscaleFilter):
        (WebCore::transformImageIntoGrayscaleMask):
        (WebCore::SVGResourceMasker::applyMask):
        * platform/graphics/svg/qt/SVGResourceClipperQt.cpp: Added.
        (WebCore::SVGResourceClipper::applyClip):
        * platform/graphics/svg/qt/SVGResourceImageQt.cpp: Added.
        (WebCore::SVGResourceImage::init):
        (WebCore::SVGResourceImage::size):
        * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp: Added.
        (WebCore::SVGResourceMasker::applyMask):
        * platform/qt/GraphicsContextQt.cpp:
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        (WebCore::DrawMarkersData::DrawMarkersData):
        (WebCore::RenderPath::drawMarkersIfNeeded):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * rendering/SVGInlineFlowBox.cpp:
        (WebCore::paintSVGInlineFlow):

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

74 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/graphics/svg/SVGResource.cpp [moved from WebCore/kcanvas/KCanvasResource.cpp with 100% similarity]
WebCore/graphics/svg/SVGResourceClipper.cpp [moved from WebCore/kcanvas/KCanvasClipper.cpp with 100% similarity]
WebCore/graphics/svg/SVGResourceClipper.h [moved from WebCore/kcanvas/KCanvasClipper.h with 100% similarity]
WebCore/graphics/svg/SVGResourceImage.h [moved from WebCore/kcanvas/KCanvasImage.h with 100% similarity]
WebCore/graphics/svg/SVGResourceListener.h [moved from WebCore/kcanvas/KCanvasResourceListener.h with 100% similarity]
WebCore/graphics/svg/SVGResourceMarker.cpp [moved from WebCore/kcanvas/KCanvasMarker.cpp with 100% similarity]
WebCore/graphics/svg/SVGResourceMarker.h [moved from WebCore/kcanvas/KCanvasMarker.h with 100% similarity]
WebCore/graphics/svg/SVGResourceMasker.cpp [moved from WebCore/kcanvas/KCanvasMasker.cpp with 100% similarity]
WebCore/graphics/svg/SVGResourceMasker.h [moved from WebCore/kcanvas/KCanvasMasker.h with 100% similarity]
WebCore/kcanvas/KCanvasCreator.cpp [deleted file]
WebCore/kcanvas/KCanvasCreator.h [deleted file]
WebCore/kcanvas/KCanvasFilters.cpp
WebCore/kcanvas/KCanvasFilters.h
WebCore/kcanvas/KCanvasResource.h
WebCore/kcanvas/KCanvasTreeDebug.cpp
WebCore/kcanvas/device/KRenderingDevice.h
WebCore/kcanvas/device/KRenderingPaintServer.h
WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp
WebCore/kcanvas/device/KRenderingPaintServerGradient.h
WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp
WebCore/kcanvas/device/KRenderingPaintServerPattern.h
WebCore/kcanvas/device/KRenderingPaintServerSolid.h
WebCore/kcanvas/device/qt/KCanvasClipperQt.cpp
WebCore/kcanvas/device/qt/KCanvasClipperQt.h
WebCore/kcanvas/device/qt/KRenderingDeviceQt.cpp
WebCore/kcanvas/device/qt/KRenderingDeviceQt.h
WebCore/kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp
WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm
WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm
WebCore/kcanvas/device/quartz/KCanvasMaskerQuartz.h
WebCore/kcanvas/device/quartz/KCanvasMaskerQuartz.mm
WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h
WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.h
WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.h
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm
WebCore/kcanvas/device/quartz/QuartzSupport.mm
WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp
WebCore/ksvg2/svg/SVGClipPathElement.cpp
WebCore/ksvg2/svg/SVGClipPathElement.h
WebCore/ksvg2/svg/SVGFEImageElement.cpp
WebCore/ksvg2/svg/SVGFilterElement.cpp
WebCore/ksvg2/svg/SVGFilterElement.h
WebCore/ksvg2/svg/SVGGradientElement.cpp
WebCore/ksvg2/svg/SVGGradientElement.h
WebCore/ksvg2/svg/SVGImageElement.cpp
WebCore/ksvg2/svg/SVGLinearGradientElement.cpp
WebCore/ksvg2/svg/SVGLinearGradientElement.h
WebCore/ksvg2/svg/SVGMarkerElement.cpp
WebCore/ksvg2/svg/SVGMarkerElement.h
WebCore/ksvg2/svg/SVGMaskElement.cpp
WebCore/ksvg2/svg/SVGMaskElement.h
WebCore/ksvg2/svg/SVGPatternElement.cpp
WebCore/ksvg2/svg/SVGPatternElement.h
WebCore/ksvg2/svg/SVGRadialGradientElement.cpp
WebCore/ksvg2/svg/SVGRadialGradientElement.h
WebCore/ksvg2/svg/SVGStyledElement.h
WebCore/platform/graphics/GraphicsContext.cpp [moved from WebCore/platform/GraphicsContext.cpp with 100% similarity]
WebCore/platform/graphics/GraphicsContext.h [moved from WebCore/platform/GraphicsContext.h with 99% similarity]
WebCore/platform/graphics/GraphicsTypes.cpp [moved from WebCore/platform/GraphicsTypes.cpp with 100% similarity]
WebCore/platform/graphics/GraphicsTypes.h [moved from WebCore/platform/GraphicsTypes.h with 100% similarity]
WebCore/platform/qt/GraphicsContextQt.cpp
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderSVGContainer.cpp
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/SVGInlineFlowBox.cpp

index 87e3881d5ce6a375740485d5d577ae1fbf00f816..c9bb837981c381e6b581189e9754edf426bdd328 100644 (file)
@@ -6,8 +6,6 @@ include (CheckCXXCompilerFlag)
 include_directories(
    BEFORE ${CMAKE_CURRENT_BINARY_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/ForwardingHeaders
-   ${CMAKE_CURRENT_SOURCE_DIR}/platform
-   ${CMAKE_CURRENT_SOURCE_DIR}/platform/network
    ${CMAKE_CURRENT_SOURCE_DIR}/loader
    ${CMAKE_CURRENT_SOURCE_DIR}/loader/icon
    ${CMAKE_CURRENT_BINARY_DIR}/css
@@ -34,6 +32,12 @@ include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/misc 
    ${CMAKE_CURRENT_SOURCE_DIR}/ksvg2/events
    ${CMAKE_CURRENT_BINARY_DIR}/platform
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform/qt
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform/network
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform/network/qt
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform/graphics
+   ${CMAKE_CURRENT_SOURCE_DIR}/platform/graphics/qt
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders/gif
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders/jpeg
@@ -41,8 +45,6 @@ include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders/xbm
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders/bmp
    ${CMAKE_CURRENT_SOURCE_DIR}/platform/image-decoders/png
-   ${CMAKE_CURRENT_SOURCE_DIR}/platform/qt
-   ${CMAKE_CURRENT_SOURCE_DIR}/platform/network/qt
    ${CMAKE_CURRENT_SOURCE_DIR}/WebCore+SVG
    ${CMAKE_CURRENT_SOURCE_DIR}/../JavaScriptCore/kjs
    ${CMAKE_CURRENT_SOURCE_DIR}/../JavaScriptCore/bindings
@@ -637,8 +639,6 @@ set (SVG_SOURCES
     ksvg2/svg/SVGStopElement.cpp
     ksvg2/svg/SVGDefsElement.cpp
     ksvg2/svg/SVGMetadataElement.cpp
-#   ksvg2/ecma/GlobalObject.cpp
-#   ksvg2/ecma/Ecma.cpp
     ksvg2/misc/SVGImageLoader.cpp
     ksvg2/misc/SVGDocumentExtensions.cpp
     ksvg2/misc/KSVGTimeScheduler.cpp
@@ -647,10 +647,6 @@ set (SVG_SOURCES
     ksvg2/events/SVGZoomEvent.cpp
     kcanvas/KCanvasTreeDebug.cpp
     kcanvas/KCanvasFilters.cpp
-    kcanvas/KCanvasClipper.cpp
-    kcanvas/KCanvasMarker.cpp
-    kcanvas/KCanvasMasker.cpp
-    kcanvas/KCanvasResource.cpp
     kcanvas/device/KRenderingPaintServerGradient.cpp
     kcanvas/device/KRenderingPaintServerSolid.cpp
     kcanvas/device/KRenderingPaintServerPattern.cpp
@@ -661,7 +657,6 @@ set (SVG_SOURCES
     kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp
     kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp
     kcanvas/device/qt/KRenderingPaintServerQt.cpp
-    kcanvas/device/qt/KCanvasClipperQt.cpp
 #   kcanvas/device/qt/KCanvasFilterQt.cpp
 #   kcanvas/device/qt/KCanvasImageItemQt.cpp
     rendering/RenderForeignObject.cpp
@@ -998,7 +993,6 @@ set(WebCore_SRCS
     platform/FloatSize.cpp
     platform/String.cpp
     platform/DeprecatedValueListImpl.cpp
-    platform/GraphicsTypes.cpp
     platform/IntRect.cpp
     platform/Arena.cpp
     platform/ArrayImpl.cpp
@@ -1013,14 +1007,12 @@ set(WebCore_SRCS
     platform/TextDecoder.cpp
     platform/TextEncoding.cpp
     platform/TextEncodingRegistry.cpp
-    platform/GraphicsContext.cpp
     platform/Logging.cpp
     platform/Color.cpp
     platform/DeprecatedPtrListImpl.cpp
     platform/KURL.cpp
     platform/StringImpl.cpp
     platform/FloatRect.cpp
-    platform/network/ResourceHandle.cpp
     platform/Path.cpp
     platform/qt/EditorClientQt.cpp
     platform/qt/SoundQt.cpp
@@ -1043,6 +1035,7 @@ set(WebCore_SRCS
     platform/qt/FontDataQt.cpp
     platform/qt/SharedTimerQt.cpp
     platform/qt/PopupMenuQt.cpp
+    platform/network/ResourceHandle.cpp
     platform/network/qt/ResourceHandleManager.cpp
     platform/network/qt/ResourceHandleQt.cpp
     platform/qt/FloatPointQt.cpp
@@ -1066,6 +1059,18 @@ set(WebCore_SRCS
     platform/qt/ScrollViewCanvasQt.cpp
     platform/qt/PlatformMouseEventQt.cpp
     platform/qt/PlatformKeyboardEventQt.cpp
+    platform/network/ResourceLoader.cpp
+    platform/network/qt/ResourceLoaderManager.cpp
+    platform/network/qt/ResourceLoaderQt.cpp
+    platform/graphics/GraphicsTypes.cpp
+    platform/graphics/GraphicsContext.cpp
+    platform/graphics/svg/SVGResource.cpp
+    platform/graphics/svg/SVGResourceClipper.cpp
+    platform/graphics/svg/SVGResourceMasker.cpp
+    platform/graphics/svg/SVGResourceMarker.cpp
+    platform/graphics/svg/qt/SVGResourceClipperQt.cpp
+    platform/graphics/svg/qt/SVGResourceImageQt.cpp
+    platform/graphics/svg/qt/SVGResourceMaskerQt.cpp
     platform/image-decoders/bmp/BMPImageDecoder.cpp
     platform/image-decoders/gif/GIFImageReader.cpp
     platform/image-decoders/gif/GIFImageDecoder.cpp
index 2dc232b4fc1081352e27c5e41a06adaf88384b49..683507cd6a1b8b8dc7ae169c773489c4ca59ee18 100644 (file)
@@ -1,3 +1,269 @@
+2006-10-31  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Oliver.
+
+        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11436
+
+        Better SVG integration in WebKit, Part I.
+
+        The patch is mostly about creating a new platform/graphics directory, and
+        moving the kcanvas resources (clipper/masker/marker) there (in svg budir),
+        with a new name (KCanvasClipper -> SVGResourceClipper). Also fix several ownership
+        issues, by using ref counting (the SVG classes now store RefPtrs to the resources).
+
+        KCanvasFilters is still left in kcanvas/ subdirectory, to be converted in a next patch.
+        All details of the patch, and upcoming patches can be found in the bug report.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * kcanvas/KCanvasClipper.cpp: Removed.
+        * kcanvas/KCanvasClipper.h: Removed.
+        * kcanvas/KCanvasCreator.cpp: Removed.
+        * kcanvas/KCanvasCreator.h: Removed.
+        * kcanvas/KCanvasFilters.cpp:
+        (WebCore::getFilterById):
+        * kcanvas/KCanvasFilters.h:
+        * kcanvas/KCanvasImage.h: Removed.
+        * kcanvas/KCanvasMarker.cpp: Removed.
+        * kcanvas/KCanvasMarker.h: Removed.
+        * kcanvas/KCanvasMasker.cpp: Removed.
+        * kcanvas/KCanvasMasker.h: Removed.
+        * kcanvas/KCanvasResource.cpp: Removed.
+        * kcanvas/KCanvasResource.h: Removed.
+        * kcanvas/KCanvasResourceListener.h: Removed.
+        * kcanvas/KCanvasTreeDebug.cpp:
+        (WebCore::writeRenderResources):
+        * kcanvas/device/KRenderingDevice.h:
+        * kcanvas/device/KRenderingPaintServer.h:
+        (WebCore::KRenderingPaintServer::KRenderingPaintServer):
+        * kcanvas/device/KRenderingPaintServerGradient.cpp:
+        (WebCore::KRenderingPaintServerGradient::listener):
+        (WebCore::KRenderingPaintServerGradient::setListener):
+        * kcanvas/device/KRenderingPaintServerGradient.h:
+        * kcanvas/device/KRenderingPaintServerPattern.cpp:
+        (WebCore::KRenderingPaintServerPattern::KRenderingPaintServerPattern):
+        (WebCore::KRenderingPaintServerPattern::~KRenderingPaintServerPattern):
+        (WebCore::KRenderingPaintServerPattern::tile):
+        (WebCore::KRenderingPaintServerPattern::setTile):
+        (WebCore::KRenderingPaintServerPattern::listener):
+        (WebCore::KRenderingPaintServerPattern::setListener):
+        * kcanvas/device/KRenderingPaintServerPattern.h:
+        * kcanvas/device/KRenderingPaintServerSolid.h:
+        * kcanvas/device/qt/KCanvasClipperQt.cpp: Removed.
+        * kcanvas/device/qt/KCanvasClipperQt.h: Removed.
+        * kcanvas/device/qt/KRenderingDeviceQt.cpp:
+        (WebCore::KRenderingDeviceQt::contextForImage):
+        (WebCore::KRenderingDeviceQt::createResource):
+        (WebCore::KRenderingDeviceQt::createPaintServer):
+        * kcanvas/device/qt/KRenderingDeviceQt.h:
+        * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
+        * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
+        * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
+        * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
+        * kcanvas/device/qt/RenderPathQt.h: Removed.
+        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
+        (WebCore::KCanvasFilterQuartz::getCIFilterStack):
+        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
+        * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Removed.
+        * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Removed.
+        * kcanvas/device/quartz/KCanvasResourcesQuartz.h: Removed.
+        * kcanvas/device/quartz/KCanvasResourcesQuartz.mm: Removed.
+        * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
+        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
+        (WebCore::KRenderingDeviceQuartz::contextForImage):
+        (WebCore::KRenderingDeviceQuartz::createPaintServer):
+        (WebCore::KRenderingDeviceQuartz::createResource):
+        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
+        (WebCore::KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz):
+        (WebCore::KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz):
+        (WebCore::KRenderingPaintServerGradientQuartz::setup):
+        (WebCore::KRenderingPaintServerGradientQuartz::teardown):
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
+        (WebCore::patternCallback):
+        (WebCore::KRenderingPaintServerPatternQuartz::setup):
+        * kcanvas/device/quartz/QuartzSupport.mm:
+        * ksvg2/misc/KCanvasRenderingStyle.cpp:
+        (WebCore::sharedSolidPaintServer):
+        * ksvg2/svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::SVGClipPathElement):
+        (WebCore::SVGClipPathElement::~SVGClipPathElement):
+        (WebCore::SVGClipPathElement::canvasResource):
+        * ksvg2/svg/SVGClipPathElement.h:
+        * ksvg2/svg/SVGFEImageElement.cpp:
+        * ksvg2/svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::SVGFilterElement):
+        (WebCore::SVGFilterElement::~SVGFilterElement):
+        (WebCore::SVGFilterElement::canvasResource):
+        * ksvg2/svg/SVGFilterElement.h:
+        * ksvg2/svg/SVGGradientElement.cpp:
+        (WebCore::SVGGradientElement::SVGGradientElement):
+        (WebCore::SVGGradientElement::~SVGGradientElement):
+        (WebCore::SVGGradientElement::canvasResource):
+        (WebCore::SVGGradientElement::resourceNotification):
+        * ksvg2/svg/SVGGradientElement.h:
+        * ksvg2/svg/SVGImageElement.cpp:
+        * ksvg2/svg/SVGLinearGradientElement.cpp:
+        (WebCore::SVGLinearGradientElement::buildGradient):
+        * ksvg2/svg/SVGLinearGradientElement.h:
+        * ksvg2/svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::SVGMarkerElement):
+        (WebCore::SVGMarkerElement::~SVGMarkerElement):
+        (WebCore::SVGMarkerElement::canvasResource):
+        * ksvg2/svg/SVGMarkerElement.h:
+        * ksvg2/svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::SVGMaskElement):
+        (WebCore::SVGMaskElement::~SVGMaskElement):
+        (WebCore::SVGMaskElement::drawMaskerContent):
+        (WebCore::SVGMaskElement::canvasResource):
+        * ksvg2/svg/SVGMaskElement.h:
+        * ksvg2/svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::SVGPatternElement):
+        (WebCore::SVGPatternElement::~SVGPatternElement):
+        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
+        (WebCore::SVGPatternElement::drawPatternContentIntoTile):
+        (WebCore::SVGPatternElement::canvasResource):
+        * ksvg2/svg/SVGPatternElement.h:
+        * ksvg2/svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::buildGradient):
+        * ksvg2/svg/SVGRadialGradientElement.h:
+        * ksvg2/svg/SVGStyledElement.h:
+        (WebCore::SVGStyledElement::canvasResource):
+        * platform/GraphicsContext.cpp: Removed.
+        * platform/GraphicsContext.h: Removed.
+        * platform/GraphicsTypes.cpp: Removed.
+        * platform/GraphicsTypes.h: Removed.
+        * platform/graphics/GraphicsContext.cpp: Added.
+        (WebCore::GraphicsContextState::GraphicsContextState):
+        (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
+        (WebCore::GraphicsContext::createGraphicsContextPrivate):
+        (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
+        (WebCore::GraphicsContext::save):
+        (WebCore::GraphicsContext::restore):
+        (WebCore::GraphicsContext::font):
+        (WebCore::GraphicsContext::setFont):
+        (WebCore::GraphicsContext::pen):
+        (WebCore::GraphicsContext::setPen):
+        (WebCore::GraphicsContext::setFillColor):
+        (WebCore::GraphicsContext::fillColor):
+        (WebCore::GraphicsContext::updatingControlTints):
+        (WebCore::GraphicsContext::setUpdatingControlTints):
+        (WebCore::GraphicsContext::setPaintingDisabled):
+        (WebCore::GraphicsContext::paintingDisabled):
+        (WebCore::GraphicsContext::drawImage):
+        (WebCore::GraphicsContext::drawText):
+        (WebCore::GraphicsContext::drawHighlightForText):
+        (WebCore::GraphicsContext::initFocusRing):
+        (WebCore::GraphicsContext::clearFocusRing):
+        (WebCore::GraphicsContext::focusRingBoundingRect):
+        (WebCore::GraphicsContext::addFocusRingRect):
+        (WebCore::GraphicsContext::focusRingWidth):
+        (WebCore::GraphicsContext::focusRingOffset):
+        (WebCore::GraphicsContext::focusRingRects):
+        (WebCore::GraphicsContext::drawTiledImage):
+        * platform/graphics/GraphicsContext.h: Added.
+        * platform/graphics/GraphicsTypes.cpp: Added.
+        (WebCore::):
+        (WebCore::parseCompositeOperator):
+        (WebCore::compositeOperatorName):
+        (WebCore::parseLineCap):
+        (WebCore::lineCapName):
+        (WebCore::parseLineJoin):
+        (WebCore::lineJoinName):
+        * platform/graphics/GraphicsTypes.h: Added.
+        (WebCore::):
+        * platform/graphics/svg/SVGResource.cpp: Added.
+        (WebCore::SVGResource::SVGResource):
+        (WebCore::SVGResource::~SVGResource):
+        (WebCore::SVGResource::invalidate):
+        (WebCore::SVGResource::addClient):
+        (WebCore::SVGResource::clients):
+        (WebCore::SVGResource::idInRegistry):
+        (WebCore::SVGResource::setIdInRegistry):
+        (WebCore::SVGResource::externalRepresentation):
+        (WebCore::getResourceById):
+        (WebCore::getPaintServerById):
+        (WebCore::operator<<):
+        * platform/graphics/svg/SVGResource.h: Added.
+        (WebCore::):
+        (WebCore::SVGResource::isPaintServer):
+        (WebCore::SVGResource::isFilter):
+        (WebCore::SVGResource::isClipper):
+        (WebCore::SVGResource::isMarker):
+        (WebCore::SVGResource::isMasker):
+        (WebCore::SVGResourceListener::~SVGResourceListener):
+        * platform/graphics/svg/SVGResourceClipper.cpp: Added.
+        (WebCore::SVGResourceClipper::SVGResourceClipper):
+        (WebCore::SVGResourceClipper::~SVGResourceClipper):
+        (WebCore::SVGResourceClipper::resetClipData):
+        (WebCore::SVGResourceClipper::addClipData):
+        (WebCore::SVGResourceClipper::clipData):
+        (WebCore::SVGResourceClipper::externalRepresentation):
+        (WebCore::operator<<):
+        (WebCore::getClipperById):
+        * platform/graphics/svg/SVGResourceClipper.h: Added.
+        (WebCore::ClipDataList::addPath):
+        (WebCore::SVGResourceClipper::isClipper):
+        * platform/graphics/svg/SVGResourceImage.h: Added.
+        * platform/graphics/svg/SVGResourceMarker.cpp: Added.
+        (WebCore::SVGResourceMarker::SVGResourceMarker):
+        (WebCore::SVGResourceMarker::~SVGResourceMarker):
+        (WebCore::SVGResourceMarker::setMarker):
+        (WebCore::SVGResourceMarker::setRef):
+        (WebCore::SVGResourceMarker::draw):
+        (WebCore::SVGResourceMarker::externalRepresentation):
+        (WebCore::getMarkerById):
+        * platform/graphics/svg/SVGResourceMarker.h: Added.
+        (WebCore::SVGResourceMarker::refX):
+        (WebCore::SVGResourceMarker::refY):
+        (WebCore::SVGResourceMarker::setAngle):
+        (WebCore::SVGResourceMarker::setAutoAngle):
+        (WebCore::SVGResourceMarker::angle):
+        (WebCore::SVGResourceMarker::setUseStrokeWidth):
+        (WebCore::SVGResourceMarker::useStrokeWidth):
+        (WebCore::SVGResourceMarker::isMarker):
+        * platform/graphics/svg/SVGResourceMasker.cpp: Added.
+        (WebCore::SVGResourceMasker::SVGResourceMasker):
+        (WebCore::SVGResourceMasker::~SVGResourceMasker):
+        (WebCore::SVGResourceMasker::setMask):
+        (WebCore::SVGResourceMasker::mask):
+        (WebCore::SVGResourceMasker::externalRepresentation):
+        (WebCore::getMaskerById):
+        * platform/graphics/svg/SVGResourceMasker.h: Added.
+        (WebCore::SVGResourceMasker::isMasker):
+        * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Added.
+        (WebCore::SVGResourceClipper::applyClip):
+        * platform/graphics/svg/cg/SVGResourceImageCg.mm: Added.
+        (WebCore::SVGResourceImage::SVGResourceImage):
+        (WebCore::SVGResourceImage::~SVGResourceImage):
+        (WebCore::SVGResourceImage::init):
+        (WebCore::SVGResourceImage::size):
+        (WebCore::SVGResourceImage::cgLayer):
+        (WebCore::SVGResourceImage::setCGLayer):
+        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: Added.
+        (WebCore::applyLuminanceToAlphaFilter):
+        (WebCore::applyExpandAlphatoGrayscaleFilter):
+        (WebCore::transformImageIntoGrayscaleMask):
+        (WebCore::SVGResourceMasker::applyMask):
+        * platform/graphics/svg/qt/SVGResourceClipperQt.cpp: Added.
+        (WebCore::SVGResourceClipper::applyClip):
+        * platform/graphics/svg/qt/SVGResourceImageQt.cpp: Added.
+        (WebCore::SVGResourceImage::init):
+        (WebCore::SVGResourceImage::size):
+        * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp: Added.
+        (WebCore::SVGResourceMasker::applyMask):
+        * platform/qt/GraphicsContextQt.cpp:
+        * rendering/RenderPath.cpp:
+        (WebCore::RenderPath::paint):
+        (WebCore::DrawMarkersData::DrawMarkersData):
+        (WebCore::RenderPath::drawMarkersIfNeeded):
+        * rendering/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::paint):
+        * rendering/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::paint):
+        * rendering/SVGInlineFlowBox.cpp:
+        (WebCore::paintSVGInlineFlow):
+
 2006-10-30  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Geoff Garen.
index 4fd5c97c9fd3600d8f573c348e9ffb6036842bf7..4b87247b3d80ce4818a8b7c2c0ad60f794764634 100644 (file)
                9352088209BD45E900F2038D /* CookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352088109BD45E900F2038D /* CookieJar.h */; };
                9353673F09AED79200D35CD6 /* ScrollBarMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9353673E09AED79200D35CD6 /* ScrollBarMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
                9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */; };
-               935367E509AF77DD00D35CD6 /* GraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 935367E409AF77DD00D35CD6 /* GraphicsContext.h */; };
                935367E909AF77EF00D35CD6 /* GraphicsContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935367E809AF77EF00D35CD6 /* GraphicsContextMac.mm */; };
                9353686B09AF78F600D35CD6 /* TextDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9353686A09AF78F600D35CD6 /* TextDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
                935C475D09AC4CA000A6AAB4 /* History.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C475C09AC4CA000A6AAB4 /* History.h */; };
                938E65F709F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */; };
                938E666009F09B81008A48EC /* JSHTMLCanvasElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 938E665F09F09B81008A48EC /* JSHTMLCanvasElement.cpp */; };
                938E666209F09B87008A48EC /* JSHTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 938E666109F09B87008A48EC /* JSHTMLCanvasElement.h */; };
-               938E683C09F0BD7B008A48EC /* GraphicsTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 938E683B09F0BD7A008A48EC /* GraphicsTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               938E685409F0BE04008A48EC /* GraphicsTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 938E685309F0BE04008A48EC /* GraphicsTypes.cpp */; };
                9392F1420AD185F400691BD4 /* RenderCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9392F1410AD185F400691BD4 /* RenderCounter.h */; };
                9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9392F1430AD185FE00691BD4 /* RenderCounter.cpp */; };
                9392F1460AD1860C00691BD4 /* CounterResetNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9392F1450AD1860C00691BD4 /* CounterResetNode.h */; };
                A81369E5097374F600D74463 /* HTMLKeygenElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81369C9097374F600D74463 /* HTMLKeygenElement.cpp */; };
                A8136D380973A8E700D74463 /* FormDataList.h in Headers */ = {isa = PBXBuildFile; fileRef = A8136D360973A8E700D74463 /* FormDataList.h */; };
                A8136D390973A8E700D74463 /* FormDataList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8136D370973A8E700D74463 /* FormDataList.cpp */; };
-               A81655D4096BBEAC00601058 /* KCanvasMaskerQuartz.h in Headers */ = {isa = PBXBuildFile; fileRef = A81655D2096BBEAC00601058 /* KCanvasMaskerQuartz.h */; };
-               A81655D5096BBEAC00601058 /* KCanvasMaskerQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A81655D3096BBEAC00601058 /* KCanvasMaskerQuartz.mm */; };
                A81655E4096BC13900601058 /* SVGMaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A81655E2096BC13900601058 /* SVGMaskElement.cpp */; };
                A81655E5096BC13900601058 /* SVGMaskElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A81655E3096BC13900601058 /* SVGMaskElement.h */; };
                A8185F3909765766005826D9 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = A8185F3109765765005826D9 /* DocumentType.h */; };
                A82398A809B3ACF500B60641 /* PlugInInfoStoreMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A82398A709B3ACF500B60641 /* PlugInInfoStoreMac.mm */; };
                A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8239DFE09B3CF8A00B60641 /* Logging.cpp */; };
                A8239E0109B3CF8A00B60641 /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = A8239DFF09B3CF8A00B60641 /* Logging.h */; };
-               A823A75C09B6E53900B60641 /* GraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A823A75B09B6E53900B60641 /* GraphicsContext.cpp */; };
                A826E8AE0A1A8F2300CD1BB6 /* JSHTMLOptionElementConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A826E8AC0A1A8F2300CD1BB6 /* JSHTMLOptionElementConstructor.h */; };
                A826EC480A1B0CBE00CD1BB6 /* JSHTMLOptionElementConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A826E8AD0A1A8F2300CD1BB6 /* JSHTMLOptionElementConstructor.cpp */; };
                A833C7CA0A2CF06B00D57664 /* SVGNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581E809D1508D000E61D7 /* SVGNames.cpp */; };
                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 */; };
                A88AD3AA0952486D001DD196 /* KCanvasFilterQuartz.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB69089701F800BA5114 /* KCanvasFilterQuartz.h */; };
                A88AD3AB0952486D001DD196 /* KCanvasFilterQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB6A089701F800BA5114 /* KCanvasFilterQuartz.mm */; };
                A88AD3AD0952486D001DD196 /* KCanvasItemQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.mm */; };
-               A88AD3AE0952486D001DD196 /* KCanvasResourcesQuartz.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB6D089701F800BA5114 /* KCanvasResourcesQuartz.h */; };
-               A88AD3AF0952486D001DD196 /* KCanvasResourcesQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB6E089701F800BA5114 /* KCanvasResourcesQuartz.mm */; };
                A88AD3B00952486E001DD196 /* KRenderingDeviceQuartz.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB71089701F800BA5114 /* KRenderingDeviceQuartz.h */; };
                A88AD3B10952486E001DD196 /* KRenderingDeviceQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB72089701F800BA5114 /* KRenderingDeviceQuartz.mm */; };
                A88AD3B20952486E001DD196 /* KRenderingPaintServerGradientQuartz.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB73089701F800BA5114 /* KRenderingPaintServerGradientQuartz.mm */; };
                A88AD3B50952486E001DD196 /* QuartzSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB76089701F800BA5114 /* QuartzSupport.h */; };
                A88AD3B60952486E001DD196 /* QuartzSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB77089701F800BA5114 /* QuartzSupport.mm */; };
                A88AD3BE0952486E001DD196 /* KCanvasFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */; };
-               A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB81089701F800BA5114 /* KCanvasImage.h */; };
-               A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB89089701F800BA5114 /* KCanvasResourceListener.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 */; };
                B222F6990AB771950022EFAD /* JSSVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = B222F6970AB771950022EFAD /* JSSVGAngle.h */; };
                B222F69C0AB771B80022EFAD /* JSSVGElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222F69A0AB771B80022EFAD /* JSSVGElement.cpp */; };
                B222F69D0AB771B80022EFAD /* JSSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B222F69B0AB771B80022EFAD /* JSSVGElement.h */; };
+               B2A015A80AF6CD53006BCE0E /* GraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */; };
+               B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015930AF6CD53006BCE0E /* GraphicsContext.h */; };
+               B2A015AA0AF6CD53006BCE0E /* GraphicsTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */; };
+               B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */; };
+               B2A015AC0AF6CD53006BCE0E /* SVGResourceClipperCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2A015980AF6CD53006BCE0E /* SVGResourceClipperCg.mm */; };
+               B2A015AD0AF6CD53006BCE0E /* SVGResourceImageCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2A015990AF6CD53006BCE0E /* SVGResourceImageCg.mm */; };
+               B2A015AE0AF6CD53006BCE0E /* SVGResourceMaskerCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2A0159A0AF6CD53006BCE0E /* SVGResourceMaskerCg.mm */; };
+               B2A015B20AF6CD53006BCE0E /* SVGResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A0159F0AF6CD53006BCE0E /* SVGResource.cpp */; };
+               B2A015B30AF6CD53006BCE0E /* SVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015A00AF6CD53006BCE0E /* SVGResource.h */; };
+               B2A015B40AF6CD53006BCE0E /* SVGResourceClipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015A10AF6CD53006BCE0E /* SVGResourceClipper.cpp */; };
+               B2A015B50AF6CD53006BCE0E /* SVGResourceClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015A20AF6CD53006BCE0E /* SVGResourceClipper.h */; };
+               B2A015B60AF6CD53006BCE0E /* SVGResourceImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015A30AF6CD53006BCE0E /* SVGResourceImage.h */; };
+               B2A015B70AF6CD53006BCE0E /* SVGResourceMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015A40AF6CD53006BCE0E /* SVGResourceMarker.cpp */; };
+               B2A015B80AF6CD53006BCE0E /* SVGResourceMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015A50AF6CD53006BCE0E /* SVGResourceMarker.h */; };
+               B2A015B90AF6CD53006BCE0E /* SVGResourceMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A015A60AF6CD53006BCE0E /* SVGResourceMasker.cpp */; };
+               B2A015BA0AF6CD53006BCE0E /* SVGResourceMasker.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A015A70AF6CD53006BCE0E /* SVGResourceMasker.h */; };
                B2CB41930AB75904004D9C45 /* SVGRenderingIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = B2CB414C0AB75904004D9C45 /* SVGRenderingIntent.h */; };
                B2CB41A60AB75904004D9C45 /* SVGUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = B2CB415F0AB75904004D9C45 /* SVGUnitTypes.h */; };
                B2FA3D360AB75A6F000E5AC4 /* JSSVGAnimateColorElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2FA3C4E0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.cpp */; };
                9352088109BD45E900F2038D /* CookieJar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookieJar.h; sourceTree = "<group>"; };
                9353673E09AED79200D35CD6 /* ScrollBarMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollBarMode.h; sourceTree = "<group>"; };
                9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollViewMac.mm; sourceTree = "<group>"; };
-               935367E409AF77DD00D35CD6 /* GraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext.h; sourceTree = "<group>"; };
                935367E809AF77EF00D35CD6 /* GraphicsContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsContextMac.mm; sourceTree = "<group>"; };
                9353686A09AF78F600D35CD6 /* TextDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextDirection.h; sourceTree = "<group>"; };
                935C475C09AC4CA000A6AAB4 /* History.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = History.h; sourceTree = "<group>"; };
                938E662509F09956008A48EC /* HTMLCanvasElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLCanvasElement.idl; sourceTree = "<group>"; };
                938E665F09F09B81008A48EC /* JSHTMLCanvasElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLCanvasElement.cpp; sourceTree = "<group>"; };
                938E666109F09B87008A48EC /* JSHTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLCanvasElement.h; sourceTree = "<group>"; };
-               938E683B09F0BD7A008A48EC /* GraphicsTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsTypes.h; sourceTree = "<group>"; };
-               938E685309F0BE04008A48EC /* GraphicsTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsTypes.cpp; sourceTree = "<group>"; };
                9392F1410AD185F400691BD4 /* RenderCounter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderCounter.h; sourceTree = "<group>"; };
                9392F1430AD185FE00691BD4 /* RenderCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderCounter.cpp; sourceTree = "<group>"; };
                9392F1450AD1860C00691BD4 /* CounterResetNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CounterResetNode.h; sourceTree = "<group>"; };
                A81369C9097374F600D74463 /* HTMLKeygenElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLKeygenElement.cpp; sourceTree = "<group>"; };
                A8136D360973A8E700D74463 /* FormDataList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FormDataList.h; sourceTree = "<group>"; };
                A8136D370973A8E700D74463 /* FormDataList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FormDataList.cpp; sourceTree = "<group>"; };
-               A81655D2096BBEAC00601058 /* KCanvasMaskerQuartz.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KCanvasMaskerQuartz.h; sourceTree = "<group>"; };
-               A81655D3096BBEAC00601058 /* KCanvasMaskerQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KCanvasMaskerQuartz.mm; sourceTree = "<group>"; };
                A81655E2096BC13900601058 /* SVGMaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGMaskElement.cpp; sourceTree = "<group>"; };
                A81655E3096BC13900601058 /* SVGMaskElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGMaskElement.h; sourceTree = "<group>"; };
                A8185F3109765765005826D9 /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = "<group>"; };
                A82398A709B3ACF500B60641 /* PlugInInfoStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PlugInInfoStoreMac.mm; sourceTree = "<group>"; };
                A8239DFE09B3CF8A00B60641 /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Logging.cpp; sourceTree = "<group>"; };
                A8239DFF09B3CF8A00B60641 /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Logging.h; sourceTree = "<group>"; };
-               A823A75B09B6E53900B60641 /* GraphicsContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext.cpp; sourceTree = "<group>"; };
                A826E8AC0A1A8F2300CD1BB6 /* JSHTMLOptionElementConstructor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLOptionElementConstructor.h; sourceTree = "<group>"; };
                A826E8AD0A1A8F2300CD1BB6 /* JSHTMLOptionElementConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOptionElementConstructor.cpp; sourceTree = "<group>"; };
                A82FC33B08CBB07C00EFEE23 /* SVGCursorElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGCursorElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                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; };
                A8C0FB69089701F800BA5114 /* KCanvasFilterQuartz.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasFilterQuartz.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB6A089701F800BA5114 /* KCanvasFilterQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KCanvasFilterQuartz.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KCanvasItemQuartz.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               A8C0FB6D089701F800BA5114 /* KCanvasResourcesQuartz.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResourcesQuartz.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               A8C0FB6E089701F800BA5114 /* KCanvasResourcesQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KCanvasResourcesQuartz.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB71089701F800BA5114 /* KRenderingDeviceQuartz.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KRenderingDeviceQuartz.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB72089701F800BA5114 /* KRenderingDeviceQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KRenderingDeviceQuartz.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB73089701F800BA5114 /* KRenderingPaintServerGradientQuartz.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KRenderingPaintServerGradientQuartz.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C0FB76089701F800BA5114 /* QuartzSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QuartzSupport.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; };
                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; };
-               A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResourceListener.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; };
                B222F6970AB771950022EFAD /* JSSVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGAngle.h; sourceTree = "<group>"; };
                B222F69A0AB771B80022EFAD /* JSSVGElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGElement.cpp; sourceTree = "<group>"; };
                B222F69B0AB771B80022EFAD /* JSSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGElement.h; sourceTree = "<group>"; };
+               B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext.cpp; sourceTree = "<group>"; };
+               B2A015930AF6CD53006BCE0E /* GraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsContext.h; sourceTree = "<group>"; };
+               B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsTypes.cpp; sourceTree = "<group>"; };
+               B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsTypes.h; sourceTree = "<group>"; };
+               B2A015980AF6CD53006BCE0E /* SVGResourceClipperCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceClipperCg.mm; sourceTree = "<group>"; };
+               B2A015990AF6CD53006BCE0E /* SVGResourceImageCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceImageCg.mm; sourceTree = "<group>"; };
+               B2A0159A0AF6CD53006BCE0E /* SVGResourceMaskerCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceMaskerCg.mm; sourceTree = "<group>"; };
+               B2A0159F0AF6CD53006BCE0E /* SVGResource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResource.cpp; sourceTree = "<group>"; };
+               B2A015A00AF6CD53006BCE0E /* SVGResource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResource.h; sourceTree = "<group>"; };
+               B2A015A10AF6CD53006BCE0E /* SVGResourceClipper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceClipper.cpp; sourceTree = "<group>"; };
+               B2A015A20AF6CD53006BCE0E /* SVGResourceClipper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceClipper.h; sourceTree = "<group>"; };
+               B2A015A30AF6CD53006BCE0E /* SVGResourceImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceImage.h; sourceTree = "<group>"; };
+               B2A015A40AF6CD53006BCE0E /* SVGResourceMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceMarker.cpp; sourceTree = "<group>"; };
+               B2A015A50AF6CD53006BCE0E /* SVGResourceMarker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceMarker.h; sourceTree = "<group>"; };
+               B2A015A60AF6CD53006BCE0E /* SVGResourceMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourceMasker.cpp; sourceTree = "<group>"; };
+               B2A015A70AF6CD53006BCE0E /* SVGResourceMasker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGResourceMasker.h; sourceTree = "<group>"; };
                B2CB41010AB758E6004D9C45 /* SVGAElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAElement.idl; sourceTree = "<group>"; };
                B2CB41020AB758E6004D9C45 /* SVGAnimateColorElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimateColorElement.idl; sourceTree = "<group>"; };
                B2CB41030AB758E6004D9C45 /* SVGAnimatedLengthList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedLengthList.idl; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                A8C0FB53089701F700BA5114 /* device */,
-                               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 */,
                                A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */,
                                A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */,
                        );
                                A8C0FB69089701F800BA5114 /* KCanvasFilterQuartz.h */,
                                A8C0FB6A089701F800BA5114 /* KCanvasFilterQuartz.mm */,
                                A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.mm */,
-                               A81655D2096BBEAC00601058 /* KCanvasMaskerQuartz.h */,
-                               A81655D3096BBEAC00601058 /* KCanvasMaskerQuartz.mm */,
-                               A8C0FB6D089701F800BA5114 /* KCanvasResourcesQuartz.h */,
-                               A8C0FB6E089701F800BA5114 /* KCanvasResourcesQuartz.mm */,
                                A8C0FB71089701F800BA5114 /* KRenderingDeviceQuartz.h */,
                                A8C0FB72089701F800BA5114 /* KRenderingDeviceQuartz.mm */,
                                A8C0FB73089701F800BA5114 /* KRenderingPaintServerGradientQuartz.mm */,
                        path = filters;
                        sourceTree = "<group>";
                };
+               B2A015910AF6CD53006BCE0E /* graphics */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */,
+                               B2A015930AF6CD53006BCE0E /* GraphicsContext.h */,
+                               B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */,
+                               B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */,
+                               B2A015960AF6CD53006BCE0E /* svg */,
+                       );
+                       path = graphics;
+                       sourceTree = "<group>";
+               };
+               B2A015960AF6CD53006BCE0E /* svg */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B2A015970AF6CD53006BCE0E /* cg */,
+                               B2A0159F0AF6CD53006BCE0E /* SVGResource.cpp */,
+                               B2A015A00AF6CD53006BCE0E /* SVGResource.h */,
+                               B2A015A10AF6CD53006BCE0E /* SVGResourceClipper.cpp */,
+                               B2A015A20AF6CD53006BCE0E /* SVGResourceClipper.h */,
+                               B2A015A30AF6CD53006BCE0E /* SVGResourceImage.h */,
+                               B2A015A40AF6CD53006BCE0E /* SVGResourceMarker.cpp */,
+                               B2A015A50AF6CD53006BCE0E /* SVGResourceMarker.h */,
+                               B2A015A60AF6CD53006BCE0E /* SVGResourceMasker.cpp */,
+                               B2A015A70AF6CD53006BCE0E /* SVGResourceMasker.h */,
+                       );
+                       path = svg;
+                       sourceTree = "<group>";
+               };
+               B2A015970AF6CD53006BCE0E /* cg */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B2A015980AF6CD53006BCE0E /* SVGResourceClipperCg.mm */,
+                               B2A015990AF6CD53006BCE0E /* SVGResourceImageCg.mm */,
+                               B2A0159A0AF6CD53006BCE0E /* SVGResourceMaskerCg.mm */,
+                       );
+                       path = cg;
+                       sourceTree = "<group>";
+               };
                BC1A3790097C6F970019F3D8 /* bindings */ = {
                        isa = PBXGroup;
                        children = (
                BCF1A5BA097832090061A123 /* platform */ = {
                        isa = PBXGroup;
                        children = (
+                               B2A015910AF6CD53006BCE0E /* graphics */,
                                656B84D70AEA1CE900A095B4 /* network */,
                                1AE42F670AA4B8CB00C8612D /* cf */,
                                93032CCC09AEC36200F82A18 /* cg */,
                                BC6DB3680A1A7CB700E5CD14 /* GlyphMap.h */,
                                BCC089550A1C4CC9006189A6 /* GlyphWidthMap.cpp */,
                                BCC089290A1C4991006189A6 /* GlyphWidthMap.h */,
-                               A823A75B09B6E53900B60641 /* GraphicsContext.cpp */,
-                               935367E409AF77DD00D35CD6 /* GraphicsContext.h */,
-                               938E685309F0BE04008A48EC /* GraphicsTypes.cpp */,
-                               938E683B09F0BD7A008A48EC /* GraphicsTypes.h */,
                                066C773B0AB6052700238CC4 /* Icon.h */,
                                BC6B7BAE0993603C0052867B /* Image.cpp */,
                                BCD75ABB0989A446003E28DF /* Image.h */,
                                A88AD3A50952486D001DD196 /* WKSpecularLightingFilter.h in Headers */,
                                A88AD3A80952486D001DD196 /* WKSpotLightFilter.h in Headers */,
                                A88AD3AA0952486D001DD196 /* KCanvasFilterQuartz.h in Headers */,
-                               A88AD3AE0952486D001DD196 /* KCanvasResourcesQuartz.h in Headers */,
                                A88AD3B00952486E001DD196 /* KRenderingDeviceQuartz.h in Headers */,
                                A88AD3B30952486E001DD196 /* KRenderingPaintServerQuartz.h in Headers */,
                                A88AD3B50952486E001DD196 /* QuartzSupport.h in Headers */,
                                A88AD3BE0952486E001DD196 /* KCanvasFilters.h in Headers */,
-                               A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */,
-                               A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */,
                                A88AD3CB0952486E001DD196 /* KCanvasTreeDebug.h in Headers */,
                                A88AD402095248F0001DD196 /* SVGRenderStyle.h in Headers */,
                                A88AD404095248F0001DD196 /* SVGRenderStyleDefs.h in Headers */,
                                A88AD50C095248F0001DD196 /* SVGZoomAndPan.h in Headers */,
                                A88AD50D095248F0001DD196 /* ksvg.h in Headers */,
                                6552E7AA096AA11B0006F248 /* WebCoreFrameNamespaces.h in Headers */,
-                               A81655D4096BBEAC00601058 /* KCanvasMaskerQuartz.h in Headers */,
                                A81655E5096BC13900601058 /* SVGMaskElement.h in Headers */,
                                A81369CA097374F600D74463 /* HTMLIsIndexElement.h in Headers */,
                                A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */,
                                6593923809AE4346002C531F /* KURL.h in Headers */,
                                BC6D6DD309AF906600F59759 /* Font.h in Headers */,
                                9353673F09AED79200D35CD6 /* ScrollBarMode.h in Headers */,
-                               935367E509AF77DD00D35CD6 /* GraphicsContext.h in Headers */,
                                9353686B09AF78F600D35CD6 /* TextDirection.h in Headers */,
                                657BD74E09AFDC54005A2056 /* TextCodec.h in Headers */,
                                657BD75009AFDC54005A2056 /* TextEncoding.h in Headers */,
                                14CF7B3409F6ECD700EB3665 /* JSCSSRule.h in Headers */,
                                938E65F109F09840008A48EC /* JSHTMLElementWrapperFactory.h in Headers */,
                                938E666209F09B87008A48EC /* JSHTMLCanvasElement.h in Headers */,
-                               938E683C09F0BD7B008A48EC /* GraphicsTypes.h in Headers */,
                                8116896009F2A4A000772CA0 /* SVGTRefElement.h in Headers */,
                                14115B5209F84B7100CA4FC1 /* Node.h in Headers */,
                                14115B7309F84CD600CA4FC1 /* JSNodeFilter.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 */,
                                BC3FCAA90AC3DB5800BA54AD /* PlatformScrollBar.h in Headers */,
                                85E7118D0AC5D5350053270F /* DOMAttrInternal.h in Headers */,
                                85E7118E0AC5D5350053270F /* DOMCDATASectionInternal.h in Headers */,
                                93E22A730AF5E94C00D48324 /* PageState.h in Headers */,
                                658821660AF4CDF700F01D1F /* ResourceResponse.h in Headers */,
                                6588216B0AF4CE1200F01D1F /* ResourceResponseMac.h in Headers */,
+                               B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */,
+                               B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */,
+                               B2A015B30AF6CD53006BCE0E /* SVGResource.h in Headers */,
+                               B2A015B50AF6CD53006BCE0E /* SVGResourceClipper.h in Headers */,
+                               B2A015B60AF6CD53006BCE0E /* SVGResourceImage.h in Headers */,
+                               B2A015B80AF6CD53006BCE0E /* SVGResourceMarker.h in Headers */,
+                               B2A015BA0AF6CD53006BCE0E /* SVGResourceMasker.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A88AD3A90952486D001DD196 /* WKSpotLightFilter.m in Sources */,
                                A88AD3AB0952486D001DD196 /* KCanvasFilterQuartz.mm in Sources */,
                                A88AD3AD0952486D001DD196 /* KCanvasItemQuartz.mm in Sources */,
-                               A88AD3AF0952486D001DD196 /* KCanvasResourcesQuartz.mm in Sources */,
                                A88AD3B10952486E001DD196 /* KRenderingDeviceQuartz.mm in Sources */,
                                A88AD3B20952486E001DD196 /* KRenderingPaintServerGradientQuartz.mm in Sources */,
                                A88AD3B40952486E001DD196 /* KRenderingPaintServerQuartz.mm in Sources */,
                                A88AD50B095248F0001DD196 /* SVGZoomAndPan.cpp in Sources */,
                                A88AD5AA09525131001DD196 /* SVGCSSStyleSelector.cpp in Sources */,
                                6552E7AB096AA11B0006F248 /* WebCoreFrameNamespaces.mm in Sources */,
-                               A81655D5096BBEAC00601058 /* KCanvasMaskerQuartz.mm in Sources */,
                                A81655E4096BC13900601058 /* SVGMaskElement.cpp in Sources */,
                                A81369CB097374F600D74463 /* HTMLIsIndexElement.cpp in Sources */,
                                A81369CD097374F600D74463 /* HTMLInputElement.cpp in Sources */,
                                A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */,
                                BCEB377309B7BA3900CB38B1 /* FontMac.mm in Sources */,
                                C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */,
-                               A823A75C09B6E53900B60641 /* GraphicsContext.cpp in Sources */,
                                AB23A31209BBA7760067CC53 /* HTMLTextFieldInnerElement.cpp in Sources */,
                                AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */,
                                9352071D09BD3BBB00F2038D /* TextBoundaries.mm in Sources */,
                                14CF7B3309F6ECD700EB3665 /* JSCSSRule.cpp in Sources */,
                                938E65F709F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp in Sources */,
                                938E666009F09B81008A48EC /* JSHTMLCanvasElement.cpp in Sources */,
-                               938E685409F0BE04008A48EC /* GraphicsTypes.cpp in Sources */,
                                8116895F09F2A4A000772CA0 /* SVGTRefElement.cpp in Sources */,
                                14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */,
                                14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */,
                                853BF4DC0ABB6B55008647BB /* DOMNode.mm in Sources */,
                                85BCBC140ABBA87D00381160 /* DOMHTMLDocument.mm in Sources */,
                                AA21ECCA0ABF0FBA002B834C /* CSSCursorImageValue.cpp 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 */,
                                8541636A0AC7180B0001E01B /* DOMSVGTransformList.mm in Sources */,
                                8541636C0AC7180B0001E01B /* DOMSVGTransform.mm in Sources */,
                                93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
                                93E227E40AF589AD00D48324 /* SubresourceLoader.cpp in Sources */,
                                93E22A6F0AF5E94100D48324 /* PageState.cpp in Sources */,
+                               B2A015A80AF6CD53006BCE0E /* GraphicsContext.cpp in Sources */,
+                               B2A015AA0AF6CD53006BCE0E /* GraphicsTypes.cpp in Sources */,
+                               B2A015AC0AF6CD53006BCE0E /* SVGResourceClipperCg.mm in Sources */,
+                               B2A015AD0AF6CD53006BCE0E /* SVGResourceImageCg.mm in Sources */,
+                               B2A015AE0AF6CD53006BCE0E /* SVGResourceMaskerCg.mm in Sources */,
+                               B2A015B20AF6CD53006BCE0E /* SVGResource.cpp in Sources */,
+                               B2A015B40AF6CD53006BCE0E /* SVGResourceClipper.cpp in Sources */,
+                               B2A015B70AF6CD53006BCE0E /* SVGResourceMarker.cpp in Sources */,
+                               B2A015B90AF6CD53006BCE0E /* SVGResourceMasker.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/kcanvas/KCanvasCreator.cpp b/WebCore/kcanvas/KCanvasCreator.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/WebCore/kcanvas/KCanvasCreator.h b/WebCore/kcanvas/KCanvasCreator.h
deleted file mode 100644 (file)
index e69de29..0000000
index a55c32397efc9fe00047000f754faea3bb9ff070..39e5960d42fb3d19b5eee5cc9198a15216a2654f 100644 (file)
@@ -90,9 +90,9 @@ TextStream& KCanvasFilter::externalRepresentation(TextStream& ts) const
     return ts;
 }
 
-KCanvasFilter *getFilterById(Document *document, const AtomicString &id)
+KCanvasFiltergetFilterById(Document *document, const AtomicString &id)
 {
-    KCanvasResource *resource = getResourceById(document, id);
+    SVGResource* resource = getResourceById(document, id);
     if (resource && resource->isFilter())
         return static_cast<KCanvasFilter*>(resource);
     return 0;
index 71c2a27a55f79b285923231c6c33af680c28d827..2a0b05ad29e48b2b63414f77b652d45bcab8ae6b 100644 (file)
 #define KCanvasFilters_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasResource.h"
+#include "CachedImage.h"
+#include "CachedResourceClient.h"
+#include "Color.h"
+#include "FloatRect.h"
+#include "SVGResource.h"
 
 #ifdef __OBJC__
 @class CIFilter;
@@ -35,7 +39,9 @@ class CIFilter;
 
 namespace WebCore {
 
+#if PLATFORM(MAC)
 class KCanvasFilterQuartz;
+#endif
 
 // Enumerations
 typedef enum {
@@ -96,7 +102,7 @@ private:
 class KCanvasFilterEffect;
 class KRenderingDevice;
 
-class KCanvasFilter : public KCanvasResource {
+class KCanvasFilter : public SVGResource {
 public:
     KCanvasFilter() { }
     virtual ~KCanvasFilter() { }
@@ -148,7 +154,7 @@ public:
     String result() const;
     void setResult(const String&);
 
-#if __APPLE__
+#if PLATFORM(MAC)
     virtual CIFilter* getCIFilter(KCanvasFilterQuartz*) const = 0;
 #endif
 
index 2f4b88f6c29f0d30c6870bad8c74512a050e2cae..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,86 +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 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
index f7861aaa14941e991426ca3f3c01476e41f5b767..5a9900babae4ff435fef5afd283ed46128d948dd 100644 (file)
 #ifdef SVG_SUPPORT
 #include "KCanvasTreeDebug.h"
 
+#include "SVGResourceClipper.h"
 #include "GraphicsTypes.h"
 #include "HTMLNames.h"
 #include "RenderTreeAsText.h"
 #include "RenderSVGContainer.h"
-#include "KCanvasClipper.h"
 #include "KRenderingDevice.h"
 #include "KRenderingPaintServerGradient.h"
 #include "KRenderingPaintServerPattern.h"
@@ -362,14 +362,15 @@ void writeRenderResources(TextStream& ts, Node *parent)
             continue;
 
         SVGStyledElement *styled = static_cast<SVGStyledElement*>(svgElement);
-        KCanvasResource *resource = styled->canvasResource();
+        RefPtr<SVGResource> resource(styled->canvasResource());
         if (!resource)
             continue;
         
         DeprecatedString elementId = svgElement->getAttribute(HTMLNames::idAttr).deprecatedString();
-        if (resource->isPaintServer())
-            ts << "KRenderingPaintServer {id=\"" << elementId << "\" " << *static_cast<KRenderingPaintServer*>(resource) << "}" << endl;
-        else
+        if (resource->isPaintServer()) {
+            RefPtr<KRenderingPaintServer> paintServer = WTF::static_pointer_cast<KRenderingPaintServer>(resource);
+            ts << "KRenderingPaintServer {id=\"" << elementId << "\" " << *paintServer << "}" << endl;
+        } else
             ts << "KCanvasResource {id=\"" << elementId << "\" " << *resource << "}" << endl;
     } while ((node = node->traverseNextNode(parent)));
 }
index 3f3e9cf28ba2acf36c4aa5d0125434fcceec0d79..f8ef3942e02341ee9b2b6a9e5b7484a3618410d7 100644 (file)
 
 namespace WebCore {
 
+class AffineTransform;
+class GraphicsContext;
+class Path;
+
 // aka where to draw
 class KRenderingDeviceContext
 {
@@ -45,7 +49,7 @@ public:
     virtual GraphicsContext* createGraphicsContext() = 0;
 };
 
-class KCanvasImage;
+class SVGResourceImage;
 class KCanvasFilterEffect;
 class KRenderingDevice
 {
@@ -63,12 +67,12 @@ public:
     virtual KRenderingDeviceContext* popContext();
     virtual void pushContext(KRenderingDeviceContext*);
     
-    virtual KRenderingDeviceContext* contextForImage(KCanvasImage*) const = 0;
+    virtual KRenderingDeviceContext* contextForImage(SVGResourceImage*) const = 0;
 
     // Creation tools
-    virtual KCanvasResource* createResource(const KCResourceType&) const = 0;
+    virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const = 0;
     virtual KCanvasFilterEffect* createFilterEffect(const KCFilterEffectType&) const = 0;
-    virtual KRenderingPaintServer* createPaintServer(const KCPaintServerType&) const = 0;
+    virtual PassRefPtr<KRenderingPaintServer> createPaintServer(const KCPaintServerType&) const = 0;
 
 private:
     Vector<KRenderingDeviceContext*> m_contextStack;
index 55dc6a42a034d960220671c7f3781bfc9b614191..e1136a48d6229e09d57b29e56dc8caaab8048730 100644 (file)
 #define KRenderingPaintServer_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasResource.h"
+#include "SVGResource.h"
 
 namespace WebCore {
 
 class KRenderingDeviceContext;
+class RenderObject;
 class RenderPath;
 class RenderStyle;
 class TextStream;
@@ -49,11 +50,11 @@ enum KCPaintTargetType {
     APPLY_TO_STROKE = 2
 };
 
-class KRenderingPaintServer : public KCanvasResource
+class KRenderingPaintServer : public SVGResource
 {
 public:
     KRenderingPaintServer()
-        : KCanvasResource()
+        : SVGResource()
         , m_activeClient(0)
         , m_paintingText(false)
     { }
@@ -64,9 +65,6 @@ public:
     const RenderPath* activeClient() const { return m_activeClient;}
     void setActiveClient(const RenderPath* client) { m_activeClient = client; }
 
-    String idInRegistry() const {  return m_registryId; }
-    void setIdInRegistry(const String& newId) { m_registryId = newId; } 
-    
     virtual KCPaintServerType type() const = 0;
     
     // Actual rendering function
@@ -83,14 +81,11 @@ public:
     virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const = 0;
 private:
     const RenderPath* m_activeClient;
-    String m_registryId;
     bool m_paintingText;
 };
 
 TextStream& operator<<(TextStream&, const KRenderingPaintServer&);
 
-KRenderingPaintServer* getPaintServerById(Document*, const AtomicString&);
-
 }
 
 #endif // SVG_SUPPORT
index bd62344490c11effbb2806e20a791e6c6b37cddf..e626f2e0f51c7bad43dfb90c0a8423ad852c4feb 100644 (file)
@@ -226,12 +226,12 @@ KCPaintServerType KRenderingPaintServerRadialGradient::type() const
     return PS_RADIAL_GRADIENT;
 }
 
-KCanvasResourceListener* KRenderingPaintServerGradient::listener() const
+SVGResourceListener* KRenderingPaintServerGradient::listener() const
 {
     return m_listener;
 }
 
-void KRenderingPaintServerGradient::setListener(KCanvasResourceListener* listener)
+void KRenderingPaintServerGradient::setListener(SVGResourceListener* listener)
 {
     m_listener = listener;
 }
index 21dcf4d8ddce9557a0857e29ec667712cf5de393..6fa04922a0cdde55afd122c980c50a88d92a7581 100644 (file)
@@ -24,6 +24,9 @@
 #define KRenderingPaintServerGradient_H
 #ifdef SVG_SUPPORT
 
+#include "AffineTransform.h"
+#include "Color.h"
+#include "FloatPoint.h"
 #include "KRenderingPaintServer.h"
 
 namespace WebCore {
@@ -63,8 +66,8 @@ public:
     AffineTransform gradientTransform() const;
     void setGradientTransform(const AffineTransform&);
     
-    KCanvasResourceListener* listener() const;
-    void setListener(KCanvasResourceListener*);
+    SVGResourceListener* listener() const;
+    void setListener(SVGResourceListener*);
 
     TextStream& externalRepresentation(TextStream&) const;
 private:
@@ -72,7 +75,7 @@ private:
     KCGradientSpreadMethod m_spreadMethod;
     bool m_boundingBoxMode;
     AffineTransform m_gradientTransform;
-    KCanvasResourceListener* m_listener;
+    SVGResourceListener* m_listener;
 };
 
 class KRenderingPaintServerLinearGradient : public KRenderingPaintServerGradient
index 36243f92b9e9794c6dffeea07295ba686a6a892f..e9687e7c114f9b3d7606228f5606c90a0aeab9e8 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "config.h"
 #ifdef SVG_SUPPORT
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 #include "KRenderingPaintServerPattern.h"
 
 #include "AffineTransform.h"
@@ -33,7 +33,6 @@ namespace WebCore {
 
 KRenderingPaintServerPattern::KRenderingPaintServerPattern()
     : KRenderingPaintServer()
-    , m_tile(0)
     , m_useBoundingBoxMode(true)
     , m_listener(0)
 {
@@ -41,7 +40,6 @@ KRenderingPaintServerPattern::KRenderingPaintServerPattern()
 
 KRenderingPaintServerPattern::~KRenderingPaintServerPattern()
 {
-    delete m_tile;
 }
 
 void KRenderingPaintServerPattern::setBbox(const FloatRect& rect)
@@ -64,12 +62,12 @@ void KRenderingPaintServerPattern::setBoundingBoxMode(bool mode)
     m_useBoundingBoxMode = mode;
 }
 
-KCanvasImage* KRenderingPaintServerPattern::tile() const
+SVGResourceImage* KRenderingPaintServerPattern::tile() const
 {
-    return m_tile;
+    return m_tile.get();
 }
 
-void KRenderingPaintServerPattern::setTile(KCanvasImage* tile)
+void KRenderingPaintServerPattern::setTile(const PassRefPtr<SVGResourceImage>& tile)
 {
     m_tile = tile;
 }
@@ -89,12 +87,12 @@ KCPaintServerType KRenderingPaintServerPattern::type() const
     return PS_PATTERN;
 }
 
-KCanvasResourceListener* KRenderingPaintServerPattern::listener() const
+SVGResourceListener* KRenderingPaintServerPattern::listener() const
 {
     return m_listener;
 }
 
-void KRenderingPaintServerPattern::setListener(KCanvasResourceListener* listener)
+void KRenderingPaintServerPattern::setListener(SVGResourceListener* listener)
 {
     m_listener = listener;
 }
index 2bc166dd574a7f74b9eaf2f6044f7ad4a5c3173b..59e809139bf4cc101763a9e9a15d01c49c910633 100644 (file)
 #define KRenderingPaintServerPattern_H
 #ifdef SVG_SUPPORT
 
+#include "AffineTransform.h"
+#include "FloatRect.h"
 #include "KRenderingPaintServer.h"
 
 namespace WebCore {
 
-class KCanvasImage;
+class SVGResourceImage;
 
 class KRenderingPaintServerPattern : public KRenderingPaintServer
 {
@@ -48,22 +50,22 @@ public:
     void setBoundingBoxMode(bool mode = true);
     
     // 'Pattern' interface
-    KCanvasImage* tile() const;
-    void setTile(KCanvasImage*);
+    SVGResourceImage* tile() const;
+    void setTile(const PassRefPtr<SVGResourceImage>&);
 
     AffineTransform patternTransform() const;
     void setPatternTransform(const AffineTransform&);
 
-    KCanvasResourceListener* listener() const;
-    void setListener(KCanvasResourceListener*);
+    SVGResourceListener* listener() const;
+    void setListener(SVGResourceListener*);
     TextStream& externalRepresentation(TextStream&) const;
 
 private:
-    KCanvasImage* m_tile;
+    RefPtr<SVGResourceImage> m_tile;
     AffineTransform m_patternTransform;
     FloatRect m_bbox;
     bool m_useBoundingBoxMode;
-    KCanvasResourceListener* m_listener;
+    SVGResourceListener* m_listener;
 
 };
 
index d30a2e32ff5e3ccce46ab613187dfe0510d0d944..007fc2027ce51aee6f5d393073463c33d73b1616 100644 (file)
@@ -24,6 +24,7 @@
 #define KRenderingPaintServerSolid_H
 #ifdef SVG_SUPPORT
 
+#include "Color.h"
 #include "KRenderingPaintServer.h"
 
 namespace WebCore {
index 6890e427ace188588bf543dac897fdc8b45a1f12..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,118 +0,0 @@
-/*
-    Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
-                  2004, 2005, 2006 Rob Buis <buis@kde.org>
-                  2005 Apple Computer, Inc.
-
-    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"
-
-#include "KCanvasClipperQt.h"
-#include "KRenderingDeviceQt.h"
-
-namespace WebCore {
-
-void KCanvasClipperQt::applyClip(const FloatRect& boundingBox) const
-{
-    KRenderingDeviceContext* context = renderingDevice()->currentContext();
-    KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
-    if (m_clipData.count() < 1)
-        return;
-
-    context->clearPath();
-
-    QPainterPath newPath;
-
-    bool heterogenousClipRules = false;
-    WindRule clipRule = m_clipData[0].windRule();
-
-    for (unsigned int x = 0; x < m_clipData.count(); x++) {
-        KCClipData clipData = m_clipData[x];
-        if (clipData.windRule() != clipRule)
-            heterogenousClipRules = true;
-       
-        QPainterPath path = *(clipData.path.platformPath());
-        if (path.isEmpty())
-            continue;
-
-        if (!newPath.isEmpty())
-            newPath.closeSubpath();
-
-        // Respect clipping units...
-        QMatrix transform;
-
-        if (clipData.bboxUnits) {
-            transform.translate(boundingBox.x(), boundingBox.y());
-            transform.scale(boundingBox.width(), boundingBox.height());
-        }
-
-        // TODO: support heterogenous clip rules!
-        //clipRule = (clipData.windRule() == RULE_EVENODD ? Qt::OddEvenFill : Qt::WindingFill);
-
-        for (int i = 0; i < path.elementCount(); ++i) {
-            const QPainterPath::Element &cur = path.elementAt(i);
-
-            switch (cur.type) {
-                case QPainterPath::MoveToElement:
-                    newPath.moveTo(QPointF(cur.x, cur.y) * transform);
-                    break;
-                case QPainterPath::LineToElement:
-                    newPath.lineTo(QPointF(cur.x, cur.y) * transform);
-                    break;
-                case QPainterPath::CurveToElement:
-                {
-                    const QPainterPath::Element &c1 = path.elementAt(i + 1);
-                    const QPainterPath::Element &c2 = path.elementAt(i + 2);
-
-                    Q_ASSERT(c1.type == QPainterPath::CurveToDataElement);
-                    Q_ASSERT(c2.type == QPainterPath::CurveToDataElement);
-
-                    newPath.cubicTo(QPointF(cur.x, cur.y) * transform,
-                                    QPointF(c1.x, c1.y) * transform,
-                                    QPointF(c2.x, c2.y) * transform);
-
-                    i += 2;
-                    break;
-                }
-                case QPainterPath::CurveToDataElement:
-                    Q_ASSERT(false);
-                    break;
-            }
-        }
-    }
-
-    if (m_clipData.count()) {
-        // 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
-        // if (!CGContextIsPathEmpty(cgContext)) {
-            if (clipRule == RULE_EVENODD)
-                newPath.setFillRule(Qt::OddEvenFill);
-            else
-                newPath.setFillRule(Qt::WindingFill);
-        // }
-    }
-
-    qtContext->painter().setClipPath(newPath);
-}
-
-}
-
-// vim:ts=4:noet
index eee821ff9568775b1fd6866d36d082421537dba5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,44 +0,0 @@
-/*
-    Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
-                  2004, 2005, 2006 Rob Buis <buis@kde.org>
-                  2005 Apple Computer, Inc.
-
-    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 KCanvasClipperQt_h
-#define KCanvasClipperQt_h
-
-#include "KCanvasClipper.h"
-
-namespace WebCore {
-
-class KCanvasClipperQt : public KCanvasClipper {
-public:
-    KCanvasClipperQt()
-    {
-    }
-    
-    virtual void applyClip(const FloatRect& boundingBox) const;
-};
-
-}
-
-#endif
-
-// vim:ts=4:noet
index 844c65b9073334c324c64750132c92c8d1f4f797..a1d208b15052379e6e2ffbed22212b608aa4a42f 100644 (file)
@@ -26,8 +26,8 @@
 #include "RenderPathQt.h"
 #include "AffineTransform.h"
 #include "GraphicsContext.h"
-#include "KCanvasClipperQt.h"
-#include "KCanvasMarker.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceMarker.h"
 #include "KRenderingDeviceQt.h"
 #include "KRenderingPaintServerSolidQt.h"
 #include "KRenderingPaintServerGradientQt.h"
@@ -135,23 +135,23 @@ KRenderingDeviceContextQt* KRenderingDeviceQt::qtContext() const
     return static_cast<KRenderingDeviceContextQt*>(currentContext());
 }
 
-KRenderingDeviceContext* KRenderingDeviceQt::contextForImage(KCanvasImage* image) const
+KRenderingDeviceContext* KRenderingDeviceQt::contextForImage(SVGResourceImage* image) const
 {
     qDebug("KRenderingDeviceQt::contextForImage() TODO!");
     return 0;
 }
 
 // Resource creation
-KCanvasResource* KRenderingDeviceQt::createResource(const KCResourceType& type) const
+PassRefPtr<SVGResource> KRenderingDeviceQt::createResource(const SVGResourceType& type) const
 {
     switch (type)
     {
         case RS_CLIPPER:
-            return new KCanvasClipperQt();
+            return new SVGResourceClipper();
         case RS_MARKER:
-            return new KCanvasMarker(); // Use default implementation...
+            return new SVGResourceMarker(); // Use default implementation...
         case RS_IMAGE:
-            // return new KCanvasImageQt();
+            // return new SVGResourceImageQt();
         case RS_FILTER:
             // return new KCanvasFilterQt();
         case RS_MASKER:
@@ -161,7 +161,7 @@ KCanvasResource* KRenderingDeviceQt::createResource(const KCResourceType& type)
     }
 }
 
-KRenderingPaintServer* KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
+PassRefPtr<KRenderingPaintServer> KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
 {
     switch (type)
     {
index 0c15fc75be8a8bc5abedddb035dc0f50c421962e..d63a13d1d76fe976e2b937588b24d5dd30d11551 100644 (file)
@@ -74,11 +74,11 @@ public:
 
     // context management.
     KRenderingDeviceContextQt* qtContext() const;
-    virtual KRenderingDeviceContext* contextForImage(KCanvasImage*) const;
+    virtual KRenderingDeviceContext* contextForImage(SVGResourceImage*) const;
 
     // Resource creation
-    virtual KCanvasResource* createResource(const KCResourceType&) const;
-    virtual KRenderingPaintServer* createPaintServer(const KCPaintServerType&) const;
+    virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const;
+    virtual PassRefPtr<KRenderingPaintServer> createPaintServer(const KCPaintServerType&) const;
     virtual KCanvasFilterEffect* createFilterEffect(const KCFilterEffectType&) const;
 };
 
index 946aa9e9d1e65e07fdb23e45427fd5a9c73978fa..ca33376846e361a1ccca35a0bea0a2889653691b 100644 (file)
@@ -25,6 +25,7 @@
 #include <math.h>
 #include <QPointF>
 
+#include "RenderPath.h"
 #include "RenderStyle.h"
 #include "AffineTransform.h"
 #include "KRenderingDeviceQt.h"
index 9a687ffccdee3bf67aede1b7f8c88fbe28adac65..d6bb1e1db21286b0c935c25e8cf4eabeec5a27a7 100644 (file)
 #include <QPointF>
 #include <QPainterPath>
 
+#include "RenderPath.h"
 #include "RenderStyle.h"
 #include "KRenderingDeviceQt.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingPaintServerPatternQt.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 
 namespace WebCore {
 
index 03716f095ed032ce6f2fce49f63b7049578210be..781a472cc5816b9ec9b54801349ed739b123059c 100644 (file)
@@ -25,6 +25,7 @@
 #include <QPen>
 #include <QVector>
 
+#include "RenderStyle.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingPaintServerQt.h"
 
index f6978c85ccfda30cf4875be502a97a14066ddaf1..bb866db41c451e6776728b35be4d960e8fe6a619 100644 (file)
@@ -26,6 +26,7 @@
 #include <QBrush>
 #include <QPainter>
 
+#include "RenderPath.h"
 #include "RenderStyle.h"
 #include "KRenderingDeviceQt.h"
 #include "KCanvasRenderingStyle.h"
index fcb4de1fceaab473ea157af306b801384c80028f..a8cc3389fd07fd3b5963f8cc09ab428963e19d98 100644 (file)
@@ -180,6 +180,7 @@ NSArray *KCanvasFilterQuartz::getCIFilterStack(CIImage *inputImage)
     DeprecatedValueListIterator<KCanvasFilterEffect*> end = m_effects.end();
 
     setImageForName(inputImage, "SourceGraphic"); // input
+
     for (;it != end; it++) {
         CIFilter *filter = (*it)->getCIFilter(this);
         if (filter)
index e8a5d131b1963d6a95f84b06e600e3fcdf1840d0..27da08df7809d31a8755ef5808e6568e0a13a46a 100644 (file)
@@ -31,9 +31,7 @@
 #import <wtf/Assertions.h>
 
 #import "KCanvasFilterQuartz.h"
-#import "KCanvasMaskerQuartz.h"
 #import "KCanvasRenderingStyle.h"
-#import "KCanvasResourcesQuartz.h"
 #import "KRenderingDeviceQuartz.h"
 #import "QuartzSupport.h"
 #import "RenderPath.h"
index 4f7914b01e54fb7614c60f8c215d9c8796a0c806..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
- *               2005, 2006 Alexander Kellett <lypanov@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. 
- */
-
-#include "KCanvasMasker.h"
-#include "KCanvasImage.h"
-
-namespace WebCore {
-
-class KCanvasMaskerQuartz : public KCanvasMasker {
-public:
-    KCanvasMaskerQuartz() { }
-    
-    virtual void applyMask(const FloatRect& boundingBox) const;
-};
-
-}
index efecf8c93a7b6e19dbe09a287b9654ae19beeb5d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2005, 2006 Alexander Kellett <lypanov@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. 
- */
-
-
-#include "config.h"
-#ifdef SVG_SUPPORT
-#import "KCanvasMaskerQuartz.h"
-
-#import "SVGRenderStyle.h"
-
-#import "KCanvasResourcesQuartz.h"
-#import "KRenderingDeviceQuartz.h"
-#import "QuartzSupport.h"
-
-#import <QuartzCore/CoreImage.h>
-
-namespace WebCore {
-
-static CIImage *applyLuminanceToAlphaFilter(CIImage *inputImage)
-{
-    CIFilter *luminanceToAlpha = [CIFilter filterWithName:@"CIColorMatrix"];
-    [luminanceToAlpha setDefaults];
-    CGFloat alpha[4] = {0.2125, 0.7154, 0.0721, 0};
-    CGFloat zero[4] = {0, 0, 0, 0};
-    [luminanceToAlpha setValue:inputImage forKey:@"inputImage"];  
-    [luminanceToAlpha setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputRVector"];
-    [luminanceToAlpha setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputGVector"];
-    [luminanceToAlpha setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputBVector"];
-    [luminanceToAlpha setValue:[CIVector vectorWithValues:alpha count:4] forKey:@"inputAVector"];
-    [luminanceToAlpha setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputBiasVector"];
-    return [luminanceToAlpha valueForKey:@"outputImage"];
-}
-
-static CIImage *applyExpandAlphatoGrayscaleFilter(CIImage *inputImage)
-{
-    CIFilter *alphaToGrayscale = [CIFilter filterWithName:@"CIColorMatrix"];
-    CGFloat zero[4] = {0, 0, 0, 0};
-    [alphaToGrayscale setDefaults];
-    [alphaToGrayscale setValue:inputImage forKey:@"inputImage"];
-    [alphaToGrayscale setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputRVector"];
-    [alphaToGrayscale setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputGVector"];
-    [alphaToGrayscale setValue:[CIVector vectorWithValues:zero count:4] forKey:@"inputBVector"];
-    [alphaToGrayscale setValue:[CIVector vectorWithX:0.0 Y:0.0 Z:0.0 W:1.0] forKey:@"inputAVector"];
-    [alphaToGrayscale setValue:[CIVector vectorWithX:1.0 Y:1.0 Z:1.0 W:0.0] forKey:@"inputBiasVector"];
-    return [alphaToGrayscale valueForKey:@"outputImage"];
-}
-
-static CIImage *transformImageIntoGrayscaleMask(CIImage *inputImage)
-{
-    CIFilter *blackBackground = [CIFilter filterWithName:@"CIConstantColorGenerator"];
-    [blackBackground setValue:[CIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0] forKey:@"inputColor"];
-
-    CIFilter *layerOverBlack = [CIFilter filterWithName:@"CISourceOverCompositing"];
-    [layerOverBlack setValue:[blackBackground valueForKey:@"outputImage"] forKey:@"inputBackgroundImage"];  
-    [layerOverBlack setValue:inputImage forKey:@"inputImage"];  
-
-    CIImage *luminanceAlpha = applyLuminanceToAlphaFilter([layerOverBlack valueForKey:@"outputImage"]);
-    CIImage *luminanceAsGrayscale = applyExpandAlphatoGrayscaleFilter(luminanceAlpha);
-    CIImage *alphaAsGrayscale = applyExpandAlphatoGrayscaleFilter(inputImage);
-
-    CIFilter *multipliedGrayscale = [CIFilter filterWithName:@"CIMultiplyCompositing"];
-    [multipliedGrayscale setValue:luminanceAsGrayscale forKey:@"inputBackgroundImage"];  
-    [multipliedGrayscale setValue:alphaAsGrayscale forKey:@"inputImage"];  
-    return [multipliedGrayscale valueForKey:@"outputImage"];
-}
-
-void KCanvasMaskerQuartz::applyMask(const FloatRect& boundingBox) const
-{
-    if (!m_mask)
-        return;
-    // Create grayscale bitmap context
-    int width = m_mask->size().width();
-    int height = m_mask->size().height();
-    void *imageBuffer = fastMalloc(width * height);
-    CGColorSpaceRef grayColorSpace = CGColorSpaceCreateDeviceGray();
-    CGContextRef grayscaleContext = CGBitmapContextCreate(imageBuffer, width, height, 8, width, grayColorSpace, kCGImageAlphaNone);
-    CGColorSpaceRelease(grayColorSpace);
-    CIContext *ciGrayscaleContext = [CIContext contextWithCGContext:grayscaleContext options:nil];
-
-    KCanvasImageQuartz* maskImage = static_cast<KCanvasImageQuartz*>(m_mask);
-    CIImage *grayscaleMask = transformImageIntoGrayscaleMask([CIImage imageWithCGLayer:maskImage->cgLayer()]);
-    [ciGrayscaleContext drawImage:grayscaleMask atPoint:CGPointZero fromRect:CGRectMake(0, 0, width, height)];
-
-    CGImageRef grayscaleImage = CGBitmapContextCreateImage(grayscaleContext);
-    CGContextRef cgContext = static_cast<KRenderingDeviceQuartz*>(renderingDevice())->currentCGContext();
-    CGContextClipToMask(cgContext, CGRectMake(0, 0, width, height), grayscaleImage);
-    
-    CGImageRelease(grayscaleImage);
-    CGContextRelease(grayscaleContext);
-    fastFree(imageBuffer);
-}
-
-}
-
-#endif // SVG_SUPPORT
index a7e9a2209262acac437a5ab81372ec634709a755..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
- *
- * 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 KCanvasResourcesQuartz_h
-#define KCanvasResourcesQuartz_h
-
-#include "KCanvasClipper.h"
-
-#include "KCanvasImage.h"
-#include "RenderSVGContainer.h"
-#include "AffineTransform.h"
-
-typedef struct CGContext *CGContextRef;
-typedef struct CGLayer *CGLayerRef;
-
-namespace WebCore {
-
-class KCanvasClipperQuartz : public KCanvasClipper {
-public:
-    KCanvasClipperQuartz() { }
-    
-    virtual void applyClip(const FloatRect& boundingBox) const;
-};
-
-class KCanvasImageQuartz : public KCanvasImage {
-public:
-    KCanvasImageQuartz() : m_cgLayer(0) { }
-    ~KCanvasImageQuartz();
-    void init(const Image&) { }
-    void init(IntSize size) { m_size = size; }
-    
-    CGLayerRef cgLayer();
-    void setCGLayer(CGLayerRef layer);
-
-    IntSize size() { return m_size; }
-    
-private:
-    IntSize m_size;
-    CGLayerRef m_cgLayer;
-};
-
-}
-
-#endif
index 4553fc71e3ac7da77b32ad4425cce84631277824..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
- *               2005 Alexander Kellett <lypanov@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. 
- */
-
-
-#include "config.h"
-#ifdef SVG_SUPPORT
-#import "KCanvasResourcesQuartz.h"
-
-#import "GraphicsContext.h"
-#import "KCanvasFilterQuartz.h"
-#import "KCanvasMaskerQuartz.h"
-#import "KRenderingDeviceQuartz.h"
-#import "QuartzSupport.h"
-
-namespace WebCore {
-
-void KCanvasClipperQuartz::applyClip(const FloatRect& boundingBox) const
-{
-    KRenderingDeviceContext* context = renderingDevice()->currentContext();
-    CGContextRef cgContext = static_cast<KRenderingDeviceContextQuartz*>(context)->cgContext();
-    if (m_clipData.count() < 1)
-        return;
-
-    BOOL heterogenousClipRules = NO;
-    WindRule clipRule = m_clipData[0].windRule();
-
-    context->clearPath();
-
-    CGAffineTransform bboxTransform = CGAffineTransformMakeMapBetweenRects(CGRectMake(0,0,1,1), CGRect(boundingBox));
-
-    for (unsigned x = 0; x < m_clipData.count(); x++) {
-        KCClipData data = m_clipData[x];
-        if (data.windRule() != clipRule)
-            heterogenousClipRules = YES;
-        
-        CGPathRef clipPath = data.path.platformPath();
-
-        if (data.bboxUnits) {
-            CGMutablePathRef transformedPath = CGPathCreateMutable();
-            CGPathAddPath(transformedPath, &bboxTransform, clipPath);
-            CGContextAddPath(cgContext, transformedPath);
-            CGPathRelease(transformedPath);
-        } else
-            CGContextAddPath(cgContext, clipPath);
-    }
-
-    if (m_clipData.count()) {
-        // 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                
-        if (!CGContextIsPathEmpty(cgContext)) {
-            if (clipRule == RULE_EVENODD)
-                CGContextEOClip(cgContext);
-            else
-                CGContextClip(cgContext);
-        }
-    }
-}
-
-KCanvasImageQuartz::~KCanvasImageQuartz()
-{
-    CGLayerRelease(m_cgLayer);
-}
-
-CGLayerRef KCanvasImageQuartz::cgLayer()
-{
-    return m_cgLayer;
-}
-
-void KCanvasImageQuartz::setCGLayer(CGLayerRef layer)
-{
-    if (m_cgLayer != layer) {
-        CGLayerRelease(m_cgLayer);
-        m_cgLayer = CGLayerRetain(layer);
-    }
-}
-
-}
-#endif // SVG_SUPPORT
index b53d4ba6e5de8761f03ad61bbe7da65897bdbb7c..33e675473377b99687fcb89b6c5d6bd0df3ab138 100644 (file)
@@ -65,11 +65,11 @@ public:
     // context management.
     KRenderingDeviceContextQuartz* quartzContext() const;
     CGContextRef currentCGContext() const;
-    virtual KRenderingDeviceContext* contextForImage(KCanvasImage*) const;
+    virtual KRenderingDeviceContext* contextForImage(SVGResourceImage*) const;
 
     // Resource creation
-    virtual KCanvasResource *createResource(const KCResourceType&) const;
-    virtual KRenderingPaintServer *createPaintServer(const KCPaintServerType&) const;
+    virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const;
+    virtual PassRefPtr<KRenderingPaintServer> createPaintServer(const KCPaintServerType&) const;
     virtual KCanvasFilterEffect *createFilterEffect(const KCFilterEffectType&) const;
     
     // filters (mostly debugging)
index 6b4a34ec803ff6f192897b2a2ccdfd11f491d859..8b128ec2b534a25d235ed2fe98d0654b01fbffb9 100644 (file)
  */
 
 #include "config.h"
+
 #ifdef SVG_SUPPORT
 #import "KRenderingDeviceQuartz.h"
 
 #import "GraphicsContext.h"
-#include "KCanvasMarker.h"
+#import "SVGResourceClipper.h"
+#import "SVGResourceImage.h"
+#import "SVGResourceMarker.h"
 #import "KCanvasFilterQuartz.h"
-#import "KCanvasMaskerQuartz.h"
-#import "KCanvasResourcesQuartz.h"
+#import "SVGResourceMasker.h"
 #import "KRenderingPaintServerQuartz.h"
 #import "Logging.h"
 #import "QuartzSupport.h"
@@ -117,16 +119,15 @@ CGContextRef KRenderingDeviceQuartz::currentCGContext() const
     return quartzContext()->cgContext();
 }
 
-KRenderingDeviceContext* KRenderingDeviceQuartz::contextForImage(KCanvasImage *image) const
+KRenderingDeviceContext* KRenderingDeviceQuartz::contextForImage(SVGResourceImage *image) const
 {
-    KCanvasImageQuartz* quartzImage = static_cast<KCanvasImageQuartz*>(image);
-    CGLayerRef cgLayer = quartzImage->cgLayer();
+    CGLayerRef cgLayer = image->cgLayer();
     if (!cgLayer) {
         // FIXME: we might not get back a layer if this is a loaded image
-        // maybe this logic should go into KCanvasImage?
+        // maybe this logic should go into SVGResourceImage?
         cgLayer = CGLayerCreateWithContext(currentCGContext(), CGSize(image->size() + IntSize(1,1)), NULL);  // FIXME + 1 is a hack
         // FIXME: we should composite the original image onto the layer...
-        quartzImage->setCGLayer(cgLayer);
+        image->setCGLayer(cgLayer);
         CGLayerRelease(cgLayer);
     }
     return new KRenderingDeviceContextQuartz(CGLayerGetContext(cgLayer));
@@ -135,7 +136,7 @@ KRenderingDeviceContext* KRenderingDeviceQuartz::contextForImage(KCanvasImage *i
 #pragma mark -
 #pragma mark Resource Creation
 
-KRenderingPaintServer *KRenderingDeviceQuartz::createPaintServer(const KCPaintServerType& type) const
+PassRefPtr<KRenderingPaintServer> KRenderingDeviceQuartz::createPaintServer(const KCPaintServerType& type) const
 {
     KRenderingPaintServer *newServer = NULL;
     switch(type) {
@@ -155,19 +156,19 @@ KRenderingPaintServer *KRenderingDeviceQuartz::createPaintServer(const KCPaintSe
     return newServer;
 }
 
-KCanvasResource *KRenderingDeviceQuartz::createResource(const KCResourceType& type) const
+PassRefPtr<SVGResource> KRenderingDeviceQuartz::createResource(const SVGResourceType& type) const
 {
     switch (type) {
     case RS_CLIPPER:
-        return new KCanvasClipperQuartz();
+        return new SVGResourceClipper();
     case RS_MARKER:
-        return new KCanvasMarker();
+        return new SVGResourceMarker();
     case RS_IMAGE:
-        return new KCanvasImageQuartz();
+        return new SVGResourceImage();
     case RS_FILTER:
         return new KCanvasFilterQuartz();
     case RS_MASKER:
-        return new KCanvasMaskerQuartz();
+        return new SVGResourceMasker();
     }
     LOG_ERROR("Failed to create resource of type: %i", type);
     return 0;
index 93a95888a7f7dc88cebc7b282eb1d8b179bfc2a0..bc2931f9e12d073a237bfab0ad2e391044850779 100644 (file)
 
 
 #include "config.h"
+
 #ifdef SVG_SUPPORT
 #import "KRenderingPaintServerQuartz.h"
-
-#import "KCanvasImage.h"
-#import "KCanvasResourcesQuartz.h"
+#import "SVGResourceImage.h"
 #import "KRenderingDeviceQuartz.h"
 #import "KRenderingPaintServer.h"
 #import "QuartzSupport.h"
-#import "RenderObject.h"
-
+#import "RenderPath.h"
 #import <wtf/Assertions.h>
 
 namespace WebCore {
@@ -137,7 +135,6 @@ KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz()
     : m_stopsCache(0)
     , m_stopsCount(0)
     , m_shadingCache(0)
-    , m_maskImage(0)
 {
 }
 
@@ -145,7 +142,6 @@ KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz()
 {
     delete m_stopsCache;
     CGShadingRelease(m_shadingCache);
-    delete m_maskImage;
 }
 
 void KRenderingPaintServerGradientQuartz::updateQuartzGradientCache(const KRenderingPaintServerGradient *server)
@@ -220,9 +216,6 @@ bool KRenderingPaintServerGradientQuartz::setup(const KRenderingPaintServerGradi
     if (server->listener()) // this seems like bad design to me, should be in a common baseclass. -- ecs 8/6/05
         server->listener()->resourceNotification();
     
-    delete m_maskImage;
-    m_maskImage = 0;
-
     // FIXME: total const HACK!
     // We need a hook to call this when the gradient gets updated, before drawn.
     if (!m_shadingCache)
@@ -246,12 +239,12 @@ bool KRenderingPaintServerGradientQuartz::setup(const KRenderingPaintServerGradi
         CGContextSaveGState(context);
         applyStrokeStyleToContext(context, renderStyle, renderObject); // FIXME: this seems like the wrong place for this.
         if (server->isPaintingText()) {
-            m_maskImage = static_cast<KCanvasImage*>(quartzDevice->createResource(RS_IMAGE));
+            m_maskImage = new SVGResourceImage();
             int width  = 2048;
             int height = 2048; // FIXME???
             IntSize size = IntSize(width, height);
             m_maskImage->init(size);
-            KRenderingDeviceContext* maskImageContext = quartzDevice->contextForImage(m_maskImage);
+            KRenderingDeviceContext* maskImageContext = quartzDevice->contextForImage(m_maskImage.get());
             quartzDevice->pushContext(maskImageContext);
             CGContextRef maskContext = static_cast<KRenderingDeviceContextQuartz*>(maskImageContext)->cgContext();
             const_cast<RenderObject*>(renderObject)->style()->setColor(Color(255, 255, 255));
@@ -292,7 +285,6 @@ void KRenderingPaintServerGradientQuartz::renderPath(const KRenderingPaintServer
 void KRenderingPaintServerGradientQuartz::teardown(const KRenderingPaintServerGradient *server, KRenderingDeviceContext* renderingContext, const RenderObject* renderObject, KCPaintTargetType type) const
 { 
     CGShadingRef shading = m_shadingCache;
-    KCanvasImage* maskImage = m_maskImage;
     KRenderingDeviceQuartz* quartzDevice = static_cast<KRenderingDeviceQuartz*>(renderingDevice());
     CGContextRef context = quartzDevice->currentCGContext();
     RenderStyle* renderStyle = renderObject->style();
@@ -315,8 +307,7 @@ void KRenderingPaintServerGradientQuartz::teardown(const KRenderingPaintServerGr
             CGColorSpaceRef grayColorSpace = CGColorSpaceCreateDeviceGray();
             CGContextRef grayscaleContext = CGBitmapContextCreate(imageBuffer, width, height, 8, width, grayColorSpace, kCGImageAlphaNone);
             CGColorSpaceRelease(grayColorSpace);
-            KCanvasImageQuartz* qMaskImage = static_cast<KCanvasImageQuartz*>(maskImage);
-            CGContextDrawLayerAtPoint(grayscaleContext, CGPointMake(0, 0), qMaskImage->cgLayer());
+            CGContextDrawLayerAtPoint(grayscaleContext, CGPointMake(0, 0), m_maskImage->cgLayer());
             CGImageRef grayscaleImage = CGBitmapContextCreateImage(grayscaleContext);
             CGContextClipToMask(context, CGRectMake(0, 0, width, height), grayscaleImage);
             CGContextRelease(grayscaleContext);
index 891f40225b12b03bc90f66b3387e6c2d7b64a256..18019904719351660dbec26cf48ae05e6eb811bd 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-class KCanvasImage;
+class SVGResourceImage;
 
 class KRenderingPaintServerQuartzHelper {
 public:
@@ -93,7 +93,7 @@ public:
 protected:
     void invalidateCaches();
     CGShadingRef m_shadingCache;
-    mutable KCanvasImage *m_maskImage;
+    mutable RefPtr<SVGResourceImage> m_maskImage;
 };
 
 class KRenderingPaintServerLinearGradientQuartz : public KRenderingPaintServerGradientQuartz,
index 7a2d243c3ccbf6b6df765f0922103f9c5d89c562..fb6844ab9758c1deb9e4402153c3b09271007ed0 100644 (file)
 
 
 #include "config.h"
+
 #ifdef SVG_SUPPORT
+#import "SVGResourceImage.h"
 #import "KRenderingPaintServerQuartz.h"
+#import "RenderPath.h"
 #import "QuartzSupport.h"
-#import "KCanvasResourcesQuartz.h"
 #import "KRenderingDeviceQuartz.h"
 
 #import "KCanvasRenderingStyle.h"
@@ -133,7 +135,7 @@ void KRenderingPaintServerSolidQuartz::teardown(KRenderingDeviceContext* renderi
 
 void patternCallback(void *info, CGContextRef context)
 {
-    CGLayerRef layer = reinterpret_cast<KCanvasImageQuartz*>(info)->cgLayer();
+    CGLayerRef layer = reinterpret_cast<SVGResourceImage*>(info)->cgLayer();
     CGContextDrawLayerAtPoint(context, CGPointZero, layer);
 }
 
@@ -155,7 +157,7 @@ bool KRenderingPaintServerPatternQuartz::setup(KRenderingDeviceContext* renderin
     KRenderingDeviceContextQuartz* quartzContext = static_cast<KRenderingDeviceContextQuartz*>(renderingContext);
     CGContextRef context = quartzContext->cgContext();
 
-    KCanvasImage* cell = tile();
+    RefPtr<SVGResourceImage> cell = tile();
     if (!cell)
         return false;
 
index a9893cc310e1f4d697a984d2eb3190117ce006f7..55f3673d1cdc55478e4c39c9806addb3cf965526 100644 (file)
@@ -30,8 +30,8 @@
 #import "QuartzSupport.h"
 
 #import "GraphicsContext.h"
-#import "KCanvasResourcesQuartz.h"
 #import "KCanvasRenderingStyle.h"
+#import "RenderStyle.h"
 #import "wtf/Assertions.h"
 
 #import <QuartzCore/CoreImage.h>
index 143a526eae36adff9cc43bbeaeef33a597b4a278..6c351d45acaf0a8f8d857989ad027e6eb19a25b1 100644 (file)
 
 #include "config.h"
 #ifdef SVG_SUPPORT
+#include "KCanvasRenderingStyle.h"
 
 #include "CSSValueList.h"
 #include "Document.h"
-#include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "KRenderingPaintServerGradient.h"
 #include "KRenderingPaintServerSolid.h"
 #include "RenderObject.h"
+#include "RenderPath.h"
 #include "SVGLength.h"
 #include "SVGRenderStyle.h"
 #include "SVGStyledElement.h"
 #include "ksvg.h"
 
+#include <wtf/PassRefPtr.h>
+
 namespace WebCore {
 
 static KRenderingPaintServerSolid* sharedSolidPaintServer()
 {
     static KRenderingPaintServerSolid* _sharedSolidPaintServer = 0;
     if (!_sharedSolidPaintServer)
-        _sharedSolidPaintServer = static_cast<KRenderingPaintServerSolid*>(renderingDevice()->createPaintServer(PS_SOLID));
+        _sharedSolidPaintServer = static_cast<KRenderingPaintServerSolid*>(renderingDevice()->createPaintServer(PS_SOLID).releaseRef());
     return _sharedSolidPaintServer;
 }
 
index 18ba6d2ce8f12ea44c5101a50a0a4dbd7bd6598c..530232eaaa7a1b1a5c2e004573b110f960d6b302 100644 (file)
@@ -42,12 +42,10 @@ SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* d
     , SVGExternalResourcesRequired()
     , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
 {
-    m_clipper = 0;
 }
 
 SVGClipPathElement::~SVGClipPathElement()
 {
-    delete m_clipper;
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGClipPathElement, int, Enumeration, enumeration, ClipPathUnits, clipPathUnits, SVGNames::clipPathUnitsAttr.localName(), m_clipPathUnits)
@@ -71,12 +69,13 @@ void SVGClipPathElement::parseMappedAttribute(MappedAttribute* attr)
     }
 }
 
-KCanvasClipper* SVGClipPathElement::canvasResource()
+SVGResource* SVGClipPathElement::canvasResource()
 {
     if (!view())
         return 0;
+
     if (!m_clipper)
-        m_clipper = static_cast<KCanvasClipper*>(renderingDevice()->createResource(RS_CLIPPER));
+        m_clipper = new SVGResourceClipper();
     else
         m_clipper->resetClipData();
 
@@ -97,7 +96,7 @@ KCanvasClipper* SVGClipPathElement::canvasResource()
         }
     }
     clipPathStyle->deref(view()->renderArena());
-    return m_clipper;
+    return m_clipper.get();
 }
 
 }
index bd075ead32dc71c065dd7ee6f300ecf90886d565..9e46f740e42b166bf0bf6fb63a8e8cd43900160c 100644 (file)
@@ -24,7 +24,7 @@
 #define KSVG_SVGClipPathElementImpl_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasClipper.h"
+#include "SVGResourceClipper.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGLangSpace.h"
 #include "SVGStyledTransformableElement.h"
@@ -43,7 +43,7 @@ namespace WebCore
         
         virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual KCanvasClipper* canvasResource();
+        virtual SVGResource* canvasResource();
 
         // 'SVGClipPathElement' functions
         virtual void parseMappedAttribute(MappedAttribute*);
@@ -56,7 +56,7 @@ namespace WebCore
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGClipPathElement, int, int, ClipPathUnits, clipPathUnits)
 
-        KCanvasClipper* m_clipper;
+        RefPtr<SVGResourceClipper> m_clipper;
     };
 
 } // namespace WebCore
index 09146d3493f02d95a76765cd577fc5e875f3be4a..fe548628ed9e607b8bee51d56bcaf06e09d6e5c5 100644 (file)
@@ -28,7 +28,7 @@
 #include "CachedImage.h"
 #include "DocLoader.h"
 #include "Document.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 #include "KRenderingDevice.h"
 #include "SVGHelper.h"
 #include "SVGLength.h"
index a50497645b26d867b7f0f5b0231f4a0d1df889c4..832a710794192c1d403d87a54215fc322c1a3295 100644 (file)
@@ -58,13 +58,10 @@ SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
     // Spec: If the attribute is not specified, the effect is as if a value of "120%" were specified.
     m_width->setValueAsString("120%");
     m_height->setValueAsString("120%");
-
-    m_filter = 0;
 }
 
 SVGFilterElement::~SVGFilterElement()
 {
-    delete m_filter;
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGFilterElement, int, Enumeration, enumeration, FilterUnits, filterUnits, SVGNames::filterUnitsAttr.localName(), m_filterUnits)
@@ -110,13 +107,13 @@ void SVGFilterElement::parseMappedAttribute(MappedAttribute* attr)
     }
 }
 
-KCanvasFilter* SVGFilterElement::canvasResource()
+SVGResource* SVGFilterElement::canvasResource()
 {
     if (!attached())
         return 0;
 
     if (!m_filter)
-        m_filter = static_cast<KCanvasFilter*>(renderingDevice()->createResource(RS_FILTER));
+        m_filter = WTF::static_pointer_cast<KCanvasFilter>(renderingDevice()->createResource(RS_FILTER));
 
     bool filterBBoxMode = filterUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     m_filter->setFilterBoundingBoxMode(filterBBoxMode);
@@ -141,7 +138,7 @@ KCanvasFilter* SVGFilterElement::canvasResource()
                 m_filter->addFilterEffect(fe->filterEffect());
         }
     }
-    return m_filter;
+    return m_filter.get();
 }
 
 }
index 4617e8c93e8d88f5a57f003fa86369056f6db590..86b2e0b56588dc44b4fd0ba1b3e6a6d17f1cfd60 100644 (file)
@@ -43,7 +43,7 @@ namespace WebCore {
         SVGFilterElement(const QualifiedName&, Document*);
         virtual ~SVGFilterElement();
 
-        virtual KCanvasFilter* canvasResource();
+        virtual SVGResource* canvasResource();
 
         // 'SVGFilterElement' functions
         void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
@@ -66,7 +66,7 @@ namespace WebCore {
         ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, long, long, FilterResX, filterResX)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, long, long, FilterResY, filterResY)
 
-        KCanvasFilter* m_filter;
+        RefPtr<KCanvasFilter> m_filter;
     };
 
 } // namespace WebCore
index 1e6a3d352dc70c2108df919daa4ef1d2dc283616..2121cb4f7f2fc08c4719d18c1b4f9496e0fd6ff1 100644 (file)
@@ -25,6 +25,7 @@
 #include "SVGGradientElement.h"
 
 #include "KRenderingDevice.h"
+#include "RenderPath.h"
 #include "RenderView.h"
 #include "SVGHelper.h"
 #include "SVGNames.h"
@@ -44,12 +45,10 @@ SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* d
     , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_gradientTransform(new SVGTransformList)
 {
-    m_resource = 0;
 }
 
 SVGGradientElement::~SVGGradientElement()
 {
-    delete m_resource;
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGGradientElement, int, Enumeration, enumeration, GradientUnits, gradientUnits, SVGNames::gradientUnitsAttr.localName(), m_gradientUnits)
@@ -103,21 +102,20 @@ void SVGGradientElement::notifyAttributeChange() const
     }
 }
 
-KRenderingPaintServerGradient* SVGGradientElement::canvasResource()
+SVGResource* SVGGradientElement::canvasResource()
 {
     if (!m_resource) {
-        KRenderingPaintServer* temp = renderingDevice()->createPaintServer(gradientType());
-        m_resource = static_cast<KRenderingPaintServerGradient*>(temp);
+        m_resource = WTF::static_pointer_cast<KRenderingPaintServerGradient>(renderingDevice()->createPaintServer(gradientType()));
         m_resource->setListener(this);
         buildGradient(m_resource);
     }
-    return m_resource;
+    return m_resource.get();
 }
 
 void SVGGradientElement::resourceNotification() const
 {
     // We're referenced by a "client", build the gradient now...
-    buildGradient(const_cast<SVGGradientElement*>(this)->canvasResource());
+    buildGradient(static_cast<KRenderingPaintServerGradient*>(const_cast<SVGGradientElement*>(this)->canvasResource()));
 }
 
 void SVGGradientElement::rebuildStops() const
index b3ab34e77a6baa34f9892aa3359e54973a9bb015..2caf59f4cae93c11516050badf6542cb4ce7ea41 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
     class SVGGradientElement : public SVGStyledElement,
                                public SVGURIReference,
                                public SVGExternalResourcesRequired,
-                               public KCanvasResourceListener
+                               public SVGResourceListener
     {
     public:
         enum SVGGradientType {
@@ -51,12 +51,13 @@ namespace WebCore {
         // 'SVGGradientElement' functions
         virtual void parseMappedAttribute(MappedAttribute*);
         virtual void notifyAttributeChange() const;
-        
-        virtual KRenderingPaintServerGradient* canvasResource();
+
+        virtual SVGResource* canvasResource();
+
         virtual void resourceNotification() const;
 
     protected:
-        virtual void buildGradient(KRenderingPaintServerGradient*) const = 0;
+        virtual void buildGradient(PassRefPtr<KRenderingPaintServerGradient>) const = 0;
         virtual KCPaintServerType gradientType() const = 0;
         void rebuildStops() const;
 
@@ -68,7 +69,7 @@ namespace WebCore {
         ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, int, int, GradientUnits, gradientUnits)
         ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGTransformList*, RefPtr<SVGTransformList>, GradientTransform, gradientTransform)
 
-        mutable KRenderingPaintServerGradient* m_resource;
+        mutable RefPtr<KRenderingPaintServerGradient> m_resource;
     };
 
 } // namespace WebCore
index 97f1f267c97f2d8eae6873766abdee555d9e36fb..6fd86209a8a807b6a50c5a431808d5c847e2190b 100644 (file)
@@ -26,7 +26,7 @@
 #include "SVGImageElement.h"
 
 #include "CSSPropertyNames.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGImage.h"
 #include "SVGDocument.h"
index 7e9be5c3dd59cd8b38a391bb1707cd3c1ca3bff0..1015d7448230aa580b5fe6970e72a867b8d5d143 100644 (file)
@@ -71,7 +71,7 @@ void SVGLinearGradientElement::parseMappedAttribute(MappedAttribute* attr)
         SVGGradientElement::parseMappedAttribute(attr);
 }
 
-void SVGLinearGradientElement::buildGradient(KRenderingPaintServerGradient* _grad) const
+void SVGLinearGradientElement::buildGradient(PassRefPtr<KRenderingPaintServerGradient> _grad) const
 {
     rebuildStops(); // rebuild stops before possibly importing them from any referenced gradient.
 
@@ -85,23 +85,23 @@ void SVGLinearGradientElement::buildGradient(KRenderingPaintServerGradient* _gra
     float _x1 = x1()->value(), _y1 = y1()->value();
     float _x2 = x2()->value(), _y2 = y2()->value();
 
-    KRenderingPaintServerLinearGradient* grad = static_cast<KRenderingPaintServerLinearGradient*>(_grad);
+    RefPtr<KRenderingPaintServerLinearGradient> grad = WTF::static_pointer_cast<KRenderingPaintServerLinearGradient>(_grad);
     AffineTransform mat;
     if (gradientTransform()->numberOfItems() > 0)
         mat = gradientTransform()->consolidate()->matrix()->matrix();
 
     DeprecatedString ref = href().deprecatedString();
-    KRenderingPaintServer* pserver = getPaintServerById(document(), ref.mid(1));
+    RefPtr<KRenderingPaintServer> pserver = getPaintServerById(document(), ref.mid(1));
     
     if (pserver && (pserver->type() == PS_RADIAL_GRADIENT || pserver->type() == PS_LINEAR_GRADIENT)) {
         bool isLinear = pserver->type() == PS_LINEAR_GRADIENT;
-        KRenderingPaintServerGradient* gradient = static_cast<KRenderingPaintServerGradient*>(pserver);
+        KRenderingPaintServerGradient* gradient = static_cast<KRenderingPaintServerGradient*>(pserver.get());
 
         if (!hasAttribute(SVGNames::gradientUnitsAttr))
             bbox = gradient->boundingBoxMode();
             
         if (isLinear) {
-            KRenderingPaintServerLinearGradient* linear = static_cast<KRenderingPaintServerLinearGradient*>(pserver);
+            KRenderingPaintServerLinearGradient* linear = static_cast<KRenderingPaintServerLinearGradient*>(pserver.get());
             if (!hasAttribute(SVGNames::x1Attr))
                 _x1 = linear->gradientStart().x();
             else if (bbox)
index 1a218c9084061ea7e26f87f8d950187270d41b27..deb6297f6fc8bcb56c39606fa19c1fbc70f92db8 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore
         virtual void parseMappedAttribute(MappedAttribute*);
 
     protected:
-        virtual void buildGradient(KRenderingPaintServerGradient*) const;
+        virtual void buildGradient(PassRefPtr<KRenderingPaintServerGradient>) const;
         virtual KCPaintServerType gradientType() const { return PS_LINEAR_GRADIENT; }
 
     protected:
index ef95a8f656a3f841c66b28ba819050a13a63b250..d3d2d62b13b13a98ca2c129a36343c9597d65a86 100644 (file)
@@ -50,13 +50,11 @@ SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
     , m_markerUnits(SVG_MARKERUNITS_STROKEWIDTH)
     , m_orientType(0)
     , m_orientAngle(new SVGAngle(this))
-    , m_marker(0)
 {
 }
 
 SVGMarkerElement::~SVGMarkerElement()
 {
-    delete m_marker;
 }
 
 void SVGMarkerElement::parseMappedAttribute(MappedAttribute* attr)
@@ -112,10 +110,10 @@ void SVGMarkerElement::setOrientToAngle(SVGAngle* angle)
     setOrientAngleBaseValue(angle);
 }
 
-KCanvasMarker* SVGMarkerElement::canvasResource()
+SVGResource* SVGMarkerElement::canvasResource()
 {
     if (!m_marker)
-        m_marker = static_cast<KCanvasMarker*>(renderingDevice()->createResource(RS_MARKER));
+        m_marker = new SVGResourceMarker();
     
     m_marker->setMarker(static_cast<RenderSVGContainer*>(renderer()));
 
@@ -132,7 +130,7 @@ KCanvasMarker* SVGMarkerElement::canvasResource()
     m_marker->setRef(refX()->value(), refY()->value());
     m_marker->setUseStrokeWidth(markerUnits() == SVG_MARKERUNITS_STROKEWIDTH);
     
-    return m_marker;
+    return m_marker.get();
 }
 
 RenderObject* SVGMarkerElement::createRenderer(RenderArena* arena, RenderStyle* style)
index cc811d03cedbeeca1b5f5615609373bb64ff2802..2159ef5bf0d994e7d4e5f4f96128f07f14765f55 100644 (file)
@@ -24,7 +24,7 @@
 #define SVGMarkerElement_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasMarker.h"
+#include "SVGResourceMarker.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
 #include "SVGLangSpace.h"
@@ -65,7 +65,7 @@ namespace WebCore
     
         virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual KCanvasMarker* canvasResource();
+        virtual SVGResource* canvasResource();
 
     protected:
         virtual const SVGElement* contextElement() const { return this; }
@@ -83,7 +83,7 @@ namespace WebCore
         ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, int, int, OrientType, orientType)
         ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGAngle*, RefPtr<SVGAngle>, OrientAngle, orientAngle)
 
-        KCanvasMarker* m_marker;
+        RefPtr<SVGResourceMarker> m_marker;
     };
 
 } // namespace WebCore
index 72567af28cf65f7bfce0f58dde03406f31c43d12..af0c730c4d58f01bc279c4b099ebe5befe3bd6ec 100644 (file)
@@ -26,7 +26,7 @@
 #include "SVGMaskElement.h"
 
 #include "GraphicsContext.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 #include "KRenderingDevice.h"
 #include "RenderSVGContainer.h"
 #include "SVGHelper.h"
@@ -48,14 +48,12 @@ SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
     , m_y(new SVGLength(this, LM_HEIGHT, viewportElement()))
     , m_width(new SVGLength(this, LM_WIDTH, viewportElement()))
     , m_height(new SVGLength(this, LM_HEIGHT, viewportElement()))
-    , m_masker(0)
     , m_dirty(true)
 {
 }
 
 SVGMaskElement::~SVGMaskElement()
 {
-    delete m_masker;
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGMaskElement, SVGLength*, Length, length, X, x, SVGNames::xAttr.localName(), m_x.get())
@@ -101,14 +99,15 @@ void SVGMaskElement::parseMappedAttribute(MappedAttribute* attr)
     }
 }
 
-KCanvasImage* SVGMaskElement::drawMaskerContent()
+SVGResourceImage* SVGMaskElement::drawMaskerContent()
 {
     KRenderingDevice* device = renderingDevice();
     if (!device->currentContext()) // FIXME: hack for now until Image::lockFocus exists
         return 0;
     if (!renderer())
         return 0;
-    KCanvasImage* maskImage = static_cast<KCanvasImage*>(device->createResource(RS_IMAGE));
+
+    SVGResourceImage* maskImage = new SVGResourceImage();
 
     IntSize size = IntSize(lroundf(width()->value()), lroundf(height()->value()));
     maskImage->init(size);
@@ -137,18 +136,18 @@ RenderObject* SVGMaskElement::createRenderer(RenderArena* arena, RenderStyle*)
     return maskContainer;
 }
 
-KCanvasMasker* SVGMaskElement::canvasResource()
+SVGResource* SVGMaskElement::canvasResource()
 {
     if (!m_masker) {
-        m_masker = static_cast<KCanvasMasker*>(renderingDevice()->createResource(RS_MASKER));
+        m_masker = new SVGResourceMasker();
         m_dirty = true;
     }
     if (m_dirty) {
-        KCanvasImage* newMaskImage = drawMaskerContent();
-        m_masker->setMask(newMaskImage);
-        m_dirty = (newMaskImage != 0);
+        RefPtr<SVGResourceImage> mask(drawMaskerContent());
+        m_masker->setMask(mask);
+        m_dirty = (mask != 0);
     }
-    return m_masker;
+    return m_masker.get();
 }
 
 }
index 687f9437311d77d99320d75c0d4ec442f6a8e192..26fcb2fcc2e10a2186d43ca893a773dbf9deab82 100644 (file)
@@ -23,7 +23,7 @@
 #define SVGMaskElement_H
 #ifdef SVG_SUPPORT
 
-#include "KCanvasMasker.h"
+#include "SVGResourceMasker.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGLangSpace.h"
 #include "SVGStyledLocatableElement.h"
@@ -52,10 +52,10 @@ namespace WebCore
 
         virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual KCanvasMasker* canvasResource();
+        virtual SVGResource* canvasResource();
 
     protected:
-        KCanvasImage* drawMaskerContent();
+        SVGResourceImage* drawMaskerContent();
 
         ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
         ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
@@ -68,7 +68,7 @@ namespace WebCore
         virtual const SVGElement* contextElement() const { return this; }
 
     private:
-        KCanvasMasker* m_masker;
+        RefPtr<SVGResourceMasker> m_masker;
         bool m_dirty;
     };
 
index 8a59fa667d4da2339b8dae60bbf99c898458f2d4..904d747e3a7946af67e75ea2db355e638c3595ee 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "Document.h"
 #include "GraphicsContext.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
 #include "KRenderingDevice.h"
 #include "KRenderingPaintServerPattern.h"
 #include "RenderSVGContainer.h"
@@ -50,7 +50,7 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
     , SVGFitToViewBox()
-    , KCanvasResourceListener()
+    , SVGResourceListener()
     , m_x(new SVGLength(this, LM_WIDTH, viewportElement()))
     , m_y(new SVGLength(this, LM_HEIGHT, viewportElement()))
     , m_width(new SVGLength(this, LM_WIDTH, viewportElement()))
@@ -59,14 +59,11 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
     , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
     , m_patternTransform(new SVGTransformList)
 {
-    m_tile = 0;
-    m_paintServer = 0;
     m_ignoreAttributeChanges = false;
 }
 
 SVGPatternElement::~SVGPatternElement()
 {
-    delete m_paintServer;
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, int, Enumeration, enumeration, PatternUnits, patternUnits, SVGNames::patternUnitsAttr.localName(), m_patternUnits)
@@ -139,12 +136,12 @@ void SVGPatternElement::resourceNotification() const
 void SVGPatternElement::fillAttributesFromReferencePattern(const SVGPatternElement* target, AffineTransform& patternTransformMatrix)
 {
     DeprecatedString ref = href().deprecatedString();
-    KRenderingPaintServer* refServer = getPaintServerById(document(), ref.mid(1));
+    RefPtr<KRenderingPaintServer> refServer = getPaintServerById(document(), ref.mid(1));
 
     if (!refServer || refServer->type() != PS_PATTERN)
         return;
     
-    KRenderingPaintServerPattern* refPattern = static_cast<KRenderingPaintServerPattern*>(refServer);
+    RefPtr<KRenderingPaintServerPattern> refPattern = WTF::static_pointer_cast<KRenderingPaintServerPattern>(refServer);
     
     if (!hasAttribute(SVGNames::patternUnitsAttr)) {
         const AtomicString& value = target->getAttribute(SVGNames::patternUnitsAttr);
@@ -184,16 +181,15 @@ void SVGPatternElement::drawPatternContentIntoTile(const SVGPatternElement* targ
             savedContext = const_cast<SVGPatternElement*>(this)->pushAttributeContext(activeElement);
     }
     
-    delete m_tile;
-    m_tile = static_cast<KCanvasImage*>(device->createResource(RS_IMAGE));
+    m_tile = new SVGResourceImage();
     m_tile->init(newSize);
 
-    KRenderingDeviceContext* patternContext = device->contextForImage(m_tile);
+    KRenderingDeviceContext* patternContext = device->contextForImage(m_tile.get());
     device->pushContext(patternContext);
     FloatRect rect(x()->value(), y()->value(), width()->value(), height()->value());
     m_paintServer->setBbox(rect);
     m_paintServer->setPatternTransform(patternTransformMatrix);
-    m_paintServer->setTile(m_tile);
+    m_paintServer->setTile(m_tile.get());
 
     OwnPtr<GraphicsContext> context(patternContext->createGraphicsContext());
 
@@ -328,14 +324,13 @@ RenderObject* SVGPatternElement::createRenderer(RenderArena* arena, RenderStyle*
     return patternContainer;
 }
 
-KRenderingPaintServerPattern* SVGPatternElement::canvasResource()
+SVGResource* SVGPatternElement::canvasResource()
 {
     if (!m_paintServer) {
-        KRenderingPaintServer* pserver = renderingDevice()->createPaintServer(KCPaintServerType(PS_PATTERN));
-        m_paintServer = static_cast<KRenderingPaintServerPattern*>(pserver);
+        m_paintServer = WTF::static_pointer_cast<KRenderingPaintServerPattern>(renderingDevice()->createPaintServer(KCPaintServerType(PS_PATTERN)));
         m_paintServer->setListener(const_cast<SVGPatternElement*>(this));
     }
-    return m_paintServer;
+    return m_paintServer.get();
 }
 
 SVGMatrix* SVGPatternElement::getCTM() const
index 3d54f8ae6b15d14f381f72e1ab1141843c37a09f..d699920e30dd8a5116e91312dbb0895c5cc81ea5 100644 (file)
@@ -32,7 +32,7 @@
 #include "SVGTests.h"
 #include "SVGURIReference.h"
 
-class KCanvasImage;
+class SVGResourceImage;
 
 namespace WebCore
 {
@@ -45,7 +45,7 @@ namespace WebCore
                               public SVGLangSpace,
                               public SVGExternalResourcesRequired,
                               public SVGFitToViewBox,
-                              public KCanvasResourceListener
+                              public SVGResourceListener
     {
     public:
         SVGPatternElement(const QualifiedName&, Document*);
@@ -63,7 +63,7 @@ namespace WebCore
 
         virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual KRenderingPaintServerPattern* canvasResource();
+        virtual SVGResource* canvasResource();
 
         // 'virtual SVGLocatable' functions
         virtual SVGMatrix* getCTM() const;
@@ -82,9 +82,9 @@ namespace WebCore
         ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, int, int, PatternContentUnits, patternContentUnits)
         ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGTransformList*, RefPtr<SVGTransformList>, PatternTransform, patternTransform)
 
-        mutable KCanvasImage* m_tile;
+        mutable RefPtr<SVGResourceImage> m_tile;
         mutable bool m_ignoreAttributeChanges;
-        mutable KRenderingPaintServerPattern* m_paintServer;
+        mutable RefPtr<KRenderingPaintServerPattern> m_paintServer;
         
         virtual const SVGElement* contextElement() const { return this; }
 
index 608d323a3c3648f48a94f12b7d47d743c161db37..6b2ec6f9cc48d1dac71766c353d53fd001bc2d38 100644 (file)
@@ -77,7 +77,7 @@ void SVGRadialGradientElement::parseMappedAttribute(MappedAttribute* attr)
         SVGGradientElement::parseMappedAttribute(attr);
 }
 
-void SVGRadialGradientElement::buildGradient(KRenderingPaintServerGradient* _grad) const
+void SVGRadialGradientElement::buildGradient(PassRefPtr<KRenderingPaintServerGradient> _grad) const
 {
     rebuildStops(); // rebuild stops before possibly importing them from any referenced gradient.
 
@@ -94,23 +94,23 @@ void SVGRadialGradientElement::buildGradient(KRenderingPaintServerGradient* _gra
     float _fx = fxSet ? fx()->value() : _cx;
     float _fy = fySet ? fy()->value() : _cy;
 
-    KRenderingPaintServerRadialGradient* grad = static_cast<KRenderingPaintServerRadialGradient*>(_grad);
+    RefPtr<KRenderingPaintServerRadialGradient> grad = WTF::static_pointer_cast<KRenderingPaintServerRadialGradient>(_grad);
     AffineTransform mat;
     if (gradientTransform()->numberOfItems() > 0)
         mat = gradientTransform()->consolidate()->matrix()->matrix();
 
     DeprecatedString ref = href().deprecatedString();
-    KRenderingPaintServer* pserver = getPaintServerById(document(), ref.mid(1));
+    RefPtr<KRenderingPaintServer> pserver = getPaintServerById(document(), ref.mid(1));
 
     if (pserver && (pserver->type() == PS_RADIAL_GRADIENT || pserver->type() == PS_LINEAR_GRADIENT)) {
         bool isRadial = pserver->type() == PS_RADIAL_GRADIENT;
-        KRenderingPaintServerGradient* gradient = static_cast<KRenderingPaintServerGradient*>(pserver);
+        RefPtr<KRenderingPaintServerGradient> gradient = WTF::static_pointer_cast<KRenderingPaintServerGradient>(pserver);
 
         if (!hasAttribute(SVGNames::gradientUnitsAttr))
             bbox = gradient->boundingBoxMode();
 
         if (isRadial) {
-            KRenderingPaintServerRadialGradient* radial = static_cast<KRenderingPaintServerRadialGradient*>(pserver);
+            RefPtr<KRenderingPaintServerRadialGradient> radial = WTF::static_pointer_cast<KRenderingPaintServerRadialGradient>(pserver);
             if (!hasAttribute(SVGNames::cxAttr))
                 _cx = radial->gradientCenter().x();
             else if (bbox)
@@ -146,7 +146,7 @@ void SVGRadialGradientElement::buildGradient(KRenderingPaintServerGradient* _gra
 
         // Inherit color stops if empty
         if (grad->gradientStops().isEmpty())
-            grad->setGradientStops(gradient);
+            grad->setGradientStops(gradient.get());
 
         if (!hasAttribute(SVGNames::spreadMethodAttr))
             grad->setGradientSpreadMethod(gradient->spreadMethod());
index af94a3de77b2800e6266bf4180e2fc1c5eef3a81..fda2d05097049e5c5cecf8df97da402e7680a209 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore
         virtual void parseMappedAttribute(MappedAttribute*);
 
     protected:
-        virtual void buildGradient(KRenderingPaintServerGradient*) const;
+        virtual void buildGradient(PassRefPtr<KRenderingPaintServerGradient>) const;
         virtual KCPaintServerType gradientType() const { return PS_RADIAL_GRADIENT; }
 
     protected:
index aa59b80c4c24f971fe6b56a7ccbf47a0b6f58f5a..00853000c5dc1f8fc7335da92478abff2739f00c 100644 (file)
 #include "RenderStyle.h"
 #include "SVGElement.h"
 #include "SVGStylable.h"
+#include "SVGResource.h"
 #include "Path.h"
 
 namespace WebCore {
 
     class CSSStyleDeclaration;
-    class KCanvasResource;
     class KRenderingDevice;
     class RenderPath;
     class RenderView;
@@ -50,7 +50,7 @@ namespace WebCore {
         virtual bool rendererIsNeeded(RenderStyle*) { return false; }
         virtual Path toPathData() const { return Path(); }
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual KCanvasResource* canvasResource() { return 0; }
+        virtual SVGResource* canvasResource() { return 0; }
         
         virtual void parseMappedAttribute(MappedAttribute*);
 
similarity index 99%
rename from WebCore/platform/GraphicsContext.h
rename to WebCore/platform/graphics/GraphicsContext.h
index faeeaab4d2adacbff55b516ee40de65998b7b606..a2025edc993c4fd1c1a14af4421c4a21c2e0546b 100644 (file)
@@ -129,7 +129,7 @@ namespace WebCore {
         
         void drawLineForText(const IntPoint&, int yOffset, int width, bool printing);
         void drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar);
-        
+       
         bool paintingDisabled() const;
         void setPaintingDisabled(bool);
         
index b4c792892888787284190be2ee3ca2a0af645a23..22a91918bf80578f479f0a229290910fce40e4e3 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "config.h"
 
+#include "AffineTransform.h"
 #include "Path.h"
 #include "Color.h"
 #include "GraphicsContext.h"
index dac936b71fd1c6727f7942e1587e80348b056fcc..0990ee728027b31bf93201119ebacbaee4a8ff5b 100644 (file)
@@ -29,9 +29,9 @@
 
 #include "GraphicsContext.h"
 #include "RenderSVGContainer.h"
-#include "KCanvasClipper.h"
-#include "KCanvasMasker.h"
-#include "KCanvasMarker.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceMasker.h"
+#include "SVGResourceMarker.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "SVGStyledElement.h"
@@ -193,10 +193,10 @@ void RenderPath::paint(PaintInfo &paintInfo, int parentX, int parentY)
         context = device->currentContext();
     }
 
-    if (KCanvasClipper* clipper = getClipperById(document(), style()->svgStyle()->clipPath().substring(1)))
+    if (SVGResourceClipper* clipper = getClipperById(document(), style()->svgStyle()->clipPath().substring(1)))
         clipper->applyClip(relativeBBox(true));
 
-    if (KCanvasMasker* masker = getMaskerById(document(), style()->svgStyle()->maskElement().substring(1)))
+    if (SVGResourceMasker* masker = getMaskerById(document(), style()->svgStyle()->maskElement().substring(1)))
         masker->applyMask(relativeBBox(true));
 
     context->clearPath();
@@ -315,18 +315,18 @@ struct MarkerData {
     FloatPoint inslopePoints[2];
     FloatPoint outslopePoints[2];
     MarkerType type;
-    KCanvasMarker *marker;
+    SVGResourceMarker *marker;
 };
 
 struct DrawMarkersData {
-    DrawMarkersData(GraphicsContext*, KCanvasMarker* startMarker, KCanvasMarker* midMarker, double strokeWidth);
+    DrawMarkersData(GraphicsContext*, SVGResourceMarker* startMarker, SVGResourceMarker* midMarker, double strokeWidth);
     GraphicsContext* context;
     int elementIndex;
     MarkerData previousMarkerData;
-    KCanvasMarker* midMarker;
+    SVGResourceMarker* midMarker;
 };
 
-DrawMarkersData::DrawMarkersData(GraphicsContext* c, KCanvasMarker *start, KCanvasMarker *mid, double strokeWidth)
+DrawMarkersData::DrawMarkersData(GraphicsContext* c, SVGResourceMarker *start, SVGResourceMarker *mid, double strokeWidth)
     : context(c)
     , elementIndex(0)
     , midMarker(mid)
@@ -428,9 +428,9 @@ void RenderPath::drawMarkersIfNeeded(GraphicsContext* context, const FloatRect&
     Document *doc = document();
     const SVGRenderStyle* svgStyle = style()->svgStyle();
 
-    KCanvasMarker* startMarker = getMarkerById(doc, svgStyle->startMarker().substring(1));
-    KCanvasMarker* midMarker = getMarkerById(doc, svgStyle->midMarker().substring(1));
-    KCanvasMarker* endMarker = getMarkerById(doc, svgStyle->endMarker().substring(1));
+    SVGResourceMarker* startMarker = getMarkerById(doc, svgStyle->startMarker().substring(1));
+    SVGResourceMarker* midMarker = getMarkerById(doc, svgStyle->midMarker().substring(1));
+    SVGResourceMarker* endMarker = getMarkerById(doc, svgStyle->endMarker().substring(1));
     
     if (!startMarker && !midMarker && !endMarker)
         return;
index 5f0e23ee1b30970e7c3dbcee922220c6f060e812..83698364802771f20865b27905e5b77203fea23c 100644 (file)
@@ -24,8 +24,8 @@
 #ifdef SVG_SUPPORT
 #include "RenderSVGContainer.h"
 
-#include "KCanvasClipper.h"
-#include "KCanvasMasker.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceMasker.h"
 #include "KRenderingDevice.h"
 #include "SVGStyledElement.h"
 #include "GraphicsContext.h"
@@ -175,10 +175,10 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
     
     FloatRect strokeBBox = relativeBBox(true);
     
-    if (KCanvasClipper *clipper = getClipperById(document(), style()->svgStyle()->clipPath().substring(1)))
+    if (SVGResourceClipper *clipper = getClipperById(document(), style()->svgStyle()->clipPath().substring(1)))
         clipper->applyClip(strokeBBox);
 
-    if (KCanvasMasker *masker = getMaskerById(document(), style()->svgStyle()->maskElement().substring(1)))
+    if (SVGResourceMasker *masker = getMaskerById(document(), style()->svgStyle()->maskElement().substring(1)))
         masker->applyMask(strokeBBox);
 
     float opacity = style()->opacity();
index 4ab6cf05f006b12aee91f799c5957419cdce2252..25f058add84f7d6dac3f66b434cd2f4b0f9db6d4 100644 (file)
@@ -26,8 +26,8 @@
 
 #include "Attr.h"
 #include "GraphicsContext.h"
-#include "KCanvasClipper.h"
-#include "KCanvasMasker.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceMasker.h"
 #include "KRenderingDevice.h"
 #include "SVGLength.h"
 #include "SVGPreserveAspectRatio.h"
@@ -146,10 +146,10 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
     FloatRect boundingBox = FloatRect(0, 0, width(), height());
     const SVGRenderStyle* svgStyle = style()->svgStyle();
             
-    if (KCanvasClipper* clipper = getClipperById(document(), svgStyle->clipPath().substring(1)))
+    if (SVGResourceClipper* clipper = getClipperById(document(), svgStyle->clipPath().substring(1)))
         clipper->applyClip(boundingBox);
 
-    if (KCanvasMasker* masker = getMaskerById(document(), svgStyle->maskElement().substring(1)))
+    if (SVGResourceMasker* masker = getMaskerById(document(), svgStyle->maskElement().substring(1)))
         masker->applyMask(boundingBox);
 
     KCanvasFilter* filter = getFilterById(document(), svgStyle->filter().substring(1));
index 0a2dc4f1dc86a48235ee0d92f9333091d6fd7be5..87af88559b93486b660f0faf1ddd8bf6269e98d6 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "GraphicsContext.h"
 #include "InlineTextBox.h"
-#include "KCanvasClipper.h"
-#include "KCanvasMasker.h"
+#include "SVGResourceClipper.h"
+#include "SVGResourceMasker.h"
 #include "KCanvasRenderingStyle.h"
 #include "KRenderingDevice.h"
 #include "RootInlineBox.h"
@@ -80,10 +80,10 @@ void paintSVGInlineFlow(InlineFlowBox* flow, RenderObject* object, RenderObject:
     FloatRect boundingBox(tx+flow->xPos() , ty+flow->yPos(), flow->width(), flow->height());
     
     const SVGRenderStyle* svgStyle = object->style()->svgStyle();
-    if (KCanvasClipper* clipper = getClipperById(object->document(), svgStyle->clipPath().substring(1)))
+    if (SVGResourceClipper* clipper = getClipperById(object->document(), svgStyle->clipPath().substring(1)))
         clipper->applyClip(boundingBox);
     
-    if (KCanvasMasker* masker = getMaskerById(object->document(), svgStyle->maskElement().substring(1)))
+    if (SVGResourceMasker* masker = getMaskerById(object->document(), svgStyle->maskElement().substring(1)))
         masker->applyMask(boundingBox);
     
     KCanvasFilter* filter = getFilterById(object->document(), svgStyle->filter().substring(1));