Diff
Modified: trunk/Source/WebCore/ChangeLog (242977 => 242978)
--- trunk/Source/WebCore/ChangeLog 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/ChangeLog 2019-03-15 00:15:09 UTC (rev 242978)
@@ -1,3 +1,104 @@
+2019-03-14 Said Abou-Hallawa <[email protected]>
+
+ Rename SVGProperty to SVGLegacyProperty and rename SVGAnimatedProperty to SVGLegacyAnimatedProperty
+ https://bugs.webkit.org/show_bug.cgi?id=195767
+
+ Reviewed by Tim Horton.
+
+ This is a step towards removing the SVG properties tear off objects.
+
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * svg/SVGAngle.h:
+ (WebCore::SVGAngle::create):
+ (WebCore::SVGAngle::SVGAngle):
+ * svg/SVGAnimateElement.h:
+ * svg/SVGAnimatedTypeAnimator.h:
+ (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType):
+ * svg/SVGElement.h:
+ (WebCore::SVGElement::lookupAnimatedProperty const):
+ (WebCore::SVGElement::lookupOrCreateAnimatedProperty):
+ (WebCore::SVGElement::lookupOrCreateAnimatedProperties):
+ * svg/SVGLength.h:
+ (WebCore::SVGLength::create):
+ (WebCore::SVGLength::SVGLength):
+ * svg/SVGMatrix.h:
+ (WebCore::SVGMatrix::create):
+ (WebCore::SVGMatrix::SVGMatrix):
+ * svg/SVGNumber.h:
+ (WebCore::SVGNumber::create):
+ (WebCore::SVGNumber::SVGNumber):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::lookupOrCreateDWrapper):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathSegList.cpp:
+ (WebCore::SVGPathSegList::processIncomingListItemValue):
+ * svg/SVGPathSegWithContext.h:
+ (WebCore::SVGPathSegWithContext::animatedProperty const):
+ * svg/SVGPoint.h:
+ (WebCore::SVGPoint::create):
+ (WebCore::SVGPoint::SVGPoint):
+ * svg/SVGPreserveAspectRatio.h:
+ (WebCore::SVGPreserveAspectRatio::create):
+ (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
+ * svg/SVGRect.h:
+ (WebCore::SVGRect::create):
+ (WebCore::SVGRect::SVGRect):
+ * svg/SVGTransform.h:
+ (WebCore::SVGTransform::create):
+ (WebCore::SVGTransform::SVGTransform):
+ * svg/properties/SVGAnimatedListPropertyTearOff.h:
+ (WebCore::SVGAnimatedListPropertyTearOff::findItem):
+ (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
+ * svg/properties/SVGAnimatedProperty.cpp: Removed.
+ * svg/properties/SVGAnimatedProperty.h: Removed.
+ * svg/properties/SVGAnimatedPropertyTearOff.h:
+ * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
+ (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
+ * svg/properties/SVGAttributeAccessor.h:
+ (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperty const):
+ (WebCore::SVGAttributeAccessor::lookupAnimatedProperty const):
+ (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperties const):
+ (WebCore::SVGAnimatedAttributeAccessor::lookupOrCreateAnimatedProperty):
+ (WebCore::SVGAnimatedAttributeAccessor::lookupAnimatedProperty):
+ * svg/properties/SVGAttributeOwnerProxy.h:
+ * svg/properties/SVGAttributeOwnerProxyImpl.h:
+ * svg/properties/SVGAttributeRegistry.h:
+ (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperty const):
+ (WebCore::SVGAttributeRegistry::lookupAnimatedProperty const):
+ (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperties const):
+ (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertyBaseTypes):
+ (WebCore::SVGAttributeRegistry::lookupAnimatedPropertyBaseTypes):
+ (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertiesBaseTypes):
+ * svg/properties/SVGLegacyAnimatedProperty.cpp: Copied from Source/WebCore/svg/properties/SVGAnimatedProperty.cpp.
+ (WebCore::SVGLegacyAnimatedProperty::SVGLegacyAnimatedProperty):
+ (WebCore::SVGLegacyAnimatedProperty::~SVGLegacyAnimatedProperty):
+ (WebCore::SVGLegacyAnimatedProperty::commitChange):
+ (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Deleted.
+ (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Deleted.
+ (WebCore::SVGAnimatedProperty::commitChange): Deleted.
+ * svg/properties/SVGLegacyAnimatedProperty.h: Copied from Source/WebCore/svg/properties/SVGAnimatedProperty.h.
+ (WebCore::SVGLegacyAnimatedProperty::lookupOrCreateAnimatedProperty):
+ (WebCore::SVGLegacyAnimatedProperty::lookupAnimatedProperty):
+ (WebCore::SVGAnimatedProperty::isAnimating const): Deleted.
+ (WebCore::SVGAnimatedProperty::isAnimatedListTearOff const): Deleted.
+ (WebCore::SVGAnimatedProperty::contextElement const): Deleted.
+ (WebCore::SVGAnimatedProperty::attributeName const): Deleted.
+ (WebCore::SVGAnimatedProperty::animatedPropertyType const): Deleted.
+ (WebCore::SVGAnimatedProperty::isReadOnly const): Deleted.
+ (WebCore::SVGAnimatedProperty::setIsReadOnly): Deleted.
+ (WebCore::SVGAnimatedProperty::lookupOrCreateAnimatedProperty): Deleted.
+ (WebCore::SVGAnimatedProperty::lookupAnimatedProperty): Deleted.
+ (WebCore::SVGAnimatedProperty::animatedPropertyCache): Deleted.
+ * svg/properties/SVGLegacyProperty.h: Copied from Source/WebCore/svg/properties/SVGProperty.h.
+ * svg/properties/SVGListProperty.h:
+ * svg/properties/SVGProperty.h: Removed.
+ * svg/properties/SVGPropertyTearOff.h:
+ (WebCore::SVGPropertyTearOff::create):
+ (WebCore::SVGPropertyTearOff::animatedProperty const):
+ (WebCore::SVGPropertyTearOff::setAnimatedProperty):
+ (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
+
2019-03-14 Ryan Haddad <[email protected]>
Unreviewed, rolling out r242963.
Modified: trunk/Source/WebCore/Sources.txt (242977 => 242978)
--- trunk/Source/WebCore/Sources.txt 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/Sources.txt 2019-03-15 00:15:09 UTC (rev 242978)
@@ -2424,8 +2424,8 @@
svg/graphics/filters/SVGFilterBuilder.cpp
svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp
-svg/properties/SVGAnimatedProperty.cpp
svg/properties/SVGAttributeOwnerProxy.cpp
+svg/properties/SVGLegacyAnimatedProperty.cpp
workers/AbstractWorker.cpp
workers/DedicatedWorkerGlobalScope.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (242977 => 242978)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-03-15 00:15:09 UTC (rev 242978)
@@ -275,7 +275,6 @@
088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */; settings = {ATTRIBUTES = (Private, ); }; };
088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */; };
088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */; };
- 088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E01126EF1DB00978F7A /* SVGProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */; };
088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
088C2F7A12390081003D65CE /* SVGTextLayoutAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 088C2F7612390080003D65CE /* SVGTextLayoutAttributes.h */; };
@@ -1789,6 +1788,7 @@
5576A5651D88A70800CCC04C /* ImageFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 5576A5631D88A70800CCC04C /* ImageFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
55AF14E61EAAC59B0026EEAA /* UTIRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55D70D23223B017C00044B8E /* SVGLegacyAnimatedProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 55D70D20223B009100044B8E /* SVGLegacyAnimatedProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
55EC9599206AA7A0007DD0A9 /* PaintFrequencyTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 55EC95972069C92D007DD0A9 /* PaintFrequencyTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
55FA7FF0210FA386005AEFE7 /* SVGAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */; settings = {ATTRIBUTES = (Private, ); }; };
55FA7FF5210FB6B1005AEFE7 /* SVGAttributeAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1795,7 +1795,6 @@
55FA7FF7210FBE3E005AEFE7 /* SVGAttributeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */; };
55FA7FFB2110ECD7005AEFE7 /* SVGZoomAndPanType.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FFA2110ECD7005AEFE7 /* SVGZoomAndPanType.h */; settings = {ATTRIBUTES = (Private, ); }; };
55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55FA8001211113EE005AEFE7 /* SVGAnimatedProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 570440591E53936200356601 /* JSAesCbcCfbParams.h */; };
5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */; };
5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */; };
@@ -5647,11 +5646,9 @@
0885067D11DA045B00182B98 /* PaintInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaintInfo.h; sourceTree = "<group>"; };
0885067E11DA045B00182B98 /* PaintPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaintPhase.h; sourceTree = "<group>"; };
088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedListPropertyTearOff.h; sourceTree = "<group>"; };
- 088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedProperty.h; sourceTree = "<group>"; };
088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyDescription.h; sourceTree = "<group>"; };
088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyTearOff.h; sourceTree = "<group>"; };
088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGListPropertyTearOff.h; sourceTree = "<group>"; };
- 088A0E01126EF1DB00978F7A /* SVGProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGProperty.h; sourceTree = "<group>"; };
088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPropertyTearOff.h; sourceTree = "<group>"; };
088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPropertyTraits.h; sourceTree = "<group>"; };
088C2F7512390080003D65CE /* SVGTextLayoutAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextLayoutAttributes.cpp; sourceTree = "<group>"; };
@@ -8673,6 +8670,9 @@
55AF14E31EAAC59B0026EEAA /* UTIRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UTIRegistry.cpp; sourceTree = "<group>"; };
55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UTIRegistry.h; sourceTree = "<group>"; };
55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; };
+ 55D70D20223B009100044B8E /* SVGLegacyAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLegacyAnimatedProperty.h; sourceTree = "<group>"; };
+ 55D70D21223B00BB00044B8E /* SVGLegacyAnimatedProperty.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLegacyAnimatedProperty.cpp; sourceTree = "<group>"; };
+ 55D70D22223B00EA00044B8E /* SVGLegacyProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLegacyProperty.h; sourceTree = "<group>"; };
55EC95972069C92D007DD0A9 /* PaintFrequencyTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaintFrequencyTracker.h; sourceTree = "<group>"; };
55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttribute.h; sourceTree = "<group>"; };
55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAccessor.h; sourceTree = "<group>"; };
@@ -10138,7 +10138,6 @@
836D032E1DA8A13200FFD96B /* JSClipboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClipboardEvent.h; sourceTree = "<group>"; };
836DAA051CEAB7CD00A2B707 /* RenderDescendantIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderDescendantIterator.h; sourceTree = "<group>"; };
836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = "<group>"; };
- 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = "<group>"; };
837056881F50915000D93425 /* JSFileCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileCallback.cpp; sourceTree = "<group>"; };
837056891F50915000D93425 /* JSFileSystemEntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemEntryCallback.h; sourceTree = "<group>"; };
8370568A1F50915000D93425 /* JSFileSystemEntryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileSystemEntryCallback.cpp; sourceTree = "<group>"; };
@@ -16179,8 +16178,6 @@
088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */,
55FA7FFC2110F813005AEFE7 /* SVGAnimatedPathSegListPropertyTearOff.cpp */,
089A8E06128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h */,
- 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */,
- 088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */,
088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */,
088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */,
@@ -16192,10 +16189,12 @@
55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */,
55346AFA2117FFAF0059BCDD /* SVGAttributeOwnerProxyImpl.h */,
55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */,
+ 55D70D21223B00BB00044B8E /* SVGLegacyAnimatedProperty.cpp */,
+ 55D70D20223B009100044B8E /* SVGLegacyAnimatedProperty.h */,
+ 55D70D22223B00EA00044B8E /* SVGLegacyProperty.h */,
0810764312828556007C63BA /* SVGListProperty.h */,
088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */,
- 088A0E01126EF1DB00978F7A /* SVGProperty.h */,
088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
@@ -31861,7 +31860,6 @@
089A8E07128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h in Headers */,
43B9336913B261B1004584BF /* SVGAnimatedPointList.h in Headers */,
08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */,
- 55FA8001211113EE005AEFE7 /* SVGAnimatedProperty.h in Headers */,
088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */,
@@ -31950,6 +31948,7 @@
0854B01F1255E4E600B9CDD0 /* SVGInlineFlowBox.h in Headers */,
0854B0211255E4E600B9CDD0 /* SVGInlineTextBox.h in Headers */,
B2227A300D00BF220071B782 /* SVGLangSpace.h in Headers */,
+ 55D70D23223B017C00044B8E /* SVGLegacyAnimatedProperty.h in Headers */,
7134496E146941B300720312 /* SVGLengthContext.h in Headers */,
B2227A360D00BF220071B782 /* SVGLengthList.h in Headers */,
7C39C3651DDA865200FEFB29 /* SVGLengthListValues.h in Headers */,
@@ -32023,7 +32022,6 @@
B2227A910D00BF220071B782 /* SVGPolygonElement.h in Headers */,
B2227A940D00BF220071B782 /* SVGPolylineElement.h in Headers */,
B2227A970D00BF220071B782 /* SVGPreserveAspectRatio.h in Headers */,
- 088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */,
088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */,
Modified: trunk/Source/WebCore/svg/SVGAngle.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGAngle.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGAngle.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -32,7 +32,7 @@
class SVGAngle : public SVGPropertyTearOff<SVGAngleValue> {
public:
- static Ref<SVGAngle> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGAngleValue& value)
+ static Ref<SVGAngle> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGAngleValue& value)
{
return adoptRef(*new SVGAngle(animatedProperty, role, value));
}
@@ -131,7 +131,7 @@
}
private:
- SVGAngle(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGAngleValue& value)
+ SVGAngle(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGAngleValue& value)
: SVGPropertyTearOff<SVGAngleValue>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGAnimateElement.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGAnimateElement.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGAnimateElement.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -29,7 +29,7 @@
namespace WebCore {
-class SVGAnimatedProperty;
+class SVGLegacyAnimatedProperty;
class SVGAnimateElement final : public SVGAnimateElementBase {
WTF_MAKE_ISO_ALLOCATED(SVGAnimateElement);
Modified: trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -21,8 +21,8 @@
#pragma once
-#include "SVGAnimatedProperty.h"
#include "SVGAnimatedType.h"
+#include "SVGLegacyAnimatedProperty.h"
#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -29,7 +29,7 @@
struct SVGElementAnimatedProperties {
SVGElement* element;
- Vector<RefPtr<SVGAnimatedProperty>> properties;
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> properties;
};
typedef Vector<SVGElementAnimatedProperties> SVGElementAnimatedPropertyList;
@@ -166,7 +166,7 @@
}
template<typename AnimValType>
- AnimValType* castAnimatedPropertyToActualType(SVGAnimatedProperty* property)
+ AnimValType* castAnimatedPropertyToActualType(SVGLegacyAnimatedProperty* property)
{
ASSERT(property);
ASSERT(property->contextElement());
Modified: trunk/Source/WebCore/svg/SVGElement.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGElement.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGElement.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -146,9 +146,9 @@
void synchronizeAttribute(const QualifiedName& name) { attributeOwnerProxy().synchronizeAttribute(name); }
void synchronizeAttributes() { attributeOwnerProxy().synchronizeAttributes(); }
Vector<AnimatedPropertyType> animatedTypes(const QualifiedName& attributeName) const { return attributeOwnerProxy().animatedTypes(attributeName); }
- RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const { return attributeOwnerProxy().lookupAnimatedProperty(attribute); }
- RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) { return attributeOwnerProxy().lookupOrCreateAnimatedProperty(attribute); }
- Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }
+ RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const { return attributeOwnerProxy().lookupAnimatedProperty(attribute); }
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) { return attributeOwnerProxy().lookupOrCreateAnimatedProperty(attribute); }
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }
// These are needed for the RenderTree, animation and DOM.
const auto& className() const { return m_className.currentValue(attributeOwnerProxy()); }
Modified: trunk/Source/WebCore/svg/SVGLength.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGLength.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGLength.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -47,7 +47,7 @@
SVG_LENGTHTYPE_PC = LengthTypePC
};
- static Ref<SVGLength> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGLengthValue& value)
+ static Ref<SVGLength> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGLengthValue& value)
{
return adoptRef(*new SVGLength(animatedProperty, role, value));
}
@@ -148,7 +148,7 @@
}
private:
- SVGLength(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGLengthValue& value)
+ SVGLength(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGLengthValue& value)
: SVGPropertyTearOff<SVGLengthValue>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGMatrix.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGMatrix.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGMatrix.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -33,7 +33,7 @@
// FIXME: Remove this class once SVGMatrix becomes an alias to DOMMatrix.
class SVGMatrix : public SVGPropertyTearOff<SVGMatrixValue> {
public:
- static Ref<SVGMatrix> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGMatrixValue& value)
+ static Ref<SVGMatrix> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGMatrixValue& value)
{
return adoptRef(*new SVGMatrix(animatedProperty, role, value));
}
@@ -272,7 +272,7 @@
}
protected:
- SVGMatrix(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGMatrixValue& value)
+ SVGMatrix(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGMatrixValue& value)
: SVGPropertyTearOff<SVGMatrixValue>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGNumber.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGNumber.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGNumber.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -31,7 +31,7 @@
class SVGNumber : public SVGPropertyTearOff<float> {
public:
- static Ref<SVGNumber> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
+ static Ref<SVGNumber> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
{
return adoptRef(*new SVGNumber(animatedProperty, role, value));
}
@@ -65,7 +65,7 @@
}
private:
- SVGNumber(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
+ SVGNumber(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
: SVGPropertyTearOff<float>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPathElement.cpp 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp 2019-03-15 00:15:09 UTC (rev 242978)
@@ -283,7 +283,7 @@
return buildPathFromByteStream(pathByteStreamToUse);
}
-RefPtr<SVGAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper()
+RefPtr<SVGLegacyAnimatedProperty> SVGPathElement::lookupOrCreateDWrapper()
{
return m_pathSegList.animatedProperty(attributeOwnerProxy());
}
Modified: trunk/Source/WebCore/svg/SVGPathElement.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPathElement.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPathElement.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -120,7 +120,7 @@
bool isValid() const final { return SVGTests::isValid(); }
bool supportsMarkers() const final { return true; }
- RefPtr<SVGAnimatedProperty> lookupOrCreateDWrapper();
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateDWrapper();
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
Modified: trunk/Source/WebCore/svg/SVGPathSegList.cpp (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-15 00:15:09 UTC (rev 242978)
@@ -67,7 +67,7 @@
bool SVGPathSegList::processIncomingListItemValue(const ListItemType& newItem, unsigned* indexToModify)
{
SVGPathSegWithContext* newItemWithContext = static_cast<SVGPathSegWithContext*>(newItem.get());
- RefPtr<SVGAnimatedProperty> animatedPropertyOfItem = newItemWithContext->animatedProperty();
+ RefPtr<SVGLegacyAnimatedProperty> animatedPropertyOfItem = newItemWithContext->animatedProperty();
// Alter the role, after calling animatedProperty(), as that may influence the returned animated property.
newItemWithContext->setContextAndRole(contextElement(), m_pathSegRole);
Modified: trunk/Source/WebCore/svg/SVGPathSegWithContext.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPathSegWithContext.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPathSegWithContext.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -31,7 +31,7 @@
{
}
- RefPtr<SVGAnimatedProperty> animatedProperty() const
+ RefPtr<SVGLegacyAnimatedProperty> animatedProperty() const
{
if (!m_element)
return nullptr;
Modified: trunk/Source/WebCore/svg/SVGPoint.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPoint.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPoint.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -34,7 +34,7 @@
class SVGPoint : public SVGPropertyTearOff<FloatPoint> {
public:
- static Ref<SVGPoint> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatPoint& value)
+ static Ref<SVGPoint> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatPoint& value)
{
return adoptRef(*new SVGPoint(animatedProperty, role, value));
}
@@ -95,7 +95,7 @@
}
protected:
- SVGPoint(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatPoint& value)
+ SVGPoint(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatPoint& value)
: SVGPropertyTearOff<FloatPoint>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGPreserveAspectRatio.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGPreserveAspectRatio.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGPreserveAspectRatio.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -32,7 +32,7 @@
class SVGPreserveAspectRatio : public SVGPropertyTearOff<SVGPreserveAspectRatioValue> {
public:
- static Ref<SVGPreserveAspectRatio> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGPreserveAspectRatioValue& value)
+ static Ref<SVGPreserveAspectRatio> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGPreserveAspectRatioValue& value)
{
return adoptRef(*new SVGPreserveAspectRatio(animatedProperty, role, value));
}
@@ -86,7 +86,7 @@
}
private:
- SVGPreserveAspectRatio(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGPreserveAspectRatioValue& value)
+ SVGPreserveAspectRatio(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGPreserveAspectRatioValue& value)
: SVGPropertyTearOff<SVGPreserveAspectRatioValue>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGRect.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGRect.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGRect.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -27,7 +27,7 @@
class SVGRect : public SVGPropertyTearOff<FloatRect> {
public:
- static Ref<SVGRect> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatRect& value)
+ static Ref<SVGRect> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatRect& value)
{
return adoptRef(*new SVGRect(animatedProperty, role, value));
}
@@ -109,7 +109,7 @@
}
private:
- SVGRect(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatRect& value)
+ SVGRect(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, FloatRect& value)
: SVGPropertyTearOff<FloatRect>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/SVGTransform.h (242977 => 242978)
--- trunk/Source/WebCore/svg/SVGTransform.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/SVGTransform.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -33,7 +33,7 @@
class SVGTransform : public SVGPropertyTearOff<SVGTransformValue> {
public:
- static Ref<SVGTransform> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
+ static Ref<SVGTransform> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
{
return adoptRef(*new SVGTransform(animatedProperty, role, value));
}
@@ -129,7 +129,7 @@
}
private:
- SVGTransform(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
+ SVGTransform(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
: SVGPropertyTearOff<SVGTransformValue>(&animatedProperty, role, value)
{
}
Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -20,7 +20,7 @@
#pragma once
-#include "SVGAnimatedProperty.h"
+#include "SVGLegacyAnimatedProperty.h"
#include "SVGListPropertyTearOff.h"
#include "SVGStaticListPropertyTearOff.h"
@@ -30,7 +30,7 @@
class SVGPropertyTearOff;
template<typename PropertyType>
-class SVGAnimatedListPropertyTearOff : public SVGAnimatedProperty {
+class SVGAnimatedListPropertyTearOff : public SVGLegacyAnimatedProperty {
public:
using ListItemType = typename SVGPropertyTraits<PropertyType>::ListItemType;
using ListItemTearOff = typename SVGPropertyTraits<PropertyType>::ListItemTearOff;
@@ -68,7 +68,7 @@
bool isAnimating() const override { return m_animatedProperty; }
bool isAnimatedListTearOff() const override { return true; }
- int findItem(SVGProperty* property)
+ int findItem(SVGLegacyProperty* property)
{
// This should ever be called for our baseVal, as animVal can't modify the list.
return baseVal()->findItem(static_cast<ListItemTearOff*>(property));
@@ -162,7 +162,7 @@
protected:
SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& values)
- : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
+ : SVGLegacyAnimatedProperty(contextElement, attributeName, animatedPropertyType)
, m_values(values)
{
if (!values.isEmpty())
Deleted: trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp 2019-03-15 00:15:09 UTC (rev 242978)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
- *
- * 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
- * along with this library; 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 "SVGAnimatedProperty.h"
-
-#include "SVGElement.h"
-
-namespace WebCore {
-
-SVGAnimatedProperty::SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType)
- : m_contextElement(contextElement)
- , m_attributeName(attributeName)
- , m_animatedPropertyType(animatedPropertyType)
-{
-}
-
-SVGAnimatedProperty::~SVGAnimatedProperty()
-{
- // Assure that animationEnded() was called, if animationStarted() was called before.
- ASSERT(!isAnimating());
-
- // Remove wrapper from cache.
- for (auto& cache : animatedPropertyCache()) {
- if (cache.value == this) {
- animatedPropertyCache().remove(cache.key);
- return;
- }
- }
-
- RELEASE_ASSERT_NOT_REACHED();
-}
-
-void SVGAnimatedProperty::commitChange()
-{
- ASSERT(m_contextElement);
- ASSERT(!m_contextElement->m_deletionHasBegun);
- m_contextElement->invalidateSVGAttributes();
- m_contextElement->svgAttributeChanged(m_attributeName);
- // Needed to synchronize with CSSOM for presentation attributes with SVG DOM.
- m_contextElement->synchronizeAnimatedSVGAttribute(m_attributeName);
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
- *
- * 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
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "QualifiedName.h"
-#include "SVGAnimatedPropertyDescription.h"
-#include "SVGAnimatedPropertyType.h"
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class SVGElement;
-class SVGProperty;
-
-class SVGAnimatedProperty : public RefCounted<SVGAnimatedProperty> {
-public:
- virtual ~SVGAnimatedProperty();
- virtual bool isAnimating() const { return false; }
- virtual bool isAnimatedListTearOff() const { return false; }
-
- SVGElement* contextElement() const { return m_contextElement.get(); }
- const QualifiedName& attributeName() const { return m_attributeName; }
- AnimatedPropertyType animatedPropertyType() const { return m_animatedPropertyType; }
- bool isReadOnly() const { return m_isReadOnly; }
- void setIsReadOnly() { m_isReadOnly = true; }
-
- void commitChange();
-
- template<typename TearOffType, typename PropertyType, AnimatedPropertyType animatedType>
- static RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(SVGElement& element, const QualifiedName& attributeName, const AtomicString& identifier, PropertyType& property, AnimatedPropertyState animatedState)
- {
- SVGAnimatedPropertyDescription key(&element, identifier);
-
- auto result = animatedPropertyCache().add(key, nullptr);
- if (!result.isNewEntry)
- return result.iterator->value;
-
- auto wrapper = TearOffType::create(&element, attributeName, animatedType, property);
- if (animatedState == PropertyIsReadOnly)
- wrapper->setIsReadOnly();
-
- // Cache the raw pointer but return a RefPtr<>. This will break the cyclic reference
- // between SVGAnimatedProperty and SVGElement once the property pointer is not needed.
- result.iterator->value = wrapper.ptr();
- return static_reference_cast<SVGAnimatedProperty>(wrapper);
- }
-
- static RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGElement& element, const AtomicString& identifier)
- {
- SVGAnimatedPropertyDescription key(const_cast<SVGElement*>(&element), identifier);
- return animatedPropertyCache().get(key);
- }
-
-protected:
- SVGAnimatedProperty(SVGElement*, const QualifiedName&, AnimatedPropertyType);
-
-private:
- // Caching facilities.
- using Cache = HashMap<SVGAnimatedPropertyDescription, SVGAnimatedProperty*, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits>;
- static Cache& animatedPropertyCache()
- {
- static NeverDestroyed<Cache> cache;
- return cache;
- }
-
- RefPtr<SVGElement> m_contextElement;
- const QualifiedName& m_attributeName;
- AnimatedPropertyType m_animatedPropertyType;
-
-protected:
- bool m_isReadOnly { false };
-};
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -20,13 +20,13 @@
#pragma once
-#include "SVGAnimatedProperty.h"
+#include "SVGLegacyAnimatedProperty.h"
#include "SVGPropertyTearOff.h"
namespace WebCore {
template<typename T>
-class SVGAnimatedPropertyTearOff final : public SVGAnimatedProperty {
+class SVGAnimatedPropertyTearOff final : public SVGLegacyAnimatedProperty {
public:
using PropertyTearOff = T;
using PropertyType = typename PropertyTearOff::PropertyType;
@@ -105,7 +105,7 @@
private:
SVGAnimatedPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
- : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
+ : SVGLegacyAnimatedProperty(contextElement, attributeName, animatedPropertyType)
, m_property(property)
{
}
Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -21,12 +21,12 @@
#pragma once
#include "ExceptionOr.h"
-#include "SVGAnimatedProperty.h"
+#include "SVGLegacyAnimatedProperty.h"
namespace WebCore {
template<typename PropertyType>
-class SVGAnimatedStaticPropertyTearOff : public SVGAnimatedProperty {
+class SVGAnimatedStaticPropertyTearOff : public SVGLegacyAnimatedProperty {
public:
typedef PropertyType ContentType;
@@ -100,7 +100,7 @@
protected:
SVGAnimatedStaticPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
- : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
+ : SVGLegacyAnimatedProperty(contextElement, attributeName, animatedPropertyType)
, m_property(property)
, m_animatedProperty(nullptr)
{
Modified: trunk/Source/WebCore/svg/properties/SVGAttributeAccessor.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAttributeAccessor.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeAccessor.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -27,9 +27,9 @@
#include "Element.h"
#include "QualifiedName.h"
-#include "SVGAnimatedProperty.h"
#include "SVGAnimatedPropertyType.h"
#include "SVGAttribute.h"
+#include "SVGLegacyAnimatedProperty.h"
#include "SVGLengthValue.h"
#include "SVGNames.h"
#include "SVGPropertyTraits.h"
@@ -58,9 +58,9 @@
virtual AnimatedPropertyType animatedType() const { return AnimatedUnknown; }
virtual Vector<AnimatedPropertyType> animatedTypes() const { return { animatedType() }; }
- virtual RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType&, SVGElement&, const SVGAttribute&, AnimatedPropertyState) const { return nullptr; };
- virtual RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const OwnerType&, const SVGElement&, const SVGAttribute&) const { return nullptr; };
- virtual Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType&, SVGElement&, AnimatedPropertyState) const { return { }; }
+ virtual RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType&, SVGElement&, const SVGAttribute&, AnimatedPropertyState) const { return nullptr; };
+ virtual RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const OwnerType&, const SVGElement&, const SVGAttribute&) const { return nullptr; };
+ virtual Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType&, SVGElement&, AnimatedPropertyState) const { return { }; }
protected:
const QualifiedName m_attributeName;
@@ -136,31 +136,31 @@
protected:
template<typename PropertyTearOff = PropertyTearOffType, typename Property = PropertyType, AnimatedPropertyType animatedType = type>
- static RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(SVGElement& element, const QualifiedName& attributeName, const AtomicString& identifier, Property& property, AnimatedPropertyState animatedState)
+ static RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(SVGElement& element, const QualifiedName& attributeName, const AtomicString& identifier, Property& property, AnimatedPropertyState animatedState)
{
- return SVGAnimatedProperty::lookupOrCreateAnimatedProperty<PropertyTearOff, Property, animatedType>(element, attributeName, identifier, property, animatedState);
+ return SVGLegacyAnimatedProperty::lookupOrCreateAnimatedProperty<PropertyTearOff, Property, animatedType>(element, attributeName, identifier, property, animatedState);
}
- static RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGElement& element, const AtomicString& identifier)
+ static RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const SVGElement& element, const AtomicString& identifier)
{
- return SVGAnimatedProperty::lookupAnimatedProperty(element, identifier);
+ return SVGLegacyAnimatedProperty::lookupAnimatedProperty(element, identifier);
}
bool isAnimatedLengthAttribute() const override { return std::is_same<PropertyType, SVGLengthValue>::value; }
AnimatedPropertyType animatedType() const override { return type; }
- RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const override
{
ASSERT_UNUSED(attribute, isMatched(owner, attribute));
return lookupOrCreateAnimatedProperty(element, m_attributeName, m_identifier, this->attribute(owner).value(), animatedState);
}
- RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const OwnerType&, const SVGElement& element, const SVGAttribute&) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const OwnerType&, const SVGElement& element, const SVGAttribute&) const override
{
return lookupAnimatedProperty(element, m_identifier);
}
- Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, AnimatedPropertyState animatedState) const override
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, AnimatedPropertyState animatedState) const override
{
return { lookupOrCreateAnimatedProperty(element, m_attributeName, m_identifier, attribute(owner).value(), animatedState) };
}
@@ -214,7 +214,7 @@
Vector<AnimatedPropertyType> animatedTypes() const override { return { type, secondType }; }
- RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const override
{
if (Base::isMatched(owner, attribute))
return lookupOrCreateAnimatedProperty(element, m_attributeName, m_identifier, this->attribute(owner).value(), animatedState);
@@ -222,7 +222,7 @@
return Base::template lookupOrCreateAnimatedProperty<SecondPropertyTearOffType, SecondPropertyType, secondType>(element, m_attributeName, m_secondIdentifier, secondAttribute(owner).value(), animatedState);
}
- RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute) const override
{
if (Base::isMatched(owner, attribute))
return lookupAnimatedProperty(element, m_identifier);
@@ -230,7 +230,7 @@
return lookupAnimatedProperty(element, m_secondIdentifier);
}
- Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, AnimatedPropertyState animatedState) const override
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, AnimatedPropertyState animatedState) const override
{
return {
lookupOrCreateAnimatedProperty(element, m_attributeName, m_identifier, attribute(owner).value(), animatedState),
Modified: trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -30,9 +30,9 @@
namespace WebCore {
-class SVGAnimatedProperty;
class SVGAttribute;
class SVGElement;
+class SVGLegacyAnimatedProperty;
class SVGAttributeOwnerProxy {
public:
@@ -47,9 +47,9 @@
virtual Vector<AnimatedPropertyType> animatedTypes(const QualifiedName&) const = 0;
- virtual RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute&) const = 0;
- virtual RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGAttribute&) const = 0;
- virtual Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName&) const = 0;
+ virtual RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute&) const = 0;
+ virtual RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const SVGAttribute&) const = 0;
+ virtual Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName&) const = 0;
protected:
WeakPtr<SVGElement> m_element;
Modified: trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -81,17 +81,17 @@
return attributeRegistry().animatedTypes(attributeName);
}
- RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) const override
{
return attributeRegistry().lookupOrCreateAnimatedProperty(m_owner, *m_element, attribute, m_animatedState);
}
- RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const override
+ RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const override
{
return attributeRegistry().lookupAnimatedProperty(m_owner, *m_element, attribute);
}
- Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& attributeName) const override
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& attributeName) const override
{
return attributeRegistry().lookupOrCreateAnimatedProperties(m_owner, *m_element, attributeName, m_animatedState);
}
Modified: trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -34,11 +34,11 @@
#include "SVGAnimatedNumberList.h"
#include "SVGAnimatedPointList.h"
#include "SVGAnimatedPreserveAspectRatio.h"
-#include "SVGAnimatedProperty.h"
#include "SVGAnimatedRect.h"
#include "SVGAnimatedString.h"
#include "SVGAnimatedTransformList.h"
#include "SVGAttributeAccessor.h"
+#include "SVGLegacyAnimatedProperty.h"
#include "SVGStringListValues.h"
#include "SVGZoomAndPanType.h"
#include <wtf/HashMap.h>
@@ -201,7 +201,7 @@
return synchronizeAttributeBaseTypes(owner, element, attributeName);
}
- RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const
+ RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState) const
{
if (const auto* attributeAccessor = findAttributeAccessor(owner, attribute))
return attributeAccessor->lookupOrCreateAnimatedProperty(owner, element, attribute, animatedState);
@@ -208,7 +208,7 @@
return lookupOrCreateAnimatedPropertyBaseTypes(owner, element, attribute, animatedState);
}
- RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute) const
+ RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute) const
{
if (const auto* attributeAccessor = findAttributeAccessor(owner, attribute))
return attributeAccessor->lookupAnimatedProperty(owner, element, attribute);
@@ -215,7 +215,7 @@
return lookupAnimatedPropertyBaseTypes(owner, element, attribute);
}
- Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, const QualifiedName& attributeName, AnimatedPropertyState animatedState) const
+ Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(OwnerType& owner, SVGElement& element, const QualifiedName& attributeName, AnimatedPropertyState animatedState) const
{
if (const auto* attributeAccessor = findAttributeAccessor(attributeName))
return attributeAccessor->lookupOrCreateAnimatedProperties(owner, element, animatedState);
@@ -274,10 +274,10 @@
}
template<size_t I = 0>
- static typename std::enable_if<I == sizeof...(BaseTypes), RefPtr<SVGAnimatedProperty>>::type lookupOrCreateAnimatedPropertyBaseTypes(OwnerType&, SVGElement&, const SVGAttribute&, AnimatedPropertyState) { return nullptr; }
+ static typename std::enable_if<I == sizeof...(BaseTypes), RefPtr<SVGLegacyAnimatedProperty>>::type lookupOrCreateAnimatedPropertyBaseTypes(OwnerType&, SVGElement&, const SVGAttribute&, AnimatedPropertyState) { return nullptr; }
template<size_t I = 0>
- static typename std::enable_if<I < sizeof...(BaseTypes), RefPtr<SVGAnimatedProperty>>::type lookupOrCreateAnimatedPropertyBaseTypes(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState)
+ static typename std::enable_if<I < sizeof...(BaseTypes), RefPtr<SVGLegacyAnimatedProperty>>::type lookupOrCreateAnimatedPropertyBaseTypes(OwnerType& owner, SVGElement& element, const SVGAttribute& attribute, AnimatedPropertyState animatedState)
{
using BaseType = typename std::tuple_element<I, typename std::tuple<BaseTypes...>>::type;
if (auto animatedProperty = BaseType::attributeRegistry().lookupOrCreateAnimatedProperty(owner, element, attribute, animatedState))
@@ -286,10 +286,10 @@
}
template<size_t I = 0>
- static typename std::enable_if<I == sizeof...(BaseTypes), RefPtr<SVGAnimatedProperty>>::type lookupAnimatedPropertyBaseTypes(const OwnerType&, const SVGElement&, const SVGAttribute&) { return nullptr; }
+ static typename std::enable_if<I == sizeof...(BaseTypes), RefPtr<SVGLegacyAnimatedProperty>>::type lookupAnimatedPropertyBaseTypes(const OwnerType&, const SVGElement&, const SVGAttribute&) { return nullptr; }
template<size_t I = 0>
- static typename std::enable_if<I < sizeof...(BaseTypes), RefPtr<SVGAnimatedProperty>>::type lookupAnimatedPropertyBaseTypes(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute)
+ static typename std::enable_if<I < sizeof...(BaseTypes), RefPtr<SVGLegacyAnimatedProperty>>::type lookupAnimatedPropertyBaseTypes(const OwnerType& owner, const SVGElement& element, const SVGAttribute& attribute)
{
using BaseType = typename std::tuple_element<I, typename std::tuple<BaseTypes...>>::type;
if (auto animatedProperty = BaseType::attributeRegistry().lookupAnimatedProperty(owner, element, attribute))
@@ -298,10 +298,10 @@
}
template<size_t I = 0>
- static typename std::enable_if<I == sizeof...(BaseTypes), Vector<RefPtr<SVGAnimatedProperty>>>::type lookupOrCreateAnimatedPropertiesBaseTypes(OwnerType&, SVGElement&, const QualifiedName&, AnimatedPropertyState) { return { }; }
+ static typename std::enable_if<I == sizeof...(BaseTypes), Vector<RefPtr<SVGLegacyAnimatedProperty>>>::type lookupOrCreateAnimatedPropertiesBaseTypes(OwnerType&, SVGElement&, const QualifiedName&, AnimatedPropertyState) { return { }; }
template<size_t I = 0>
- static typename std::enable_if<I < sizeof...(BaseTypes), Vector<RefPtr<SVGAnimatedProperty>>>::type lookupOrCreateAnimatedPropertiesBaseTypes(OwnerType& owner, SVGElement& element, const QualifiedName& attributeName, AnimatedPropertyState animatedState)
+ static typename std::enable_if<I < sizeof...(BaseTypes), Vector<RefPtr<SVGLegacyAnimatedProperty>>>::type lookupOrCreateAnimatedPropertiesBaseTypes(OwnerType& owner, SVGElement& element, const QualifiedName& attributeName, AnimatedPropertyState animatedState)
{
using BaseType = typename std::tuple_element<I, typename std::tuple<BaseTypes...>>::type;
auto animatedProperties = BaseType::attributeRegistry().lookupOrCreateAnimatedProperties(owner, element, attributeName, animatedState);
Copied: trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.cpp (from rev 242977, trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp) (0 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.cpp (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.cpp 2019-03-15 00:15:09 UTC (rev 242978)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
+ *
+ * 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
+ * along with this library; 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 "SVGLegacyAnimatedProperty.h"
+
+#include "SVGElement.h"
+
+namespace WebCore {
+
+SVGLegacyAnimatedProperty::SVGLegacyAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType)
+ : m_contextElement(contextElement)
+ , m_attributeName(attributeName)
+ , m_animatedPropertyType(animatedPropertyType)
+{
+}
+
+SVGLegacyAnimatedProperty::~SVGLegacyAnimatedProperty()
+{
+ // Assure that animationEnded() was called, if animationStarted() was called before.
+ ASSERT(!isAnimating());
+
+ // Remove wrapper from cache.
+ for (auto& cache : animatedPropertyCache()) {
+ if (cache.value == this) {
+ animatedPropertyCache().remove(cache.key);
+ return;
+ }
+ }
+
+ RELEASE_ASSERT_NOT_REACHED();
+}
+
+void SVGLegacyAnimatedProperty::commitChange()
+{
+ ASSERT(m_contextElement);
+ ASSERT(!m_contextElement->m_deletionHasBegun);
+ m_contextElement->invalidateSVGAttributes();
+ m_contextElement->svgAttributeChanged(m_attributeName);
+ // Needed to synchronize with CSSOM for presentation attributes with SVG DOM.
+ m_contextElement->synchronizeAnimatedSVGAttribute(m_attributeName);
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.h (from rev 242977, trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h) (0 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.h (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGLegacyAnimatedProperty.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
+ *
+ * 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
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include "QualifiedName.h"
+#include "SVGAnimatedPropertyDescription.h"
+#include "SVGAnimatedPropertyType.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class SVGElement;
+class SVGLegacyProperty;
+
+class SVGLegacyAnimatedProperty : public RefCounted<SVGLegacyAnimatedProperty> {
+public:
+ virtual ~SVGLegacyAnimatedProperty();
+ virtual bool isAnimating() const { return false; }
+ virtual bool isAnimatedListTearOff() const { return false; }
+
+ SVGElement* contextElement() const { return m_contextElement.get(); }
+ const QualifiedName& attributeName() const { return m_attributeName; }
+ AnimatedPropertyType animatedPropertyType() const { return m_animatedPropertyType; }
+ bool isReadOnly() const { return m_isReadOnly; }
+ void setIsReadOnly() { m_isReadOnly = true; }
+
+ void commitChange();
+
+ template<typename TearOffType, typename PropertyType, AnimatedPropertyType animatedType>
+ static RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(SVGElement& element, const QualifiedName& attributeName, const AtomicString& identifier, PropertyType& property, AnimatedPropertyState animatedState)
+ {
+ SVGAnimatedPropertyDescription key(&element, identifier);
+
+ auto result = animatedPropertyCache().add(key, nullptr);
+ if (!result.isNewEntry)
+ return result.iterator->value;
+
+ auto wrapper = TearOffType::create(&element, attributeName, animatedType, property);
+ if (animatedState == PropertyIsReadOnly)
+ wrapper->setIsReadOnly();
+
+ // Cache the raw pointer but return a RefPtr<>. This will break the cyclic reference
+ // between SVGAnimatedProperty and SVGElement once the property pointer is not needed.
+ result.iterator->value = wrapper.ptr();
+ return static_reference_cast<SVGLegacyAnimatedProperty>(wrapper);
+ }
+
+ static RefPtr<SVGLegacyAnimatedProperty> lookupAnimatedProperty(const SVGElement& element, const AtomicString& identifier)
+ {
+ SVGAnimatedPropertyDescription key(const_cast<SVGElement*>(&element), identifier);
+ return animatedPropertyCache().get(key);
+ }
+
+protected:
+ SVGLegacyAnimatedProperty(SVGElement*, const QualifiedName&, AnimatedPropertyType);
+
+private:
+ // Caching facilities.
+ using Cache = HashMap<SVGAnimatedPropertyDescription, SVGLegacyAnimatedProperty*, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits>;
+ static Cache& animatedPropertyCache()
+ {
+ static NeverDestroyed<Cache> cache;
+ return cache;
+ }
+
+ RefPtr<SVGElement> m_contextElement;
+ const QualifiedName& m_attributeName;
+ AnimatedPropertyType m_animatedPropertyType;
+
+protected:
+ bool m_isReadOnly { false };
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/svg/properties/SVGLegacyProperty.h (from rev 242977, trunk/Source/WebCore/svg/properties/SVGProperty.h) (0 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGLegacyProperty.h (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGLegacyProperty.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * 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
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+enum SVGPropertyRole {
+ UndefinedRole,
+ BaseValRole,
+ AnimValRole
+};
+
+class SVGLegacyProperty : public RefCounted<SVGLegacyProperty> {
+public:
+ virtual ~SVGLegacyProperty() = default;
+
+ virtual bool isReadOnly() const = 0;
+ virtual void commitChange() = 0;
+};
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/svg/properties/SVGListProperty.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGListProperty.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGListProperty.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -37,7 +37,7 @@
class SVGAnimatedListPropertyTearOff;
template<typename PropertyType>
-class SVGListProperty : public SVGProperty, public CanMakeWeakPtr<SVGListProperty<PropertyType>> {
+class SVGListProperty : public SVGLegacyProperty, public CanMakeWeakPtr<SVGListProperty<PropertyType>> {
public:
typedef SVGListProperty<PropertyType> Self;
Deleted: trunk/Source/WebCore/svg/properties/SVGProperty.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGProperty.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGProperty.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- *
- * 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
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-enum SVGPropertyRole {
- UndefinedRole,
- BaseValRole,
- AnimValRole
-};
-
-class SVGProperty : public RefCounted<SVGProperty> {
-public:
- virtual ~SVGProperty() = default;
-
- virtual bool isReadOnly() const = 0;
- virtual void commitChange() = 0;
-};
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/svg/properties/SVGPropertyTearOff.h (242977 => 242978)
--- trunk/Source/WebCore/svg/properties/SVGPropertyTearOff.h 2019-03-15 00:00:06 UTC (rev 242977)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyTearOff.h 2019-03-15 00:15:09 UTC (rev 242978)
@@ -21,8 +21,8 @@
#pragma once
#include "ExceptionOr.h"
-#include "SVGAnimatedProperty.h"
-#include "SVGProperty.h"
+#include "SVGLegacyAnimatedProperty.h"
+#include "SVGLegacyProperty.h"
#include <wtf/WeakPtr.h>
namespace WebCore {
@@ -29,7 +29,7 @@
class SVGElement;
-class SVGPropertyTearOffBase : public SVGProperty {
+class SVGPropertyTearOffBase : public SVGLegacyProperty {
public:
virtual void detachWrapper() = 0;
};
@@ -42,7 +42,7 @@
// Used for child types (baseVal/animVal) of a SVGAnimated* property (for example: SVGAnimatedLength::baseVal()).
// Also used for list tear offs (for example: text.x.baseVal.getItem(0)).
- static Ref<Self> create(SVGAnimatedProperty& animatedProperty, SVGPropertyRole role, PropertyType& value)
+ static Ref<Self> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, PropertyType& value)
{
return adoptRef(*new Self(animatedProperty, role, value));
}
@@ -61,7 +61,7 @@
}
virtual PropertyType& propertyReference() { return *m_value; }
- SVGAnimatedProperty* animatedProperty() const { return m_animatedProperty.get(); }
+ SVGLegacyAnimatedProperty* animatedProperty() const { return m_animatedProperty.get(); }
virtual void setValue(PropertyType& value)
{
@@ -73,7 +73,7 @@
m_value = &value;
}
- void setAnimatedProperty(SVGAnimatedProperty* animatedProperty)
+ void setAnimatedProperty(SVGLegacyAnimatedProperty* animatedProperty)
{
m_animatedProperty = animatedProperty;
}
@@ -126,7 +126,7 @@
}
protected:
- SVGPropertyTearOff(SVGAnimatedProperty* animatedProperty, SVGPropertyRole role, PropertyType& value)
+ SVGPropertyTearOff(SVGLegacyAnimatedProperty* animatedProperty, SVGPropertyRole role, PropertyType& value)
: m_animatedProperty(animatedProperty)
, m_role(role)
, m_value(&value)
@@ -164,7 +164,7 @@
m_childTearOffs.clear();
}
- RefPtr<SVGAnimatedProperty> m_animatedProperty;
+ RefPtr<SVGLegacyAnimatedProperty> m_animatedProperty;
SVGPropertyRole m_role;
PropertyType* m_value;
Vector<WeakPtr<SVGPropertyTearOffBase>> m_childTearOffs;