Title: [153886] trunk
- Revision
- 153886
- Author
- [email protected]
- Date
- 2013-08-09 06:05:37 -0700 (Fri, 09 Aug 2013)
Log Message
ASSERT(m_type == toSVGTransform.type())
https://bugs.webkit.org/show_bug.cgi?id=113217
Reviewed by Darin Adler.
Source/WebCore:
For to animations clear the transform list while animating and reset to it after the animation is done.
This matches Firefox and Opera 12 behavior.
Tests: svg/animations/animateTransform-to-scale-expected.svg
svg/animations/animateTransform-to-scale.svg
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
LayoutTests:
Add reftest for additive to animation where from and to transform types differ.
* svg/animations/animateTransform-to-scale-expected.svg: Added.
* svg/animations/animateTransform-to-scale.svg: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (153885 => 153886)
--- trunk/LayoutTests/ChangeLog 2013-08-09 12:46:05 UTC (rev 153885)
+++ trunk/LayoutTests/ChangeLog 2013-08-09 13:05:37 UTC (rev 153886)
@@ -1,3 +1,15 @@
+2013-08-09 Rob Buis <[email protected]>
+
+ ASSERT(m_type == toSVGTransform.type())
+ https://bugs.webkit.org/show_bug.cgi?id=113217
+
+ Reviewed by Darin Adler.
+
+ Add reftest for additive to animation where from and to transform types differ.
+
+ * svg/animations/animateTransform-to-scale-expected.svg: Added.
+ * svg/animations/animateTransform-to-scale.svg: Added.
+
2013-08-09 Renata Hodovan <[email protected]>
Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
Added: trunk/LayoutTests/svg/animations/animateTransform-to-scale-expected.svg (0 => 153886)
--- trunk/LayoutTests/svg/animations/animateTransform-to-scale-expected.svg (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-to-scale-expected.svg 2013-08-09 13:05:37 UTC (rev 153886)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<svg viewBox="0 0 500 300" _onload_="loaded()" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<rect x="0" y="0" width="500" height="300" fill="#fff" />
+
+<g fill="green">
+ <path d="M-25,0C120,-40 -80,-60 20,25zM20 10q-10 -10 2 -10" transform="translate(100,100)"/>
+</g>
+</svg>
Added: trunk/LayoutTests/svg/animations/animateTransform-to-scale.svg (0 => 153886)
--- trunk/LayoutTests/svg/animations/animateTransform-to-scale.svg (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-to-scale.svg 2013-08-09 13:05:37 UTC (rev 153886)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<svg viewBox="0 0 500 300" _onload_="loaded()" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<rect x="0" y="0" width="500" height="300" fill="#fff" />
+
+<g fill="green">
+ <path d="M-25,0C120,-40 -80,-60 20,25zM20 10q-10 -10 2 -10" transform="translate(100,100)">
+ <animateTransform attributeName="transform" additive="sum" type="scale" to="3" begin="0s" dur="2s"/>
+ </path>
+</g>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function loaded() {
+ document.documentElement.setCurrentTime(2);
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+</svg>
Modified: trunk/Source/WebCore/ChangeLog (153885 => 153886)
--- trunk/Source/WebCore/ChangeLog 2013-08-09 12:46:05 UTC (rev 153885)
+++ trunk/Source/WebCore/ChangeLog 2013-08-09 13:05:37 UTC (rev 153886)
@@ -1,3 +1,19 @@
+2013-08-09 Rob Buis <[email protected]>
+
+ ASSERT(m_type == toSVGTransform.type())
+ https://bugs.webkit.org/show_bug.cgi?id=113217
+
+ Reviewed by Darin Adler.
+
+ For to animations clear the transform list while animating and reset to it after the animation is done.
+ This matches Firefox and Opera 12 behavior.
+
+ Tests: svg/animations/animateTransform-to-scale-expected.svg
+ svg/animations/animateTransform-to-scale.svg
+
+ * svg/SVGAnimatedTransformList.cpp:
+ (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
+
2013-08-09 Arunprasad Rajkumar <[email protected]>
[Qt] QtWebKit should allow sending domain specific keycode to HTML applications
Modified: trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp (153885 => 153886)
--- trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp 2013-08-09 12:46:05 UTC (rev 153885)
+++ trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp 2013-08-09 13:05:37 UTC (rev 153886)
@@ -100,8 +100,7 @@
// Spec: To animations provide specific functionality to get a smooth change from the underlying value to the
// ‘to’ attribute value, which conflicts mathematically with the requirement for additive transform animations
// to be post-multiplied. As a consequence, in SVG 1.1 the behavior of to animations for ‘animateTransform’ is undefined.
- // FIXME: This is not taken into account yet.
- const SVGTransformList& fromTransformList = m_animationElement->animationMode() == ToAnimation ? animated->transformList() : from->transformList();
+ const SVGTransformList& fromTransformList = from->transformList();
const SVGTransformList& toTransformList = to->transformList();
const SVGTransformList& toAtEndOfDurationTransformList = toAtEndOfDuration->transformList();
SVGTransformList& animatedTransformList = animated->transformList();
@@ -111,7 +110,7 @@
return;
// Never resize the animatedTransformList to the toTransformList size, instead either clear the list or append to it.
- if (!animatedTransformList.isEmpty() && !m_animationElement->isAdditive())
+ if (!animatedTransformList.isEmpty() && (!m_animationElement->isAdditive() || m_animationElement->animationMode() == ToAnimation))
animatedTransformList.clear();
unsigned fromTransformListSize = fromTransformList.size();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes