[SVG] Start moving special casing of SVG out of the bindings - SVGPreserveAspectRatio
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 06:29:44 +0000 (06:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 06:29:44 +0000 (06:29 +0000)
commit87460d3510e34c7da2a40e5b00212c2d0e8f88bb
treea7a803a0799f214edc9c1ca5dfa393ae1d97c469
parent1a261a899b13922acdd69c0770ee44ae3d87a1d0
[SVG] Start moving special casing of SVG out of the bindings - SVGPreserveAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=164622

Patch by Sam Weinig <sam@webkit.org> on 2016-11-10
Reviewed by Darin Adler.

Part 2 of moving special casing of SVG out of the bindings.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/scripts/CodeGenerator.pm:
(GenerateCompileTimeCheckForEnumsIfNeeded):
* bindings/scripts/IDLAttributes.txt:
Allow specifying a different scope for the constants to be declared in.
This allows us to have only one copy of the constants in the implementation
of SVGAngle/SVGAngleValue and SVGPreserveAspectRatio/SVGPreserveAspectRatioValue.

* loader/FrameLoader.cpp:
* rendering/svg/RenderSVGImage.h:
Remove unnecessary #include.

* svg/SVGAngle.h:
Remove redundant enum declaration.

* svg/SVGAngle.idl:
Specify a ConstantsScope of SVGAngleValue.

* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::updateImageViewport):
* svg/PatternAttributes.h:
(WebCore::PatternAttributes::preserveAspectRatio):
(WebCore::PatternAttributes::setPreserveAspectRatio):
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::createPreserveAspectRatio):
* svg/SVGAnimatedType.h:
(WebCore::SVGAnimatedType::preserveAspectRatio):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::parseAttribute):
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::viewBoxToViewTransform):
* svg/SVGFitToViewBox.h:
(WebCore::SVGFitToViewBox::parseAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::parseAttribute):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::preserveAspectRatioString):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::reset):
(WebCore::SVGViewSpec::parseViewSpec):
* svg/SVGViewSpec.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::computeIntrinsicDimensions):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::FEImage):
(WebCore::FEImage::createWithImage):
(WebCore::FEImage::createWithIRIReference):
* svg/graphics/filters/SVGFEImage.h:
Replace SVGPreserveAspectRatio usage with SVGPreserveAspectRatioValue.

* svg/SVGPreserveAspectRatio.cpp: Removed.
* svg/SVGPreserveAspectRatio.h: Replaced.
* svg/SVGPreserveAspectRatio.idl:
* svg/SVGPreserveAspectRatioValue.cpp: Copied from Source/WebCore/svg/SVGPreserveAspectRatio.cpp.
* svg/SVGPreserveAspectRatioValue.h: Copied from Source/WebCore/svg/SVGPreserveAspectRatio.h.
Rename SVGPreserveAspectRatio to SVGPreserveAspectRatioValue and add a new SVGPreserveAspectRatio
that acts as the binding object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/scripts/CodeGenerator.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/rendering/svg/RenderSVGImage.cpp
Source/WebCore/rendering/svg/RenderSVGImage.h
Source/WebCore/svg/PatternAttributes.h
Source/WebCore/svg/SVGAllInOne.cpp
Source/WebCore/svg/SVGAngle.h
Source/WebCore/svg/SVGAngle.idl
Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp
Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
Source/WebCore/svg/SVGAnimatedType.cpp
Source/WebCore/svg/SVGAnimatedType.h
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/SVGFitToViewBox.cpp
Source/WebCore/svg/SVGFitToViewBox.h
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGPreserveAspectRatio.h
Source/WebCore/svg/SVGPreserveAspectRatio.idl
Source/WebCore/svg/SVGPreserveAspectRatioValue.cpp [moved from Source/WebCore/svg/SVGPreserveAspectRatio.cpp with 80% similarity]
Source/WebCore/svg/SVGPreserveAspectRatioValue.h [new file with mode: 0644]
Source/WebCore/svg/SVGViewSpec.cpp
Source/WebCore/svg/SVGViewSpec.h
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.h