commit | 30faed44834e53958ee41161cefa9f2069db8bfe | [log] [tgz] |
---|---|---|
author | commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Tue Mar 26 01:26:11 2019 +0000 |
committer | commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Tue Mar 26 01:26:11 2019 +0000 |
tree | b13978fec552e1cad3b4a74ee3fd1b69455ff78b | |
parent | 29467c3caa8edeafb995a492d3b6134e9742f904 [diff] |
Remove the SVG tear off objects for SVGAngle, SVGAnimatedAngle and SVGAnimatedEnumeration https://bugs.webkit.org/show_bug.cgi?id=196087 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-03-25 Reviewed by Simon Fraser. Source/WebCore: In this patch, the tear off objects for SVGAnimatedEnumeration will be removed. Because the angle is paired with the orient type so its tear off objects have to be removed as well. Here is what this patch does: -- SVGAngle is now a superclass of SVGValueProperty<SVGAngleValue>. Its relationship with its owner will be managed by the owner of its base class SVGProperty. -- SVGAnimatedAngle is now defined to be SVGAnimatedValueProperty< SVGAngle>. All the DOM interfaces will be handled by the base class given its baseVal and animVal are of type SVGAngle. -- SVGAnimatedEnumeration is now defined to be SVGAnimatedDecoratedProperty<SVGDecoratedEnumeration, unsigned>. This can be read: SVGAnimatedEnumeration is an SVGAnimatedProperty which decorates the "SVGDecoratedEnumeration" type to "unsigned". The reason for this complication is the IDL of SVGAnimatedEnumeration defines the baseVal and animVal are of type unsigned. However SVGAnimatedEnumeration should be able to convert a string to its enum value and vice versa. -- SVGAnimatedDecoratedProperty is a template class which maps from DecoratedProperty to DecorationType. The DecoratedProperty is actually a template class which exposes a property of type DecorationType. -- SVGDecoratedProperty is an abstract class which manages setting and getting a property in DecorationType regardless of how it is actually stored. -- SVGDecoratedPrimitive is a superclass of SVGDecoratedProperty which stores a primitive property whose type is PropertyType but can decorate it to the callers as DecorationType. -- SVGDecoratedEnumeration is a superclass of SVGDecoratedPrimitive which stores a primitive type DecorationType like "BlendMode" but decorates it as "unsigned" To get the mechanics of this change correct, new accessors, animators and animation functions need to be added for SVGAnimatedAngle, SVGAnimatedEnumeration and SVGAnimatedOrientType. But since angle and the orient type are paired under a single attribute, a pair accessor and animator are also needed for the pair { angle, orientType }. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAngle.h: (WebCore::SVGAngle::create): (WebCore::SVGAngle::unitType): (WebCore::SVGAngle::setValueForBindings): (WebCore::SVGAngle::valueForBindings): (WebCore::SVGAngle::setValueInSpecifiedUnits): (WebCore::SVGAngle::valueInSpecifiedUnits): (WebCore::SVGAngle::setValueAsString): (WebCore::SVGAngle::newValueSpecifiedUnits): (WebCore::SVGAngle::convertToSpecifiedUnits): (WebCore::SVGAngle::valueAsString): Deleted. (WebCore::SVGAngle::SVGAngle): Deleted. * svg/SVGAnimatedAngle.cpp: Removed. * svg/SVGAnimatedAngle.h: Removed. * svg/SVGAnimatedEnumeration.cpp: Removed. * svg/SVGAnimatedEnumeration.h: Removed. * svg/SVGAnimatedType.h: (WebCore::SVGAnimatedType::type const): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::SVGClipPathElement): (WebCore::SVGClipPathElement::parseAttribute): (WebCore::SVGClipPathElement::svgAttributeChanged): (WebCore::SVGClipPathElement::registerAttributes): Deleted. * svg/SVGClipPathElement.h: * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): (WebCore::SVGComponentTransferFunctionElement::parseAttribute): (WebCore::SVGComponentTransferFunctionElement::registerAttributes): Deleted. * svg/SVGComponentTransferFunctionElement.h: (WebCore::SVGComponentTransferFunctionElement::type const): (WebCore::SVGComponentTransferFunctionElement::typeAnimated): (WebCore::SVGComponentTransferFunctionElement::attributeRegistry): Deleted. (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute): Deleted. * svg/SVGElement.cpp: (WebCore::SVGElement::commitPropertyChange): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::SVGFEBlendElement): (WebCore::SVGFEBlendElement::parseAttribute): (WebCore::SVGFEBlendElement::registerAttributes): Deleted. * svg/SVGFEBlendElement.h: (WebCore::SVGPropertyTraits<BlendMode>::fromString): * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): (WebCore::SVGFEColorMatrixElement::parseAttribute): (WebCore::SVGFEColorMatrixElement::registerAttributes): Deleted. * svg/SVGFEColorMatrixElement.h: * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::SVGFECompositeElement): (WebCore::SVGFECompositeElement::parseAttribute): (WebCore::SVGFECompositeElement::registerAttributes): Deleted. * svg/SVGFECompositeElement.h: * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement): (WebCore::SVGFEConvolveMatrixElement::parseAttribute): (WebCore::SVGFEConvolveMatrixElement::registerAttributes): Deleted. * svg/SVGFEConvolveMatrixElement.h: * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement): (WebCore::SVGFEDisplacementMapElement::parseAttribute): (WebCore::SVGFEDisplacementMapElement::registerAttributes): Deleted. * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement): (WebCore::SVGFEGaussianBlurElement::parseAttribute): (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): (WebCore::SVGFEGaussianBlurElement::registerAttributes): Deleted. * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement): (WebCore::SVGFEMorphologyElement::parseAttribute): (WebCore::SVGFEMorphologyElement::registerAttributes): Deleted. * svg/SVGFEMorphologyElement.h: * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement): (WebCore::SVGFETurbulenceElement::parseAttribute): (WebCore::SVGFETurbulenceElement::svgAttributeChanged): (WebCore::SVGFETurbulenceElement::registerAttributes): Deleted. * svg/SVGFETurbulenceElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::SVGFilterElement): (WebCore::SVGFilterElement::registerAttributes): (WebCore::SVGFilterElement::parseAttribute): * svg/SVGFilterElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::registerAttributes): (WebCore::SVGGradientElement::parseAttribute): * svg/SVGGradientElement.h: (WebCore::SVGGradientElement::spreadMethod const): (WebCore::SVGGradientElement::gradientUnits const): (WebCore::SVGGradientElement::spreadMethodAnimated): (WebCore::SVGGradientElement::gradientUnitsAnimated): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::SVGMarkerElement): (WebCore::SVGMarkerElement::registerAttributes): (WebCore::SVGMarkerElement::parseAttribute): (WebCore::SVGMarkerElement::setOrient): (WebCore::SVGMarkerElement::setOrientToAngle): (WebCore::SVGMarkerElement::orientTypeIdentifier): Deleted. (WebCore::SVGMarkerElement::orientAngleIdentifier): Deleted. * svg/SVGMarkerElement.h: * svg/SVGMarkerTypes.h: (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoString): (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::autoStartReverseString): (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString): (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::toString): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::SVGMaskElement): (WebCore::SVGMaskElement::registerAttributes): (WebCore::SVGMaskElement::parseAttribute): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::registerAttributes): (WebCore::SVGPatternElement::parseAttribute): * svg/SVGPatternElement.h: * svg/SVGSVGElement.cpp: * svg/SVGScriptElement.cpp: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::SVGTextContentElement): (WebCore::SVGTextContentElement::registerAttributes): (WebCore::SVGTextContentElement::parseAttribute): * svg/SVGTextContentElement.h: (WebCore::SVGTextContentElement::lengthAdjust const): (WebCore::SVGTextContentElement::lengthAdjustAnimated): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): (WebCore::SVGTextPathElement::registerAttributes): (WebCore::SVGTextPathElement::parseAttribute): * svg/SVGTextPathElement.h: * svg/SVGValue.h: * svg/properties/SVGAnimatedDecoratedProperty.h: Added. (WebCore::SVGAnimatedDecoratedProperty::create): (WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty): (WebCore::SVGAnimatedDecoratedProperty::setBaseVal): (WebCore::SVGAnimatedDecoratedProperty::setBaseValInternal): (WebCore::SVGAnimatedDecoratedProperty::baseVal const): (WebCore::SVGAnimatedDecoratedProperty::setAnimVal): (WebCore::SVGAnimatedDecoratedProperty::animVal const): (WebCore::SVGAnimatedDecoratedProperty::currentValue const): * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Removed. * svg/properties/SVGAnimatedPropertyAccessorImpl.h: * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyImpl.h: (WebCore::SVGAnimatedOrientType::create): * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimator.h: (WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance): * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Removed. * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: (WebCore::SVGAnimationAngleFunction::progress): * svg/properties/SVGAnimationDiscreteFunctionImpl.h: * svg/properties/SVGAttributeRegistry.h: * svg/properties/SVGDecoratedEnumeration.h: Added. (WebCore::SVGDecoratedEnumeration::create): * svg/properties/SVGDecoratedPrimitive.h: Added. (WebCore::SVGDecoratedPrimitive::SVGDecoratedPrimitive): * svg/properties/SVGDecoratedProperty.h: Added. (WebCore::SVGDecoratedProperty::setValue): (WebCore::SVGDecoratedProperty::value const): * svg/properties/SVGPropertyOwnerRegistry.h: (WebCore::SVGPropertyOwnerRegistry::registerProperty): (WebCore::SVGPropertyOwnerRegistry::isAnimatedLengthAttribute): * svg/properties/SVGPropertyRegistry.h: * svg/properties/SVGStaticPropertyTearOff.h: Removed. LayoutTests: * svg/dom/SVGAnimatedEnumeration-SVGMarkerElement-expected.txt: * svg/dom/SVGAnimatedEnumeration-SVGMarkerElement.html: Fixes cases that the tear off objects could not handle correctly for the paired { angle, orientType }. Also when setting the orient type to "auto" or "auto-start-reverse", the orient angle should be reset to SVG_ANGLETYPE_UNSPECIFIED and is not suppsed to keep its original value. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@243478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
Visit WebKit Feature Status page to see which Web API has been implemented, in development, or under consideration.
On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.
Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.
On Windows, follow the instructions on our website.
Run the following command to clone WebKit's Git SVN repository:
git clone git://git.webkit.org/WebKit.git WebKit
or
git clone https://git.webkit.org/git/WebKit.git WebKit
If you want to be able to commit changes to the repository, or just want to check out branches that aren’t contained in WebKit.git, you will need track WebKit's Subversion repository. You can run the following command to configure this and other options of the new Git clone for WebKit development.
Tools/Scripts/webkit-patch setup-git-clone
For information about this, and other aspects of using Git with WebKit, read the wiki page.
If you don‘t want to use Git, run the following command to check out WebKit’s Subversion repository:
svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
Install Xcode and its command line tools if you haven't done so already:
xcode-select --install
Run the following command to build a debug build with debugging symbols and assertions:
Tools/Scripts/build-webkit --debug
For performance testing, and other purposes, use --release
instead.
You can open WebKit.xcworkspace
to build and debug WebKit within Xcode.
If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild
directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select “Custom”, “Relative to Workspace”, and enter WebKitBuild
for both Products and Intermediates.
The first time after you install a new Xcode, you will need to run the following command to enable Xcode to build command line tools for iOS Simulator:
sudo Tools/Scripts/configure-xcode-for-ios-development
Without this step, you will see the error message: “target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.
” when building target JSCLLIntOffsetsExtractor
of project JavaScriptCore
.
Run the following command to build a debug build with debugging symbols and assertions for iOS:
Tools/Scripts/build-webkit --debug --ios-simulator
For production builds:
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/gtk/install-dependencies Tools/Scripts/update-webkitgtk-libs Tools/Scripts/build-webkit --gtk --debug
For more information on building WebKitGTK+, see the wiki page.
For production builds:
cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/wpe/install-dependencies Tools/Scripts/update-webkitwpe-libs Tools/Scripts/build-webkit --wpe --debug
For building WebKit on Windows, see the wiki page.
Run the following command to launch Safari with your local build of WebKit:
Tools/Scripts/run-safari --debug
The run-safari
script sets the DYLD_FRAMEWORK_PATH
environment variable to point to your build products, and then launches /Applications/Safari.app
. DYLD_FRAMEWORK_PATH
tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks
.
To run other applications with your local build of WebKit, run the following command:
Tools/Scripts/run-webkit-app <application-path>
Run the following command to launch iOS simulator with your local build of WebKit:
run-safari --debug --ios-simulator
In both cases, if you have built release builds instead, use --release
instead of --debug
.
If you have a development build, you can use the run-minibrowser script, e.g.:
run-minibrowser --debug --wpe
Pass one of --gtk
, --jsc-only
, or --wpe
to indicate the port to use.
Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.