Commit b67995fc authored by zimmermann's avatar zimmermann
Browse files

Reviewed by Eric. Rubber stamped by Oliver.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=10383

This is the final patch after the long "die kcanvas" journey.

All old kcanvas code is gone now, and properly integrated within
WebCore (stuff like GraphicsContext changes etc.). It shares
the platform/ design concept: no subclassing, but instead
implementing parts of the classes/methods per-platform.

This commit removes the last pieces: KRenderingDevice & KRenderingDeviceContext.
This layer was just obsolete, given the powerful GraphicsContext API we have
since quite a while now. All the ugly pushContext/popContext stuff is gone now.

The naming issues Cg vs. CG will be fixed in one shot, when moving the whole
platform/graphics/svg directory down into ksvg2/graphics - as discussed with Darin.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c04b2c58
......@@ -19,9 +19,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/editing
${CMAKE_CURRENT_BINARY_DIR}/html
${CMAKE_CURRENT_SOURCE_DIR}/html
${CMAKE_CURRENT_SOURCE_DIR}/kcanvas
${CMAKE_CURRENT_SOURCE_DIR}/kcanvas/device
${CMAKE_CURRENT_SOURCE_DIR}/kcanvas/device/qt
${CMAKE_CURRENT_SOURCE_DIR}/ksvg2
${CMAKE_CURRENT_SOURCE_DIR}/ksvg2/css
${CMAKE_CURRENT_SOURCE_DIR}/ksvg2/events
......@@ -534,10 +531,6 @@ set (SVG_SOURCES
bindings/js/JSSVGPoint.cpp
bindings/js/JSSVGRect.cpp
kcanvas/device/KRenderingDevice.cpp
kcanvas/device/qt/KRenderingDeviceQt.cpp
kcanvas/device/qt/RenderPathQt.cpp
ksvg2/css/SVGCSSParser.cpp
ksvg2/css/SVGCSSStyleSelector.cpp
ksvg2/css/SVGRenderStyle.cpp
......@@ -1073,6 +1066,7 @@ set(WebCore_SRCS
platform/graphics/svg/filters/SVGFilterEffect.cpp
platform/graphics/svg/filters/SVGLightSource.cpp
platform/graphics/svg/qt/RenderPathQt.cpp
platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp
platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp
......
2006-11-30 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Rubber stamped by Oliver.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=10383
This is the final patch after the long "die kcanvas" journey.
All old kcanvas code is gone now, and properly integrated within
WebCore (stuff like GraphicsContext changes etc.). It shares
the platform/ design concept: no subclassing, but instead
implementing parts of the classes/methods per-platform.
This commit removes the last pieces: KRenderingDevice & KRenderingDeviceContext.
This layer was just obsolete, given the powerful GraphicsContext API we have
since quite a while now. All the ugly pushContext/popContext stuff is gone now.
LayoutTests affected: svg/W3C-SVG-1.1/pservers-grad-11-b.svg
Radial gradients as fill color for texts, work again!
Though "Gradient on text stroke" remains broken. Funny thing:
With this patch, if you "select" the text using the mouse, as
soon as the selection rectangle is drawn, you see the correct
gradient on stroke rendering - at least a hint where it breaks!
All svg layout tests have subtle text rendering changes - with and without this
patch, it seems it was forgotton to update svg pixel test baseline, a while ago.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* kcanvas/device/KRenderingDevice.cpp: Removed.
* kcanvas/device/KRenderingDevice.h: Removed.
* kcanvas/device/qt/KRenderingDeviceQt.cpp: Removed.
* kcanvas/device/qt/KRenderingDeviceQt.h: Removed.
* kcanvas/device/qt/RenderPathQt.cpp: Moved to platform/graphics/qt
* kcanvas/device/quartz/KCanvasItemQuartz.cpp: Moved to platform/graphics/svg/cg/RenderPathCg.cpp
* kcanvas/device/quartz/KRenderingDeviceQuartz.cpp: Removed.
* kcanvas/device/quartz/KRenderingDeviceQuartz.h: Removed.
* kcanvas/device/quartz/QuartzSupport.cpp: Moved to platform/graphics/svg/cg/CgSupport.cpp
* kcanvas/device/quartz/QuartzSupport.h: Moved to platform/graphics/svg/cg/CgSupport.h
* ksvg2/misc/KCanvasRenderingStyle.cpp:
(WebCore::sharedSolidPaintServer):
* ksvg2/misc/KCanvasRenderingStyle.h:
* ksvg2/svg/SVGAElement.cpp:
* ksvg2/svg/SVGClipPathElement.cpp:
* ksvg2/svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::filterEffect):
* ksvg2/svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::filterEffect):
* ksvg2/svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
(WebCore::SVGFEComponentTransferElement::parseMappedAttribute):
(WebCore::SVGFEComponentTransferElement::filterEffect):
* ksvg2/svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::SVGFECompositeElement):
(WebCore::SVGFECompositeElement::filterEffect):
* ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
(WebCore::SVGFEDiffuseLightingElement::filterEffect):
(WebCore::SVGFEDiffuseLightingElement::updateLights):
* ksvg2/svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::filterEffect):
* ksvg2/svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
(WebCore::SVGFEDistantLightElement::lightSource):
* ksvg2/svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::SVGFEFloodElement):
(WebCore::SVGFEFloodElement::parseMappedAttribute):
(WebCore::SVGFEFloodElement::filterEffect):
* ksvg2/svg/SVGFEFuncAElement.cpp:
* ksvg2/svg/SVGFEFuncBElement.cpp:
* ksvg2/svg/SVGFEFuncGElement.cpp:
(WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
* ksvg2/svg/SVGFEFuncRElement.cpp:
* ksvg2/svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::filterEffect):
* ksvg2/svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::SVGFEImageElement):
(WebCore::SVGFEImageElement::parseMappedAttribute):
(WebCore::SVGFEImageElement::notifyFinished):
(WebCore::SVGFEImageElement::filterEffect):
* ksvg2/svg/SVGFELightElement.cpp:
* ksvg2/svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::filterEffect):
* ksvg2/svg/SVGFEMergeNodeElement.cpp:
* ksvg2/svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
(WebCore::SVGFEOffsetElement::parseMappedAttribute):
(WebCore::SVGFEOffsetElement::filterEffect):
* ksvg2/svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::lightSource):
* ksvg2/svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
(WebCore::SVGFESpecularLightingElement::filterEffect):
(WebCore::SVGFESpecularLightingElement::updateLights):
* ksvg2/svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::SVGFESpotLightElement):
(WebCore::SVGFESpotLightElement::lightSource):
* ksvg2/svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::SVGFETileElement):
(WebCore::SVGFETileElement::parseMappedAttribute):
(WebCore::SVGFETileElement::filterEffect):
* ksvg2/svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::filterEffect):
* ksvg2/svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::canvasResource):
* ksvg2/svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::canvasResource):
* ksvg2/svg/SVGLinearGradientElement.cpp:
* ksvg2/svg/SVGMarkerElement.cpp:
* ksvg2/svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::parseMappedAttribute):
(WebCore::SVGMaskElement::drawMaskerContent):
(WebCore::SVGMaskElement::canvasResource):
* ksvg2/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::drawPatternContentIntoTile):
(WebCore::SVGPatternElement::canvasResource):
* ksvg2/svg/SVGStyledElement.cpp:
* ksvg2/svg/SVGStyledElement.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/svg/SVGPaintServer.h:
* platform/graphics/svg/SVGPaintServerGradient.cpp:
(WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
* platform/graphics/svg/SVGPaintServerGradient.h:
* platform/graphics/svg/SVGPaintServerLinearGradient.h:
* platform/graphics/svg/SVGPaintServerPattern.h:
* platform/graphics/svg/SVGPaintServerRadialGradient.h:
* platform/graphics/svg/SVGPaintServerSolid.h:
* platform/graphics/svg/SVGResource.cpp:
* platform/graphics/svg/SVGResource.h:
* platform/graphics/svg/SVGResourceClipper.h:
* platform/graphics/svg/SVGResourceFilter.h:
* platform/graphics/svg/SVGResourceMasker.h:
* platform/graphics/svg/cg/RenderPathCg.cpp: Added.
* platform/graphics/svg/cg/SVGPaintServerCg.cpp:
(WebCore::SVGPaintServer::draw):
(WebCore::SVGPaintServer::teardown):
(WebCore::SVGPaintServer::renderPath):
* platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
(WebCore::SVGPaintServerGradient::teardown):
(WebCore::SVGPaintServerGradient::renderPath):
(WebCore::SVGPaintServerGradient::setup):
* platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
(WebCore::SVGPaintServerPattern::setup):
(WebCore::SVGPaintServerPattern::teardown):
* platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
(WebCore::SVGPaintServerSolid::setup):
* platform/graphics/svg/cg/SVGResourceClipperCg.cpp:
(WebCore::SVGResourceClipper::applyClip):
* platform/graphics/svg/cg/SVGResourceFilterCg.mm:
(WebCore::SVGResourceFilter::SVGResourceFilter):
(WebCore::SVGResourceFilter::createFilterEffect):
(WebCore::SVGResourceFilter::prepareFilter):
(WebCore::SVGResourceFilter::applyFilter):
* platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
(WebCore::SVGResourceMasker::applyMask):
* platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
* platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
(WebCore::SVGPaintServerLinearGradient::setup):
* platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
(WebCore::SVGPaintServerPattern::setup):
* platform/graphics/svg/qt/SVGPaintServerQt.cpp:
(WebCore::SVGPaintServer::draw):
(WebCore::SVGPaintServer::teardown):
(WebCore::SVGPaintServer::renderPath):
* platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
(WebCore::setup):
* platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
(WebCore::SVGPaintServerSolid::setup):
* platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
(WebCore::SVGResourceClipper::applyClip):
* platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
(WebCore::SVGResourceFilter::createFilterEffect):
(WebCore::SVGResourceFilter::prepareFilter):
(WebCore::SVGResourceFilter::applyFilter):
* platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
(WebCore::SVGResourceMasker::applyMask):
* platform/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::beginPath):
(WebCore::GraphicsContext::addPath):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::currentPath):
(WebCore::GraphicsContext::strokeRect):
(WebCore::contextForImage):
* rendering/RenderForeignObject.cpp:
(WebCore::RenderForeignObject::paint):
* rendering/RenderPath.cpp:
(WebCore::RenderPath::paint):
* rendering/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* rendering/RenderSVGImage.h:
* rendering/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::RenderSVGInline):
(WebCore::RenderSVGInline::createInlineBox):
* rendering/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::RenderSVGInlineText):
* rendering/RenderSVGTSpan.cpp:
(WebCore::RenderSVGTSpan::RenderSVGTSpan):
* rendering/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint):
* rendering/SVGInlineFlowBox.cpp:
(WebCore::paintSVGInlineFlow):
* rendering/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
2006-11-30 Geoffrey Garen <ggaren@apple.com>
 
Reviewed by Beth Dakin.
......@@ -1836,13 +1836,6 @@
A871DFE30A15376B00B12A68 /* RenderReplaced.h in Headers */ = {isa = PBXBuildFile; fileRef = A871DFDF0A15376B00B12A68 /* RenderReplaced.h */; settings = {ATTRIBUTES = (Private, ); }; };
A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = A871DFE00A15376B00B12A68 /* RenderWidget.h */; };
A871DFE50A15376B00B12A68 /* RenderWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A871DFE10A15376B00B12A68 /* RenderWidget.cpp */; };
A88AD3860952486D001DD196 /* KRenderingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB54089701F700BA5114 /* KRenderingDevice.cpp */; };
A88AD3870952486D001DD196 /* KRenderingDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB55089701F700BA5114 /* KRenderingDevice.h */; };
A88AD3AD0952486D001DD196 /* KCanvasItemQuartz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.cpp */; };
A88AD3B00952486E001DD196 /* KRenderingDeviceQuartz.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB71089701F800BA5114 /* KRenderingDeviceQuartz.h */; };
A88AD3B10952486E001DD196 /* KRenderingDeviceQuartz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB72089701F800BA5114 /* KRenderingDeviceQuartz.cpp */; };
A88AD3B50952486E001DD196 /* QuartzSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB76089701F800BA5114 /* QuartzSupport.h */; };
A88AD3B60952486E001DD196 /* QuartzSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB77089701F800BA5114 /* QuartzSupport.cpp */; };
A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */; };
A88AD402095248F0001DD196 /* SVGRenderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F700089701F100BA5114 /* SVGRenderStyle.h */; settings = {ATTRIBUTES = (Private, ); }; };
A88AD403095248F0001DD196 /* SVGRenderStyleDefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F701089701F100BA5114 /* SVGRenderStyleDefs.cpp */; };
......@@ -2233,13 +2226,15 @@
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 */; };
B2310B760B1F46A200D55D87 /* CgSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2310B730B1F46A200D55D87 /* CgSupport.cpp */; };
B2310B770B1F46A200D55D87 /* CgSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = B2310B740B1F46A200D55D87 /* CgSupport.h */; };
B2310B780B1F46A300D55D87 /* RenderPathCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2310B750B1F46A200D55D87 /* RenderPathCg.cpp */; };
B27535560B053814002CE64F /* AffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535270B053814002CE64F /* AffineTransform.cpp */; };
B27535570B053814002CE64F /* AffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535280B053814002CE64F /* AffineTransform.h */; };
B27535580B053814002CE64F /* AffineTransformCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352A0B053814002CE64F /* AffineTransformCG.cpp */; };
B27535590B053814002CE64F /* FloatPointCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352B0B053814002CE64F /* FloatPointCG.cpp */; };
B275355A0B053814002CE64F /* FloatRectCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352C0B053814002CE64F /* FloatRectCG.cpp */; };
B275355B0B053814002CE64F /* FloatSizeCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352D0B053814002CE64F /* FloatSizeCG.cpp */; };
B275355C0B053814002CE64F /* GraphicsContextCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352E0B053814002CE64F /* GraphicsContextCG.cpp */; };
B275355D0B053814002CE64F /* GraphicsContextPlatformPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B275352F0B053814002CE64F /* GraphicsContextPlatformPrivate.h */; };
B275355E0B053814002CE64F /* ImageCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535300B053814002CE64F /* ImageCG.cpp */; };
B275355F0B053814002CE64F /* ImageSourceCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535310B053814002CE64F /* ImageSourceCG.cpp */; };
......@@ -2416,6 +2411,7 @@
B2E27CA00B0F2B0900F17C7B /* FloatPoint3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */; };
B2EBDC9C0AF77E3400AE4A68 /* SVGRenderTreeAsText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2EBDC9A0AF77E3400AE4A68 /* SVGRenderTreeAsText.cpp */; };
B2EBDC9D0AF77E3400AE4A68 /* SVGRenderTreeAsText.h in Headers */ = {isa = PBXBuildFile; fileRef = B2EBDC9B0AF77E3400AE4A68 /* SVGRenderTreeAsText.h */; };
B2ED97710B1F55CE00257D0F /* GraphicsContextCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */; };
B2FA3D360AB75A6F000E5AC4 /* JSSVGAnimateColorElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2FA3C4E0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.cpp */; };
B2FA3D370AB75A6F000E5AC4 /* JSSVGAnimateColorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B2FA3C4F0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.h */; };
B2FA3D380AB75A6F000E5AC4 /* JSSVGAnimatedAngle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2FA3C500AB75A6E000E5AC4 /* JSSVGAnimatedAngle.cpp */; };
......@@ -5001,13 +4997,6 @@
A8C0F8EA089701F400BA5114 /* SVGViewElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F8EB089701F400BA5114 /* SVGZoomAndPan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGZoomAndPan.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F8EC089701F400BA5114 /* SVGZoomAndPan.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGZoomAndPan.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB54089701F700BA5114 /* KRenderingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRenderingDevice.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB55089701F700BA5114 /* KRenderingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KRenderingDevice.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasItemQuartz.cpp; 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.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRenderingDeviceQuartz.cpp; 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.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QuartzSupport.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C3295C093BB7B2000B9CAC /* SVGFELightElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGFELightElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C3295D093BB7B2000B9CAC /* SVGFELightElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFELightElement.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C3295E093BB7B2000B9CAC /* SVGFEDistantLightElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEDistantLightElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
......@@ -5190,13 +5179,15 @@
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>"; };
B2310B730B1F46A200D55D87 /* CgSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CgSupport.cpp; sourceTree = "<group>"; };
B2310B740B1F46A200D55D87 /* CgSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CgSupport.h; sourceTree = "<group>"; };
B2310B750B1F46A200D55D87 /* RenderPathCg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderPathCg.cpp; sourceTree = "<group>"; };
B27535270B053814002CE64F /* AffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AffineTransform.cpp; sourceTree = "<group>"; };
B27535280B053814002CE64F /* AffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AffineTransform.h; sourceTree = "<group>"; };
B275352A0B053814002CE64F /* AffineTransformCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AffineTransformCG.cpp; sourceTree = "<group>"; };
B275352B0B053814002CE64F /* FloatPointCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPointCG.cpp; sourceTree = "<group>"; };
B275352C0B053814002CE64F /* FloatRectCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatRectCG.cpp; sourceTree = "<group>"; };
B275352D0B053814002CE64F /* FloatSizeCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatSizeCG.cpp; sourceTree = "<group>"; };
B275352E0B053814002CE64F /* GraphicsContextCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextCG.cpp; sourceTree = "<group>"; };
B275352F0B053814002CE64F /* GraphicsContextPlatformPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsContextPlatformPrivate.h; sourceTree = "<group>"; };
B27535300B053814002CE64F /* ImageCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageCG.cpp; sourceTree = "<group>"; };
B27535310B053814002CE64F /* ImageSourceCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSourceCG.cpp; sourceTree = "<group>"; };
......@@ -5491,6 +5482,7 @@
B2E9548E0AB5FBA30076DE37 /* SVGPreserveAspectRatio.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGPreserveAspectRatio.idl; sourceTree = "<group>"; };
B2EBDC9A0AF77E3400AE4A68 /* SVGRenderTreeAsText.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGRenderTreeAsText.cpp; sourceTree = "<group>"; };
B2EBDC9B0AF77E3400AE4A68 /* SVGRenderTreeAsText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGRenderTreeAsText.h; sourceTree = "<group>"; };
B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextCG.cpp; sourceTree = "<group>"; };
B2FA3C4E0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGAnimateColorElement.cpp; sourceTree = "<group>"; };
B2FA3C4F0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGAnimateColorElement.h; sourceTree = "<group>"; };
B2FA3C500AB75A6E000E5AC4 /* JSSVGAnimatedAngle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGAnimatedAngle.cpp; sourceTree = "<group>"; };
......@@ -5995,7 +5987,6 @@
F523D32402DE4478018635CA /* dom */,
93309D86099E64910056E581 /* editing */,
93EEC1EC09C2877700C515D1 /* html */,
A8C0FB51089701F700BA5114 /* kcanvas */,
A8C0F6E9089701F100BA5114 /* ksvg2 */,
BCB16BFB0979C38700467741 /* loader */,
65BF02180974806300C43196 /* page */,
......@@ -8374,36 +8365,6 @@
path = svg;
sourceTree = "<group>";
};
A8C0FB51089701F700BA5114 /* kcanvas */ = {
isa = PBXGroup;
children = (
A8C0FB53089701F700BA5114 /* device */,
);
path = kcanvas;
sourceTree = "<group>";
};
A8C0FB53089701F700BA5114 /* device */ = {
isa = PBXGroup;
children = (
A8C0FB54089701F700BA5114 /* KRenderingDevice.cpp */,
A8C0FB55089701F700BA5114 /* KRenderingDevice.h */,
A8C0FB68089701F800BA5114 /* quartz */,
);
path = device;
sourceTree = "<group>";
};
A8C0FB68089701F800BA5114 /* quartz */ = {
isa = PBXGroup;
children = (
A8C0FB6C089701F800BA5114 /* KCanvasItemQuartz.cpp */,
A8C0FB71089701F800BA5114 /* KRenderingDeviceQuartz.h */,
A8C0FB72089701F800BA5114 /* KRenderingDeviceQuartz.cpp */,
A8C0FB76089701F800BA5114 /* QuartzSupport.h */,
A8C0FB77089701F800BA5114 /* QuartzSupport.cpp */,
);
path = quartz;
sourceTree = "<group>";
};
B27535290B053814002CE64F /* cg */ = {
isa = PBXGroup;
children = (
......@@ -8411,7 +8372,7 @@
B275352B0B053814002CE64F /* FloatPointCG.cpp */,
B275352C0B053814002CE64F /* FloatRectCG.cpp */,
B275352D0B053814002CE64F /* FloatSizeCG.cpp */,
B275352E0B053814002CE64F /* GraphicsContextCG.cpp */,
B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */,
B275352F0B053814002CE64F /* GraphicsContextPlatformPrivate.h */,
B27535300B053814002CE64F /* ImageCG.cpp */,
B27535310B053814002CE64F /* ImageSourceCG.cpp */,
......@@ -8516,6 +8477,9 @@
B2A015970AF6CD53006BCE0E /* cg */ = {
isa = PBXGroup;
children = (
B2310B730B1F46A200D55D87 /* CgSupport.cpp */,
B2310B740B1F46A200D55D87 /* CgSupport.h */,
B2310B750B1F46A200D55D87 /* RenderPathCg.cpp */,
B2D87C830B124E9500B0DE1E /* SVGPaintServerCg.cpp */,
B2D87C840B124E9500B0DE1E /* SVGPaintServerGradientCg.cpp */,
B2D87C850B124E9500B0DE1E /* SVGPaintServerPatternCg.cpp */,
......@@ -9457,9 +9421,6 @@
7E6FEED80898582300C44C3F /* WebCoreScriptDebugger.h in Headers */,
939885C408B7E3D100E707C4 /* EventNames.h in Headers */,
65C97AF308EA908800ACD273 /* config.h in Headers */,
A88AD3870952486D001DD196 /* KRenderingDevice.h in Headers */,
A88AD3B00952486E001DD196 /* KRenderingDeviceQuartz.h in Headers */,
A88AD3B50952486E001DD196 /* QuartzSupport.h in Headers */,
A88AD402095248F0001DD196 /* SVGRenderStyle.h in Headers */,
A88AD404095248F0001DD196 /* SVGRenderStyleDefs.h in Headers */,
A88AD40B095248F0001DD196 /* SVGZoomEvent.h in Headers */,
......@@ -10839,6 +10800,7 @@
A7352C1A0B1BB89D00A986D0 /* RenderSVGBlock.h in Headers */,
4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */,
06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */,
B2310B770B1F46A200D55D87 /* CgSupport.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -11039,10 +11001,6 @@
BCEF3434087B563E00BBF833 /* HTMLElementFactory.cpp in Sources */,
7E6FEED90898582300C44C3F /* WebCoreScriptDebugger.mm in Sources */,
939885C308B7E3D100E707C4 /* EventNames.cpp in Sources */,
A88AD3860952486D001DD196 /* KRenderingDevice.cpp in Sources */,
A88AD3AD0952486D001DD196 /* KCanvasItemQuartz.cpp in Sources */,
A88AD3B10952486E001DD196 /* KRenderingDeviceQuartz.cpp in Sources */,
A88AD3B60952486E001DD196 /* QuartzSupport.cpp in Sources */,
A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */,
A88AD403095248F0001DD196 /* SVGRenderStyleDefs.cpp in Sources */,
A88AD40A095248F0001DD196 /* SVGZoomEvent.cpp in Sources */,
......@@ -12063,7 +12021,6 @@
B27535590B053814002CE64F /* FloatPointCG.cpp in Sources */,
B275355A0B053814002CE64F /* FloatRectCG.cpp in Sources */,
B275355B0B053814002CE64F /* FloatSizeCG.cpp in Sources */,
B275355C0B053814002CE64F /* GraphicsContextCG.cpp in Sources */,
B275355E0B053814002CE64F /* ImageCG.cpp in Sources */,
B275355F0B053814002CE64F /* ImageSourceCG.cpp in Sources */,
B27535600B053814002CE64F /* IntPointCG.cpp in Sources */,
......@@ -12156,6 +12113,9 @@
1AD8CFCE0B1CED8900696DE0 /* ResourceRequest.cpp in Sources */,
06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */,
1A8180A50B1D4E4300CE46C4 /* ResourceResponse.cpp in Sources */,
B2310B760B1F46A200D55D87 /* CgSupport.cpp in Sources */,
B2310B780B1F46A300D55D87 /* RenderPathCg.cpp in Sources */,
B2ED97710B1F55CE00257D0F /* GraphicsContextCG.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/*
Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
2006 Alexander Kellett <lypanov@kde.org>
This file is part of the KDE project
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
aint with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "config.h"
#ifdef SVG_SUPPORT
#include "KRenderingDevice.h"
namespace WebCore {
KRenderingDevice::KRenderingDevice()
{
}
KRenderingDevice::~KRenderingDevice()
{
}
KRenderingDeviceContext* KRenderingDevice::currentContext() const
{
if (m_contextStack.isEmpty())
return 0;
return m_contextStack.last();
}
KRenderingDeviceContext* KRenderingDevice::popContext()
{
KRenderingDeviceContext* result = m_contextStack.last();
m_contextStack.removeLast();
return result;
}
void KRenderingDevice::pushContext(KRenderingDeviceContext* context)
{
m_contextStack.append(context);
}
}
// vim:ts=4:noet
#endif // SVG_SUPPORT
/*
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 KRenderingDevice_H
#define KRenderingDevice_H
#ifdef SVG_SUPPORT
#include "SVGFilterEffect.h"
#include "SVGPaintServer.h"
namespace WebCore {
class AffineTransform;
class GraphicsContext;
class Path;
// aka where to draw
class KRenderingDeviceContext
{
public:
KRenderingDeviceContext() { }
virtual ~KRenderingDeviceContext() { }
virtual AffineTransform concatCTM(const AffineTransform&) = 0;
virtual AffineTransform ctm() const = 0;
virtual void clearPath() = 0;
virtual void addPath(const Path&) = 0;
virtual GraphicsContext* createGraphicsContext() = 0;
};
class SVGResourceImage;
class SVGResourceFilterEffect;
class KRenderingDevice
{
public:
KRenderingDevice();
virtual ~KRenderingDevice();
// The rendering device will be directly inited
// after the canvas target, it may be overwritten.
virtual bool isBuffered() const = 0;
// Global rendering device context
KRenderingDeviceContext* currentContext() const;
virtual KRenderingDeviceContext* popContext();
virtual void pushContext(KRenderingDeviceContext*);
virtual KRenderingDeviceContext* contextForImage(SVGResourceImage*) const = 0;
// Creation tools
virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const = 0;
virtual SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&) const = 0;
virtual PassRefPtr<SVGPaintServer> createPaintServer(const SVGPaintServerType&) const = 0;
private:
Vector<KRenderingDeviceContext*> m_contextStack;
};
KRenderingDevice* renderingDevice(); /* returns the single global rendering device */
}
#endif // SVG_SUPPORT
#endif
// vim:ts=4:noet
/*
Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
2004, 2005, 2006 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 General Public License
along with this program; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "IntRect.h"
#include "RenderPath.h"
#include "AffineTransform.h"
#include "GraphicsContext.h"
#include "SVGResourceClipper.h"
#include "SVGResourceMarker.h"
#include "KRenderingDeviceQt.h"
#include "SVGPaintServerSolid.h"
#include "SVGPaintServerLinearGradient.h"
#include "SVGPaintServerRadialGradient.h"
#include "SVGPaintServerPattern.h"
namespace WebCore {
KRenderingDeviceContextQt::KRenderingDeviceContextQt(QPainter* painter)
: m_painter(painter)
, m_path()
{
Q_ASSERT(m_painter != 0);
}
KRenderingDeviceContextQt::~KRenderingDeviceContextQt()
{
}
AffineTransform KRenderingDeviceContextQt::concatCTM(const AffineTransform& worldMatrix)
{
AffineTransform ret = ctm();
m_painter->setMatrix(worldMatrix, true);
return ret;
}