12018-02-12 Said Abou-Hallawa <sabouhallawa@apple.com>
2
3 Make all the SVGElements' attributes be RefCounted objects
4 https://bugs.webkit.org/show_bug.cgi?id=168586
5
6 Reviewed by NOBODY (OOPS!).
7
8 The SVG tear-off objects have been causing many memory leak and use-after-
9 free bugs. Tear-off objects are created on demand. More specifically, they
10 are created when animating the SVGElement's attribute or when creating a
11 DOM object for that attribute. The problem is these tear-off objects hold
12 a raw reference to the SVGElement's attribute. To keep this reference valid,
13 both the SVGElement and the tear-off object used to hold a RefPtr to each
14 other which was causing a memory leak. When this strong double referencing
15 was relaxed by using WeakPtr or raw pointer from one side to the other, a
16 use-after-free bugs were happening. A more subtle problem can happen when
17 the tear-off object is created for an element in a list attribute. Even if
18 both the SVGElement and the tear-off exist in memory, a use-after-free may
19 happen if the list attribute was reallocated.
20
21 The current state of the code can not guarantee the validity of the reference
22 which is held by the tear-off object to the SVGElement's attribute. To fix
23 this issue, all the SVGElement's attributes have to be RefCounted objects.
24
25 Creating different classes for every data type an SVG attribute may have
26 does not look the cleanest solution. Besides, there are cases where the
27 union SVGAnimatedType is used to represent all the data types. So here is
28 the plan of this patch:
29
30 -- Create the class SVGValue which is a variant of all the SVG attribute
31 basic data types including the type of the elements in the SVG attribute
32 lists.
33
34 -- Change SVGAnimatedType to hold two SVGValues. The second one is optional
35 and only used for animated types which requires two data types.
36
37 -- Change all the SVG attributes to be of type RefPtr<SVGValue>.
38
39 -- Change all the SVG list attributes to be of type Vector<RefPtr<SVGValue>>.
40
41 -- Change all the tear-off objects to hold RefPtr<SVGValue> instead of
42 holding a raw reference.
43
44 * Sources.txt:
45 * WebCore.xcodeproj/project.pbxproj:
46 * rendering/svg/SVGPathData.cpp:
47 (WebCore::pathFromPolygonElement):
48 (WebCore::pathFromPolylineElement):
49 * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
50 (WebCore::updateCharacterData):
51 * svg/SVGAngle.h:
52 (WebCore::SVGAngle::create):
53 (WebCore::SVGAngle::unitType):
54 (WebCore::SVGAngle::setValueForBindings):
55 (WebCore::SVGAngle::valueForBindings):
56 (WebCore::SVGAngle::setValueInSpecifiedUnits):
57 (WebCore::SVGAngle::valueInSpecifiedUnits):
58 (WebCore::SVGAngle::setValueAsString):
59 (WebCore::SVGAngle::valueAsString):
60 (WebCore::SVGAngle::newValueSpecifiedUnits):
61 (WebCore::SVGAngle::convertToSpecifiedUnits):
62 (WebCore::SVGAngle::SVGAngle):
63 * svg/SVGAnimateElementBase.cpp:
64 (WebCore::SVGAnimateElementBase::resetAnimatedType):
65 (WebCore::SVGAnimateElementBase::applyResultsToTarget):
66 * svg/SVGAnimateMotionElement.cpp:
67 (WebCore::parsePoint): Deleted.
68 * svg/SVGAnimatedAngle.cpp:
69 (WebCore::SVGAnimatedAngleAnimator::constructFromString):
70 (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
71 (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
72 (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes):
73 (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
74 * svg/SVGAnimatedBoolean.cpp:
75 (WebCore::SVGAnimatedBooleanAnimator::constructFromString):
76 (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
77 (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
78 (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
79 * svg/SVGAnimatedColor.cpp:
80 (WebCore::SVGAnimatedColorAnimator::constructFromString):
81 (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
82 (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
83 * svg/SVGAnimatedEnumeration.cpp:
84 (WebCore::SVGAnimatedEnumerationAnimator::constructFromString):
85 (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation):
86 (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
87 (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
88 * svg/SVGAnimatedInteger.cpp:
89 (WebCore::SVGAnimatedIntegerAnimator::constructFromString):
90 (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
91 (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
92 (WebCore::SVGAnimatedIntegerAnimator::addAnimatedTypes):
93 (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
94 * svg/SVGAnimatedIntegerOptionalInteger.cpp:
95 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
96 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
97 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
98 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes):
99 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
100 * svg/SVGAnimatedLength.cpp:
101 (WebCore::SVGAnimatedLengthAnimator::constructFromString):
102 (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation):
103 (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
104 (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
105 (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
106 * svg/SVGAnimatedLengthList.cpp:
107 (WebCore::SVGAnimatedLengthListAnimator::constructFromString):
108 (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation):
109 (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
110 (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
111 (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
112 * svg/SVGAnimatedNumber.cpp:
113 (WebCore::SVGAnimatedNumberAnimator::constructFromString):
114 (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation):
115 (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
116 (WebCore::SVGAnimatedNumberAnimator::addAnimatedTypes):
117 (WebCore::parseNumberFromString):
118 (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
119 * svg/SVGAnimatedNumberList.cpp:
120 (WebCore::SVGAnimatedNumberListAnimator::constructFromString):
121 (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation):
122 (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
123 (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
124 (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
125 * svg/SVGAnimatedNumberOptionalNumber.cpp:
126 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
127 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation):
128 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
129 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes):
130 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
131 * svg/SVGAnimatedPath.cpp:
132 (WebCore::SVGAnimatedPathAnimator::constructFromString):
133 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
134 (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
135 (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
136 (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
137 * svg/SVGAnimatedPointList.cpp:
138 (WebCore::SVGAnimatedPointListAnimator::constructFromString):
139 (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation):
140 (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
141 (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
142 (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
143 * svg/SVGAnimatedPreserveAspectRatio.cpp:
144 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
145 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
146 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
147 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
148 * svg/SVGAnimatedRect.cpp:
149 (WebCore::SVGAnimatedRectAnimator::constructFromString):
150 (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
151 (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
152 (WebCore::SVGAnimatedRectAnimator::addAnimatedTypes):
153 (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
154 * svg/SVGAnimatedString.cpp:
155 (WebCore::SVGAnimatedStringAnimator::constructFromString):
156 (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
157 (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
158 (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
159 * svg/SVGAnimatedTransformList.cpp:
160 (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
161 (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation):
162 (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
163 (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
164 (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
165 (WebCore::SVGAnimatedTransformListAnimator::calculateDistance):
166 * svg/SVGAnimatedType.cpp: Removed.
167 * svg/SVGAnimatedType.h:
168 (WebCore::SVGAnimatedType::SVGAnimatedType):
169 (WebCore::SVGAnimatedType::create):
170 (WebCore::SVGAnimatedType::type const):
171 (WebCore::SVGAnimatedType::toString const):
172 (WebCore::SVGAnimatedType::parse):
173 (WebCore::SVGAnimatedType::supportsAnimVal):
174 (WebCore::SVGAnimatedType::valueAnimatedType):
175 (WebCore::SVGAnimatedType::angleAndEnumeration const): Deleted.
176 (WebCore::SVGAnimatedType::boolean const): Deleted.
177 (WebCore::SVGAnimatedType::color const): Deleted.
178 (WebCore::SVGAnimatedType::enumeration const): Deleted.
179 (WebCore::SVGAnimatedType::integer const): Deleted.
180 (WebCore::SVGAnimatedType::integerOptionalInteger const): Deleted.
181 (WebCore::SVGAnimatedType::length const): Deleted.
182 (WebCore::SVGAnimatedType::lengthList const): Deleted.
183 (WebCore::SVGAnimatedType::number const): Deleted.
184 (WebCore::SVGAnimatedType::numberList const): Deleted.
185 (WebCore::SVGAnimatedType::numberOptionalNumber const): Deleted.
186 (WebCore::SVGAnimatedType::path const): Deleted.
187 (WebCore::SVGAnimatedType::pointList const): Deleted.
188 (WebCore::SVGAnimatedType::preserveAspectRatio const): Deleted.
189 (WebCore::SVGAnimatedType::rect const): Deleted.
190 (WebCore::SVGAnimatedType::string const): Deleted.
191 (WebCore::SVGAnimatedType::transformList const): Deleted.
192 (WebCore::SVGAnimatedType::angleAndEnumeration): Deleted.
193 (WebCore::SVGAnimatedType::boolean): Deleted.
194 (WebCore::SVGAnimatedType::color): Deleted.
195 (WebCore::SVGAnimatedType::enumeration): Deleted.
196 (WebCore::SVGAnimatedType::integer): Deleted.
197 (WebCore::SVGAnimatedType::integerOptionalInteger): Deleted.
198 (WebCore::SVGAnimatedType::length): Deleted.
199 (WebCore::SVGAnimatedType::lengthList): Deleted.
200 (WebCore::SVGAnimatedType::number): Deleted.
201 (WebCore::SVGAnimatedType::numberList): Deleted.
202 (WebCore::SVGAnimatedType::numberOptionalNumber): Deleted.
203 (WebCore::SVGAnimatedType::path): Deleted.
204 (WebCore::SVGAnimatedType::pointList): Deleted.
205 (WebCore::SVGAnimatedType::preserveAspectRatio): Deleted.
206 (WebCore::SVGAnimatedType::rect): Deleted.
207 (WebCore::SVGAnimatedType::string): Deleted.
208 (WebCore::SVGAnimatedType::transformList): Deleted.
209 (): Deleted.
210 * svg/SVGAnimatedTypeAnimator.h:
211 (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue):
212 (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
213 (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues):
214 (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
215 (WebCore::SVGAnimatedTypeAnimator::executeAction):
216 * svg/SVGAnimationElement.h:
217 * svg/SVGComponentTransferFunctionElement.cpp:
218 (WebCore::SVGComponentTransferFunctionElement::transferFunction const):
219 * svg/SVGCursorElement.cpp:
220 (WebCore::SVGCursorElement::SVGCursorElement):
221 * svg/SVGEllipseElement.cpp:
222 (WebCore::SVGEllipseElement::SVGEllipseElement):
223 * svg/SVGFEColorMatrixElement.cpp:
224 (WebCore::SVGFEColorMatrixElement::setFilterEffectAttribute):
225 (WebCore::SVGFEColorMatrixElement::build):
226 * svg/SVGFEConvolveMatrixElement.cpp:
227 (WebCore::SVGFEConvolveMatrixElement::build):
228 * svg/SVGFilterElement.cpp:
229 (WebCore::SVGFilterElement::SVGFilterElement):
230 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
231 (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
232 * svg/SVGForeignObjectElement.cpp:
233 (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
234 * svg/SVGImageElement.cpp:
235 (WebCore::SVGImageElement::SVGImageElement):
236 * svg/SVGLength.h:
237 (WebCore::SVGLength::create):
238 (WebCore::SVGLength::unitType):
239 (WebCore::SVGLength::valueForBindings):
240 (WebCore::SVGLength::setValueForBindings):
241 (WebCore::SVGLength::valueInSpecifiedUnits):
242 (WebCore::SVGLength::setValueInSpecifiedUnits):
243 (WebCore::SVGLength::valueAsString):
244 (WebCore::SVGLength::setValueAsString):
245 (WebCore::SVGLength::newValueSpecifiedUnits):
246 (WebCore::SVGLength::convertToSpecifiedUnits):
247 (WebCore::SVGLength::SVGLength):
248 * svg/SVGLengthList.h:
249 (WebCore::SVGLengthList::create):
250 (WebCore::SVGLengthList::SVGLengthList):
251 * svg/SVGLengthListValues.cpp:
252 (WebCore::SVGLengthListValues::parse):
253 (WebCore::SVGLengthListValues::valueAsString const):
254 * svg/SVGLengthListValues.h:
255 (WebCore::SVGPropertyTraits<SVGLengthListValues>::initialValue):
256 (WebCore::SVGPropertyTraits<SVGLengthListValues>::fromString):
257 (WebCore::SVGPropertyTraits<SVGLengthListValues>::parse):
258 (WebCore::SVGPropertyTraits<SVGLengthListValues>::toString):
259 * svg/SVGLengthValue.h:
260 (WebCore::SVGPropertyTraits<SVGLengthValue>::parse):
261 (WebCore::SVGPropertyTraits<SVGLengthValue>::toString):
262 * svg/SVGLinearGradientElement.cpp:
263 (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
264 * svg/SVGListValues.cpp: Added.
265 (WebCore::SVGListValues<PropertyType>::resize):
266 (WebCore::SVGListValues<PropertyType>::deepCopy const):
267 * svg/SVGListValues.h: Added.
268 (WebCore::SVGListValues::SVGListValues):
269 (WebCore::SVGListValues::propertyAt const):
270 (WebCore::SVGListValues::propertyAt):
271 (WebCore::SVGListValues::firstProperty const):
272 (WebCore::SVGListValues::firstProperty):
273 (WebCore::SVGListValues::lastProperty const):
274 (WebCore::SVGListValues::lastProperty):
275 (WebCore::SVGListValues::properties const):
276 * svg/SVGMarkerElement.cpp:
277 (WebCore::SVGMarkerElement::SVGMarkerElement):
278 (WebCore::SVGMarkerElement::setOrientToAngle):
279 (WebCore::SVGMarkerElement::synchronizeOrientType):
280 (WebCore::SVGMarkerElement::orientType const):
281 * svg/SVGMarkerElement.h:
282 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue): Deleted.
283 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString): Deleted.
284 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString): Deleted.
285 (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue): Deleted.
286 (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue): Deleted.
287 (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString): Deleted.
288 * svg/SVGMarkerTypes.h: Added.
289 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue):
290 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString):
291 (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString):
292 (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue):
293 (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
294 (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue):
295 * svg/SVGMaskElement.cpp:
296 (WebCore::SVGMaskElement::SVGMaskElement):
297 * svg/SVGMatrix.h:
298 (WebCore::SVGMatrix::create):
299 (WebCore::SVGMatrix::a):
300 (WebCore::SVGMatrix::setA):
301 (WebCore::SVGMatrix::b):
302 (WebCore::SVGMatrix::setB):
303 (WebCore::SVGMatrix::c):
304 (WebCore::SVGMatrix::setC):
305 (WebCore::SVGMatrix::d):
306 (WebCore::SVGMatrix::setD):
307 (WebCore::SVGMatrix::e):
308 (WebCore::SVGMatrix::setE):
309 (WebCore::SVGMatrix::f):
310 (WebCore::SVGMatrix::setF):
311 (WebCore::SVGMatrix::multiply):
312 (WebCore::SVGMatrix::inverse):
313 (WebCore::SVGMatrix::translate):
314 (WebCore::SVGMatrix::scale):
315 (WebCore::SVGMatrix::scaleNonUniform):
316 (WebCore::SVGMatrix::rotate):
317 (WebCore::SVGMatrix::rotateFromVector):
318 (WebCore::SVGMatrix::flipX):
319 (WebCore::SVGMatrix::flipY):
320 (WebCore::SVGMatrix::skewX):
321 (WebCore::SVGMatrix::skewY):
322 (WebCore::SVGMatrix::SVGMatrix):
323 * svg/SVGNumber.h:
324 (WebCore::SVGNumber::create):
325 (WebCore::SVGNumber::valueForBindings):
326 (WebCore::SVGNumber::setValueForBindings):
327 (WebCore::SVGNumber::SVGNumber):
328 * svg/SVGNumberList.h:
329 (WebCore::SVGNumberList::create):
330 (WebCore::SVGNumberList::SVGNumberList):
331 * svg/SVGNumberListValues.cpp:
332 (WebCore::SVGNumberListValues::parse):
333 (WebCore::SVGNumberListValues::valueAsString const):
334 * svg/SVGNumberListValues.h:
335 (WebCore::SVGPropertyTraits<SVGNumberListValues>::fromString):
336 (WebCore::SVGPropertyTraits<SVGNumberListValues>::toString):
337 * svg/SVGParserUtilities.cpp:
338 (WebCore::parsePoint):
339 (WebCore::pointsListFromSVGData):
340 * svg/SVGParserUtilities.h:
341 * svg/SVGPathByteStream.h:
342 (WebCore::SVGPathByteStream::SVGPathByteStream):
343 (WebCore::SVGPathByteStream::operator=):
344 (WebCore::SVGPathByteStream::operator== const):
345 (WebCore::SVGPathByteStream::operator!= const):
346 (WebCore::SVGPathByteStream::copy const):
347 (WebCore::SVGPathByteStream::append):
348 (WebCore::SVGPathByteStream::isEmpty const):
349 (WebCore::SVGPropertyTraits<SVGPathByteStream>::initialValue):
350 (WebCore::SVGPropertyTraits<SVGPathByteStream>::fromString):
351 * svg/SVGPathElement.cpp:
352 (WebCore::SVGPathElement::SVGPathElement):
353 (WebCore::SVGPathElement::svgAttributeChanged):
354 (WebCore::SVGPathElement::lookupOrCreateDWrapper):
355 (WebCore::SVGPathElement::synchronizeD):
356 (WebCore::SVGPathElement::pathSegListChanged):
357 * svg/SVGPathSegList.cpp:
358 (WebCore::SVGPathSegList::clearContextAndRoles):
359 (WebCore::SVGPathSegList::clear):
360 (WebCore::SVGPathSegList::replaceItem):
361 * svg/SVGPathSegList.h:
362 * svg/SVGPathSegListBuilder.cpp:
363 (WebCore::SVGPathSegListBuilder::moveTo):
364 (WebCore::SVGPathSegListBuilder::lineTo):
365 (WebCore::SVGPathSegListBuilder::lineToHorizontal):
366 (WebCore::SVGPathSegListBuilder::lineToVertical):
367 (WebCore::SVGPathSegListBuilder::curveToCubic):
368 (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
369 (WebCore::SVGPathSegListBuilder::curveToQuadratic):
370 (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
371 (WebCore::SVGPathSegListBuilder::arcTo):
372 (WebCore::SVGPathSegListBuilder::closePath):
373 * svg/SVGPathSegListSource.cpp:
374 (WebCore::SVGPathSegListSource::parseSVGSegmentType):
375 (WebCore::SVGPathSegListSource::nextCommand):
376 * svg/SVGPathSegListValues.h:
377 * svg/SVGPathUtilities.cpp:
378 (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
379 (WebCore::addToSVGPathByteStream):
380 * svg/SVGPoint.h:
381 (WebCore::SVGPoint::create):
382 (WebCore::SVGPoint::x):
383 (WebCore::SVGPoint::setX):
384 (WebCore::SVGPoint::y):
385 (WebCore::SVGPoint::setY):
386 (WebCore::SVGPoint::matrixTransform):
387 (WebCore::SVGPoint::SVGPoint):
388 * svg/SVGPointList.h:
389 (WebCore::SVGPointList::create):
390 (WebCore::SVGPointList::SVGPointList):
391 * svg/SVGPointListValues.cpp:
392 (WebCore::SVGPointListValues::valueAsString const):
393 * svg/SVGPointListValues.h:
394 (WebCore::SVGPropertyTraits<SVGPointListValues>::fromString):
395 * svg/SVGPolyElement.cpp:
396 (WebCore::SVGPolyElement::parseAttribute):
397 (WebCore::SVGPolyElement::synchronizePoints):
398 * svg/SVGPolyElement.h:
399 (WebCore::SVGPolyElement::pointList const):
400 * svg/SVGPreserveAspectRatio.h:
401 (WebCore::SVGPreserveAspectRatio::create):
402 (WebCore::SVGPreserveAspectRatio::align):
403 (WebCore::SVGPreserveAspectRatio::setAlign):
404 (WebCore::SVGPreserveAspectRatio::meetOrSlice):
405 (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
406 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
407 * svg/SVGPreserveAspectRatioValue.cpp:
408 (WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue):
409 * svg/SVGPreserveAspectRatioValue.h:
410 (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::fromString):
411 * svg/SVGRadialGradientElement.cpp:
412 (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
413 * svg/SVGRect.h:
414 (WebCore::SVGRect::create):
415 (WebCore::SVGRect::x):
416 (WebCore::SVGRect::setX):
417 (WebCore::SVGRect::y):
418 (WebCore::SVGRect::setY):
419 (WebCore::SVGRect::width):
420 (WebCore::SVGRect::setWidth):
421 (WebCore::SVGRect::height):
422 (WebCore::SVGRect::setHeight):
423 (WebCore::SVGRect::SVGRect):
424 * svg/SVGRectTraits.h: Removed.
425 * svg/SVGSVGElement.cpp:
426 (WebCore::SVGSVGElement::SVGSVGElement):
427 (WebCore::SVGSVGElement::setCurrentTranslate):
428 (WebCore::checkIntersectionWithoutUpdatingLayout):
429 (WebCore::checkEnclosureWithoutUpdatingLayout):
430 (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
431 * svg/SVGSVGElement.h:
432 (WebCore::SVGSVGElement::currentTranslateValue):
433 * svg/SVGStringList.h:
434 * svg/SVGStringListValues.cpp:
435 (WebCore::SVGStringListValues::reset):
436 (WebCore::SVGStringListValues::parse):
437 (WebCore::SVGStringListValues::valueAsString const):
438 * svg/SVGStringListValues.h:
439 * svg/SVGTests.cpp:
440 (WebCore::SVGTests::SVGTests):
441 (WebCore::SVGTests::isValid const):
442 (WebCore::SVGTests::parseAttribute):
443 (WebCore::SVGTests::synchronizeAttribute):
444 * svg/SVGTextContentElement.cpp:
445 (WebCore::SVGTextContentElement::SVGTextContentElement):
446 (WebCore::SVGTextContentElement::textLengthAnimated):
447 (WebCore::SVGTextContentElement::getCharNumAtPosition):
448 (WebCore::SVGTextContentElement::parseAttribute):
449 (WebCore::SVGTextContentElement::svgAttributeChanged):
450 * svg/SVGTextPathElement.cpp:
451 (WebCore::SVGTextPathElement::SVGTextPathElement):
452 * svg/SVGTransform.cpp:
453 (WebCore::SVGTransform::matrix):
454 * svg/SVGTransform.h:
455 (WebCore::SVGTransform::create):
456 (WebCore::SVGTransform::type):
457 (WebCore::SVGTransform::angle):
458 (WebCore::SVGTransform::setMatrix):
459 (WebCore::SVGTransform::setTranslate):
460 (WebCore::SVGTransform::setScale):
461 (WebCore::SVGTransform::setRotate):
462 (WebCore::SVGTransform::setSkewX):
463 (WebCore::SVGTransform::setSkewY):
464 (WebCore::SVGTransform::SVGTransform):
465 * svg/SVGTransformList.h:
466 * svg/SVGTransformListValues.cpp:
467 (WebCore::SVGTransformListValues::consolidate):
468 (WebCore::SVGTransformListValues::concatenate const):
469 (WebCore::SVGTransformListValues::valueAsString const):
470 * svg/SVGTransformListValues.h:
471 (WebCore::SVGPropertyTraits<SVGTransformListValues>::fromString):
472 * svg/SVGTransformValue.h:
473 (WebCore::SVGPropertyTraits<SVGTransformValue>::initialValue):
474 (WebCore::SVGPropertyTraits<SVGTransformValue>::toString):
475 * svg/SVGTransformable.cpp:
476 (WebCore::SVGTransformable::parseTransformAttribute):
477 * svg/SVGUseElement.cpp:
478 (WebCore::SVGUseElement::SVGUseElement):
479 * svg/SVGValue.h: Added.
480 (WebCore::toStringVisitor::operator()):
481 (WebCore::parseVisitor::parseVisitor):
482 (WebCore::parseVisitor::operator()):
483 (WebCore::SVGValue::create):
484 (WebCore::SVGValue::is const):
485 (WebCore::SVGValue::operator const PropertyType& const):
486 (WebCore::SVGValue::operator PropertyType&):
487 (WebCore::SVGValue::toString const):
488 (WebCore::SVGValue::parse):
489 (WebCore::SVGValue::SVGValue):
490 * svg/SVGViewElement.cpp:
491 (WebCore::SVGViewElement::SVGViewElement):
492 (WebCore::SVGViewElement::parseAttribute):
493 * svg/SVGViewElement.h:
494 * svg/SVGViewSpec.cpp:
495 (WebCore::SVGViewSpec::SVGViewSpec):
496 (WebCore::SVGViewSpec::transformString const):
497 (WebCore::SVGViewSpec::viewBoxString const):
498 (WebCore::SVGViewSpec::preserveAspectRatioString const):
499 (WebCore::SVGViewSpec::reset):
500 (WebCore::SVGViewSpec::parseViewSpec):
501 * svg/SVGViewSpec.h:
502 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
503 * svg/properties/SVGAnimatedListPropertyTearOff.h:
504 (WebCore::SVGAnimatedListPropertyTearOff::create):
505 (WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue):
506 (WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue const):
507 (WebCore::SVGAnimatedListPropertyTearOff::currentBaseValue const):
508 (WebCore::SVGAnimatedListPropertyTearOff::animationStarted):
509 (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
510 (WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded):
511 (WebCore::SVGAnimatedListPropertyTearOff::animValWillChange):
512 (WebCore::SVGAnimatedListPropertyTearOff::animValDidChange):
513 (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
514 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
515 * svg/properties/SVGAnimatedProperty.h:
516 (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
517 * svg/properties/SVGAnimatedPropertyMacros.h:
518 (WebCore::SVGSynchronizableAnimatedProperty::SVGSynchronizableAnimatedProperty):
519 * svg/properties/SVGAnimatedPropertyTearOff.h:
520 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
521 (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal):
522 (WebCore::SVGAnimatedStaticPropertyTearOff::animVal):
523 (WebCore::SVGAnimatedStaticPropertyTearOff::setBaseVal):
524 (WebCore::SVGAnimatedStaticPropertyTearOff::create):
525 (WebCore::SVGAnimatedStaticPropertyTearOff::currentAnimatedValue):
526 (WebCore::SVGAnimatedStaticPropertyTearOff::currentAnimatedValue const):
527 (WebCore::SVGAnimatedStaticPropertyTearOff::currentBaseValue const):
528 (WebCore::SVGAnimatedStaticPropertyTearOff::animationStarted):
529 (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
530 (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
531 * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
532 * svg/properties/SVGListProperty.h:
533 (WebCore::SVGListProperty::setValuesAndWrappers):
534 (WebCore::SVGListProperty::clearValues):
535 (WebCore::SVGListProperty::clearValuesAndWrappers):
536 (WebCore::SVGListProperty::numberOfItems const):
537 (WebCore::SVGListProperty::initializeValues):
538 (WebCore::SVGListProperty::initializeValuesAndWrappers):
539 (WebCore::SVGListProperty::canGetItem):
540 (WebCore::SVGListProperty::getItemValues):
541 (WebCore::SVGListProperty::getItemValuesAndWrappers):
542 (WebCore::SVGListProperty::insertItemBeforeValues):
543 (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
544 (WebCore::SVGListProperty::canReplaceItem):
545 (WebCore::SVGListProperty::replaceItemValues):
546 (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
547 (WebCore::SVGListProperty::canRemoveItem):
548 (WebCore::SVGListProperty::removeItemValues):
549 (WebCore::SVGListProperty::removeItemValuesAndWrappers):
550 (WebCore::SVGListProperty::appendItemValues):
551 (WebCore::SVGListProperty::appendItemValuesAndWrappers):
552 (WebCore::SVGListProperty::values const):
553 (WebCore::SVGListProperty::valuesProperty const):
554 (WebCore::SVGListProperty::SVGListProperty):
555 (): Deleted.
556 (WebCore::SVGListProperty::values): Deleted.
557 (WebCore::SVGListProperty::~SVGListProperty): Deleted.
558 * svg/properties/SVGListPropertyTearOff.h:
559 (WebCore::SVGListPropertyTearOff::create):
560 (WebCore::SVGListPropertyTearOff::findItem const):
561 (WebCore::SVGListPropertyTearOff::removeItemFromList):
562 (WebCore::SVGListPropertyTearOff::SVGListPropertyTearOff):
563 * svg/properties/SVGMatrixTearOff.h:
564 * svg/properties/SVGPropertyTearOff.h:
565 (WebCore::SVGPropertyTearOff::value const):
566 (WebCore::SVGPropertyTearOff::valueProperty):
567 (WebCore::SVGPropertyTearOff::setValue):
568 (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
569 (WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
570 (WebCore::SVGPropertyTearOff::propertyReference): Deleted.
571 * svg/properties/SVGPropertyTraits.h:
572 (WebCore::SVGPropertyTraits<bool>::fromString):
573 (WebCore::SVGPropertyTraits<Color>::initialValue):
574 (WebCore::SVGPropertyTraits<Color>::fromString):
575 (WebCore::SVGPropertyTraits<Color>::parse):
576 (WebCore::SVGPropertyTraits<Color>::toString):
577 (WebCore::SVGPropertyTraits<int>::fromString):
578 (WebCore::SVGPropertyTraits<float>::fromString):
579 (WebCore::SVGPropertyTraits<float>::parse):
580 (WebCore::SVGPropertyTraits<FloatPoint>::initialValue):
581 (WebCore::SVGPropertyTraits<FloatPoint>::fromString):
582 (WebCore::SVGPropertyTraits<FloatPoint>::parse):
583 (WebCore::SVGPropertyTraits<FloatPoint>::toString):
584 (WebCore::SVGPropertyTraits<FloatRect>::initialValue):
585 (WebCore::SVGPropertyTraits<FloatRect>::fromString):
586 (WebCore::SVGPropertyTraits<FloatRect>::parse):
587 (WebCore::SVGPropertyTraits<FloatRect>::toString):
588 (WebCore::SVGPropertyTraits<String>::fromString):
589 (WebCore::SVGPropertyTraits<String>::parse):
590 (WebCore::SVGPropertyTraits<String>::toString):
591 * svg/properties/SVGStaticListPropertyTearOff.h:
592 (WebCore::SVGStaticListPropertyTearOff::SVGStaticListPropertyTearOff):
593 * svg/properties/SVGStaticPropertyTearOff.h:
594