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
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
${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
${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
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
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
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
platform/FloatSize.cpp
platform/String.cpp
platform/DeprecatedValueListImpl.cpp
- platform/GraphicsTypes.cpp
platform/IntRect.cpp
platform/Arena.cpp
platform/ArrayImpl.cpp
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
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
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
+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.
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;
};
return ts;
}
-KCanvasFilter *getFilterById(Document *document, const AtomicString &id)
+KCanvasFilter* getFilterById(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;
#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;
namespace WebCore {
+#if PLATFORM(MAC)
class KCanvasFilterQuartz;
+#endif
// Enumerations
typedef enum {
class KCanvasFilterEffect;
class KRenderingDevice;
-class KCanvasFilter : public KCanvasResource {
+class KCanvasFilter : public SVGResource {
public:
KCanvasFilter() { }
virtual ~KCanvasFilter() { }
String result() const;
void setResult(const String&);
-#if __APPLE__
+#if PLATFORM(MAC)
virtual CIFilter* getCIFilter(KCanvasFilterQuartz*) const = 0;
#endif
-/*
- 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
#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"
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)));
}
namespace WebCore {
+class AffineTransform;
+class GraphicsContext;
+class Path;
+
// aka where to draw
class KRenderingDeviceContext
{
virtual GraphicsContext* createGraphicsContext() = 0;
};
-class KCanvasImage;
+class SVGResourceImage;
class KCanvasFilterEffect;
class KRenderingDevice
{
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;
#define KRenderingPaintServer_H
#ifdef SVG_SUPPORT
-#include "KCanvasResource.h"
+#include "SVGResource.h"
namespace WebCore {
class KRenderingDeviceContext;
+class RenderObject;
class RenderPath;
class RenderStyle;
class TextStream;
APPLY_TO_STROKE = 2
};
-class KRenderingPaintServer : public KCanvasResource
+class KRenderingPaintServer : public SVGResource
{
public:
KRenderingPaintServer()
- : KCanvasResource()
+ : SVGResource()
, m_activeClient(0)
, m_paintingText(false)
{ }
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
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
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;
}
#define KRenderingPaintServerGradient_H
#ifdef SVG_SUPPORT
+#include "AffineTransform.h"
+#include "Color.h"
+#include "FloatPoint.h"
#include "KRenderingPaintServer.h"
namespace WebCore {
AffineTransform gradientTransform() const;
void setGradientTransform(const AffineTransform&);
- KCanvasResourceListener* listener() const;
- void setListener(KCanvasResourceListener*);
+ SVGResourceListener* listener() const;
+ void setListener(SVGResourceListener*);
TextStream& externalRepresentation(TextStream&) const;
private:
KCGradientSpreadMethod m_spreadMethod;
bool m_boundingBoxMode;
AffineTransform m_gradientTransform;
- KCanvasResourceListener* m_listener;
+ SVGResourceListener* m_listener;
};
class KRenderingPaintServerLinearGradient : public KRenderingPaintServerGradient
#include "config.h"
#ifdef SVG_SUPPORT
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
#include "KRenderingPaintServerPattern.h"
#include "AffineTransform.h"
KRenderingPaintServerPattern::KRenderingPaintServerPattern()
: KRenderingPaintServer()
- , m_tile(0)
, m_useBoundingBoxMode(true)
, m_listener(0)
{
KRenderingPaintServerPattern::~KRenderingPaintServerPattern()
{
- delete m_tile;
}
void KRenderingPaintServerPattern::setBbox(const FloatRect& rect)
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;
}
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;
}
#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
{
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;
};
#define KRenderingPaintServerSolid_H
#ifdef SVG_SUPPORT
+#include "Color.h"
#include "KRenderingPaintServer.h"
namespace WebCore {
-/*
- 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
-/*
- 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
#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"
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:
}
}
-KRenderingPaintServer* KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
+PassRefPtr<KRenderingPaintServer> KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
{
switch (type)
{
// 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;
};
#include <math.h>
#include <QPointF>
+#include "RenderPath.h"
#include "RenderStyle.h"
#include "AffineTransform.h"
#include "KRenderingDeviceQt.h"
#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 {
#include <QPen>
#include <QVector>
+#include "RenderStyle.h"
#include "KCanvasRenderingStyle.h"
#include "KRenderingPaintServerQt.h"
#include <QBrush>
#include <QPainter>
+#include "RenderPath.h"
#include "RenderStyle.h"
#include "KRenderingDeviceQt.h"
#include "KCanvasRenderingStyle.h"
DeprecatedValueListIterator<KCanvasFilterEffect*> end = m_effects.end();
setImageForName(inputImage, "SourceGraphic"); // input
+
for (;it != end; it++) {
CIFilter *filter = (*it)->getCIFilter(this);
if (filter)
#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"
-/*
- * 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;
-};
-
-}
-/*
- * 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
-/*
- * 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
-/*
- * 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
// 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)
*/
#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"
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));
#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) {
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;
#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 {
: m_stopsCache(0)
, m_stopsCount(0)
, m_shadingCache(0)
- , m_maskImage(0)
{
}
{
delete m_stopsCache;
CGShadingRelease(m_shadingCache);
- delete m_maskImage;
}
void KRenderingPaintServerGradientQuartz::updateQuartzGradientCache(const KRenderingPaintServerGradient *server)
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)
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));
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();
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);
namespace WebCore {
-class KCanvasImage;
+class SVGResourceImage;
class KRenderingPaintServerQuartzHelper {
public:
protected:
void invalidateCaches();
CGShadingRef m_shadingCache;
- mutable KCanvasImage *m_maskImage;
+ mutable RefPtr<SVGResourceImage> m_maskImage;
};
class KRenderingPaintServerLinearGradientQuartz : public KRenderingPaintServerGradientQuartz,
#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"
void patternCallback(void *info, CGContextRef context)
{
- CGLayerRef layer = reinterpret_cast<KCanvasImageQuartz*>(info)->cgLayer();
+ CGLayerRef layer = reinterpret_cast<SVGResourceImage*>(info)->cgLayer();
CGContextDrawLayerAtPoint(context, CGPointZero, layer);
}
KRenderingDeviceContextQuartz* quartzContext = static_cast<KRenderingDeviceContextQuartz*>(renderingContext);
CGContextRef context = quartzContext->cgContext();
- KCanvasImage* cell = tile();
+ RefPtr<SVGResourceImage> cell = tile();
if (!cell)
return false;
#import "QuartzSupport.h"
#import "GraphicsContext.h"
-#import "KCanvasResourcesQuartz.h"
#import "KCanvasRenderingStyle.h"
+#import "RenderStyle.h"
#import "wtf/Assertions.h"
#import <QuartzCore/CoreImage.h>
#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;
}
, 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)
}
}
-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();
}
}
clipPathStyle->deref(view()->renderArena());
- return m_clipper;
+ return m_clipper.get();
}
}
#define KSVG_SVGClipPathElementImpl_H
#ifdef SVG_SUPPORT
-#include "KCanvasClipper.h"
+#include "SVGResourceClipper.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
virtual bool isValid() const { return SVGTests::isValid(); }
- virtual KCanvasClipper* canvasResource();
+ virtual SVGResource* canvasResource();
// 'SVGClipPathElement' functions
virtual void parseMappedAttribute(MappedAttribute*);
ANIMATED_PROPERTY_DECLARATIONS(SVGClipPathElement, int, int, ClipPathUnits, clipPathUnits)
- KCanvasClipper* m_clipper;
+ RefPtr<SVGResourceClipper> m_clipper;
};
} // namespace WebCore
#include "CachedImage.h"
#include "DocLoader.h"
#include "Document.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
#include "KRenderingDevice.h"
#include "SVGHelper.h"
#include "SVGLength.h"
// 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)
}
}
-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);
m_filter->addFilterEffect(fe->filterEffect());
}
}
- return m_filter;
+ return m_filter.get();
}
}
SVGFilterElement(const QualifiedName&, Document*);
virtual ~SVGFilterElement();
- virtual KCanvasFilter* canvasResource();
+ virtual SVGResource* canvasResource();
// 'SVGFilterElement' functions
void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
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
#include "SVGGradientElement.h"
#include "KRenderingDevice.h"
+#include "RenderPath.h"
#include "RenderView.h"
#include "SVGHelper.h"
#include "SVGNames.h"
, 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)
}
}
-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
class SVGGradientElement : public SVGStyledElement,
public SVGURIReference,
public SVGExternalResourcesRequired,
- public KCanvasResourceListener
+ public SVGResourceListener
{
public:
enum SVGGradientType {
// '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;
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
#include "SVGImageElement.h"
#include "CSSPropertyNames.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
#include "RenderSVGContainer.h"
#include "RenderSVGImage.h"
#include "SVGDocument.h"
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.
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)
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:
, 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)
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()));
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)
#define SVGMarkerElement_H
#ifdef SVG_SUPPORT
-#include "KCanvasMarker.h"
+#include "SVGResourceMarker.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGLangSpace.h"
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; }
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
#include "SVGMaskElement.h"
#include "GraphicsContext.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
#include "KRenderingDevice.h"
#include "RenderSVGContainer.h"
#include "SVGHelper.h"
, 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())
}
}
-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);
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();
}
}
#define SVGMaskElement_H
#ifdef SVG_SUPPORT
-#include "KCanvasMasker.h"
+#include "SVGResourceMasker.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledLocatableElement.h"
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)
virtual const SVGElement* contextElement() const { return this; }
private:
- KCanvasMasker* m_masker;
+ RefPtr<SVGResourceMasker> m_masker;
bool m_dirty;
};
#include "Document.h"
#include "GraphicsContext.h"
-#include "KCanvasImage.h"
+#include "SVGResourceImage.h"
#include "KRenderingDevice.h"
#include "KRenderingPaintServerPattern.h"
#include "RenderSVGContainer.h"
, 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()))
, 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)
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);
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());
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
#include "SVGTests.h"
#include "SVGURIReference.h"
-class KCanvasImage;
+class SVGResourceImage;
namespace WebCore
{
public SVGLangSpace,
public SVGExternalResourcesRequired,
public SVGFitToViewBox,
- public KCanvasResourceListener
+ public SVGResourceListener
{
public:
SVGPatternElement(const QualifiedName&, Document*);
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;
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; }
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.
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)
// Inherit color stops if empty
if (grad->gradientStops().isEmpty())
- grad->setGradientStops(gradient);
+ grad->setGradientStops(gradient.get());
if (!hasAttribute(SVGNames::spreadMethodAttr))
grad->setGradientSpreadMethod(gradient->spreadMethod());
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:
#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;
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*);
void drawLineForText(const IntPoint&, int yOffset, int width, bool printing);
void drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar);
-
+
bool paintingDisabled() const;
void setPaintingDisabled(bool);
#include "config.h"
+#include "AffineTransform.h"
#include "Path.h"
#include "Color.h"
#include "GraphicsContext.h"
#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"
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();
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)
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;
#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"
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();
#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"
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));
#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"
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));