12019-09-13 Said Abou-Hallawa <sabouhallawa@apple.com>
2
3 Introduce DOMLiveObject and make SVGProperty a superclass of it
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. We need to make
9 DOMPoint be a live object like SVGProperty.
10
11 -- A new class, named DOMLiveObject, is added. Its job is to communicate
12 the changes in this object to its observer. SVGProperty is made a super
13 class of DOMLiveObject. DOMPoint will be made in a super of it also
14 in a following patch.
15
16 -- Another new class, named DOMLiveObjectObserver and make it the base
17 class of DOMLiveObject observers. Currently the following class are
18 made super classes of DOMLiveObjectObserver:
19 1. Element: This observes the changes in all the SVG properties.
20 2. SVGAnimatedProperty: This observes the changes in its baseVal.
21 3. SVGPropertyList: This observes the changes in the items.
22 4. SVGTransform: This observes the changes in the underlying SVGMatrix.
23
24 * Headers.cmake:
25 * Sources.txt:
26 * WebCore.xcodeproj/project.pbxproj:
27 * dom/DOMLiveObject.h: Added.
28 (WebCore::DOMLiveObject::observer const):
29 (WebCore::DOMLiveObject::isAttached const):
30 (WebCore::DOMLiveObject::attach):
31 (WebCore::DOMLiveObject::detach):
32 (WebCore::DOMLiveObject::contextElement const):
33 (WebCore::DOMLiveObject::commitChange):
34 (WebCore::DOMLiveObject::isSVGProperty const):
35 (WebCore::DOMLiveObject::DOMLiveObject):
36 * dom/DOMLiveObjectObserver.h: Added.
37 (WebCore::DOMLiveObjectObserver::observer const):
38 (WebCore::DOMLiveObjectObserver::contextElement const):
39 (WebCore::DOMLiveObjectObserver::commitChange):
40 * dom/Element.h:
41 * svg/SVGAngle.h:
42 (WebCore::SVGAngle::create):
43 * svg/SVGElement.cpp:
44 (WebCore::SVGElement::commitChange):
45 (WebCore::SVGElement::commitPropertyChange): Deleted.
46 * svg/SVGElement.h:
47 * svg/SVGLength.h:
48 (WebCore::SVGLength::create):
49 (WebCore::SVGLength::valueForBindings):
50 (WebCore::SVGLength::setValueForBindings):
51 (WebCore::SVGLength::convertToSpecifiedUnits):
52 * svg/SVGLengthList.h:
53 (WebCore::SVGLengthList::create):
54 (WebCore::SVGLengthList::SVGLengthList):
55 * svg/SVGMatrix.h:
56 (WebCore::SVGMatrix::create):
57 * svg/SVGNumber.h:
58 (WebCore::SVGNumber::create):
59 * svg/SVGNumberList.h:
60 (WebCore::SVGNumberList::create):
61 * svg/SVGPathSegList.h:
62 * svg/SVGPointList.h:
63 (WebCore::SVGPointList::create):
64 * svg/SVGPreserveAspectRatio.h:
65 (WebCore::SVGPreserveAspectRatio::create):
66 * svg/SVGRect.h:
67 (WebCore::SVGRect::create):
68 * svg/SVGStringList.h:
69 * svg/SVGTransform.h:
70 * svg/SVGTransformList.h:
71 * svg/properties/SVGAnimatedDecoratedProperty.h:
72 (WebCore::SVGAnimatedDecoratedProperty::setBaseVal):
73 * svg/properties/SVGAnimatedPrimitiveProperty.h:
74 (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
75 * svg/properties/SVGAnimatedProperty.cpp:
76 (WebCore::SVGAnimatedProperty::observer const):
77 (WebCore::SVGAnimatedProperty::contextElement const):
78 (WebCore::SVGAnimatedProperty::commitChange):
79 (WebCore::SVGAnimatedProperty::owner const): Deleted.
80 (WebCore::SVGAnimatedProperty::commitPropertyChange): Deleted.
81 * svg/properties/SVGAnimatedProperty.h:
82 (WebCore::SVGAnimatedProperty::contextElement const): Deleted.
83 * svg/properties/SVGAnimatedPropertyList.h:
84 * svg/properties/SVGAnimatedValueProperty.h:
85 * svg/properties/SVGProperty.cpp: Added.
86 (WebCore::SVGProperty::svgContextElement const):
87 * svg/properties/SVGProperty.h:
88 (WebCore::SVGProperty::attach):
89 (WebCore::SVGProperty::detach):
90 (WebCore::SVGProperty::SVGProperty):
91 (WebCore::SVGProperty::isSVGProperty const):
92 (isType):
93 (WebCore::SVGProperty::isAttached const): Deleted.
94 (WebCore::SVGProperty::contextElement const): Deleted.
95 (WebCore::SVGProperty::commitChange): Deleted.
96 * svg/properties/SVGPropertyList.h:
97 (WebCore::SVGPropertyList::SVGPropertyList):
98 * svg/properties/SVGPropertyOwner.h: Removed.
99 * svg/properties/SVGValueProperty.h:
100 (WebCore::SVGValueProperty::SVGValueProperty):
101 * svg/properties/SVGValuePropertyList.h:
102 (WebCore::SVGValuePropertyList::SVGValuePropertyList):
103