Commit 8ab401e1 authored by kouhei@chromium.org's avatar kouhei@chromium.org

SVGSMILElement should respect SVGTests results

SVGAnimationElement derives SVGTests, but it never checked for its results.
This patch modifies |SVGSMILElement::progress| so it will query |SVGElement::isValid()| before applying animation.

BUG=397991

Review URL: https://codereview.chromium.org/424753002

git-svn-id: svn://svn.chromium.org/blink/trunk@179122 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 86e3e3a5
<!DOCTYPE html>
<svg>
<rect id="#target" x="10" y="10" width="10" height="10" style="fill: green"/>
</svg>
<!DOCTYPE html>
<svg>
<rect id="#reference" x="10" y="10" width="10" height="10" style="fill: red"/>
<rect id="#target" x="10" y="0" width="10" height="10" style="fill: green">
<set attributeName="y" attributeType="XML" to="10" begin="0s" dur="1s" fill="freeze" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Shape" />
<set attributeName="x" attributeType="XML" to="20" begin="0s" dur="1s" fill="freeze" requiredFeatures="http://www.w3.org/TR/SVG11/feature#BogusFeature" />
</rect>
</svg>
<script>
document.querySelector("svg").setCurrentTime(0.5);
</script>
...@@ -546,6 +546,9 @@ void SVGAnimationElement::startedActiveInterval() ...@@ -546,6 +546,9 @@ void SVGAnimationElement::startedActiveInterval()
{ {
m_animationValid = false; m_animationValid = false;
if (!isValid())
return;
if (!hasValidAttributeType()) if (!hasValidAttributeType())
return; return;
......
...@@ -166,6 +166,8 @@ protected: ...@@ -166,6 +166,8 @@ protected:
void setCalcMode(CalcMode calcMode) { m_calcMode = calcMode; } void setCalcMode(CalcMode calcMode) { m_calcMode = calcMode; }
private: private:
virtual bool isValid() const OVERRIDE FINAL { return SVGTests::isValid(); }
virtual void animationAttributeChanged() OVERRIDE; virtual void animationAttributeChanged() OVERRIDE;
void setAttributeType(const AtomicString&); void setAttributeType(const AtomicString&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment