[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zimmermann at webkit.org
zimmermann at webkit.org
Wed Dec 22 15:33:38 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d26a72c1ca1ea18b6719b9f21908a1e5491747f4
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 8 13:43:41 2010 +0000
2010-11-08 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convert SVGPoint/SVGPointList to the new SVGPropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=49067
Remove SVGAnimatedPoints interface, not reachable through bindings anyway, it was just another MI interface, that
now has been integrated into SVGPolylineElement/SVGPolygonElement, simplfying the generation and avoiding virtual
calls in SVGPolylineElement/SVGPolygonElement.
Remove the need to use manual XML <-> SVG DOM synchronization. The points/animatedPoints methods now create
SVGListPropertyTearOffs, thus using the same synchronization/expose-to-bindings concept like all other
animated properties.
Convert SVGPoint/SVGPointList to use the new SVGPropertyTearOff concept, adapted all code, as SVGPointList
is now a plain Vector<FloatPoint>. Enable StrictTypeChecking for SVGPoint.
Test: svg/dom/SVGPoint.html
* Android.derived.v8bindings.mk: Remove SVGAnimatedPoints (and IDL generation).
* Android.mk: Ditto.
* CMakeLists.txt: Ditto.
* DerivedSources.make: Ditto.
* GNUmakefile.am: Ditto. Add SVGStaticPropertyTearOff.h to build.
* WebCore.gypi: Ditto.
* WebCore.order: Remove SVGAnimatedPoints symbols.
* WebCore.pro: Remove SVGAnimatedPoints (and IDL generation). Add SVGStaticPropertyTearOff.h to build.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/objc/DOMSVG.h: Remove DOMSVGAnimatedPoints include.
* bindings/scripts/CodeGenerator.pm: Adapt code converting SVGPoint/SVGPointList to use the new SVGPropertyTearOff concepts.
* bindings/scripts/CodeGeneratorJS.pm: Ditto.
* bindings/scripts/CodeGeneratorObjC.pm: Ditto.
* bindings/scripts/CodeGeneratorV8.pm: Ditto.
* rendering/SVGRenderTreeAsText.cpp: Adapt for SVGPolyElement API change, use pointList() instead of points() (which is only used for bindings now).
(WebCore::operator<<):
* svg/SVGAllInOne.cpp: Remove SVGAnimatedPoints.cpp.
* svg/SVGAnimateElement.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
(WebCore::SVGAnimateElement::calculateAnimatedValue):
(WebCore::SVGAnimateElement::calculateFromAndToValues):
(WebCore::SVGAnimateElement::applyResultsToTarget):
* svg/SVGAnimateElement.h: Ditto.
* svg/SVGAnimatedPoints.cpp: Removed.
* svg/SVGAnimatedPoints.h: Removed.
* svg/SVGAnimatedPoints.idl: Removed.
* svg/SVGParserUtilities.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
(WebCore::pointsListFromSVGData):
* svg/SVGParserUtilities.h: Ditto.
* svg/SVGPoint.idl: Remove PODType marker, and add StrictTypeChecking for x/y attributes.
* svg/SVGPointList.cpp: SVGPointList is now a plain Vector<FloatPoint>, rewrite.
(WebCore::SVGPointList::valueAsString):
(WebCore::SVGPointList::createAnimated):
* svg/SVGPointList.h: Ditto.
(WebCore::SVGPointList::SVGPointList):
* svg/SVGPolyElement.cpp: Remove manual SVG <-> XML DOM synchronization. Now handles through the SVGAnimatedPropertyTearOff concept.
(WebCore::SVGPolyElement::parseMappedAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
(WebCore::SVGPolyElement::synchronizeProperty):
(WebCore::SVGPolyElement::synchronizePoints):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):
* svg/SVGPolyElement.h: Reindented.
(WebCore::SVGPolyElement::pointList):
(WebCore::SVGPolyElement::isValid):
(WebCore::SVGPolyElement::supportsMarkers):
* svg/SVGPolygonElement.cpp: Adapt for SVGPointList API change.
(WebCore::SVGPolygonElement::toPathData):
* svg/SVGPolygonElement.idl: Remove SVGAnimatedPoints inheritance.
* svg/SVGPolylineElement.cpp: Adapt for SVGPointList API change.
(WebCore::SVGPolylineElement::toPathData):
* svg/SVGPolylineElement.idl: Remove SVGAnimatedPoints inheritance.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentTranslate): Use updateCurrentTranslate().
(WebCore::SVGSVGElement::updateCurrentTranslate): Added, only used by the bindings, after changing a value of SVGStaticPropertyTearOff object.
* svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::currentTranslate): Return reference to m_translation.
* svg/properties/SVGPropertyTearOff.h: Made constructors protected, as SVGStaticPropertyTearOff inherits from it.
(WebCore::SVGPropertyTearOff::commitChange):
* svg/properties/SVGPropertyTraits.h: Add SVGPointList handing.
* svg/properties/SVGStaticPropertyTearOff.h: Added. Used for SVGProperty types returned by attributes, that are not associated with a SVGAnimatedProperty. (SVGSVGElement::currentTranslate).
(WebCore::SVGStaticPropertyTearOff::create):
(WebCore::SVGStaticPropertyTearOff::commitChange):
(WebCore::SVGStaticPropertyTearOff::SVGStaticPropertyTearOff):
2010-11-08 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
Convert SVGPoint/SVGPointList to the new SVGPropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=49067
* platform/mac/svg/custom/use-property-synchronization-crash-expected.txt: Cloned <polyline> now reports parsing problems as well.
* svg/custom/polyline-points-crash-expected.txt: Update expectation.
* svg/custom/polyline-points-crash.html: appendItem(null) now throws, catch exception.
* svg/dom/points-parser.html: Fix failure reporting, use correct variable name.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c2191d9..f8fcf1d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-08 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Convert SVGPoint/SVGPointList to the new SVGPropertyTearOff concept
+ https://bugs.webkit.org/show_bug.cgi?id=49067
+
+ * platform/mac/svg/custom/use-property-synchronization-crash-expected.txt: Cloned <polyline> now reports parsing problems as well.
+ * svg/custom/polyline-points-crash-expected.txt: Update expectation.
+ * svg/custom/polyline-points-crash.html: appendItem(null) now throws, catch exception.
+ * svg/dom/points-parser.html: Fix failure reporting, use correct variable name.
+
2010-11-08 Renata Hodovan <reni at webkit.org>
Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/platform/mac/svg/custom/use-property-synchronization-crash-expected.txt b/LayoutTests/platform/mac/svg/custom/use-property-synchronization-crash-expected.txt
index 8bbb03f..b5efa0d 100644
--- a/LayoutTests/platform/mac/svg/custom/use-property-synchronization-crash-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/use-property-synchronization-crash-expected.txt
@@ -1,4 +1,5 @@
CONSOLE MESSAGE: line 5: Error: Problem parsing points="0"
+CONSOLE MESSAGE: line 7: Error: Problem parsing points="0"
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
diff --git a/LayoutTests/svg/custom/polyline-points-crash-expected.txt b/LayoutTests/svg/custom/polyline-points-crash-expected.txt
index 4ac064b..b08f058 100644
--- a/LayoutTests/svg/custom/polyline-points-crash-expected.txt
+++ b/LayoutTests/svg/custom/polyline-points-crash-expected.txt
@@ -1 +1,2 @@
+Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
PASSED -- WebKit did not crash!
diff --git a/LayoutTests/svg/custom/polyline-points-crash.html b/LayoutTests/svg/custom/polyline-points-crash.html
index 9804b6e..65c4dcf 100644
--- a/LayoutTests/svg/custom/polyline-points-crash.html
+++ b/LayoutTests/svg/custom/polyline-points-crash.html
@@ -3,6 +3,10 @@ if (window.layoutTestController)
layoutTestController.dumpAsText();
var polyline = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
-polyline.points.appendItem(null);
+try {
+ polyline.points.appendItem(null);
+} catch (e) {
+ document.write("Caught exception: " + e + "<br>");
+}
document.write("PASSED -- WebKit did not crash!")
</script>
diff --git a/LayoutTests/svg/dom/SVGPoint-expected.txt b/LayoutTests/svg/dom/SVGPoint-expected.txt
new file mode 100644
index 0000000..992ab1a
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGPoint-expected.txt
@@ -0,0 +1,25 @@
+This test checks the SVGPoint API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial point values
+PASS point.x is 0
+PASS point.y is 0
+
+Check assigning points
+PASS point.x = 100 is 100
+PASS point.y = 200 is 200
+
+Check assigning invalid points
+PASS point.x = point threw exception TypeError: Type error.
+PASS point.y = null is null
+
+Check that the point is still containing the correct values
+PASS point.x is 100
+PASS point.y is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGPoint.html b/LayoutTests/svg/dom/SVGPoint.html
new file mode 100644
index 0000000..50975fe
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGPoint.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGPoint.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/points-parser.html b/LayoutTests/svg/dom/points-parser.html
index f76db7d..23f3ec7 100644
--- a/LayoutTests/svg/dom/points-parser.html
+++ b/LayoutTests/svg/dom/points-parser.html
@@ -27,7 +27,7 @@ function parsePoints(str, result)
if (points === result) {
testPassed("'" + points + "' is '" + result + "'");
} else {
- testFailed("'" + string + "' should be '" + result + "', but is '" + points + "'");
+ testFailed("'" + str + "' should be '" + result + "', but is '" + points + "'");
}
debug("");
}
diff --git a/LayoutTests/svg/dom/script-tests/SVGPoint.js b/LayoutTests/svg/dom/script-tests/SVGPoint.js
new file mode 100644
index 0000000..1a38a3d
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/SVGPoint.js
@@ -0,0 +1,26 @@
+description("This test checks the SVGPoint API");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var point = svgElement.createSVGPoint();
+
+debug("");
+debug("Check initial point values");
+shouldBe("point.x", "0");
+shouldBe("point.y", "0");
+
+debug("");
+debug("Check assigning points");
+shouldBe("point.x = 100", "100");
+shouldBe("point.y = 200", "200");
+
+debug("");
+debug("Check assigning invalid points");
+shouldThrow("point.x = point");
+shouldBeNull("point.y = null");
+
+debug("");
+debug("Check that the point is still containing the correct values");
+shouldBe("point.x", "100");
+shouldBe("point.y", "0");
+
+successfullyParsed = true;
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index e8a9cfd..3edea16 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -504,7 +504,6 @@ GEN += \
$(intermediates)/bindings/V8SVGAnimatedLengthList.h \
$(intermediates)/bindings/V8SVGAnimatedNumber.h \
$(intermediates)/bindings/V8SVGAnimatedNumberList.h \
- $(intermediates)/bindings/V8SVGAnimatedPoints.h \
$(intermediates)/bindings/V8SVGAnimatedPreserveAspectRatio.h \
$(intermediates)/bindings/V8SVGAnimatedRect.h \
$(intermediates)/bindings/V8SVGAnimatedString.h \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 1764e61..1421b63 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -863,7 +863,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
svg/SVGAnimateMotionElement.cpp \
svg/SVGAnimateTransformElement.cpp \
svg/SVGAnimatedPathData.cpp \
- svg/SVGAnimatedPoints.cpp \
svg/SVGAnimationElement.cpp \
svg/SVGCircleElement.cpp \
svg/SVGClipPathElement.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 10246cd..660e5e5 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -100,7 +100,6 @@ SET(WebCore_IDL_INCLUDES
SET(WebCore_IDL_PURE_FILES
svg/ElementTimeControl.idl
svg/SVGAnimatedPathData.idl
- svg/SVGAnimatedPoints.idl
svg/SVGExternalResourcesRequired.idl
svg/SVGFilterPrimitiveStandardAttributes.idl
svg/SVGFitToViewBox.idl
@@ -1778,7 +1777,6 @@ IF (ENABLE_SVG)
svg/SVGAnimateMotionElement.cpp
svg/SVGAnimateTransformElement.cpp
svg/SVGAnimatedPathData.cpp
- svg/SVGAnimatedPoints.cpp
svg/SVGAnimationElement.cpp
svg/SVGCircleElement.cpp
svg/SVGClipPathElement.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 30d6458..81ab524 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,88 @@
+2010-11-08 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Convert SVGPoint/SVGPointList to the new SVGPropertyTearOff concept
+ https://bugs.webkit.org/show_bug.cgi?id=49067
+
+ Remove SVGAnimatedPoints interface, not reachable through bindings anyway, it was just another MI interface, that
+ now has been integrated into SVGPolylineElement/SVGPolygonElement, simplfying the generation and avoiding virtual
+ calls in SVGPolylineElement/SVGPolygonElement.
+
+ Remove the need to use manual XML <-> SVG DOM synchronization. The points/animatedPoints methods now create
+ SVGListPropertyTearOffs, thus using the same synchronization/expose-to-bindings concept like all other
+ animated properties.
+
+ Convert SVGPoint/SVGPointList to use the new SVGPropertyTearOff concept, adapted all code, as SVGPointList
+ is now a plain Vector<FloatPoint>. Enable StrictTypeChecking for SVGPoint.
+
+ Test: svg/dom/SVGPoint.html
+
+ * Android.derived.v8bindings.mk: Remove SVGAnimatedPoints (and IDL generation).
+ * Android.mk: Ditto.
+ * CMakeLists.txt: Ditto.
+ * DerivedSources.make: Ditto.
+ * GNUmakefile.am: Ditto. Add SVGStaticPropertyTearOff.h to build.
+ * WebCore.gypi: Ditto.
+ * WebCore.order: Remove SVGAnimatedPoints symbols.
+ * WebCore.pro: Remove SVGAnimatedPoints (and IDL generation). Add SVGStaticPropertyTearOff.h to build.
+ * WebCore.vcproj/WebCore.vcproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/objc/DOMSVG.h: Remove DOMSVGAnimatedPoints include.
+ * bindings/scripts/CodeGenerator.pm: Adapt code converting SVGPoint/SVGPointList to use the new SVGPropertyTearOff concepts.
+ * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+ * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+ * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+ * rendering/SVGRenderTreeAsText.cpp: Adapt for SVGPolyElement API change, use pointList() instead of points() (which is only used for bindings now).
+ (WebCore::operator<<):
+ * svg/SVGAllInOne.cpp: Remove SVGAnimatedPoints.cpp.
+ * svg/SVGAnimateElement.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
+ (WebCore::SVGAnimateElement::calculateAnimatedValue):
+ (WebCore::SVGAnimateElement::calculateFromAndToValues):
+ (WebCore::SVGAnimateElement::applyResultsToTarget):
+ * svg/SVGAnimateElement.h: Ditto.
+ * svg/SVGAnimatedPoints.cpp: Removed.
+ * svg/SVGAnimatedPoints.h: Removed.
+ * svg/SVGAnimatedPoints.idl: Removed.
+ * svg/SVGParserUtilities.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
+ (WebCore::pointsListFromSVGData):
+ * svg/SVGParserUtilities.h: Ditto.
+ * svg/SVGPoint.idl: Remove PODType marker, and add StrictTypeChecking for x/y attributes.
+ * svg/SVGPointList.cpp: SVGPointList is now a plain Vector<FloatPoint>, rewrite.
+ (WebCore::SVGPointList::valueAsString):
+ (WebCore::SVGPointList::createAnimated):
+ * svg/SVGPointList.h: Ditto.
+ (WebCore::SVGPointList::SVGPointList):
+ * svg/SVGPolyElement.cpp: Remove manual SVG <-> XML DOM synchronization. Now handles through the SVGAnimatedPropertyTearOff concept.
+ (WebCore::SVGPolyElement::parseMappedAttribute):
+ (WebCore::SVGPolyElement::svgAttributeChanged):
+ (WebCore::SVGPolyElement::synchronizeProperty):
+ (WebCore::SVGPolyElement::synchronizePoints):
+ (WebCore::SVGPolyElement::points):
+ (WebCore::SVGPolyElement::animatedPoints):
+ * svg/SVGPolyElement.h: Reindented.
+ (WebCore::SVGPolyElement::pointList):
+ (WebCore::SVGPolyElement::isValid):
+ (WebCore::SVGPolyElement::supportsMarkers):
+ * svg/SVGPolygonElement.cpp: Adapt for SVGPointList API change.
+ (WebCore::SVGPolygonElement::toPathData):
+ * svg/SVGPolygonElement.idl: Remove SVGAnimatedPoints inheritance.
+ * svg/SVGPolylineElement.cpp: Adapt for SVGPointList API change.
+ (WebCore::SVGPolylineElement::toPathData):
+ * svg/SVGPolylineElement.idl: Remove SVGAnimatedPoints inheritance.
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::setCurrentTranslate): Use updateCurrentTranslate().
+ (WebCore::SVGSVGElement::updateCurrentTranslate): Added, only used by the bindings, after changing a value of SVGStaticPropertyTearOff object.
+ * svg/SVGSVGElement.h:
+ (WebCore::SVGSVGElement::currentTranslate): Return reference to m_translation.
+ * svg/properties/SVGPropertyTearOff.h: Made constructors protected, as SVGStaticPropertyTearOff inherits from it.
+ (WebCore::SVGPropertyTearOff::commitChange):
+ * svg/properties/SVGPropertyTraits.h: Add SVGPointList handing.
+ * svg/properties/SVGStaticPropertyTearOff.h: Added. Used for SVGProperty types returned by attributes, that are not associated with a SVGAnimatedProperty. (SVGSVGElement::currentTranslate).
+ (WebCore::SVGStaticPropertyTearOff::create):
+ (WebCore::SVGStaticPropertyTearOff::commitChange):
+ (WebCore::SVGStaticPropertyTearOff::SVGStaticPropertyTearOff):
+
2010-11-08 Mikhail Naganov <mnaganov at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 68979b0..ef22c83 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -330,7 +330,6 @@ DOM_CLASSES = \
SVGAnimatedNumber \
SVGAnimatedNumberList \
SVGAnimatedPathData \
- SVGAnimatedPoints \
SVGAnimatedPreserveAspectRatio \
SVGAnimatedRect \
SVGAnimatedString \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index ba76c6b..80b1183 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3052,6 +3052,7 @@ webcore_sources += \
WebCore/svg/properties/SVGPropertyTearOff.h \
WebCore/svg/properties/SVGPropertyTraits.h \
WebCore/svg/properties/SVGStaticListPropertyTearOff.h \
+ WebCore/svg/properties/SVGStaticPropertyTearOff.h \
WebCore/svg/RadialGradientAttributes.h \
WebCore/svg/SVGAElement.cpp \
WebCore/svg/SVGAElement.h \
@@ -3071,8 +3072,6 @@ webcore_sources += \
WebCore/svg/SVGAnimatedNumberList.h \
WebCore/svg/SVGAnimatedPathData.cpp \
WebCore/svg/SVGAnimatedPathData.h \
- WebCore/svg/SVGAnimatedPoints.cpp \
- WebCore/svg/SVGAnimatedPoints.h \
WebCore/svg/SVGAnimatedPreserveAspectRatio.h \
WebCore/svg/SVGAnimatedRect.h \
WebCore/svg/SVGAnimatedString.h \
@@ -4181,7 +4180,6 @@ webcore_built_sources += \
DerivedSources/WebCore/JSSVGAnimatedNumberList.cpp \
DerivedSources/WebCore/JSSVGAnimatedNumberList.h \
DerivedSources/WebCore/JSSVGAnimatedPathData.h \
- DerivedSources/WebCore/JSSVGAnimatedPoints.h \
DerivedSources/WebCore/JSSVGAnimatedPreserveAspectRatio.cpp \
DerivedSources/WebCore/JSSVGAnimatedPreserveAspectRatio.h \
DerivedSources/WebCore/JSSVGAnimatedRect.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index a8efde6..571315b 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -326,7 +326,6 @@
'svg/SVGAnimatedNumber.idl',
'svg/SVGAnimatedNumberList.idl',
'svg/SVGAnimatedPathData.idl',
- 'svg/SVGAnimatedPoints.idl',
'svg/SVGAnimatedPreserveAspectRatio.idl',
'svg/SVGAnimatedRect.idl',
'svg/SVGAnimatedString.idl',
@@ -3975,6 +3974,7 @@
'svg/properties/SVGPropertyTearOff.h',
'svg/properties/SVGPropertyTraits.h',
'svg/properties/SVGStaticListPropertyTearOff.h',
+ 'svg/properties/SVGStaticPropertyTearOff.h',
'svg/ColorDistance.cpp',
'svg/ColorDistance.h',
'svg/DeprecatedSVGAnimatedProperty.h',
@@ -4010,8 +4010,6 @@
'svg/SVGAnimatedNumberList.h',
'svg/SVGAnimatedPathData.cpp',
'svg/SVGAnimatedPathData.h',
- 'svg/SVGAnimatedPoints.cpp',
- 'svg/SVGAnimatedPoints.h',
'svg/SVGAnimatedPreserveAspectRatio.h',
'svg/SVGAnimatedRect.h',
'svg/SVGAnimatedString.h',
diff --git a/WebCore/WebCore.order b/WebCore/WebCore.order
index 06dfb3d..0c852e1 100644
--- a/WebCore/WebCore.order
+++ b/WebCore/WebCore.order
@@ -26499,7 +26499,6 @@ __ZN7WebCoreL16transformListForEPNS_10SVGElementE
__ZN7WebCoreL19polylineConstructorERKNS_13QualifiedNameEPNS_8DocumentEb
__ZN7WebCore18SVGPolylineElementC1ERKNS_13QualifiedNameEPNS_8DocumentE
__ZN7WebCore14SVGPolyElementC2ERKNS_13QualifiedNameEPNS_8DocumentE
-__ZN7WebCore17SVGAnimatedPointsC2Ev
__ZN7WebCore14SVGPolyElement19svgAttributeChangedERKNS_13QualifiedNameE
__ZN7WebCore14SVGPolyElement20parseMappedAttributeEPNS_15MappedAttributeE
__ZNK7WebCore14SVGPolyElement6pointsEv
@@ -26655,7 +26654,6 @@ __ZN7WebCore18SVGPolylineElementD0Ev
__ZN7WebCore14SVGPolyElementD2Ev
__ZN7WebCore12SVGPointListD0Ev
__ZN3WTF6VectorINS_6RefPtrIN7WebCore14SVGPODListItemINS2_10FloatPointEEEEELm0EE6shrinkEm
-__ZN7WebCore17SVGAnimatedPointsD2Ev
__ZThn8_N7WebCore17SVGPolygonElementD0Ev
__ZN7WebCore17SVGPolygonElementD0Ev
__ZThn8_N7WebCore15SVGImageElementD0Ev
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 758bfae..ad4b480 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2378,6 +2378,7 @@ HEADERS += \
svg/properties/SVGPropertyTearOff.h \
svg/properties/SVGPropertyTraits.h \
svg/properties/SVGStaticListPropertyTearOff.h \
+ svg/properties/SVGStaticPropertyTearOff.h \
svg/SVGAElement.h \
svg/SVGAltGlyphElement.h \
svg/SVGAngle.h \
@@ -2391,7 +2392,6 @@ HEADERS += \
svg/SVGAnimatedNumber.h \
svg/SVGAnimatedNumberList.h \
svg/SVGAnimatedPathData.h \
- svg/SVGAnimatedPoints.h \
svg/SVGAnimatedPreserveAspectRatio.h \
svg/SVGAnimatedRect.h \
svg/SVGAnimatedString.h \
@@ -3406,7 +3406,6 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGAngle.cpp \
svg/SVGAnimateColorElement.cpp \
svg/SVGAnimatedPathData.cpp \
- svg/SVGAnimatedPoints.cpp \
svg/SVGAnimateElement.cpp \
svg/SVGAnimateMotionElement.cpp \
svg/SVGAnimateTransformElement.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 91d485e..9b1b1a2 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -61852,10 +61852,6 @@
>
</File>
<File
- RelativePath="..\svg\SVGAnimatedPoints.h"
- >
- </File>
- <File
RelativePath="..\svg\SVGAnimatedPreserveAspectRatio.h"
>
</File>
@@ -62938,6 +62934,10 @@
RelativePath="..\svg\properties\SVGStaticListPropertyTearOff.h"
>
</File>
+ <File
+ RelativePath="..\svg\properties\SVGStaticPropertyTearOff.h"
+ >
+ </File>
</Filter>
</Filter>
<Filter
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 9e76a64..4f37735 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -73,6 +73,7 @@
0810764412828556007C63BA /* SVGListProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 0810764312828556007C63BA /* SVGListProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
081093DB1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 081093D91255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.cpp */; };
081093DC1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081093DA1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.h */; };
+ 0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
081668D3125603BF006F25DE /* SVGTextChunkBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 081668D1125603BF006F25DE /* SVGTextChunkBuilder.cpp */; };
081668D4125603BF006F25DE /* SVGTextChunkBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D2125603BF006F25DE /* SVGTextChunkBuilder.h */; };
081668D9125603D5006F25DE /* SVGTextLayoutEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 081668D7125603D5006F25DE /* SVGTextLayoutEngine.cpp */; };
@@ -2144,7 +2145,6 @@
85ACABB00A9CAF8000671E90 /* DOMDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACABAE0A9CAF8000671E90 /* DOMDocument.h */; settings = {ATTRIBUTES = (); }; };
85ACABB10A9CAF8000671E90 /* DOMDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */; };
85ACEF0C0ACDCCCF001214FF /* DOMSVGAnimatedPathData.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF060ACDCCCF001214FF /* DOMSVGAnimatedPathData.h */; };
- 85ACEF0D0ACDCCCF001214FF /* DOMSVGAnimatedPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF070ACDCCCF001214FF /* DOMSVGAnimatedPoints.h */; };
85ACEF0E0ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF080ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.h */; };
85ACEF0F0ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85ACEF090ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.mm */; };
85ACEF100ACDCCCF001214FF /* DOMSVGPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF0A0ACDCCCF001214FF /* DOMSVGPreserveAspectRatio.h */; };
@@ -3169,7 +3169,6 @@
A80E7E9F0A1A83E3007FB8C5 /* JSHTMLButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E7E950A1A83E3007FB8C5 /* JSHTMLButtonElement.h */; };
A80E7EA00A1A83E3007FB8C5 /* JSHTMLButtonElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E7E960A1A83E3007FB8C5 /* JSHTMLButtonElement.cpp */; };
A80F3A500CCDA2A2002DD990 /* DOMSVGFETurbulenceElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8502AB3E0AD438C000378540 /* DOMSVGFETurbulenceElement.h */; };
- A80F3A5A0CCDA2ED002DD990 /* DOMSVGAnimatedPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF070ACDCCCF001214FF /* DOMSVGAnimatedPoints.h */; };
A80F3A640CCDA2FC002DD990 /* DOMSVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85C9A2FD0AD7E94200FBFF1E /* DOMSVGLineElement.h */; };
A80F3A6B0CCDA30A002DD990 /* DOMSVGPathSegLinetoAbs.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CE1A2D0ADAC473003BBDEA /* DOMSVGPathSegLinetoAbs.h */; };
A80F3A750CCDA318002DD990 /* DOMSVGPathSegCurvetoQuadraticAbs.h in Headers */ = {isa = PBXBuildFile; fileRef = 85CE1A250ADAC473003BBDEA /* DOMSVGPathSegCurvetoQuadraticAbs.h */; };
@@ -3278,7 +3277,6 @@
A80F3B910CCDCE24002DD990 /* DOMSVGFEGaussianBlurElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 8502AB2C0AD438C000378540 /* DOMSVGFEGaussianBlurElement.h */; };
A80F3B920CCDCE24002DD990 /* DOMSVGPaintInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A8E544400CA9D1C10097D09B /* DOMSVGPaintInternal.h */; };
A80F3B930CCDCE24002DD990 /* DOMSVGPathSegCurvetoQuadraticAbsInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A8E544200CA9D1C10097D09B /* DOMSVGPathSegCurvetoQuadraticAbsInternal.h */; };
- A80F3B940CCDCE24002DD990 /* DOMSVGAnimatedPoints.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85ACEF070ACDCCCF001214FF /* DOMSVGAnimatedPoints.h */; };
A80F3B950CCDCE24002DD990 /* DOMSVGPathSegLinetoAbs.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85CE1A2D0ADAC473003BBDEA /* DOMSVGPathSegLinetoAbs.h */; };
A80F3B960CCDCE24002DD990 /* DOMSVGNumberInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A8E544330CA9D1C10097D09B /* DOMSVGNumberInternal.h */; };
A80F3B970CCDCE24002DD990 /* DOMSVGAnimatedAngleInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A8E544BF0CA9D1C20097D09B /* DOMSVGAnimatedAngleInternal.h */; };
@@ -3970,8 +3968,6 @@
B222797A0D00BF220071B782 /* SVGAnimateColorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277E40D00BF1F0071B782 /* SVGAnimateColorElement.h */; };
B22279840D00BF220071B782 /* SVGAnimatedPathData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277EE0D00BF1F0071B782 /* SVGAnimatedPathData.cpp */; };
B22279850D00BF220071B782 /* SVGAnimatedPathData.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277EF0D00BF1F0071B782 /* SVGAnimatedPathData.h */; };
- B22279870D00BF220071B782 /* SVGAnimatedPoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277F10D00BF1F0071B782 /* SVGAnimatedPoints.cpp */; };
- B22279880D00BF220071B782 /* SVGAnimatedPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277F20D00BF1F0071B782 /* SVGAnimatedPoints.h */; };
B222798F0D00BF220071B782 /* SVGAnimateElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277F90D00BF1F0071B782 /* SVGAnimateElement.cpp */; };
B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277FA0D00BF1F0071B782 /* SVGAnimateElement.h */; };
B22279920D00BF220071B782 /* SVGAnimateMotionElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22277FC0D00BF1F0071B782 /* SVGAnimateMotionElement.cpp */; };
@@ -5815,7 +5811,6 @@
A8F46AAF0CB20A9D003A9670 /* DOMSVGAnimatedNumberList.h in Copy Generated Headers */,
A80F3B700CCDCE24002DD990 /* DOMSVGAnimatedNumberListInternal.h in Copy Generated Headers */,
A8F46A900CB20A9D003A9670 /* DOMSVGAnimatedPathData.h in Copy Generated Headers */,
- A80F3B940CCDCE24002DD990 /* DOMSVGAnimatedPoints.h in Copy Generated Headers */,
A8F46B2E0CB20A9D003A9670 /* DOMSVGAnimatedPreserveAspectRatio.h in Copy Generated Headers */,
A80F3B7E0CCDCE24002DD990 /* DOMSVGAnimatedPreserveAspectRatioInternal.h in Copy Generated Headers */,
A8F46B1B0CB20A9D003A9670 /* DOMSVGAnimatedRect.h in Copy Generated Headers */,
@@ -6118,6 +6113,7 @@
0810764312828556007C63BA /* SVGListProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGListProperty.h; sourceTree = "<group>"; };
081093D91255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextLayoutAttributesBuilder.cpp; sourceTree = "<group>"; };
081093DA1255F0E700ED9D29 /* SVGTextLayoutAttributesBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextLayoutAttributesBuilder.h; sourceTree = "<group>"; };
+ 0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGStaticPropertyTearOff.h; sourceTree = "<group>"; };
081668D1125603BF006F25DE /* SVGTextChunkBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextChunkBuilder.cpp; sourceTree = "<group>"; };
081668D2125603BF006F25DE /* SVGTextChunkBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextChunkBuilder.h; sourceTree = "<group>"; };
081668D7125603D5006F25DE /* SVGTextLayoutEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextLayoutEngine.cpp; sourceTree = "<group>"; };
@@ -8299,7 +8295,6 @@
85ACABAE0A9CAF8000671E90 /* DOMDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMDocument.h; sourceTree = "<group>"; };
85ACABAF0A9CAF8000671E90 /* DOMDocument.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDocument.mm; sourceTree = "<group>"; };
85ACEF060ACDCCCF001214FF /* DOMSVGAnimatedPathData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGAnimatedPathData.h; sourceTree = "<group>"; };
- 85ACEF070ACDCCCF001214FF /* DOMSVGAnimatedPoints.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGAnimatedPoints.h; sourceTree = "<group>"; };
85ACEF080ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGAnimatedPreserveAspectRatio.h; sourceTree = "<group>"; };
85ACEF090ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGAnimatedPreserveAspectRatio.mm; sourceTree = "<group>"; };
85ACEF0A0ACDCCCF001214FF /* DOMSVGPreserveAspectRatio.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGPreserveAspectRatio.h; sourceTree = "<group>"; };
@@ -9836,9 +9831,6 @@
B22277EE0D00BF1F0071B782 /* SVGAnimatedPathData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedPathData.cpp; sourceTree = "<group>"; };
B22277EF0D00BF1F0071B782 /* SVGAnimatedPathData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPathData.h; sourceTree = "<group>"; };
B22277F00D00BF1F0071B782 /* SVGAnimatedPathData.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedPathData.idl; sourceTree = "<group>"; };
- B22277F10D00BF1F0071B782 /* SVGAnimatedPoints.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedPoints.cpp; sourceTree = "<group>"; };
- B22277F20D00BF1F0071B782 /* SVGAnimatedPoints.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPoints.h; sourceTree = "<group>"; };
- B22277F30D00BF1F0071B782 /* SVGAnimatedPoints.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedPoints.idl; sourceTree = "<group>"; };
B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedPreserveAspectRatio.idl; sourceTree = "<group>"; };
B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedRect.idl; sourceTree = "<group>"; };
B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGAnimatedString.idl; sourceTree = "<group>"; };
@@ -11797,6 +11789,7 @@
088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
+ 0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */,
);
path = properties;
sourceTree = "<group>";
@@ -13552,7 +13545,6 @@
A8E544B10CA9D1C20097D09B /* DOMSVGAnimatedNumberListInternal.h */,
A8E544B00CA9D1C20097D09B /* DOMSVGAnimatedPathData.h */,
85ACEF060ACDCCCF001214FF /* DOMSVGAnimatedPathData.h */,
- 85ACEF070ACDCCCF001214FF /* DOMSVGAnimatedPoints.h */,
85ACEF080ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.h */,
85ACEF090ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.mm */,
A8E544AD0CA9D1C20097D09B /* DOMSVGAnimatedPreserveAspectRatioInternal.h */,
@@ -16112,9 +16104,6 @@
B22277EE0D00BF1F0071B782 /* SVGAnimatedPathData.cpp */,
B22277EF0D00BF1F0071B782 /* SVGAnimatedPathData.h */,
B22277F00D00BF1F0071B782 /* SVGAnimatedPathData.idl */,
- B22277F10D00BF1F0071B782 /* SVGAnimatedPoints.cpp */,
- B22277F20D00BF1F0071B782 /* SVGAnimatedPoints.h */,
- B22277F30D00BF1F0071B782 /* SVGAnimatedPoints.idl */,
08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */,
B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */,
08C859BF1274575300A5728D /* SVGAnimatedRect.h */,
@@ -16643,7 +16632,6 @@
B2A015910AF6CD53006BCE0E /* graphics */ = {
isa = PBXGroup;
children = (
- 6E67D2A81280E8BD008758F7 /* Extensions3D.h */,
B27535290B053814002CE64F /* cg */,
B5320D68122A24E9002D1440 /* cocoa */,
A75E8B7F0E1DE2B0007F2481 /* filters */,
@@ -16660,6 +16648,7 @@
B27535390B053814002CE64F /* Color.h */,
9382DF5710A8D5C900925652 /* ColorSpace.h */,
A8CB41020E85B8A50032C4F0 /* DashArray.h */,
+ 6E67D2A81280E8BD008758F7 /* Extensions3D.h */,
B275353A0B053814002CE64F /* FloatPoint.cpp */,
B275353B0B053814002CE64F /* FloatPoint.h */,
B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */,
@@ -18636,6 +18625,7 @@
D8B6152F1032495100C8554A /* Cookie.h in Headers */,
9352088209BD45E900F2038D /* CookieJar.h in Headers */,
FE6FD4880F676E5700092873 /* Coordinates.h in Headers */,
+ B8A6A6D5127B338D008673BA /* CorrectionPanelInfo.h in Headers */,
A80E6D040A1989CA007FB8C5 /* Counter.h in Headers */,
BC5EB9790E82069200B25965 /* CounterContent.h in Headers */,
BC5EB9510E82056B00B25965 /* CounterDirectives.h in Headers */,
@@ -19080,8 +19070,6 @@
A8E545AF0CA9D1C20097D09B /* DOMSVGAnimatedNumberListInternal.h in Headers */,
85ACEF0C0ACDCCCF001214FF /* DOMSVGAnimatedPathData.h in Headers */,
A8E545AE0CA9D1C20097D09B /* DOMSVGAnimatedPathData.h in Headers */,
- 85ACEF0D0ACDCCCF001214FF /* DOMSVGAnimatedPoints.h in Headers */,
- A80F3A5A0CCDA2ED002DD990 /* DOMSVGAnimatedPoints.h in Headers */,
85ACEF0E0ACDCCCF001214FF /* DOMSVGAnimatedPreserveAspectRatio.h in Headers */,
85ACEF180ACDCD1A001214FF /* DOMSVGAnimatedPreserveAspectRatioInternal.h in Headers */,
A8E545AB0CA9D1C20097D09B /* DOMSVGAnimatedPreserveAspectRatioInternal.h in Headers */,
@@ -19571,6 +19559,8 @@
BC60D8F30D2A11E000B9918F /* ExceptionBase.h in Headers */,
935FBCF209BA143B00E230B1 /* ExceptionCode.h in Headers */,
148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */,
+ 6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
+ 6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
@@ -20896,7 +20886,6 @@
08B35B13127B6A7C005314DD /* SVGAnimatedNumber.h in Headers */,
08B35B17127B6A88005314DD /* SVGAnimatedNumberList.h in Headers */,
B22279850D00BF220071B782 /* SVGAnimatedPathData.h in Headers */,
- B22279880D00BF220071B782 /* SVGAnimatedPoints.h in Headers */,
08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */,
088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */,
088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
@@ -21049,6 +21038,7 @@
08DAB9C31103D9C1003E7ABA /* SVGShadowTreeElements.h in Headers */,
E4AFD0100DAF335500F5F55C /* SVGSMILElement.h in Headers */,
0880F70E1282B46D00948505 /* SVGStaticListPropertyTearOff.h in Headers */,
+ 0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */,
B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
B2227AAF0D00BF220071B782 /* SVGStylable.h in Headers */,
@@ -21198,6 +21188,7 @@
A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */,
49C7B9C91042D32F0009D447 /* WebGLBuffer.h in Headers */,
6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */,
+ 93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */,
49C7B9CF1042D32F0009D447 /* WebGLFramebuffer.h in Headers */,
6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */,
49FFBF3F11C93EE3006A7118 /* WebGLLayer.h in Headers */,
@@ -21322,10 +21313,6 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
- 6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
- 6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
- 93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */,
- B8A6A6D5127B338D008673BA /* CorrectionPanelInfo.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -21385,7 +21372,6 @@
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
compatibilityVersion = "Xcode 2.4";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -22213,6 +22199,7 @@
BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */,
93831B570D087D6000E5C984 /* ExceptionCode.cpp in Sources */,
148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */,
+ 6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
A75E8B880E1DE2D6007F2481 /* FEBlend.cpp in Sources */,
A75E8B8A0E1DE2D6007F2481 /* FEColorMatrix.cpp in Sources */,
A75E8B8C0E1DE2D6007F2481 /* FEComponentTransfer.cpp in Sources */,
@@ -23525,7 +23512,6 @@
B22279760D00BF220071B782 /* SVGAngle.cpp in Sources */,
B22279790D00BF220071B782 /* SVGAnimateColorElement.cpp in Sources */,
B22279840D00BF220071B782 /* SVGAnimatedPathData.cpp in Sources */,
- B22279870D00BF220071B782 /* SVGAnimatedPoints.cpp in Sources */,
B222798F0D00BF220071B782 /* SVGAnimateElement.cpp in Sources */,
B22279920D00BF220071B782 /* SVGAnimateMotionElement.cpp in Sources */,
B22279940D00BF220071B782 /* SVGAnimateTransformElement.cpp in Sources */,
@@ -23777,6 +23763,7 @@
BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */,
49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,
6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */,
+ 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */,
49C7B9CE1042D32F0009D447 /* WebGLFramebuffer.cpp in Sources */,
6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */,
49FFBF4011C93EE3006A7118 /* WebGLLayer.mm in Sources */,
@@ -23892,8 +23879,6 @@
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
- 6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
- 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/bindings/objc/DOMSVG.h b/WebCore/bindings/objc/DOMSVG.h
index eda705e..1fdab9a 100644
--- a/WebCore/bindings/objc/DOMSVG.h
+++ b/WebCore/bindings/objc/DOMSVG.h
@@ -39,7 +39,6 @@
#import <WebCore/DOMSVGAnimatedNumber.h>
#import <WebCore/DOMSVGAnimatedNumberList.h>
#import <WebCore/DOMSVGAnimatedPathData.h>
-#import <WebCore/DOMSVGAnimatedPoints.h>
#import <WebCore/DOMSVGAnimatedPreserveAspectRatio.h>
#import <WebCore/DOMSVGAnimatedRect.h>
#import <WebCore/DOMSVGAnimatedString.h>
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index 71c53a8..d439c19 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -51,7 +51,7 @@ my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
my %podTypeHash = ("SVGTransform" => 1);
-my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1);
+my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1);
my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
@@ -77,17 +77,23 @@ my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick
"onmouseup" => 1, "onresize" => 1, "onscroll" => 1,
"onunload" => 1);
-my %svgNativeType = (
+my %svgTypeNeedingTearOff = (
"SVGAngle" => "SVGPropertyTearOff<SVGAngle>",
"SVGLength" => "SVGPropertyTearOff<SVGLength>",
"SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>",
"SVGNumber" => "SVGPropertyTearOff<float>",
"SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
+ "SVGPoint" => "SVGPropertyTearOff<FloatPoint>",
+ "SVGPointList" => "SVGListPropertyTearOff<SVGPointList>",
"SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
"SVGRect" => "SVGPropertyTearOff<FloatRect>",
"SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>"
);
+my %svgTypeWithWritablePropertiesNeedingTearOff = (
+ "SVGPoint" => 1
+);
+
# Cache of IDL file pathnames.
my $idlFiles;
@@ -373,7 +379,16 @@ sub IsSVGTypeNeedingTearOff
my $object = shift;
my $type = shift;
- return 1 if exists $svgNativeType{$type};
+ return 1 if exists $svgTypeNeedingTearOff{$type};
+ return 0;
+}
+
+sub IsSVGTypeWithWritablePropertiesNeedingTearOff
+{
+ my $object = shift;
+ my $type = shift;
+
+ return 1 if $svgTypeWithWritablePropertiesNeedingTearOff{$type};
return 0;
}
@@ -382,7 +397,7 @@ sub GetSVGTypeNeedingTearOff
my $object = shift;
my $type = shift;
- return $svgNativeType{$type} if exists $svgNativeType{$type};
+ return $svgTypeNeedingTearOff{$type} if exists $svgTypeNeedingTearOff{$type};
return undef;
}
@@ -391,19 +406,19 @@ sub GetSVGWrappedTypeNeedingTearOff
my $object = shift;
my $type = shift;
- my $svgNativeType = $object->GetSVGTypeNeedingTearOff($type);
- return $svgNativeType if not $svgNativeType;
+ my $svgTypeNeedingTearOff = $object->GetSVGTypeNeedingTearOff($type);
+ return $svgTypeNeedingTearOff if not $svgTypeNeedingTearOff;
- if ($svgNativeType =~ /SVGPropertyTearOff/) {
- $svgNativeType =~ s/SVGPropertyTearOff<//;
- } elsif ($svgNativeType =~ /SVGListPropertyTearOff/) {
- $svgNativeType =~ s/SVGListPropertyTearOff<//;
- } elsif ($svgNativeType =~ /SVGStaticListPropertyTearOff/) {
- $svgNativeType =~ s/SVGStaticListPropertyTearOff<//;
+ if ($svgTypeNeedingTearOff =~ /SVGPropertyTearOff/) {
+ $svgTypeNeedingTearOff =~ s/SVGPropertyTearOff<//;
+ } elsif ($svgTypeNeedingTearOff =~ /SVGListPropertyTearOff/) {
+ $svgTypeNeedingTearOff =~ s/SVGListPropertyTearOff<//;
+ } elsif ($svgTypeNeedingTearOff =~ /SVGStaticListPropertyTearOff/) {
+ $svgTypeNeedingTearOff =~ s/SVGStaticListPropertyTearOff<//;
}
- $svgNativeType =~ s/>//;
- return $svgNativeType;
+ $svgTypeNeedingTearOff =~ s/>//;
+ return $svgTypeNeedingTearOff;
}
# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 673f098..61748d6 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2456,8 +2456,6 @@ my %nativeType = (
"IDBKey" => "RefPtr<IDBKey>",
"SVGMatrix" => "AffineTransform",
"SVGPaintType" => "SVGPaint::SVGPaintType",
- "SVGPoint" => "FloatPoint",
- "SVGRect" => "FloatRect",
"SVGTransform" => "SVGTransform",
"boolean" => "bool",
"double" => "double",
@@ -2556,8 +2554,6 @@ sub JSValueToNative
return "createIDBKeyFromValue(exec, $value)";
}
- $implIncludes{"FloatPoint.h"} = 1 if $type eq "SVGPoint";
- $implIncludes{"FloatRect.h"} = 1 if $type eq "SVGRect";
$implIncludes{"HTMLOptionElement.h"} = 1 if $type eq "HTMLOptionElement";
$implIncludes{"JSCustomVoidCallback.h"} = 1 if $type eq "VoidCallback";
$implIncludes{"Event.h"} = 1 if $type eq "Event";
@@ -2680,10 +2676,19 @@ sub NativeToJSValue
$value = "static_cast<" . GetNativeType($type) . ">($value)";
} elsif ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
- if ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
+ if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and $inFunctionCall eq 0 and not defined $signature->extendedAttributes->{"Immutable"}) {
+ $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
+ $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
+
+ my $getter = $value;
+ $getter =~ s/imp->//;
+ $getter =~ s/\(\)//;
+ my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
+ $value = "${tearOffType}::create(imp, $value, &${implClassName}::$updater)";
+ } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
$value = "${tearOffType}::create($extraImp$value)";
- } else {
+ } elsif (not $tearOffType =~ /SVGPointList/) {
$value = "${tearOffType}::create($value)";
}
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index b8999b5..69e24a9 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -59,8 +59,7 @@ my @depsContent = ();
my %protocolTypeHash = ("XPathNSResolver" => 1, "EventListener" => 1, "EventTarget" => 1, "NodeFilter" => 1,
"SVGLocatable" => 1, "SVGTransformable" => 1, "SVGStylable" => 1, "SVGFilterPrimitiveStandardAttributes" => 1,
"SVGTests" => 1, "SVGLangSpace" => 1, "SVGExternalResourcesRequired" => 1, "SVGURIReference" => 1,
- "SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1, "SVGAnimatedPoints" => 1,
- "ElementTimeControl" => 1);
+ "SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1, "ElementTimeControl" => 1);
my %nativeObjCTypeHash = ("URL" => 1, "Color" => 1);
# FIXME: this should be replaced with a function that recurses up the tree
@@ -71,7 +70,7 @@ my %baseTypeHash = ("Object" => 1, "Node" => 1, "NodeList" => 1, "NamedNodeMap"
"NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1, "Blob" => 1,
"SVGAngle" => 1, "SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, "SVGAnimatedEnumeration" => 1,
"SVGAnimatedInteger" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
- "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1, "SVGAnimatedPoints" => 1,
+ "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
"SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1, "SVGAnimatedString" => 1,
"SVGAnimatedTransformList" => 1, "SVGLength" => 1, "SVGLengthList" => 1, "SVGMatrix" => 1,
"SVGNumber" => 1, "SVGNumberList" => 1, "SVGPathSeg" => 1, "SVGPathSegList" => 1, "SVGPoint" => 1,
@@ -600,12 +599,6 @@ sub AddIncludesForType
return;
}
- if ($type eq "SVGPoint") {
- $implIncludes{"FloatPoint.h"} = 1;
- $implIncludes{"DOMSVGPointInternal.h"} = 1;
- return;
- }
-
if ($type eq "SVGMatrix") {
$implIncludes{"AffineTransform.h"} = 1;
$implIncludes{"DOMSVGMatrixInternal.h"} = 1;
@@ -1317,15 +1310,30 @@ sub GenerateImplementation
$getterContentHead = "$getterContentHead";
$getterContentTail .= "->toString()";
} elsif (ConversionNeeded($attribute->signature->type)) {
- if ($codeGenerator->IsSVGTypeNeedingTearOff($attribute->signature->type) and not $implClassName =~ /List$/) {
- my $idlTypeWithNamespace = GetSVGTypeWithNamespace($attribute->signature->type);
- if ($idlTypeWithNamespace =~ /SVGStaticListPropertyTearOff/) {
+ my $type = $attribute->signature->type;
+ if ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
+ my $idlTypeWithNamespace = GetSVGTypeWithNamespace($type);
+ if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
+ $idlTypeWithNamespace =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassNameWithNamespace, /;
+ $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
+
+ my $getter = $getterContentHead;
+ $getter =~ s/IMPL->//;
+ $getter =~ s/\(//;
+ my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
+ $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, &${implClassNameWithNamespace}::$updater";
+ $getterContentTail .= "))";
+ } elsif ($idlTypeWithNamespace =~ /SVGStaticListPropertyTearOff/) {
my $extraImp = "WebCore::GetOwnerElementForType<$implClassNameWithNamespace, WebCore::IsDerivedFromSVGElement<$implClassNameWithNamespace>::value>::ownerElement(IMPL), ";
$getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($extraImp$getterContentHead";
+ $getterContentTail .= ")))";
+ } elsif ($idlTypeWithNamespace =~ /SVGPointList/) {
+ $getterContentHead = "kit(WTF::getPtr($getterContentHead";
+ $getterContentTail .= "))";
} else {
$getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead";
+ $getterContentTail .= ")))";
}
- $getterContentTail .= ")))";
} else {
$getterContentHead = "kit(WTF::getPtr($getterContentHead";
$getterContentTail .= "))";
@@ -1416,7 +1424,7 @@ sub GenerateImplementation
push(@implContent, " IMPL->commitChange();\n");
push(@implContent, " $exceptionRaiseOnError\n");
} else {
- push(@implContent, " IMPL->commitChange();\n");
+ push(@implContent, " IMPL->commitChange();\n");
}
} elsif ($svgListPropertyType) {
$getterContentHead = "$getterExpressionPrefix";
@@ -1578,7 +1586,7 @@ sub GenerateImplementation
if ($svgPropertyType) {
push(@functionContent, " $svgPropertyType& podImpl = IMPL->propertyReference();\n");
- $content = "podImpl.$content;\n IMPL->commitChange()";
+ $content = "podImpl.$content";
} else {
$content = $caller . "->$content";
}
@@ -1602,9 +1610,14 @@ sub GenerateImplementation
if ($raisesExceptions) {
push(@functionContent, " $exceptionInit\n");
push(@functionContent, " $content;\n");
+ if ($svgPropertyType) {
+ push(@functionContent, " if (!ec)\n");
+ push(@functionContent, " IMPL->commitChange();\n");
+ }
push(@functionContent, " $exceptionRaiseOnError\n");
} else {
push(@functionContent, " $content;\n");
+ push(@functionContent, " IMPL->commitChange()\n") if $svgPropertyType;
}
} elsif (defined $needsCustom{"NodeToReturn"}) {
# Special case the insertBefore, replaceChild, removeChild
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 6cb3414..d8f0482 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -228,6 +228,7 @@ sub GetSVGPropertyTypes
$implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
}
+ $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
}
@@ -930,9 +931,20 @@ END
$implIncludes{"V8$attrType.h"} = 1;
$implIncludes{"SVGPropertyTearOff.h"} = 1;
my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
- if ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
+ if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
+ $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
+ $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
+
+ my $getter = $result;
+ $getter =~ s/imp->//;
+ $getter =~ s/\(\)//;
+ my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
+ push(@implContentDecls, " return toV8(WTF::getPtr(${tearOffType}::create(imp, $result, &${implClassName}::$updater)));\n");
+ } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
push(@implContentDecls, " return toV8(WTF::getPtr(${tearOffType}::create($extraImp$result)));\n");
+ } elsif ($tearOffType =~ /SVGPointList/) {
+ push(@implContentDecls, " return toV8(WTF::getPtr($result));\n");
} else {
push(@implContentDecls, " return toV8(WTF::getPtr(${tearOffType}::create($result)));\n");
}
@@ -2679,7 +2691,6 @@ sub GetNativeTypeForConversions
my $dataNode = shift;
my $type = shift;
- $type = "FloatPoint" if $type eq "SVGPoint";
$type = "AffineTransform" if $type eq "SVGMatrix";
$type = "V8SVGPODTypeWrapper<$type>" if $dataNode->extendedAttributes->{"PODType"};
$type = $codeGenerator->GetSVGTypeNeedingTearOff($type) if $codeGenerator->IsSVGTypeNeedingTearOff($type);
@@ -2949,7 +2960,6 @@ sub IsRefPtrType
return 0 if $type eq "unsigned";
return 0 if $type eq "unsigned long";
return 0 if $type eq "unsigned short";
- return 0 if $type eq "SVGAnimatedPoints";
return 1;
}
@@ -2982,7 +2992,6 @@ sub GetNativeType
return "bool" if $type eq "boolean";
return "String" if $type eq "DOMString";
return "Range::CompareHow" if $type eq "CompareHow";
- return "FloatPoint" if $type eq "SVGPoint";
return "AffineTransform" if $type eq "SVGMatrix";
return "SVGTransform" if $type eq "SVGTransform";
return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
@@ -3035,7 +3044,6 @@ sub BasicTypeCanFailConversion
my $type = GetTypeFromSignature($signature);
return 1 if $type eq "SVGMatrix";
- return 1 if $type eq "SVGPoint";
return 1 if $type eq "SVGTransform";
return 0;
}
@@ -3098,10 +3106,6 @@ sub JSValueToNative
$implIncludes{"FloatRect.h"} = 1;
}
- if ($type eq "SVGPoint") {
- $implIncludes{"FloatPoint.h"} = 1;
- }
-
# Default, assume autogenerated type conversion routines
if ($type eq "EventTarget") {
$implIncludes{"V8Node.h"} = 1;
@@ -3493,7 +3497,6 @@ sub IsSVGListTypeNeedingSpecialHandling
{
my $className = shift;
- return 1 if $className eq "SVGPointList";
return 1 if $className eq "SVGTransformList";
return 0;
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index b7f7f95..b9a854d 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -411,7 +411,7 @@ static TextStream& operator<<(TextStream& ts, const RenderSVGPath& path)
writeNameValuePair(ts, "r", element->r().value(element));
} else if (svgElement->hasTagName(SVGNames::polygonTag) || svgElement->hasTagName(SVGNames::polylineTag)) {
SVGPolyElement* element = static_cast<SVGPolyElement*>(svgElement);
- writeNameAndQuotedValue(ts, "points", element->points()->valueAsString());
+ writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString());
} else if (svgElement->hasTagName(SVGNames::pathTag)) {
SVGPathElement* element = static_cast<SVGPathElement*>(svgElement);
String pathString;
diff --git a/WebCore/svg/SVGAllInOne.cpp b/WebCore/svg/SVGAllInOne.cpp
index 2cb63af..e01af2c 100644
--- a/WebCore/svg/SVGAllInOne.cpp
+++ b/WebCore/svg/SVGAllInOne.cpp
@@ -31,7 +31,6 @@
#include "SVGAngle.cpp"
#include "SVGAnimateColorElement.cpp"
#include "SVGAnimatedPathData.cpp"
-#include "SVGAnimatedPoints.cpp"
#include "SVGAnimateElement.cpp"
#include "SVGAnimateMotionElement.cpp"
#include "SVGAnimateTransformElement.cpp"
diff --git a/WebCore/svg/SVGAnimateElement.cpp b/WebCore/svg/SVGAnimateElement.cpp
index c47a378..152b342 100644
--- a/WebCore/svg/SVGAnimateElement.cpp
+++ b/WebCore/svg/SVGAnimateElement.cpp
@@ -170,12 +170,12 @@ void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat
else if (percentage == 1.f)
results->m_animatedPoints = m_toPoints;
else {
- if (m_fromPoints && m_toPoints)
- results->m_animatedPoints = SVGPointList::createAnimated(m_fromPoints.get(), m_toPoints.get(), percentage);
+ if (!m_fromPoints.isEmpty() && !m_toPoints.isEmpty())
+ SVGPointList::createAnimated(m_fromPoints, m_toPoints, results->m_animatedPoints, percentage);
else
results->m_animatedPoints.clear();
// Fall back to discrete animation if the points are not compatible
- if (!results->m_animatedPoints)
+ if (results->m_animatedPoints.isEmpty())
results->m_animatedPoints = ((animationMode == FromToAnimation && percentage > 0.5f) || animationMode == ToAnimation || percentage == 1.0f)
? m_toPoints : m_fromPoints;
}
@@ -215,14 +215,12 @@ bool SVGAnimateElement::calculateFromAndToValues(const String& fromString, const
m_fromPath.clear();
m_toPath.clear();
} else if (m_propertyType == PointsProperty) {
- m_fromPoints = SVGPointList::create(SVGNames::pointsAttr);
- if (pointsListFromSVGData(m_fromPoints.get(), fromString)) {
- m_toPoints = SVGPointList::create(SVGNames::pointsAttr);
- if (pointsListFromSVGData(m_toPoints.get(), toString))
+ m_fromPoints.clear();
+ if (pointsListFromSVGData(m_fromPoints, fromString)) {
+ m_toPoints.clear();
+ if (pointsListFromSVGData(m_toPoints, toString))
return true;
}
- m_fromPoints.clear();
- m_toPoints.clear();
}
m_fromString = fromString;
m_toString = toString;
@@ -299,12 +297,9 @@ void SVGAnimateElement::applyResultsToTarget()
SVGPathParserFactory* factory = SVGPathParserFactory::self();
factory->buildStringFromByteStream(m_animatedPathPointer, valueToApply, UnalteredParsing);
}
- } else if (m_propertyType == PointsProperty) {
- if (!m_animatedPoints || !m_animatedPoints->numberOfItems())
- valueToApply = m_animatedString;
- else
- valueToApply = m_animatedPoints->valueAsString();
- } else
+ } else if (m_propertyType == PointsProperty)
+ valueToApply = m_animatedPoints.isEmpty() ? m_animatedString : m_animatedPoints.valueAsString();
+ else
valueToApply = m_animatedString;
setTargetAttributeAnimatedValue(valueToApply);
diff --git a/WebCore/svg/SVGAnimateElement.h b/WebCore/svg/SVGAnimateElement.h
index 9993d84..e478cf8 100644
--- a/WebCore/svg/SVGAnimateElement.h
+++ b/WebCore/svg/SVGAnimateElement.h
@@ -27,12 +27,12 @@
#include "Color.h"
#include "SVGAnimationElement.h"
#include "SVGPathByteStream.h"
+#include "SVGPointList.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
class SVGPathSegList;
- class SVGPointList;
class SVGAnimateElement : public SVGAnimationElement {
public:
@@ -69,9 +69,9 @@ namespace WebCore {
OwnPtr<SVGPathByteStream> m_toPath;
OwnPtr<SVGPathByteStream> m_animatedPath;
SVGPathByteStream* m_animatedPathPointer;
- RefPtr<SVGPointList> m_fromPoints;
- RefPtr<SVGPointList> m_toPoints;
- RefPtr<SVGPointList> m_animatedPoints;
+ SVGPointList m_fromPoints;
+ SVGPointList m_toPoints;
+ SVGPointList m_animatedPoints;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGAnimatedPoints.cpp b/WebCore/svg/SVGAnimatedPoints.cpp
deleted file mode 100644
index 6f54888..0000000
--- a/WebCore/svg/SVGAnimatedPoints.cpp
+++ /dev/null
@@ -1 +0,0 @@
-// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGAnimatedPoints.h b/WebCore/svg/SVGAnimatedPoints.h
deleted file mode 100644
index a62f60c..0000000
--- a/WebCore/svg/SVGAnimatedPoints.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann at kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis at kde.org>
- *
- * 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.
- */
-
-#ifndef SVGAnimatedPoints_h
-#define SVGAnimatedPoints_h
-
-#if ENABLE(SVG)
-
-namespace WebCore {
-
- class SVGPointList;
-
- class SVGAnimatedPoints {
- public:
- virtual ~SVGAnimatedPoints() { }
-
- // 'SVGAnimatedPoints' functions
- virtual SVGPointList* points() const = 0;
- virtual SVGPointList* animatedPoints() const = 0;
- };
-
-} // namespace WebCore
-
-#endif // ENABLE(SVG)
-#endif
-
-// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAnimatedPoints.idl b/WebCore/svg/SVGAnimatedPoints.idl
deleted file mode 100644
index 11314df..0000000
--- a/WebCore/svg/SVGAnimatedPoints.idl
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module svg {
-
- interface [Conditional=SVG, ObjCProtocol, OmitConstructor] SVGAnimatedPoints {
- readonly attribute SVGPointList points;
- readonly attribute SVGPointList animatedPoints;
- };
-
-}
diff --git a/WebCore/svg/SVGParserUtilities.cpp b/WebCore/svg/SVGParserUtilities.cpp
index c37d207..5a77ce2 100644
--- a/WebCore/svg/SVGParserUtilities.cpp
+++ b/WebCore/svg/SVGParserUtilities.cpp
@@ -26,9 +26,7 @@
#include "SVGParserUtilities.h"
#include "Document.h"
-#include "ExceptionCode.h"
#include "FloatPoint.h"
-#include "PlatformString.h"
#include "SVGPointList.h"
#include <wtf/ASCIICType.h>
@@ -167,7 +165,7 @@ bool parseNumberOptionalNumber(const String& s, float& x, float& y)
return cur == end;
}
-bool pointsListFromSVGData(SVGPointList* pointsList, const String& points)
+bool pointsListFromSVGData(SVGPointList& pointsList, const String& points)
{
if (points.isEmpty())
return true;
@@ -195,8 +193,7 @@ bool pointsListFromSVGData(SVGPointList* pointsList, const String& points)
}
skipOptionalSpaces(cur, end);
- ExceptionCode ec = 0;
- pointsList->appendItem(FloatPoint(xPos, yPos), ec);
+ pointsList.append(FloatPoint(xPos, yPos));
}
return cur == end && !delimParsed;
}
diff --git a/WebCore/svg/SVGParserUtilities.h b/WebCore/svg/SVGParserUtilities.h
index 4e9362d..0718d50 100644
--- a/WebCore/svg/SVGParserUtilities.h
+++ b/WebCore/svg/SVGParserUtilities.h
@@ -63,7 +63,7 @@ namespace WebCore {
return ptr < end;
}
- bool pointsListFromSVGData(SVGPointList* pointsList, const String& points);
+ bool pointsListFromSVGData(SVGPointList& pointsList, const String& points);
Vector<String> parseDelimitedString(const String& input, const char seperator);
bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<String>& stringList);
bool parseGlyphName(const String& input, HashSet<String>& values);
diff --git a/WebCore/svg/SVGPoint.idl b/WebCore/svg/SVGPoint.idl
index 46ca671..19c6292 100644
--- a/WebCore/svg/SVGPoint.idl
+++ b/WebCore/svg/SVGPoint.idl
@@ -22,9 +22,9 @@
module svg {
- interface [Conditional=SVG, PODType=FloatPoint] SVGPoint {
- attribute float x;
- attribute float y;
+ interface [Conditional=SVG] SVGPoint {
+ attribute [StrictTypeChecking] float x;
+ attribute [StrictTypeChecking] float y;
SVGPoint matrixTransform(in SVGMatrix matrix);
};
diff --git a/WebCore/svg/SVGPointList.cpp b/WebCore/svg/SVGPointList.cpp
index 0d8e10c..ae460a1 100644
--- a/WebCore/svg/SVGPointList.cpp
+++ b/WebCore/svg/SVGPointList.cpp
@@ -22,32 +22,27 @@
#if ENABLE(SVG)
#include "SVGPointList.h"
-#include "SVGPathSegList.h"
-#include "PlatformString.h"
-namespace WebCore {
+#include "FloatPoint.h"
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/StringConcatenate.h>
-SVGPointList::SVGPointList(const QualifiedName& attributeName)
- : SVGPODList<FloatPoint>(attributeName)
-{
-}
+namespace WebCore {
String SVGPointList::valueAsString() const
{
- String result;
+ StringBuilder builder;
- ExceptionCode ec = 0;
- for (unsigned int i = 0; i < numberOfItems(); ++i) {
+ unsigned size = this->size();
+ for (unsigned i = 0; i < size; ++i) {
if (i > 0)
- result += " ";
-
- FloatPoint point = getItem(i, ec);
- ASSERT(ec == 0);
+ builder.append(" "); // FIXME: Shouldn't we use commas to seperate?
- result += String::format("%.6lg %.6lg", point.x(), point.y());
+ const FloatPoint& point = at(i);
+ builder.append(makeString(String::number(point.x()), ' ', String::number(point.y())));
}
- return result;
+ return builder.toString();
}
float inline adjustAnimatedValue(float from, float to, float progress)
@@ -55,27 +50,19 @@ float inline adjustAnimatedValue(float from, float to, float progress)
return (to - from) * progress + from;
}
-PassRefPtr<SVGPointList> SVGPointList::createAnimated(const SVGPointList* fromList, const SVGPointList* toList, float progress)
+bool SVGPointList::createAnimated(const SVGPointList& fromList, const SVGPointList& toList, SVGPointList& resultList, float progress)
{
- unsigned itemCount = fromList->numberOfItems();
- if (!itemCount || itemCount != toList->numberOfItems())
- return 0;
- RefPtr<SVGPointList> result = create(fromList->associatedAttributeName());
- ExceptionCode ec = 0;
+ unsigned itemCount = fromList.size();
+ if (!itemCount || itemCount != toList.size())
+ return false;
for (unsigned n = 0; n < itemCount; ++n) {
- FloatPoint from = fromList->getItem(n, ec);
- if (ec)
- return 0;
- FloatPoint to = toList->getItem(n, ec);
- if (ec)
- return 0;
+ const FloatPoint& from = fromList.at(n);
+ const FloatPoint& to = toList.at(n);
FloatPoint segment = FloatPoint(adjustAnimatedValue(from.x(), to.x(), progress),
adjustAnimatedValue(from.y(), to.y(), progress));
- result->appendItem(segment, ec);
- if (ec)
- return 0;
+ resultList.append(segment);
}
- return result.release();
+ return true;
}
}
diff --git a/WebCore/svg/SVGPointList.h b/WebCore/svg/SVGPointList.h
index 43edbbb..9f2efc9 100644
--- a/WebCore/svg/SVGPointList.h
+++ b/WebCore/svg/SVGPointList.h
@@ -22,24 +22,22 @@
#define SVGPointList_h
#if ENABLE(SVG)
-#include "SVGList.h"
-#include "FloatPoint.h"
-#include <wtf/Forward.h>
-#include <wtf/PassRefPtr.h>
+#include "QualifiedName.h"
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
- class SVGPointList : public SVGPODList<FloatPoint> {
- public:
- static PassRefPtr<SVGPointList> create(const QualifiedName& attributeName) { return adoptRef(new SVGPointList(attributeName)); }
+class FloatPoint;
- String valueAsString() const;
+class SVGPointList : public Vector<FloatPoint> {
+public:
+ SVGPointList() { }
- static PassRefPtr<SVGPointList> createAnimated(const SVGPointList* fromList, const SVGPointList* toList, float progress);
+ String valueAsString() const;
- private:
- SVGPointList(const QualifiedName&);
- };
+ static bool createAnimated(const SVGPointList& fromList, const SVGPointList& toList, SVGPointList& resultList, float progress);
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPolyElement.cpp b/WebCore/svg/SVGPolyElement.cpp
index 6e935f1..7b95a32 100644
--- a/WebCore/svg/SVGPolyElement.cpp
+++ b/WebCore/svg/SVGPolyElement.cpp
@@ -39,29 +39,18 @@ SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* document)
{
}
-SVGPointList* SVGPolyElement::points() const
-{
- if (!m_points)
- m_points = SVGPointList::create(SVGNames::pointsAttr);
-
- return m_points.get();
-}
-
-SVGPointList* SVGPolyElement::animatedPoints() const
-{
- // FIXME!
- return 0;
-}
-
void SVGPolyElement::parseMappedAttribute(Attribute* attr)
{
const AtomicString& value = attr->value();
if (attr->name() == SVGNames::pointsAttr) {
- ExceptionCode ec = 0;
- points()->clear(ec);
-
- if (!pointsListFromSVGData(points(), value))
+ SVGPointList newList;
+ if (!pointsListFromSVGData(newList, value))
document()->accessSVGExtensions()->reportError("Problem parsing points=\"" + value + "\"");
+
+ if (SVGAnimatedListPropertyTearOff<SVGPointList>* list = m_animatablePointsList.get())
+ list->detachListWrappers(newList.size());
+
+ m_points.value = newList;
} else {
if (SVGTests::parseMappedAttribute(attr))
return;
@@ -77,10 +66,6 @@ void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
- // The points property is not a regular SVGAnimatedProperty, still we use the same SVG<->XML DOM synchronization framework.
- if (attrName == SVGNames::pointsAttr)
- invalidateSVGAttributes();
-
RenderSVGPath* renderer = static_cast<RenderSVGPath*>(this->renderer());
if (!renderer)
return;
@@ -109,14 +94,44 @@ void SVGPolyElement::synchronizeProperty(const QualifiedName& attrName)
if (attrName == anyQName()) {
synchronizeExternalResourcesRequired();
- SVGAnimatedPropertySynchronizer<true>::synchronize(this, SVGNames::pointsAttr, points()->valueAsString());
+ synchronizePoints();
return;
}
if (SVGExternalResourcesRequired::isKnownAttribute(attrName))
synchronizeExternalResourcesRequired();
else if (attrName == SVGNames::pointsAttr)
- SVGAnimatedPropertySynchronizer<true>::synchronize(this, attrName, points()->valueAsString());
+ synchronizePoints();
+}
+
+void SVGPolyElement::synchronizePoints()
+{
+ if (!m_points.shouldSynchronize)
+ return;
+
+ SVGAnimatedPropertySynchronizer<true>::synchronize(this, SVGNames::pointsAttr, m_points.value.valueAsString());
+}
+
+SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::points()
+{
+ if (!m_animatablePointsList) {
+ m_points.shouldSynchronize = true;
+ m_animatablePointsList = SVGAnimatedProperty::lookupOrCreateWrapper<SVGAnimatedListPropertyTearOff<SVGPointList> , SVGPointList>
+ (this, SVGNames::pointsAttr, SVGNames::pointsAttr.localName(), m_points.value);
+ }
+
+ return static_cast<SVGListPropertyTearOff<SVGPointList>*>(m_animatablePointsList->baseVal());
+}
+
+SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints()
+{
+ if (!m_animatablePointsList) {
+ m_points.shouldSynchronize = true;
+ m_animatablePointsList = SVGAnimatedProperty::lookupOrCreateWrapper<SVGAnimatedListPropertyTearOff<SVGPointList> , SVGPointList>
+ (this, SVGNames::pointsAttr, SVGNames::pointsAttr.localName(), m_points.value);
+ }
+
+ return static_cast<SVGListPropertyTearOff<SVGPointList>*>(m_animatablePointsList->animVal());
}
}
diff --git a/WebCore/svg/SVGPolyElement.h b/WebCore/svg/SVGPolyElement.h
index 64d4abb..0855218 100644
--- a/WebCore/svg/SVGPolyElement.h
+++ b/WebCore/svg/SVGPolyElement.h
@@ -22,41 +22,46 @@
#define SVGPolyElement_h
#if ENABLE(SVG)
-#include "SVGAnimatedPoints.h"
#include "SVGAnimatedPropertyMacros.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
+#include "SVGPointList.h"
#include "SVGStyledTransformableElement.h"
#include "SVGTests.h"
namespace WebCore {
- class SVGPolyElement : public SVGStyledTransformableElement,
- public SVGTests,
- public SVGLangSpace,
- public SVGExternalResourcesRequired,
- public SVGAnimatedPoints {
- public:
- virtual SVGPointList* points() const;
- virtual SVGPointList* animatedPoints() const;
+class SVGPolyElement : public SVGStyledTransformableElement
+ , public SVGTests
+ , public SVGLangSpace
+ , public SVGExternalResourcesRequired {
+public:
+ SVGListPropertyTearOff<SVGPointList>* points();
+ SVGListPropertyTearOff<SVGPointList>* animatedPoints();
- protected:
- SVGPolyElement(const QualifiedName&, Document*);
+ SVGPointList& pointList() const { return m_points.value; }
- private:
- virtual bool isValid() const { return SVGTests::isValid(); }
+protected:
+ SVGPolyElement(const QualifiedName&, Document*);
- virtual void parseMappedAttribute(Attribute*);
- virtual void svgAttributeChanged(const QualifiedName&);
- virtual void synchronizeProperty(const QualifiedName&);
+private:
+ virtual bool isValid() const { return SVGTests::isValid(); }
- virtual bool supportsMarkers() const { return true; }
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
- // SVGExternalResourcesRequired
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ virtual bool supportsMarkers() const { return true; }
- mutable RefPtr<SVGPointList> m_points;
- };
+ // SVGExternalResourcesRequired
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+
+ void synchronizePoints();
+
+protected:
+ mutable SVGSynchronizableAnimatedProperty<SVGPointList> m_points;
+ RefPtr<SVGAnimatedListPropertyTearOff<SVGPointList> > m_animatablePointsList;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPolygonElement.cpp b/WebCore/svg/SVGPolygonElement.cpp
index 38f5bce..3439a78 100644
--- a/WebCore/svg/SVGPolygonElement.cpp
+++ b/WebCore/svg/SVGPolygonElement.cpp
@@ -23,8 +23,6 @@
#if ENABLE(SVG)
#include "SVGPolygonElement.h"
-#include "SVGPointList.h"
-
namespace WebCore {
inline SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* document)
@@ -41,15 +39,15 @@ void SVGPolygonElement::toPathData(Path& path) const
{
ASSERT(path.isEmpty());
- int len = points()->numberOfItems();
- if (len < 1)
+ SVGPointList& points = pointList();
+ if (points.isEmpty())
return;
-
- ExceptionCode ec = 0;
- path.moveTo(points()->getItem(0, ec));
- for (int i = 1; i < len; ++i)
- path.addLineTo(points()->getItem(i, ec));
+ path.moveTo(points.first());
+
+ unsigned size = points.size();
+ for (unsigned i = 1; i < size; ++i)
+ path.addLineTo(points.at(i));
path.closeSubpath();
}
diff --git a/WebCore/svg/SVGPolygonElement.idl b/WebCore/svg/SVGPolygonElement.idl
index e58ec38..b767aaa 100644
--- a/WebCore/svg/SVGPolygonElement.idl
+++ b/WebCore/svg/SVGPolygonElement.idl
@@ -30,8 +30,9 @@ module svg {
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
- SVGTransformable,
- SVGAnimatedPoints {
+ SVGTransformable {
+ readonly attribute SVGPointList points;
+ readonly attribute SVGPointList animatedPoints;
};
}
diff --git a/WebCore/svg/SVGPolylineElement.cpp b/WebCore/svg/SVGPolylineElement.cpp
index c9750b2..8bd6d7b 100644
--- a/WebCore/svg/SVGPolylineElement.cpp
+++ b/WebCore/svg/SVGPolylineElement.cpp
@@ -23,8 +23,6 @@
#if ENABLE(SVG)
#include "SVGPolylineElement.h"
-#include "SVGPointList.h"
-
namespace WebCore {
inline SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* document)
@@ -41,15 +39,15 @@ void SVGPolylineElement::toPathData(Path& path) const
{
ASSERT(path.isEmpty());
- int len = points()->numberOfItems();
- if (len < 1)
+ SVGPointList& points = pointList();
+ if (points.isEmpty())
return;
- ExceptionCode ec = 0;
- path.moveTo(points()->getItem(0, ec));
+ path.moveTo(points.first());
- for (int i = 1; i < len; ++i)
- path.addLineTo(points()->getItem(i, ec));
+ unsigned size = points.size();
+ for (unsigned i = 1; i < size; ++i)
+ path.addLineTo(points.at(i));
}
}
diff --git a/WebCore/svg/SVGPolylineElement.idl b/WebCore/svg/SVGPolylineElement.idl
index e3f1cd7..b7af89f 100644
--- a/WebCore/svg/SVGPolylineElement.idl
+++ b/WebCore/svg/SVGPolylineElement.idl
@@ -30,8 +30,9 @@ module svg {
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
- SVGTransformable,
- SVGAnimatedPoints {
+ SVGTransformable {
+ readonly attribute SVGPointList points;
+ readonly attribute SVGPointList animatedPoints;
};
}
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index 2354b27..314f522 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -213,14 +213,14 @@ void SVGSVGElement::setCurrentScale(float scale)
RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
}
-FloatPoint SVGSVGElement::currentTranslate() const
+void SVGSVGElement::setCurrentTranslate(const FloatPoint& translation)
{
- return m_translation;
+ m_translation = translation;
+ updateCurrentTranslate();
}
-void SVGSVGElement::setCurrentTranslate(const FloatPoint &translation)
+void SVGSVGElement::updateCurrentTranslate()
{
- m_translation = translation;
if (RenderObject* object = renderer())
object->setNeedsLayout(true);
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index 804c5ec..dca3ac2 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -78,9 +78,12 @@ namespace WebCore {
float currentScale() const;
void setCurrentScale(float scale);
- FloatPoint currentTranslate() const;
+ FloatPoint& currentTranslate() { return m_translation; }
void setCurrentTranslate(const FloatPoint&);
-
+
+ // Only used from the bindings.
+ void updateCurrentTranslate();
+
SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); }
void pauseAnimations();
diff --git a/WebCore/svg/properties/SVGPropertyTearOff.h b/WebCore/svg/properties/SVGPropertyTearOff.h
index 25b8fa2..2ffaede 100644
--- a/WebCore/svg/properties/SVGPropertyTearOff.h
+++ b/WebCore/svg/properties/SVGPropertyTearOff.h
@@ -32,7 +32,7 @@ class SVGPropertyTearOff : public SVGProperty {
public:
typedef SVGPropertyTearOff<PropertyType> Self;
- // Used for [SVGAnimatedProperty] types (for example: SVGAnimatedLength::baseVal()).
+ // 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 PassRefPtr<Self> create(SVGAnimatedProperty* animatedProperty, SVGPropertyRole, PropertyType& value)
{
@@ -40,7 +40,7 @@ public:
return adoptRef(new Self(animatedProperty, value));
}
- // Used for non-animated POD types (for example: SVGLength).
+ // Used for non-animated POD types (for example: SVGSVGElement::createSVGLength()).
static PassRefPtr<Self> create(const PropertyType& initialValue)
{
return adoptRef(new Self(initialValue));
@@ -82,14 +82,14 @@ public:
m_animatedProperty = 0;
}
- void commitChange()
+ virtual void commitChange()
{
if (!m_animatedProperty || m_valueIsCopy)
return;
m_animatedProperty->commitChange();
}
-private:
+protected:
SVGPropertyTearOff(SVGAnimatedProperty* animatedProperty, PropertyType& value)
: m_animatedProperty(animatedProperty)
, m_value(&value)
diff --git a/WebCore/svg/properties/SVGPropertyTraits.h b/WebCore/svg/properties/SVGPropertyTraits.h
index 5b12a22..85bca7e 100644
--- a/WebCore/svg/properties/SVGPropertyTraits.h
+++ b/WebCore/svg/properties/SVGPropertyTraits.h
@@ -27,6 +27,7 @@
#include "SVGLength.h"
#include "SVGLengthList.h"
#include "SVGNumberList.h"
+#include "SVGPointList.h"
#include "SVGPreserveAspectRatio.h"
#include "SVGStringList.h"
#include <wtf/text/StringBuilder.h>
@@ -123,6 +124,12 @@ struct SVGPropertyTraits<SVGStringList> {
typedef String ListItemType;
};
+template<>
+struct SVGPropertyTraits<SVGPointList> {
+ static SVGPointList initialValue() { return SVGPointList(); }
+ typedef FloatPoint ListItemType;
+};
+
}
#endif
diff --git a/WebCore/svg/properties/SVGStaticPropertyTearOff.h b/WebCore/svg/properties/SVGStaticPropertyTearOff.h
new file mode 100644
index 0000000..149e520
--- /dev/null
+++ b/WebCore/svg/properties/SVGStaticPropertyTearOff.h
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+#ifndef SVGStaticPropertyTearOff_h
+#define SVGStaticPropertyTearOff_h
+
+#if ENABLE(SVG)
+#include "SVGPropertyTearOff.h"
+
+namespace WebCore {
+
+template<typename ContextElement, typename PropertyType>
+class SVGStaticPropertyTearOff : public SVGPropertyTearOff<PropertyType> {
+public:
+ typedef SVGStaticPropertyTearOff<ContextElement, PropertyType> Self;
+ typedef void (ContextElement::*UpdateMethod)();
+
+ // Used for non-animated POD types that are not associated with a SVGAnimatedProperty object, nor with a XML DOM attribute
+ // (for example: SVGSVGElement::currentTranslate).
+ static PassRefPtr<Self> create(ContextElement* contextElement, PropertyType& value, UpdateMethod update)
+ {
+ ASSERT(contextElement);
+ return adoptRef(new Self(contextElement, value, update));
+ }
+
+ virtual void commitChange() { (m_contextElement.get()->*m_update)(); }
+
+private:
+ SVGStaticPropertyTearOff(ContextElement* contextElement, PropertyType& value, UpdateMethod update)
+ : SVGPropertyTearOff<PropertyType>(0, value)
+ , m_contextElement(contextElement)
+ , m_update(update)
+ {
+ }
+
+ RefPtr<ContextElement> m_contextElement;
+ UpdateMethod m_update;
+};
+
+}
+
+#endif // ENABLE(SVG)
+#endif // SVGStaticPropertyTearOff_h
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list