Diff
Modified: trunk/LayoutTests/ChangeLog (112222 => 112223)
--- trunk/LayoutTests/ChangeLog 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/ChangeLog 2012-03-27 08:22:37 UTC (rev 112223)
@@ -1,3 +1,37 @@
+2012-03-25 Nikolas Zimmermann <[email protected]>
+
+ Enable animVal support for SVGAngle
+ https://bugs.webkit.org/show_bug.cgi?id=82144
+
+ Reviewed by Rob Buis.
+
+ Update tests after enabling animVal support for SVGAnimatedAngle.
+
+ * svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/svgangle-animation-deg-to-grad-expected.txt:
+ * svg/animations/svgangle-animation-deg-to-rad-expected.txt:
+ * svg/animations/svgangle-animation-grad-to-deg-expected.txt:
+ * svg/animations/svgangle-animation-grad-to-rad-expected.txt:
+ * svg/animations/svgangle-animation-rad-to-deg-expected.txt:
+ * svg/animations/svgangle-animation-rad-to-grad-expected.txt:
+
2012-03-27 Yury Semikhatsky <[email protected]>
Web Inspector: remove remains of path finder in heap profiler front-end
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-grad.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-grad.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-grad.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-rad.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-rad.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-rad.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-deg.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-deg.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-deg.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-rad.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-rad.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-rad.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-deg.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-deg.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-deg.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-grad.js (112222 => 112223)
--- trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-grad.js 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-grad.js 2012-03-27 08:22:37 UTC (rev 112223)
@@ -49,12 +49,12 @@
function sample2() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "90");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function sample3() {
shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "0");
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-grad-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-grad-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-grad-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-rad-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-rad-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-deg-to-rad-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-deg-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-deg-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-deg-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-rad-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-rad-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-grad-to-rad-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-deg-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-deg-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-deg-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-grad-expected.txt (112222 => 112223)
--- trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-grad-expected.txt 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/LayoutTests/svg/animations/svgangle-animation-rad-to-grad-expected.txt 2012-03-27 08:22:37 UTC (rev 112223)
@@ -8,9 +8,9 @@
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 90
-PASS marker.orientAngle.baseVal.value is 90
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.baseVal.value is 0
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
Modified: trunk/Source/WebCore/ChangeLog (112222 => 112223)
--- trunk/Source/WebCore/ChangeLog 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/Source/WebCore/ChangeLog 2012-03-27 08:22:37 UTC (rev 112223)
@@ -1,3 +1,29 @@
+2012-03-25 Nikolas Zimmermann <[email protected]>
+
+ Enable animVal support for SVGAngle
+ https://bugs.webkit.org/show_bug.cgi?id=82144
+
+ Reviewed by Rob Buis.
+
+ Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared.
+ All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator.
+
+ Extended existing tests to cover this.
+
+ * svg/SVGAnimatedAngle.cpp:
+ (WebCore::sharedSVGAngle):
+ (WebCore::SVGAnimatedAngleAnimator::constructFromString):
+ (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
+ (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
+ (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
+ (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
+ (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
+ (WebCore::SVGAnimatedAngleAnimator::calculateDistance):
+ * svg/SVGAnimatedAngle.h:
+ (SVGAnimatedAngleAnimator):
+ * svg/SVGAnimatedType.cpp:
+ (WebCore::SVGAnimatedType::supportsAnimVal):
+
2012-03-27 Yury Semikhatsky <[email protected]>
Web Inspector: remove remains of path finder in heap profiler front-end
Modified: trunk/Source/WebCore/svg/SVGAnimatedAngle.cpp (112222 => 112223)
--- trunk/Source/WebCore/svg/SVGAnimatedAngle.cpp 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/Source/WebCore/svg/SVGAnimatedAngle.cpp 2012-03-27 08:22:37 UTC (rev 112223)
@@ -34,21 +34,42 @@
static inline SVGAngle& sharedSVGAngle(const String& valueAsString)
{
DEFINE_STATIC_LOCAL(SVGAngle, sharedAngle, ());
- ExceptionCode ec = 0;
- sharedAngle.setValueAsString(valueAsString, ec);
- ASSERT(!ec);
+ sharedAngle.setValueAsString(valueAsString, ASSERT_NO_EXCEPTION);
return sharedAngle;
}
PassOwnPtr<SVGAnimatedType> SVGAnimatedAngleAnimator::constructFromString(const String& string)
{
OwnPtr<SVGAnimatedType> animatedType = SVGAnimatedType::createAngle(new SVGAngle);
- ExceptionCode ec = 0;
- animatedType->angle().setValueAsString(string, ec);
- ASSERT(!ec);
+ animatedType->angle().setValueAsString(string, ASSERT_NO_EXCEPTION);
return animatedType.release();
}
+PassOwnPtr<SVGAnimatedType> SVGAnimatedAngleAnimator::startAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties)
+{
+ return SVGAnimatedType::createAngle(constructFromOneBaseValue<SVGAngle, SVGAnimatedAngle>(properties));
+}
+
+void SVGAnimatedAngleAnimator::stopAnimValAnimation(const Vector<SVGAnimatedProperty*>& properties)
+{
+ SVGAnimatedTypeAnimator::stopAnimValAnimationForType<SVGAnimatedAngle>(properties);
+}
+
+void SVGAnimatedAngleAnimator::resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>& properties, SVGAnimatedType* type)
+{
+ resetFromOneBaseValue<SVGAngle, SVGAnimatedAngle>(properties, type, &SVGAnimatedType::angle);
+}
+
+void SVGAnimatedAngleAnimator::animValWillChange(const Vector<SVGAnimatedProperty*>& properties)
+{
+ animValWillChangeForType<SVGAnimatedAngle>(properties);
+}
+
+void SVGAnimatedAngleAnimator::animValDidChange(const Vector<SVGAnimatedProperty*>& properties)
+{
+ animValDidChangeForType<SVGAnimatedAngle>(properties);
+}
+
void SVGAnimatedAngleAnimator::calculateFromAndToValues(OwnPtr<SVGAnimatedType>& from, OwnPtr<SVGAnimatedType>& to, const String& fromString, const String& toString)
{
ASSERT(m_contextElement);
@@ -123,13 +144,10 @@
float SVGAnimatedAngleAnimator::calculateDistance(const String& fromString, const String& toString)
{
- ExceptionCode ec = 0;
SVGAngle from = SVGAngle();
- from.setValueAsString(fromString, ec);
- ASSERT(!ec);
+ from.setValueAsString(fromString, ASSERT_NO_EXCEPTION);
SVGAngle to = SVGAngle();
- to.setValueAsString(toString, ec);
- ASSERT(!ec);
+ to.setValueAsString(toString, ASSERT_NO_EXCEPTION);
return fabsf(to.value() - from.value());
}
Modified: trunk/Source/WebCore/svg/SVGAnimatedAngle.h (112222 => 112223)
--- trunk/Source/WebCore/svg/SVGAnimatedAngle.h 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/Source/WebCore/svg/SVGAnimatedAngle.h 2012-03-27 08:22:37 UTC (rev 112223)
@@ -39,12 +39,16 @@
class SVGAnimationElement;
class SVGAnimatedAngleAnimator : public SVGAnimatedTypeAnimator {
-
public:
SVGAnimatedAngleAnimator(SVGAnimationElement*, SVGElement*);
virtual ~SVGAnimatedAngleAnimator() { }
virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&);
+ virtual PassOwnPtr<SVGAnimatedType> startAnimValAnimation(const Vector<SVGAnimatedProperty*>&);
+ virtual void stopAnimValAnimation(const Vector<SVGAnimatedProperty*>&);
+ virtual void resetAnimValToBaseVal(const Vector<SVGAnimatedProperty*>&, SVGAnimatedType*);
+ virtual void animValWillChange(const Vector<SVGAnimatedProperty*>&);
+ virtual void animValDidChange(const Vector<SVGAnimatedProperty*>&);
virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString);
virtual void calculateFromAndByValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& byString);
Modified: trunk/Source/WebCore/svg/SVGAnimatedType.cpp (112222 => 112223)
--- trunk/Source/WebCore/svg/SVGAnimatedType.cpp 2012-03-27 08:18:26 UTC (rev 112222)
+++ trunk/Source/WebCore/svg/SVGAnimatedType.cpp 2012-03-27 08:22:37 UTC (rev 112223)
@@ -453,6 +453,7 @@
{
// FIXME: This lists the current state of our animVal support.
switch (type) {
+ case AnimatedAngle:
case AnimatedLength:
case AnimatedLengthList:
case AnimatedNumber:
@@ -460,7 +461,6 @@
case AnimatedNumberOptionalNumber:
case AnimatedTransformList:
return true;
- case AnimatedAngle:
case AnimatedBoolean:
case AnimatedColor:
case AnimatedEnumeration: