Add SVGRenderingContext and move there the context related code from SVGRenderSupport
authorzherczeg@webkit.org <zherczeg@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Mar 2012 12:02:50 +0000 (12:02 +0000)
committerzherczeg@webkit.org <zherczeg@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Mar 2012 12:02:50 +0000 (12:02 +0000)
commitba97da5926acf2ba2534e63262bbb2964e836eba
tree2f35a52c5d18fada5eb34aea3a0fb5a37ab4de12
parent1e08ae0e6d62717b24a0b03c76054091da2b0b7e
Add SVGRenderingContext and move there the context related code from SVGRenderSupport
https://bugs.webkit.org/show_bug.cgi?id=80413

Reviewed by Nikolas Zimmermann.

This is the first step of refactoring the rendering context for SVG. The
previous context was stateless before, which means the cleanup phase
needed to do a lot of checks to revert the initialization part and
was unaware of failed inititalization. Future code can also add
new local variables to the context.

This patch add a new SVGRenderingContext class, and moves there the context
initialization / cleanup code from SVGRenderSupport. All build systems were
updated.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/svg/RenderSVGAllInOne.cpp:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::paint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::paint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint):
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGRenderSupport.h:
* rendering/svg/SVGRenderingContext.cpp: Added.
(WebCore):
(WebCore::isRenderingMaskImage):
(WebCore::SVGRenderingContext::~SVGRenderingContext):
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGRenderingContext.h: Added.
(WebCore):
(SVGRenderingContext):
(WebCore::SVGRenderingContext::SVGRenderingContext):
(WebCore::SVGRenderingContext::isRenderingPrepared):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/svg/RenderSVGAllInOne.cpp
Source/WebCore/rendering/svg/RenderSVGContainer.cpp
Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
Source/WebCore/rendering/svg/RenderSVGImage.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/RenderSVGShape.cpp
Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.h
Source/WebCore/rendering/svg/SVGRenderingContext.cpp [new file with mode: 0644]
Source/WebCore/rendering/svg/SVGRenderingContext.h [new file with mode: 0644]
Source/WebCore/rendering/svg/SVGRootInlineBox.cpp