12019-10-01 Said Abou-Hallawa <sabouhallawa@apple.com>
2
3 Replace SVGProperty/SVGPropertyOwner by DOMLiveProperty/DOMLivePropertyObserver
4 https://bugs.webkit.org/show_bug.cgi?id=201782
5
6 Reviewed by NOBODY (OOPS!).
7
8 This is a step towards replacing SVGPoint by DOMPoint.
9
10 -- Add a new class, named DOMLiveProperty. Its job is to communicate the
11 changes in this object to its observer. This is replacing SVGProperty.
12 DOMPoint will be made in a super of it also in a following patch.
13
14 -- Add a new class, named DOMLivePropertyObserver and make it the base
15 class of DOMLiveProperty observers. Currently the following class are
16 made super classes of DOMLivePropertyObserver:
17 1. SVGElement: This observes the changes in all the SVG properties.
18 2. SVGAnimatedProperty: This observes the changes in its baseVal.
19 3. SVGPropertyList: This observes the changes in the items.
20 4. SVGTransform: This observes the changes in the underlying SVGMatrix.
21
22 * Headers.cmake:
23 * WebCore.xcodeproj/project.pbxproj:
24 * dom/DOMLiveProperty.h: Added.
25 (WebCore::DOMLiveProperty::isAttached const):
26 (WebCore::DOMLiveProperty::observer const):
27 (WebCore::DOMLiveProperty::attach):
28 (WebCore::DOMLiveProperty::detach):
29 (WebCore::DOMLiveProperty::svgContextElement const):
30 (WebCore::DOMLiveProperty::isReadOnly const):
31 (WebCore::DOMLiveProperty::commitChange):
32 (WebCore::DOMLiveProperty::valueAsString const):
33 (WebCore::DOMLiveProperty::DOMLiveProperty):
34 * dom/DOMLivePropertyObserver.h: Added.
35 (WebCore::DOMLivePropertyObserver::observer const):
36 (WebCore::DOMLivePropertyObserver::propertySVGContextElement const):
37 (WebCore::DOMLivePropertyObserver::isPropertyReadOnly const):
38 (WebCore::DOMLivePropertyObserver::commitPropertyChange):
39 * svg/SVGAngle.h:
40 (WebCore::SVGAngle::create):
41 * svg/SVGElement.cpp:
42 (WebCore::SVGElement::commitPropertyChange):
43 * svg/SVGElement.h:
44 * svg/SVGLength.h:
45 (WebCore::SVGLength::create):
46 (WebCore::SVGLength::valueForBindings):
47 (WebCore::SVGLength::setValueForBindings):
48 (WebCore::SVGLength::convertToSpecifiedUnits):
49 * svg/SVGLengthList.h:
50 (WebCore::SVGLengthList::create):
51 (WebCore::SVGLengthList::SVGLengthList):
52 * svg/SVGMatrix.h:
53 (WebCore::SVGMatrix::create):
54 * svg/SVGNumber.h:
55 (WebCore::SVGNumber::create):
56 * svg/SVGNumberList.h:
57 (WebCore::SVGNumberList::create):
58 * svg/SVGPathSeg.h:
59 * svg/SVGPathSegList.h:
60 * svg/SVGPointList.h:
61 (WebCore::SVGPointList::create):
62 * svg/SVGPreserveAspectRatio.h:
63 (WebCore::SVGPreserveAspectRatio::create):
64 * svg/SVGRect.h:
65 (WebCore::SVGRect::create):
66 * svg/SVGStringList.h:
67 * svg/SVGTransform.h:
68 * svg/SVGTransformList.h:
69 * svg/properties/SVGAnimatedProperty.cpp:
70 (WebCore::SVGAnimatedProperty::observer const):
71 (WebCore::SVGAnimatedProperty::commitPropertyChange):
72 (WebCore::SVGAnimatedProperty::owner const): Deleted.
73 * svg/properties/SVGAnimatedProperty.h:
74 (WebCore::SVGAnimatedProperty::valueAsString const):
75 * svg/properties/SVGAnimatedPropertyList.h:
76 * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
77 * svg/properties/SVGAnimatedValueProperty.h:
78 * svg/properties/SVGList.h:
79 * svg/properties/SVGMemberAccessor.h:
80 (WebCore::SVGMemberAccessor::matches const):
81 * svg/properties/SVGPointerMemberAccessor.h:
82 * svg/properties/SVGPrimitivePropertyAnimator.h:
83 (WebCore::SVGPrimitivePropertyAnimator::create):
84 (WebCore::SVGPrimitivePropertyAnimator::SVGPrimitivePropertyAnimator):
85 * svg/properties/SVGProperty.h: Removed.
86 * svg/properties/SVGPropertyAccessor.h:
87 * svg/properties/SVGPropertyAnimatorFactory.h:
88 (WebCore::SVGPropertyAnimatorFactory::createColorAnimator):
89 (WebCore::SVGPropertyAnimatorFactory::createLengthAnimator):
90 (WebCore::SVGPropertyAnimatorFactory::createLengthListAnimator):
91 (WebCore::SVGPropertyAnimatorFactory::createNumberAnimator):
92 (WebCore::SVGPropertyAnimatorFactory::createStringAnimator):
93 * svg/properties/SVGPropertyList.h:
94 (WebCore::SVGPropertyList::SVGPropertyList):
95 * svg/properties/SVGPropertyOwner.h: Removed.
96 * svg/properties/SVGPropertyOwnerRegistry.h:
97 * svg/properties/SVGPropertyRegistry.h:
98 * svg/properties/SVGSharedPrimitiveProperty.h:
99 * svg/properties/SVGValueProperty.h:
100 (WebCore::SVGValueProperty::SVGValueProperty):
101 * svg/properties/SVGValuePropertyAnimator.h:
102 (WebCore::SVGValuePropertyAnimator::SVGValuePropertyAnimator):
103 * svg/properties/SVGValuePropertyAnimatorImpl.h:
104 * svg/properties/SVGValuePropertyList.h:
105 (WebCore::SVGValuePropertyList::SVGValuePropertyList):
106 * svg/properties/SVGValuePropertyListAnimator.h:
107 (WebCore::SVGValuePropertyListAnimator::SVGValuePropertyListAnimator):
108 * svg/properties/SVGValuePropertyListAnimatorImpl.h:
109