Changeset 110545 in webkit


Ignore:
Timestamp:
Mar 13, 2012 1:27:14 AM (12 years ago)
Author:
Nikolas Zimmermann
Message:

SVG Animations update baseVal instead of animVal
https://bugs.webkit.org/show_bug.cgi?id=12437

Reviewed by Dirk Schulze.

Source/WebCore:

Begin implementing the last missing core piece of the SVG DOM: proper animVal support.
Most SVG DOM interfaces exposing eg. lengths use SVGAnimatedLength. eg. from SVGRectElement:
"readonly attribute SVGAnimatedLength x;" SVGAnimatedXXX contains following methods:
"readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;"
From SVG DOM perspective, animVal and baseVal are two distinctive objects, animVal != baseVal.
Its underlying value is the same though, if no animation is running on that attribute.

As soon as a SMIL animation starts animating an SVGAnimated* target attribute, its
baseVal and animVal may begin to differ. The animVal always reflect the current animated
value (including all effects of additive/accumulated animations) which is shown on screen
when eg animating the width of a <rect>. The baseVal is is equal to the underlying XML
property value / SVG DOM value, but may be influenced through dynamic changes.
(Consider changing rect1.width.baseVal.value while 'width' is animated)

During the last year we prepared our animation code to turn on animVal support.
This patch adds the last missing pieces to turn on animVal support for the SVGLength.
SVGLengthList and all other types will follow, one after the other.

I've decided to write an exhaustive ChangeLog, as this as the base for any future
work in this area - hopefully making this more reviewable.

Tests: svg/animations/additive-from-to-width-animation.html

svg/animations/additive-values-width-animation.html
svg/animations/change-baseVal-while-animating-fill-freeze-2.html
svg/animations/change-baseVal-while-animating-fill-freeze.html
svg/animations/change-baseVal-while-animating-fill-remove-2.html
svg/animations/change-baseVal-while-animating-fill-remove.html
svg/animations/change-target-while-animating-SVG-property.html
svg/animations/multiple-animations-fill-freeze.html
svg/animations/remove-animation-element-while-animation-is-running.html
svg/repaint/repainting-after-animation-element-removal.svg

  • svg/SVGAnimateElement.cpp: Remove unnecessary std namespace inclusion.

(WebCore::SVGAnimateElement::SVGAnimateElement): Remove now-obsolete m_aboutToStopAnimation.
(WebCore::SVGAnimateElement::calculateAnimatedValue): Swap assertion order, to test hasTagName() _before_ casting.
(WebCore::SVGAnimateElement::resetToBaseValue):

Stop relying on the cached baseValue (breaking additive="sum"+values animation) for SVG DOM primitive animations.
Avoid any string roundtrips previously needed to reset the SVGAnimatedType to the base value. Just grab the
currentBaseValue() from the associated SVGAnimatedProperty, which includes all dynamic changes to the baseVal
either by SVG DOM or setAttribute() calls - this way we don't need to utilize the buggy cache in SMILTimeContainer,
which can be removed once all SVG DOM primitive types switched to the new animVal concept.

NOTE: When multiple animations of the same attribute are applied to a target element, resetToBaseValue() will be called
for the highest priority SVGSMILElement, on every animation step! Consider two <animate> elements, applied to a target
<rect> which both animate the 'x' attribute, one from 0s to 2s, the other from 4s to 6s. The last <animate> element
will reuse the SVGAnimatedType m_animatedType from the first <animate> element, and never create an own m_animatedType.
When the animation starts the first time at 0s, we update the rect.x.animVals SVGLength* pointer, to point to the
SVGAnimatedType of the first <animate> element, owning the m_animatedType. From that point on each call to rect.x.animVal
will always return the same value as the SVGAnimatedType of the first <animate> element holds. Now after 2s the first
<animate> element becomes inactive, but its m_animatedType remains alive. The bindings don't notice this change at all.
Now at 4s, the second animation element gets active. It reuses the SVGAnimatedType of the first <animate> element, and
applies its animation changes to that SVGAnimatedType, which is immediately reflected in the bindings w/o any additional
work. It's very important for the understanding when animationStarted/animationEnded need to be called.

(WebCore::SVGAnimateElement::applyResultsToTarget): Remove now-obsolete m_aboutToStopAnimation logic. No need to know it at this point.
(WebCore::SVGAnimateElement::targetElementWillChange):

Renamed from targetElementDidChange(). This method is called from SVGSMILElement for following conditions:

  • animation element is destructed
  • animation element is removed from document
  • target element of animation is destructed
  • target element of animation is removed from document
  • target element of animation changes id

Whenever any of this happens, we need to reset the animVal. Resetting the animVal involves resetting the PropertyType* pointer,
eg. SVGLength*, from the animVal property tear off, belonging to a certain SVGAnimatedProperty (eg. rect.x) to the initial
value again, which is the 'm_x' of the SVGRectElement. This is needed as the SVGAnimatedType the animVal currently points to,
if an animation is/was running, is destructed in targetElementWillChange(), to reset the SVGAnimateElement to the initial
state before it received a target. This is the only place which destructed the m_animatedType, and thus the only place that
needs to take care of resetting the animVal pointers.

  • svg/SVGAnimatedLength.cpp:

(WebCore::SVGAnimatedLengthAnimator::constructFromCopy):

Add a new constructFromCopy(SVGGenericAnimatedType) function to SVGAnimatedLengthAnimator.
It takes a type-unsafe SVGGenericAnimatedType - the caller has to guarantee the type matches.
This is strictly enforced for the single caller of constructFromCopy, and guaranteed to be safe.

  • svg/SVGAnimatedLength.h: Add new constructFromCopy method, which is used to avoid string-roundtrips when resetting to base values.
  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::supportsAnimVal): Only returns true for AnimatedLength, for now.
(WebCore::SVGAnimatedType::setVariantValue): Takes a SVGGenericAnimatedType, assuming the type matches. Callers have to guarantee type-safety!

  • svg/SVGAnimatedType.h:

(SVGAnimatedType): Add new static supportsAnimVal(AnimatedPropertyType) function.
(WebCore::SVGAnimatedType::variantValue): Add a generic accessor for all animated types, called variant(). Only one place uses this.

  • svg/SVGAnimatedTypeAnimator.h:

(WebCore::SVGAnimatedTypeAnimator::constructFromCopy):

New method to construct an eg. SVGAnimatedLengthAnimator right from a SVGLength, instead of a String.
In that case the SVGAnimatedType just stores a pointer to the underlying SVGLength, no copying and or other roundtrips involved.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::svgAttributeChanged):

Implement this instead of attributeChanged. The previous implementation reset the animation state to Inactive, causing a full
rebuild, whenever any attribute changes, even though it might not be related for the animation element, eg.
animate.setAttribute("stdDeviationX", "foobar"). Fix that by checking if we support the attribute (keyTimes/keySplines/etc..)
, if not pass it on to SVGSMILElement (which supports begin/end/etc..) to check if it can handle that.

(WebCore::SVGAnimationElement::animationAttributeChanged):

Called from our svgAttributeChanged, and/or from SVGSMILElement::svgAttributeChanged, whenever a _known_ attribute has changed.
This sledgehammer should be used with care, instead of each time attributeChanged() is called :-)

(WebCore::setTargetAttributeAnimatedCSSValue):

Remove support for removing properties from the override style sheet. I've added this optimization too early, we should reevaluate
this once more types support animVal. It currently complexifies the logic too much, requiring setAttributeAnimatedValue to know
if the animation ends (and that's not easy to figure out, at least not using started/endedActiveInterval, as I anticipated).

(WebCore::findMatchingAnimatedProperty):

Add helper functions which retrieves a SVGAnimatedProperty* for a given SVGElement* targetElement, an attributeName, and an attribute
type. eg. findMatchingAnimatedProperty(myRectElement, SVGNames::xAttr, AnimatedLength) returns the SVGAnimatedProperty which is
exposed to JS, that holds: SVGProperty* baseVal, and SVGProperty* animVal. (Lazily created if they got accessed from JS.). This is
used to update the animVal pointing to a new eg. SVGLength* value, once animation has started, to make rect->x() return that new
SVGLength* value (internally), and to reflect the current animated value in rect.x.animVal.value from JS.

(WebCore::SVGAnimationElement::applyAnimatedValue): Refactored from setTargetAttributeAnimatedValue, to simplify the code.
(WebCore::notifyAnimatedPropertyAboutAnimationBeginEnd):

Helper function to share code betweeen animationStarted/animationEnded.
It takes a SVGAnimatedProperty* and a SVGAnimatedType* which may be zero, indicating that the animation ended.
It calls animationStarted/animationEnded on the given SVGAnimatedProperty, to update the animVal state.
It also figures out all instances of the target element, and their SVGAnimatedProperties that may need updating.

(WebCore::SVGAnimationElement::animationStarted): Uses the helper above, passing on the given animatedType.
(WebCore::SVGAnimationElement::animationEnded): Uses the helper above, passing 0 as animatedType.
(WebCore::InstanceUpdateBlocker::InstanceUpdateBlocker):

Added new helper struct, doing element->setInstancesUpdatedBlock(true) on construction and setInstancesUpdatesBlocked(false) on
destruction, making it impossible to forget one. If we ever rewrite svgAttributeChanged & co to auto-update the cloned instances,
this can go away.

(WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):

Now takes an SVGAnimatedType* instead of a String parameter. In order to avoid string-roundtrips for animVal support, let us
decide if we need to construct a String out of it, or not. For animations supporting animVal (only SVGLength) we don't need
to update any attribute or animVal pointer here, that happens automatically! We only need to notify the targetElement eg,
that its xAttr changed! Previously we had to call targetElement->setAttribute("x", "...") on every animation step for
SVGLength animations - that's gone now! The SVGAnimatedType pointers remains the same during the whole animation, so there's
no need to call animationStarted() at each animated step!

(WebCore::SVGAnimationElement::animatedPropertyForType):

Helper function returning a SVGAnimatedProperty* for the current target element & current target attribute, if the
current animation is running on a type supporting animVal (SVGLength), or returning 0. This is needed for SVGAnimateElement.
Reuses the existing findMatchingAnimatedProperty code.

  • svg/SVGAnimationElement.h:
  • svg/animation/SMILTimeContainer.cpp:

(WebCore::SMILTimeContainer::updateAnimations):

Add comment to clarify why caching baseValues is just wrong. For SVGLength animations the problem is now gone.
This is exercised using the new additive-from-to-width-animation.html & additive-values-width-animation.html tests.

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::removedFromDocument):

Since animVal requires that the SVGAnimatedProperties are correctly reset if an animation element is removed from the document,
we have to call targetElementWillChange(0) from here. That requires to move the "m_attributeName = anyQName()" line down,
otherwise targetElementWillChange() would early exit, as no valid attributeName was specified.

This is verified using the new svg/animations/remove-animation-element-while-animation-is-running.html
and svg/repaint/repainting-after-animation-element-removal.svg tests.

(WebCore::SVGSMILElement::isSupportedAttribute): Add function like all SVG*Elements have identifying their supported attributes.
(WebCore::SVGSMILElement::svgAttributeChanged):

Implement svgAttributeChanged instead of attributeChanged. Only take action if the attribute is actually supported.
If one of the common attributes like begin/end/etc. changed, be sure to call animationAttributeChanged() so that our
ancestor-classes get notified about this and can take action as well. NOTE: This is not about animating begin/end attributes,
but about pure DOM changes. begin/end/et.. are not exposed to the SVG DOM, we still reuse the svgAttributeChanged logic
for consistency. (This does NOT make those attributes animatable, nothing this here as it came up while reviewing).

(WebCore::SVGSMILElement::targetElement): Adapt logic to targetElementDidChange -> targetElementWillChange change.
(WebCore::SVGSMILElement::targetElementWillChange):

Renamed from targetElementDidChange. Added "oldTarget" as parameter as well. Our ancestor-classes like SVGAnimateElement
use this to properly deregister the animVal in the old target, before resetting the SVGAnimatedType, otherwise we'd leave
dangling pointers around (verified manually by guard malloc runs, that none of this happens).

Also add a default implementation here in targetElementWillChange, that ancestor classes have to call.
Now we properly call endedActiveInterval() if the m_activeState is currently Active, so that animations are shut-down
just like if the animation properly ends (use the same cleanup routines, etc.). Not doing that now leads to assertions.

(WebCore::SVGSMILElement::resetTargetElement):

Instead of forcing m_activeState to be inactive, use the standard methods to end the animation.
targetElementWillChange(m_targetElement, 0) and animationAttributeChanged().

resetTargetElement() is only called by SVGDocumentExtensions::removeAllAnimationElementsFromTarget() for following conditions:

  • targetElement gets destructed
  • targetElement gets removed from the document
  • targetElement id changes

If the targetElement gets destructed or removed, no actions need to be taken, as the SVGAnimatedPropertys are teared down
as well. But if only the id changes, we still have to properly disconnect the animVals - this is all handled through
targetElementWillChange now - that's why this has to be called from here as well.
That explains why targetElementWillChange() now needs to check if the targetElement is destructing or not.

  • svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:

Pass the AnimatedPropertyType from the SVGPropertyInfo to the SVGAnimatedProperties.
Requires mechanic changes in all SVGAnimated* classes. We need acccess to the AnimatedPropertyType
to verify the SVGAnimatedType objects, passed to animationStarted, match our type. This is to enforce
strict type-checking, whenever SVGGenericAnimatedTypes are passed around.

(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):

  • svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.

(WebCore::SVGAnimatedListPropertyTearOff::create):
(WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):

  • svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.

(WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
(WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):

  • svg/properties/SVGAnimatedProperty.h: Store AnimatedPropertyType, add accessors.

(WebCore::SVGAnimatedProperty::animatedPropertyType): Add accessor.
(WebCore::SVGAnimatedProperty::animationValueChanged): New animVal related functions to be implemented in the animated tear offs.
(WebCore::SVGAnimatedProperty::animationStarted): Ditto.
(WebCore::SVGAnimatedProperty::animationEnded): Ditto.
(WebCore::SVGAnimatedProperty::currentBaseValue):

Generic accessor for the baseVal: returns a SVGGenericAnimatedType.
It takes an AnimatedPropertyType as input, that's only needed to verify that the type we're returning matches
the expectation of the caller. If not, return 0 to avoid any potential casting mistakes, which would lead to crashes.

(WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Store m_animatedPropertyType.

  • svg/properties/SVGAnimatedPropertyTearOff.h:

(WebCore::SVGAnimatedPropertyTearOff::create): Same changes as in the other tear offs: pass around AnimatedPropertyType.
(WebCore::SVGAnimatedPropertyTearOff::currentBaseValue): Returns &m_property, if the type matches (see above).
(SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
(WebCore::SVGAnimatedPropertyTearOff::animationValueChanged): No-op for non list types, don't need to do anything here.
(WebCore::SVGAnimatedPropertyTearOff::animationStarted):
(WebCore::SVGAnimatedPropertyTearOff::animationEnded):

Store the currently animated value in the animVal() property tear off, that's also re-used as-is for the JS bindings.
As this is important, here's an example of how this affects methods like rect->x() used in the renderers.

Setting m_isAnimating to true, redirects any rect->x() calls that previously returned rect->m_x, to
rect->xAnimated()->animVal()->propertyReference() (which returns the same SVGLength& that the SVGAnimatedElement
m_animatedType contains). Calling rect->setXBaseValue() still modifies rect->m_x, and is used by all parseAttribute()
methods in svg/ as setAttribute() calls only ever modify the "baseValue", never the current animated value.
rect.x.baseVal will return a SVGLength object corresponding to rect->m_x.
rect.x.animVal will return a SVGLength object corresponding to rect->xAnimated()->animVal()->propertyReference().

These implementation details are all hidden in the SVGAnimatedPropertyMacros. Here's an example from SVGRectElement:
DECLARE_ANIMATED_LENGTH(X, x) -> Replace PropertyType with 'SVGLength', LowerProperty with 'x', and UpperProperty with 'X'.

PropertyType& LowerProperty() const
{

if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType, IsDerivedFromSVGElement<UseOwnerType>::value>(this, LowerProperty##PropertyInfo())) {

if (wrapper->isAnimating())

return wrapper->currentAnimatedValue();

}
return m_##LowerProperty.value;

}

PropertyType& LowerProperty##BaseValue() const
{

return m_##LowerProperty.value;

}

void set##UpperProperty##BaseValue(const PropertyType& type)
{

m_##LowerProperty.value = type;

}

Any code outside of svg/, eg. in rendering/svg, does not need to care about any baseVal/animVal differences.
During layout eg. RenderSVGRect calls rect->x().value(someLengthContext) to get the current 'x' as float. If an animation
is running on that rect element it will automatically retrieve the last set animated value here - all under the hood.
I hope that sheds some light in those myserious functions, they were designed with animVal in mind, but we never had that until now :-)

(WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
(WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): Add destructor to debug builds veryifing that m_isAnimating is false.

  • svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.

(WebCore::SVGAnimatedStaticPropertyTearOff::create):
(WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):

  • svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.

(WebCore::SVGAnimatedTransformListPropertyTearOff::create):
(WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):

  • svg/properties/SVGPropertyInfo.h: Add SVGGenericAnimatedType definition.
  • svg/properties/SVGPropertyTearOff.h: Remove obsolete updateAnimVal method - switched to using setValue directly.

LayoutTests:

Update test expectations after turning on animVal support for SVGLength, the first primitive now support animVal.
Added several new tests, checking additive behaviour with SVGLength objects, removing animation elements
while animations are running (+ test repainting of those cases), etc.

  • platform/mac/svg/repaint/repainting-after-animation-element-removal-expected.png: Added.
  • platform/mac/svg/repaint/repainting-after-animation-element-removal-expected.txt: Added.
  • svg/animations/additive-from-to-width-animation-expected.txt: Added.
  • svg/animations/additive-from-to-width-animation.html: Added.
  • svg/animations/additive-values-width-animation-expected.txt: Added.
  • svg/animations/additive-values-width-animation.html: Added.
  • svg/animations/animVal-basics-expected.txt:
  • svg/animations/animate-calcMode-spline-by-expected.txt:
  • svg/animations/animate-calcMode-spline-from-by-expected.txt:
  • svg/animations/animate-calcMode-spline-from-to-expected.txt:
  • svg/animations/animate-calcMode-spline-to-expected.txt:
  • svg/animations/animate-calcMode-spline-values-expected.txt:
  • svg/animations/animate-elem-02-t-drt-expected.txt:
  • svg/animations/animate-elem-09-t-drt-expected.txt:
  • svg/animations/animate-elem-10-t-drt-expected.txt:
  • svg/animations/animate-elem-11-t-drt-expected.txt:
  • svg/animations/animate-elem-12-t-drt-expected.txt:
  • svg/animations/animate-elem-13-t-drt-expected.txt:
  • svg/animations/animate-elem-14-t-drt-expected.txt:
  • svg/animations/animate-elem-15-t-drt-expected.txt:
  • svg/animations/animate-elem-16-t-drt-expected.txt:
  • svg/animations/animate-elem-17-t-drt-expected.txt:
  • svg/animations/animate-elem-18-t-drt-expected.txt:
  • svg/animations/animate-elem-19-t-drt-expected.txt:
  • svg/animations/animate-end-attribute-expected.txt:
  • svg/animations/animate-endElement-beginElement-expected.txt:
  • svg/animations/animate-from-to-keyTimes-expected.txt:
  • svg/animations/animate-insert-begin-expected.txt:
  • svg/animations/animate-insert-no-begin-expected.txt:
  • svg/animations/animate-keySplines-expected.txt:
  • svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt:
  • svg/animations/attributeTypes-expected.txt:
  • svg/animations/change-baseVal-while-animating-fill-freeze-2-expected.txt: Added.
  • svg/animations/change-baseVal-while-animating-fill-freeze-2.html: Added.
  • svg/animations/change-baseVal-while-animating-fill-freeze-expected.txt: Added.
  • svg/animations/change-baseVal-while-animating-fill-freeze.html: Added.
  • svg/animations/change-baseVal-while-animating-fill-remove-2-expected.txt: Added.
  • svg/animations/change-baseVal-while-animating-fill-remove-2.html: Added.
  • svg/animations/change-baseVal-while-animating-fill-remove-expected.txt: Added.
  • svg/animations/change-baseVal-while-animating-fill-remove.html: Added.
  • svg/animations/change-target-while-animating-SVG-property-expected.txt: Added.
  • svg/animations/change-target-while-animating-SVG-property.html: Added.
  • svg/animations/multiple-animations-fill-freeze-expected.txt: Added.
  • svg/animations/multiple-animations-fill-freeze.html: Added.
  • svg/animations/remove-animation-element-while-animation-is-running-expected.txt: Added.
  • svg/animations/remove-animation-element-while-animation-is-running.html: Added.
  • svg/animations/resources/additive-from-to-width-animation.svg: Added.
  • svg/animations/resources/additive-values-width-animation.svg: Added.
  • svg/animations/resources/change-baseVal-while-animating-fill-freeze.svg: Added.
  • svg/animations/resources/change-baseVal-while-animating-fill-remove.svg: Added.
  • svg/animations/resources/change-target-while-animating-SVG-property.svg: Added.
  • svg/animations/resources/multiple-animations-fill-freeze.svg: Added.
  • svg/animations/resources/remove-animation-element-while-animation-is-running.svg: Added.
  • svg/animations/script-tests/additive-from-to-width-animation.js: Added.

(sample1):
(sample2):
(sample3):
(executeTest):

  • svg/animations/script-tests/additive-values-width-animation.js: Added.

(sample1):
(sample2):
(sample3):
(changeBaseVal):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/animVal-basics.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-calcMode-spline-by.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-calcMode-spline-from-by.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-calcMode-spline-from-to.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-calcMode-spline-to.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-calcMode-spline-values.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-elem-02-t-drt.js:

(sampleAfterBegin):
(sampleAfterMid):
(sampleAfterBeginOfFirstRepetition):
(sampleAfterMidOfFirstRepetition):

  • svg/animations/script-tests/animate-elem-09-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-10-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-11-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-12-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-13-t-drt.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/animate-elem-14-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-15-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-16-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-17-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-18-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-elem-19-t-drt.js:

(sample1):
(sample2):
(sample3):
(sample4):

  • svg/animations/script-tests/animate-end-attribute.js:

(sample2):
(sample3):

  • svg/animations/script-tests/animate-endElement-beginElement.js:

(sample1):

  • svg/animations/script-tests/animate-from-to-keyTimes.js:

(sample1):
(sample2):

  • svg/animations/script-tests/animate-insert-begin.js:

(sample1):
(sample2):

  • svg/animations/script-tests/animate-insert-no-begin.js:

(sample1):
(sample2):

  • svg/animations/script-tests/animate-keySplines.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/attributeTypes.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/change-baseVal-while-animating-fill-freeze-2.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/change-baseVal-while-animating-fill-freeze.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/change-baseVal-while-animating-fill-remove-2.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/change-baseVal-while-animating-fill-remove.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/change-target-while-animating-SVG-property.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):

  • svg/animations/script-tests/multiple-animations-fill-freeze.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(sample6):
(sample7):
(sample8):
(executeTest):

  • svg/animations/script-tests/remove-animation-element-while-animation-is-running.js: Added.

(sample1):
(sample2):
(sample3):
(sample4):
(executeTest):

  • svg/animations/script-tests/svglength-animation-LengthModeHeight.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-LengthModeOther.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-LengthModeWidth.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-invalid-value-1.js:

(sample2):

  • svg/animations/script-tests/svglength-animation-invalid-value-2.js:

(sample2):

  • svg/animations/script-tests/svglength-animation-invalid-value-3.js:

(sample2):

  • svg/animations/script-tests/svglength-animation-number-to-number.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-cm.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-ems.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-exs.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-in.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-number.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-pc.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-percentage.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-pt.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-px-to-px.js:

(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-unitType.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/svglength-animation-values.js:

(sample2):
(sample3):
(sample4):
(sample5):

  • svg/animations/svglength-animation-LengthModeHeight-expected.txt:
  • svg/animations/svglength-animation-LengthModeOther-expected.txt:
  • svg/animations/svglength-animation-LengthModeWidth-expected.txt:
  • svg/animations/svglength-animation-invalid-value-1-expected.txt:
  • svg/animations/svglength-animation-invalid-value-2-expected.txt:
  • svg/animations/svglength-animation-invalid-value-3-expected.txt:
  • svg/animations/svglength-animation-number-to-number-expected.txt:
  • svg/animations/svglength-animation-px-to-cm-expected.txt:
  • svg/animations/svglength-animation-px-to-ems-expected.txt:
  • svg/animations/svglength-animation-px-to-exs-expected.txt:
  • svg/animations/svglength-animation-px-to-in-expected.txt:
  • svg/animations/svglength-animation-px-to-number-expected.txt:
  • svg/animations/svglength-animation-px-to-pc-expected.txt:
  • svg/animations/svglength-animation-px-to-percentage-expected.txt:
  • svg/animations/svglength-animation-px-to-pt-expected.txt:
  • svg/animations/svglength-animation-px-to-px-expected.txt:
  • svg/animations/svglength-animation-unitType-expected.txt:
  • svg/animations/svglength-animation-values-expected.txt:
  • svg/repaint/repainting-after-animation-element-removal.svg: Added.
Location:
trunk
Files:
37 added
110 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r110543 r110545  
     12012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        SVG Animations update baseVal instead of animVal
     4        https://bugs.webkit.org/show_bug.cgi?id=12437
     5
     6        Reviewed by Dirk Schulze.
     7
     8        Update test expectations after turning on animVal support for SVGLength, the first primitive now support animVal.
     9        Added several new tests, checking additive behaviour with SVGLength objects, removing animation elements
     10        while animations are running (+ test repainting of those cases), etc.
     11
     12        * platform/mac/svg/repaint/repainting-after-animation-element-removal-expected.png: Added.
     13        * platform/mac/svg/repaint/repainting-after-animation-element-removal-expected.txt: Added.
     14        * svg/animations/additive-from-to-width-animation-expected.txt: Added.
     15        * svg/animations/additive-from-to-width-animation.html: Added.
     16        * svg/animations/additive-values-width-animation-expected.txt: Added.
     17        * svg/animations/additive-values-width-animation.html: Added.
     18        * svg/animations/animVal-basics-expected.txt:
     19        * svg/animations/animate-calcMode-spline-by-expected.txt:
     20        * svg/animations/animate-calcMode-spline-from-by-expected.txt:
     21        * svg/animations/animate-calcMode-spline-from-to-expected.txt:
     22        * svg/animations/animate-calcMode-spline-to-expected.txt:
     23        * svg/animations/animate-calcMode-spline-values-expected.txt:
     24        * svg/animations/animate-elem-02-t-drt-expected.txt:
     25        * svg/animations/animate-elem-09-t-drt-expected.txt:
     26        * svg/animations/animate-elem-10-t-drt-expected.txt:
     27        * svg/animations/animate-elem-11-t-drt-expected.txt:
     28        * svg/animations/animate-elem-12-t-drt-expected.txt:
     29        * svg/animations/animate-elem-13-t-drt-expected.txt:
     30        * svg/animations/animate-elem-14-t-drt-expected.txt:
     31        * svg/animations/animate-elem-15-t-drt-expected.txt:
     32        * svg/animations/animate-elem-16-t-drt-expected.txt:
     33        * svg/animations/animate-elem-17-t-drt-expected.txt:
     34        * svg/animations/animate-elem-18-t-drt-expected.txt:
     35        * svg/animations/animate-elem-19-t-drt-expected.txt:
     36        * svg/animations/animate-end-attribute-expected.txt:
     37        * svg/animations/animate-endElement-beginElement-expected.txt:
     38        * svg/animations/animate-from-to-keyTimes-expected.txt:
     39        * svg/animations/animate-insert-begin-expected.txt:
     40        * svg/animations/animate-insert-no-begin-expected.txt:
     41        * svg/animations/animate-keySplines-expected.txt:
     42        * svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt:
     43        * svg/animations/attributeTypes-expected.txt:
     44        * svg/animations/change-baseVal-while-animating-fill-freeze-2-expected.txt: Added.
     45        * svg/animations/change-baseVal-while-animating-fill-freeze-2.html: Added.
     46        * svg/animations/change-baseVal-while-animating-fill-freeze-expected.txt: Added.
     47        * svg/animations/change-baseVal-while-animating-fill-freeze.html: Added.
     48        * svg/animations/change-baseVal-while-animating-fill-remove-2-expected.txt: Added.
     49        * svg/animations/change-baseVal-while-animating-fill-remove-2.html: Added.
     50        * svg/animations/change-baseVal-while-animating-fill-remove-expected.txt: Added.
     51        * svg/animations/change-baseVal-while-animating-fill-remove.html: Added.
     52        * svg/animations/change-target-while-animating-SVG-property-expected.txt: Added.
     53        * svg/animations/change-target-while-animating-SVG-property.html: Added.
     54        * svg/animations/multiple-animations-fill-freeze-expected.txt: Added.
     55        * svg/animations/multiple-animations-fill-freeze.html: Added.
     56        * svg/animations/remove-animation-element-while-animation-is-running-expected.txt: Added.
     57        * svg/animations/remove-animation-element-while-animation-is-running.html: Added.
     58        * svg/animations/resources/additive-from-to-width-animation.svg: Added.
     59        * svg/animations/resources/additive-values-width-animation.svg: Added.
     60        * svg/animations/resources/change-baseVal-while-animating-fill-freeze.svg: Added.
     61        * svg/animations/resources/change-baseVal-while-animating-fill-remove.svg: Added.
     62        * svg/animations/resources/change-target-while-animating-SVG-property.svg: Added.
     63        * svg/animations/resources/multiple-animations-fill-freeze.svg: Added.
     64        * svg/animations/resources/remove-animation-element-while-animation-is-running.svg: Added.
     65        * svg/animations/script-tests/additive-from-to-width-animation.js: Added.
     66        (sample1):
     67        (sample2):
     68        (sample3):
     69        (executeTest):
     70        * svg/animations/script-tests/additive-values-width-animation.js: Added.
     71        (sample1):
     72        (sample2):
     73        (sample3):
     74        (changeBaseVal):
     75        (sample4):
     76        (sample5):
     77        (executeTest):
     78        * svg/animations/script-tests/animVal-basics.js:
     79        (sample2):
     80        (sample3):
     81        * svg/animations/script-tests/animate-calcMode-spline-by.js:
     82        (sample2):
     83        (sample3):
     84        * svg/animations/script-tests/animate-calcMode-spline-from-by.js:
     85        (sample2):
     86        (sample3):
     87        * svg/animations/script-tests/animate-calcMode-spline-from-to.js:
     88        (sample2):
     89        (sample3):
     90        * svg/animations/script-tests/animate-calcMode-spline-to.js:
     91        (sample2):
     92        (sample3):
     93        * svg/animations/script-tests/animate-calcMode-spline-values.js:
     94        (sample2):
     95        (sample3):
     96        * svg/animations/script-tests/animate-elem-02-t-drt.js:
     97        (sampleAfterBegin):
     98        (sampleAfterMid):
     99        (sampleAfterBeginOfFirstRepetition):
     100        (sampleAfterMidOfFirstRepetition):
     101        * svg/animations/script-tests/animate-elem-09-t-drt.js:
     102        (sample1):
     103        (sample2):
     104        (sample3):
     105        (sample4):
     106        * svg/animations/script-tests/animate-elem-10-t-drt.js:
     107        (sample1):
     108        (sample2):
     109        (sample3):
     110        (sample4):
     111        * svg/animations/script-tests/animate-elem-11-t-drt.js:
     112        (sample1):
     113        (sample2):
     114        (sample3):
     115        (sample4):
     116        * svg/animations/script-tests/animate-elem-12-t-drt.js:
     117        (sample1):
     118        (sample2):
     119        (sample3):
     120        (sample4):
     121        * svg/animations/script-tests/animate-elem-13-t-drt.js:
     122        (sample1):
     123        (sample2):
     124        (sample3):
     125        * svg/animations/script-tests/animate-elem-14-t-drt.js:
     126        (sample1):
     127        (sample2):
     128        (sample3):
     129        (sample4):
     130        * svg/animations/script-tests/animate-elem-15-t-drt.js:
     131        (sample1):
     132        (sample2):
     133        (sample3):
     134        (sample4):
     135        * svg/animations/script-tests/animate-elem-16-t-drt.js:
     136        (sample1):
     137        (sample2):
     138        (sample3):
     139        (sample4):
     140        * svg/animations/script-tests/animate-elem-17-t-drt.js:
     141        (sample1):
     142        (sample2):
     143        (sample3):
     144        (sample4):
     145        * svg/animations/script-tests/animate-elem-18-t-drt.js:
     146        (sample1):
     147        (sample2):
     148        (sample3):
     149        (sample4):
     150        * svg/animations/script-tests/animate-elem-19-t-drt.js:
     151        (sample1):
     152        (sample2):
     153        (sample3):
     154        (sample4):
     155        * svg/animations/script-tests/animate-end-attribute.js:
     156        (sample2):
     157        (sample3):
     158        * svg/animations/script-tests/animate-endElement-beginElement.js:
     159        (sample1):
     160        * svg/animations/script-tests/animate-from-to-keyTimes.js:
     161        (sample1):
     162        (sample2):
     163        * svg/animations/script-tests/animate-insert-begin.js:
     164        (sample1):
     165        (sample2):
     166        * svg/animations/script-tests/animate-insert-no-begin.js:
     167        (sample1):
     168        (sample2):
     169        * svg/animations/script-tests/animate-keySplines.js:
     170        (sample1):
     171        (sample2):
     172        (sample3):
     173        * svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js:
     174        (sample1):
     175        (sample2):
     176        (sample3):
     177        * svg/animations/script-tests/attributeTypes.js:
     178        (sample1):
     179        (sample2):
     180        (sample3):
     181        * svg/animations/script-tests/change-baseVal-while-animating-fill-freeze-2.js: Added.
     182        (sample1):
     183        (sample2):
     184        (sample3):
     185        (sample4):
     186        (sample5):
     187        (executeTest):
     188        * svg/animations/script-tests/change-baseVal-while-animating-fill-freeze.js: Added.
     189        (sample1):
     190        (sample2):
     191        (sample3):
     192        (sample4):
     193        (sample5):
     194        (executeTest):
     195        * svg/animations/script-tests/change-baseVal-while-animating-fill-remove-2.js: Added.
     196        (sample1):
     197        (sample2):
     198        (sample3):
     199        (sample4):
     200        (sample5):
     201        (executeTest):
     202        * svg/animations/script-tests/change-baseVal-while-animating-fill-remove.js: Added.
     203        (sample1):
     204        (sample2):
     205        (sample3):
     206        (sample4):
     207        (sample5):
     208        (executeTest):
     209        * svg/animations/script-tests/change-target-while-animating-SVG-property.js: Added.
     210        (sample1):
     211        (sample2):
     212        (sample3):
     213        (sample4):
     214        (sample5):
     215        (executeTest):
     216        * svg/animations/script-tests/multiple-animations-fill-freeze.js: Added.
     217        (sample1):
     218        (sample2):
     219        (sample3):
     220        (sample4):
     221        (sample5):
     222        (sample6):
     223        (sample7):
     224        (sample8):
     225        (executeTest):
     226        * svg/animations/script-tests/remove-animation-element-while-animation-is-running.js: Added.
     227        (sample1):
     228        (sample2):
     229        (sample3):
     230        (sample4):
     231        (executeTest):
     232        * svg/animations/script-tests/svglength-animation-LengthModeHeight.js:
     233        (sample2):
     234        (sample3):
     235        * svg/animations/script-tests/svglength-animation-LengthModeOther.js:
     236        (sample2):
     237        (sample3):
     238        * svg/animations/script-tests/svglength-animation-LengthModeWidth.js:
     239        (sample2):
     240        (sample3):
     241        * svg/animations/script-tests/svglength-animation-invalid-value-1.js:
     242        (sample2):
     243        * svg/animations/script-tests/svglength-animation-invalid-value-2.js:
     244        (sample2):
     245        * svg/animations/script-tests/svglength-animation-invalid-value-3.js:
     246        (sample2):
     247        * svg/animations/script-tests/svglength-animation-number-to-number.js:
     248        (sample2):
     249        (sample3):
     250        * svg/animations/script-tests/svglength-animation-px-to-cm.js:
     251        (sample2):
     252        (sample3):
     253        * svg/animations/script-tests/svglength-animation-px-to-ems.js:
     254        (sample2):
     255        (sample3):
     256        * svg/animations/script-tests/svglength-animation-px-to-exs.js:
     257        (sample2):
     258        (sample3):
     259        * svg/animations/script-tests/svglength-animation-px-to-in.js:
     260        (sample2):
     261        (sample3):
     262        * svg/animations/script-tests/svglength-animation-px-to-number.js:
     263        (sample2):
     264        (sample3):
     265        * svg/animations/script-tests/svglength-animation-px-to-pc.js:
     266        (sample2):
     267        (sample3):
     268        * svg/animations/script-tests/svglength-animation-px-to-percentage.js:
     269        (sample2):
     270        (sample3):
     271        * svg/animations/script-tests/svglength-animation-px-to-pt.js:
     272        (sample2):
     273        (sample3):
     274        * svg/animations/script-tests/svglength-animation-px-to-px.js:
     275        (sample2):
     276        (sample3):
     277        * svg/animations/script-tests/svglength-animation-unitType.js:
     278        (sample1):
     279        (sample2):
     280        (sample3):
     281        * svg/animations/script-tests/svglength-animation-values.js:
     282        (sample2):
     283        (sample3):
     284        (sample4):
     285        (sample5):
     286        * svg/animations/svglength-animation-LengthModeHeight-expected.txt:
     287        * svg/animations/svglength-animation-LengthModeOther-expected.txt:
     288        * svg/animations/svglength-animation-LengthModeWidth-expected.txt:
     289        * svg/animations/svglength-animation-invalid-value-1-expected.txt:
     290        * svg/animations/svglength-animation-invalid-value-2-expected.txt:
     291        * svg/animations/svglength-animation-invalid-value-3-expected.txt:
     292        * svg/animations/svglength-animation-number-to-number-expected.txt:
     293        * svg/animations/svglength-animation-px-to-cm-expected.txt:
     294        * svg/animations/svglength-animation-px-to-ems-expected.txt:
     295        * svg/animations/svglength-animation-px-to-exs-expected.txt:
     296        * svg/animations/svglength-animation-px-to-in-expected.txt:
     297        * svg/animations/svglength-animation-px-to-number-expected.txt:
     298        * svg/animations/svglength-animation-px-to-pc-expected.txt:
     299        * svg/animations/svglength-animation-px-to-percentage-expected.txt:
     300        * svg/animations/svglength-animation-px-to-pt-expected.txt:
     301        * svg/animations/svglength-animation-px-to-px-expected.txt:
     302        * svg/animations/svglength-animation-unitType-expected.txt:
     303        * svg/animations/svglength-animation-values-expected.txt:
     304        * svg/repaint/repainting-after-animation-element-removal.svg: Added.
     305
    13062012-03-13  Philippe Normand  <pnormand@igalia.com>
    2307
  • trunk/LayoutTests/svg/animations/animVal-basics-expected.txt

    r107682 r110545  
    99PASS rect.width.baseVal.value is 200
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 200
    1212PASS rect.width.animVal.value is 100
    13 PASS rect.width.baseVal.value is 100
     13PASS rect.width.baseVal.value is 200
    1414PASS rect.width.animVal.value is 200
    1515PASS rect.width.baseVal.value is 200
  • trunk/LayoutTests/svg/animations/animate-calcMode-spline-by-expected.txt

    r107791 r110545  
    99PASS rect.x.baseVal.value is 100
    1010PASS rect.x.animVal.value is 18.8
    11 PASS rect.x.baseVal.value is 18.8
     11PASS rect.x.baseVal.value is 100
    1212PASS rect.x.animVal.value is 0
    13 PASS rect.x.baseVal.value is 0
     13PASS rect.x.baseVal.value is 100
    1414PASS rect.x.animVal.value is 100
    1515PASS rect.x.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/animate-calcMode-spline-from-by-expected.txt

    r107791 r110545  
    99PASS rect.x.baseVal.value is 100
    1010PASS rect.x.animVal.value is 18.8
    11 PASS rect.x.baseVal.value is 18.8
     11PASS rect.x.baseVal.value is 100
    1212PASS rect.x.animVal.value is 0
    13 PASS rect.x.baseVal.value is 0
     13PASS rect.x.baseVal.value is 100
    1414PASS rect.x.animVal.value is 100
    1515PASS rect.x.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/animate-calcMode-spline-from-to-expected.txt

    r107791 r110545  
    99PASS rect.x.baseVal.value is 100
    1010PASS rect.x.animVal.value is 18.8
    11 PASS rect.x.baseVal.value is 18.8
     11PASS rect.x.baseVal.value is 100
    1212PASS rect.x.animVal.value is 0
    13 PASS rect.x.baseVal.value is 0
     13PASS rect.x.baseVal.value is 100
    1414PASS rect.x.animVal.value is 100
    1515PASS rect.x.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/animate-calcMode-spline-to-expected.txt

    r107791 r110545  
    99PASS rect.x.baseVal.value is 100
    1010PASS rect.x.animVal.value is 18.8
    11 PASS rect.x.baseVal.value is 18.8
     11PASS rect.x.baseVal.value is 100
    1212PASS rect.x.animVal.value is 0
    13 PASS rect.x.baseVal.value is 0
     13PASS rect.x.baseVal.value is 100
    1414PASS rect.x.animVal.value is 100
    1515PASS rect.x.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/animate-calcMode-spline-values-expected.txt

    r107791 r110545  
    99PASS rect.x.baseVal.value is 100
    1010PASS rect.x.animVal.value is 18.8
    11 PASS rect.x.baseVal.value is 18.8
     11PASS rect.x.baseVal.value is 100
    1212PASS rect.x.animVal.value is 0
    13 PASS rect.x.baseVal.value is 0
     13PASS rect.x.baseVal.value is 100
    1414PASS rect.x.animVal.value is 100
    1515PASS rect.x.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/animate-elem-02-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.height.animVal.value is 200
     10PASS rect1.height.baseVal.value is 20
    1011PASS rect2.height.animVal.value is 220
     12PASS rect2.height.baseVal.value is 20
    1113PASS rect3.height.animVal.value is 200
     14PASS rect3.height.baseVal.value is 20
    1215PASS rect1.height.animVal.value is 200
     16PASS rect1.height.baseVal.value is 20
    1317PASS rect2.height.animVal.value is 220
     18PASS rect2.height.baseVal.value is 20
    1419PASS rect3.height.animVal.value is 200
     20PASS rect3.height.baseVal.value is 20
    1521PASS rect1.height.animVal.value is 20
     22PASS rect1.height.baseVal.value is 20
    1623PASS rect2.height.animVal.value is 40
     24PASS rect2.height.baseVal.value is 20
    1725PASS rect3.height.animVal.value is 20
     26PASS rect3.height.baseVal.value is 20
    1827PASS rect1.height.animVal.value is 20
     28PASS rect1.height.baseVal.value is 20
    1929PASS rect2.height.animVal.value is 40
     30PASS rect2.height.baseVal.value is 20
    2031PASS rect3.height.animVal.value is 20
     32PASS rect3.height.baseVal.value is 20
    2133PASS rect1.height.animVal.value is 200
     34PASS rect1.height.baseVal.value is 20
    2235PASS rect2.height.animVal.value is 220
     36PASS rect2.height.baseVal.value is 20
    2337PASS rect3.height.animVal.value is 220
     38PASS rect3.height.baseVal.value is 20
    2439PASS rect1.height.animVal.value is 200
     40PASS rect1.height.baseVal.value is 20
    2541PASS rect2.height.animVal.value is 220
     42PASS rect2.height.baseVal.value is 20
    2643PASS rect3.height.animVal.value is 220
     44PASS rect3.height.baseVal.value is 20
    2745PASS rect1.height.animVal.value is 20
     46PASS rect1.height.baseVal.value is 20
    2847PASS rect2.height.animVal.value is 40
     48PASS rect2.height.baseVal.value is 20
    2949PASS rect3.height.animVal.value is 40
     50PASS rect3.height.baseVal.value is 20
    3051PASS rect1.height.animVal.value is 20
     52PASS rect1.height.baseVal.value is 20
    3153PASS rect2.height.animVal.value is 40
     54PASS rect2.height.baseVal.value is 20
    3255PASS rect3.height.animVal.value is 40
     56PASS rect3.height.baseVal.value is 20
    3357PASS rect1.height.animVal.value is 20
     58PASS rect1.height.baseVal.value is 20
    3459PASS rect2.height.animVal.value is 40
     60PASS rect2.height.baseVal.value is 20
    3561PASS rect3.height.animVal.value is 40
     62PASS rect3.height.baseVal.value is 20
    3663PASS rect1.height.animVal.value is 20
     64PASS rect1.height.baseVal.value is 20
    3765PASS rect2.height.animVal.value is 40
     66PASS rect2.height.baseVal.value is 20
    3867PASS rect3.height.animVal.value is 40
     68PASS rect3.height.baseVal.value is 20
    3969PASS successfullyParsed is true
    4070
  • trunk/LayoutTests/svg/animations/animate-elem-09-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.height.animVal.value is 210
     10PASS rect1.height.baseVal.value is 210
    1011PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1112PASS rootSVGElement.getTransformToElement(rect2).f is -250
    1213PASS rect1.height.animVal.value is 177
     14PASS rect1.height.baseVal.value is 210
    1315PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1416PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1517PASS rect1.height.animVal.value is 177
     18PASS rect1.height.baseVal.value is 210
    1619PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1720PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1821PASS rect1.height.animVal.value is 121
     22PASS rect1.height.baseVal.value is 210
    1923PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2024PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2125PASS rect1.height.animVal.value is 121
     26PASS rect1.height.baseVal.value is 210
    2227PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2328PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2429PASS rect1.height.animVal.value is 10
     30PASS rect1.height.baseVal.value is 210
    2531PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2632PASS rootSVGElement.getTransformToElement(rect2).f is -50
    2733PASS rect1.height.animVal.value is 10
     34PASS rect1.height.baseVal.value is 210
    2835PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2936PASS rootSVGElement.getTransformToElement(rect2).f is -50
    3037PASS rect1.height.animVal.value is 10
     38PASS rect1.height.baseVal.value is 210
    3139PASS rootSVGElement.getTransformToElement(rect2).e is -250
    3240PASS rootSVGElement.getTransformToElement(rect2).f is -50
  • trunk/LayoutTests/svg/animations/animate-elem-10-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.height.animVal.value is 210
     10PASS rect1.height.baseVal.value is 210
    1011PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1112PASS rootSVGElement.getTransformToElement(rect2).f is -250
    1213PASS rect1.height.animVal.value is 177
     14PASS rect1.height.baseVal.value is 210
    1315PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1416PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1517PASS rect1.height.animVal.value is 177
     18PASS rect1.height.baseVal.value is 210
    1619PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1720PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1821PASS rect1.height.animVal.value is 121
     22PASS rect1.height.baseVal.value is 210
    1923PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2024PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2125PASS rect1.height.animVal.value is 121
     26PASS rect1.height.baseVal.value is 210
    2227PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2328PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2429PASS rect1.height.animVal.value is 10
     30PASS rect1.height.baseVal.value is 210
    2531PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2632PASS rootSVGElement.getTransformToElement(rect2).f is -50
    2733PASS rect1.height.animVal.value is 10
     34PASS rect1.height.baseVal.value is 210
    2835PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2936PASS rootSVGElement.getTransformToElement(rect2).f is -50
    3037PASS rect1.height.animVal.value is 10
     38PASS rect1.height.baseVal.value is 210
    3139PASS rootSVGElement.getTransformToElement(rect2).e is -250
    3240PASS rootSVGElement.getTransformToElement(rect2).f is -50
  • trunk/LayoutTests/svg/animations/animate-elem-11-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.height.animVal.value is 210
     10PASS rect1.height.baseVal.value is 210
    1011PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1112PASS rootSVGElement.getTransformToElement(rect2).f is -250
    1213PASS rect1.height.animVal.value is 143.4
     14PASS rect1.height.baseVal.value is 210
    1315PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1416PASS rootSVGElement.getTransformToElement(rect2).f is -183.4
    1517PASS rect1.height.animVal.value is 143.4
     18PASS rect1.height.baseVal.value is 210
    1619PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1720PASS rootSVGElement.getTransformToElement(rect2).f is -183.4
    1821PASS rect1.height.animVal.value is 76.7
     22PASS rect1.height.baseVal.value is 210
    1923PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2024PASS rootSVGElement.getTransformToElement(rect2).f is -116.7
    2125PASS rect1.height.animVal.value is 76.7
     26PASS rect1.height.baseVal.value is 210
    2227PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2328PASS rootSVGElement.getTransformToElement(rect2).f is -116.7
    2429PASS rect1.height.animVal.value is 10
     30PASS rect1.height.baseVal.value is 210
    2531PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2632PASS rootSVGElement.getTransformToElement(rect2).f is -50
    2733PASS rect1.height.animVal.value is 10
     34PASS rect1.height.baseVal.value is 210
    2835PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2936PASS rootSVGElement.getTransformToElement(rect2).f is -50
    3037PASS rect1.height.animVal.value is 10
     38PASS rect1.height.baseVal.value is 210
    3139PASS rootSVGElement.getTransformToElement(rect2).e is -250
    3240PASS rootSVGElement.getTransformToElement(rect2).f is -50
  • trunk/LayoutTests/svg/animations/animate-elem-12-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.height.animVal.value is 210
     10PASS rect1.height.baseVal.value is 210
    1011PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1112PASS rootSVGElement.getTransformToElement(rect2).f is -250
    1213PASS rect1.height.animVal.value is 177
     14PASS rect1.height.baseVal.value is 210
    1315PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1416PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1517PASS rect1.height.animVal.value is 177
     18PASS rect1.height.baseVal.value is 210
    1619PASS rootSVGElement.getTransformToElement(rect2).e is -250
    1720PASS rootSVGElement.getTransformToElement(rect2).f is -217
    1821PASS rect1.height.animVal.value is 121
     22PASS rect1.height.baseVal.value is 210
    1923PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2024PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2125PASS rect1.height.animVal.value is 121
     26PASS rect1.height.baseVal.value is 210
    2227PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2328PASS rootSVGElement.getTransformToElement(rect2).f is -161
    2429PASS rect1.height.animVal.value is 10
     30PASS rect1.height.baseVal.value is 210
    2531PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2632PASS rootSVGElement.getTransformToElement(rect2).f is -50
    2733PASS rect1.height.animVal.value is 10
     34PASS rect1.height.baseVal.value is 210
    2835PASS rootSVGElement.getTransformToElement(rect2).e is -250
    2936PASS rootSVGElement.getTransformToElement(rect2).f is -50
    3037PASS rect1.height.animVal.value is 10
     38PASS rect1.height.baseVal.value is 210
    3139PASS rootSVGElement.getTransformToElement(rect2).e is -250
    3240PASS rootSVGElement.getTransformToElement(rect2).f is -50
  • trunk/LayoutTests/svg/animations/animate-elem-13-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect1.width.animVal.value is 30
     10PASS rect1.width.baseVal.value is 30
    1011PASS rect1.width.animVal.value is 165
     12PASS rect1.width.baseVal.value is 30
    1113PASS rect1.width.animVal.value is 300
     14PASS rect1.width.baseVal.value is 30
    1215PASS rect1.width.animVal.value is 300
     16PASS rect1.width.baseVal.value is 30
    1317PASS successfullyParsed is true
    1418
  • trunk/LayoutTests/svg/animations/animate-elem-14-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 300
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 255
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 255
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 180
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 180
     20PASS rect.width.baseVal.value is 300
    1521FAIL rect.width.animVal.value should be close to 30. Was 180.
     22PASS rect.width.baseVal.value is 300
    1623FAIL rect.width.animVal.value should be close to 30. Was 180.
     24PASS rect.width.baseVal.value is 300
    1725FAIL rect.width.animVal.value should be close to 30. Was 180.
     26PASS rect.width.baseVal.value is 300
    1827FAIL rect.width.animVal.value should be close to 30. Was 180.
     28PASS rect.width.baseVal.value is 300
    1929FAIL rect.width.animVal.value should be close to 30. Was 180.
     30PASS rect.width.baseVal.value is 300
    2031PASS rect.width.animVal.value is 30
     32PASS rect.width.baseVal.value is 300
    2133PASS rect.width.animVal.value is 30
     34PASS rect.width.baseVal.value is 300
    2235PASS successfullyParsed is true
    2336
  • trunk/LayoutTests/svg/animations/animate-elem-15-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 232.5
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 232.5
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 165
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 165
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 30
     20PASS rect.width.baseVal.value is 300
    1521PASS rect.width.animVal.value is 30
     22PASS rect.width.baseVal.value is 300
    1623PASS rect.width.animVal.value is 30
     24PASS rect.width.baseVal.value is 300
    1725PASS successfullyParsed is true
    1826
  • trunk/LayoutTests/svg/animations/animate-elem-16-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 255
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 255
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 180
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 180
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 30
     20PASS rect.width.baseVal.value is 300
    1521PASS rect.width.animVal.value is 30
     22PASS rect.width.baseVal.value is 300
    1623PASS rect.width.animVal.value is 30
     24PASS rect.width.baseVal.value is 300
    1725PASS successfullyParsed is true
    1826
  • trunk/LayoutTests/svg/animations/animate-elem-17-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 255
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 255
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 180
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 180
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 30
     20PASS rect.width.baseVal.value is 300
    1521PASS rect.width.animVal.value is 30
     22PASS rect.width.baseVal.value is 300
    1623PASS rect.width.animVal.value is 30
     24PASS rect.width.baseVal.value is 300
    1725PASS successfullyParsed is true
    1826
  • trunk/LayoutTests/svg/animations/animate-elem-18-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 300
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 255
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 255
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 180
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 180
     20PASS rect.width.baseVal.value is 300
    1521FAIL rect.width.animVal.value should be close to 30. Was 180.
     22PASS rect.width.baseVal.value is 300
    1623FAIL rect.width.animVal.value should be close to 30. Was 180.
     24PASS rect.width.baseVal.value is 300
    1725PASS rect.width.animVal.value is 30
     26PASS rect.width.baseVal.value is 300
    1827PASS rect.width.animVal.value is 30
     28PASS rect.width.baseVal.value is 300
    1929PASS successfullyParsed is true
    2030
  • trunk/LayoutTests/svg/animations/animate-elem-19-t-drt-expected.txt

    r109215 r110545  
    88
    99PASS rect.width.animVal.value is 300
     10PASS rect.width.baseVal.value is 300
    1011PASS rect.width.animVal.value is 255
     12PASS rect.width.baseVal.value is 300
    1113PASS rect.width.animVal.value is 255
     14PASS rect.width.baseVal.value is 300
    1215PASS rect.width.animVal.value is 180
     16PASS rect.width.baseVal.value is 300
    1317PASS rect.width.animVal.value is 180
     18PASS rect.width.baseVal.value is 300
    1419PASS rect.width.animVal.value is 30
     20PASS rect.width.baseVal.value is 300
    1521PASS rect.width.animVal.value is 30
     22PASS rect.width.baseVal.value is 300
    1623PASS rect.width.animVal.value is 30
     24PASS rect.width.baseVal.value is 300
    1725PASS successfullyParsed is true
    1826
  • trunk/LayoutTests/svg/animations/animate-end-attribute-expected.txt

    r107682 r110545  
    44PASS rect.x.baseVal.value is 100
    55PASS rect.x.animVal.value is 50
    6 PASS rect.x.baseVal.value is 50
     6PASS rect.x.baseVal.value is 100
    77PASS rect.x.animVal.value is 200
    8 PASS rect.x.baseVal.value is 200
     8PASS rect.x.baseVal.value is 100
    99PASS rect.x.animVal.value is 200
    10 PASS rect.x.baseVal.value is 200
     10PASS rect.x.baseVal.value is 100
    1111PASS successfullyParsed is true
    1212
  • trunk/LayoutTests/svg/animations/animate-endElement-beginElement-expected.txt

    r88234 r110545  
    77
    88PASS rect.x.animVal.value is 50
     9PASS rect.x.baseVal.value is 0
    910PASS successfullyParsed is true
    1011
  • trunk/LayoutTests/svg/animations/animate-from-to-keyTimes-expected.txt

    r95907 r110545  
    11SVG 1.1 dynamic animation tests
    22
     3PASS rect.x.animVal.value is 100
    34PASS rect.x.baseVal.value is 100
    4 PASS rect.x.baseVal.value is 200
    5 PASS rect.x.baseVal.value is 200
     5PASS rect.x.animVal.value is 200
     6PASS rect.x.baseVal.value is 100
     7PASS rect.x.animVal.value is 200
     8PASS rect.x.baseVal.value is 100
    69PASS successfullyParsed is true
    710
  • trunk/LayoutTests/svg/animations/animate-insert-begin-expected.txt

    r87392 r110545  
    66
    77
     8PASS rect.x.animVal.value is 0
    89PASS rect.x.baseVal.value is 0
    9 PASS rect.x.baseVal.value is 90
     10PASS rect.x.animVal.value is 90
     11PASS rect.x.baseVal.value is 0
    1012PASS successfullyParsed is true
    1113
  • trunk/LayoutTests/svg/animations/animate-insert-no-begin-expected.txt

    r87392 r110545  
    66
    77
     8PASS rect.x.animVal.value is 0
    89PASS rect.x.baseVal.value is 0
    9 PASS rect.x.baseVal.value is 90
     10PASS rect.x.animVal.value is 90
     11PASS rect.x.baseVal.value is 0
    1012PASS successfullyParsed is true
    1113
  • trunk/LayoutTests/svg/animations/animate-keySplines-expected.txt

    r57140 r110545  
    66
    77
    8 PASS rect.height.baseVal.value is 167
    98PASS rect.height.animVal.value is 167
    10 PASS rect.height.baseVal.value is 111
     9PASS rect.height.baseVal.value is 100
    1110PASS rect.height.animVal.value is 111
    1211PASS rect.height.baseVal.value is 100
    1312PASS rect.height.animVal.value is 100
     13PASS rect.height.baseVal.value is 100
    1414PASS successfullyParsed is true
    1515
  • trunk/LayoutTests/svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt

    r89993 r110545  
    11SVG 1.1 dynamic animation tests
    22
     3PASS rect.x.animVal.value is 100
    34PASS rect.x.baseVal.value is 100
    4 PASS rect.x.baseVal.value is 200
    5 PASS rect.x.baseVal.value is 300
     5PASS rect.x.animVal.value is 200
     6PASS rect.x.baseVal.value is 100
     7PASS rect.x.animVal.value is 300
     8PASS rect.x.baseVal.value is 100
    69PASS successfullyParsed is true
    710
  • trunk/LayoutTests/svg/animations/attributeTypes-expected.txt

    r109679 r110545  
    88
    99PASS rect1.width.animVal.value is 10
     10PASS rect1.width.baseVal.value is 10
    1011PASS getComputedStyle(rect1).fill is "#008000"
    1112PASS rect2.width.animVal.value is 100
     13PASS rect2.width.baseVal.value is 100
    1214PASS getComputedStyle(rect2).fill is "#008000"
    1315PASS rect3.width.animVal.value is 100
     16PASS rect3.width.baseVal.value is 100
    1417PASS getComputedStyle(rect3).fill is "#ff0000"
    1518PASS rect3.getAttribute('fill') is "red"
    1619PASS rect4.width.animVal.value is 100
     20PASS rect4.width.baseVal.value is 100
    1721PASS getComputedStyle(rect4).fill is "#ff0000"
    1822PASS rect4.getAttribute('fill') is "red"
    1923PASS rect1.width.animVal.value is 55
     24PASS rect1.width.baseVal.value is 10
    2025PASS getComputedStyle(rect1).fill is "#008000"
    2126PASS rect2.width.animVal.value is 100
     27PASS rect2.width.baseVal.value is 100
    2228PASS getComputedStyle(rect2).fill is "#008000"
    2329PASS rect3.width.animVal.value is 100
     30PASS rect3.width.baseVal.value is 100
    2431PASS getComputedStyle(rect3).fill is "#804000"
    2532PASS rect3.getAttribute('fill') is "red"
    2633PASS rect4.width.animVal.value is 100
     34PASS rect4.width.baseVal.value is 100
    2735PASS getComputedStyle(rect4).fill is "#804000"
    2836PASS rect4.getAttribute('fill') is "red"
    2937PASS rect1.width.animVal.value is 100
     38PASS rect1.width.baseVal.value is 10
    3039PASS getComputedStyle(rect1).fill is "#008000"
    3140PASS rect2.width.animVal.value is 100
     41PASS rect2.width.baseVal.value is 100
    3242PASS getComputedStyle(rect2).fill is "#008000"
    3343PASS rect3.width.animVal.value is 100
     44PASS rect3.width.baseVal.value is 100
    3445PASS getComputedStyle(rect3).fill is "#008000"
    3546PASS rect3.getAttribute('fill') is "red"
    3647PASS rect4.width.animVal.value is 100
     48PASS rect4.width.baseVal.value is 100
    3749PASS getComputedStyle(rect4).fill is "#008000"
    3850PASS rect4.getAttribute('fill') is "red"
    3951PASS rect1.width.animVal.value is 100
     52PASS rect1.width.baseVal.value is 10
    4053PASS getComputedStyle(rect1).fill is "#008000"
    4154PASS rect2.width.animVal.value is 100
     55PASS rect2.width.baseVal.value is 100
    4256PASS getComputedStyle(rect2).fill is "#008000"
    4357PASS rect3.width.animVal.value is 100
     58PASS rect3.width.baseVal.value is 100
    4459PASS getComputedStyle(rect3).fill is "#008000"
    4560PASS rect3.getAttribute('fill') is "red"
    4661PASS rect4.width.animVal.value is 100
     62PASS rect4.width.baseVal.value is 100
    4763PASS getComputedStyle(rect4).fill is "#008000"
    4864PASS rect4.getAttribute('fill') is "red"
  • trunk/LayoutTests/svg/animations/script-tests/animVal-basics.js

    r107791 r110545  
    3131    // Check half-time conditions
    3232    shouldBe("rect.width.animVal.value", "150");
    33     shouldBe("rect.width.baseVal.value", "150");
     33    shouldBe("rect.width.baseVal.value", "200");
    3434}
    3535
     
    3737    // Check just before-end conditions
    3838    shouldBeCloseEnough("rect.width.animVal.value", "100");
    39     shouldBeCloseEnough("rect.width.baseVal.value", "100");
     39    shouldBe("rect.width.baseVal.value", "200");
    4040}
    4141
  • trunk/LayoutTests/svg/animations/script-tests/animate-calcMode-spline-by.js

    r107791 r110545  
    3333    // Check half-time conditions
    3434    shouldBeCloseEnough("rect.x.animVal.value", "18.8");
    35     shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
     35    shouldBe("rect.x.baseVal.value", "100");
    3636}
    3737
     
    3939    // Check just before-end conditions
    4040    shouldBeCloseEnough("rect.x.animVal.value", "0");
    41     shouldBeCloseEnough("rect.x.baseVal.value", "0");
     41    shouldBe("rect.x.baseVal.value", "100");
    4242}
    4343
  • trunk/LayoutTests/svg/animations/script-tests/animate-calcMode-spline-from-by.js

    r107791 r110545  
    3434    // Check half-time conditions
    3535    shouldBeCloseEnough("rect.x.animVal.value", "18.8");
    36     shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
     36    shouldBe("rect.x.baseVal.value", "100");
    3737}
    3838
     
    4040    // Check just before-end conditions
    4141    shouldBeCloseEnough("rect.x.animVal.value", "0");
    42     shouldBeCloseEnough("rect.x.baseVal.value", "0");
     42    shouldBe("rect.x.baseVal.value", "100");
    4343}
    4444
  • trunk/LayoutTests/svg/animations/script-tests/animate-calcMode-spline-from-to.js

    r107791 r110545  
    3434    // Check half-time conditions
    3535    shouldBeCloseEnough("rect.x.animVal.value", "18.8");
    36     shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
     36    shouldBe("rect.x.baseVal.value", "100");
    3737}
    3838
     
    4040    // Check just before-end conditions
    4141    shouldBeCloseEnough("rect.x.animVal.value", "0");
    42     shouldBeCloseEnough("rect.x.baseVal.value", "0");
     42    shouldBe("rect.x.baseVal.value", "100");
    4343}
    4444
  • trunk/LayoutTests/svg/animations/script-tests/animate-calcMode-spline-to.js

    r107791 r110545  
    3333    // Check half-time conditions
    3434    shouldBeCloseEnough("rect.x.animVal.value", "18.8");
    35     shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
     35    shouldBe("rect.x.baseVal.value", "100");
    3636}
    3737
     
    3939    // Check just before-end conditions
    4040    shouldBeCloseEnough("rect.x.animVal.value", "0");
    41     shouldBeCloseEnough("rect.x.baseVal.value", "0");
     41    shouldBe("rect.x.baseVal.value", "100");
    4242}
    4343
  • trunk/LayoutTests/svg/animations/script-tests/animate-calcMode-spline-values.js

    r107791 r110545  
    3333    // Check half-time conditions
    3434    shouldBeCloseEnough("rect.x.animVal.value", "18.8");
    35     shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
     35    shouldBe("rect.x.baseVal.value", "100");
    3636}
    3737
     
    3939    // Check just before-end conditions
    4040    shouldBeCloseEnough("rect.x.animVal.value", "0");
    41     shouldBeCloseEnough("rect.x.baseVal.value", "0");
     41    shouldBe("rect.x.baseVal.value", "100");
    4242}
    4343
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-02-t-drt.js

    r109215 r110545  
    55function sampleAfterBegin() {
    66    shouldBe("rect1.height.animVal.value", "200");
    7     //shouldBe("rect1.height.baseVal.value", "20");
     7    shouldBe("rect1.height.baseVal.value", "20");
    88
    99    shouldBe("rect2.height.animVal.value", "220");
    10     //shouldBe("rect2.height.baseVal.value", "20");
     10    shouldBe("rect2.height.baseVal.value", "20");
    1111
    1212    shouldBe("rect3.height.animVal.value", "200");
    13     //shouldBe("rect3.height.baseVal.value", "20");
     13    shouldBe("rect3.height.baseVal.value", "20");
    1414}
    1515
    1616function sampleAfterMid() {
    1717    shouldBe("rect1.height.animVal.value", "20");
    18     //shouldBe("rect1.height.baseVal.value", "20");
     18    shouldBe("rect1.height.baseVal.value", "20");
    1919
    2020    shouldBe("rect2.height.animVal.value", "40");
    21     //shouldBe("rect2.height.baseVal.value", "20");
     21    shouldBe("rect2.height.baseVal.value", "20");
    2222
    2323    shouldBe("rect3.height.animVal.value", "20");
    24     //shouldBe("rect3.height.baseVal.value", "20");
     24    shouldBe("rect3.height.baseVal.value", "20");
    2525}
    2626
    2727function sampleAfterBeginOfFirstRepetition() {
    2828    shouldBe("rect1.height.animVal.value", "200");
    29     //shouldBe("rect1.height.baseVal.value", "20");
     29    shouldBe("rect1.height.baseVal.value", "20");
    3030
    3131    shouldBe("rect2.height.animVal.value", "220");
    32     //shouldBe("rect2.height.baseVal.value", "20");
     32    shouldBe("rect2.height.baseVal.value", "20");
    3333
    3434    shouldBe("rect3.height.animVal.value", "220");
    35     //shouldBe("rect3.height.baseVal.value", "20");
     35    shouldBe("rect3.height.baseVal.value", "20");
    3636}
    3737
    3838function sampleAfterMidOfFirstRepetition() {
    3939    shouldBe("rect1.height.animVal.value", "20");
    40     //shouldBe("rect1.height.baseVal.value", "20");
     40    shouldBe("rect1.height.baseVal.value", "20");
    4141
    4242    shouldBe("rect2.height.animVal.value", "40");
    43     //shouldBe("rect2.height.baseVal.value", "20");
     43    shouldBe("rect2.height.baseVal.value", "20");
    4444
    4545    shouldBe("rect3.height.animVal.value", "40");
    46     //shouldBe("rect3.height.baseVal.value", "20");
     46    shouldBe("rect3.height.baseVal.value", "20");
    4747}
    4848
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-09-t-drt.js

    r109215 r110545  
    55function sample1() {
    66    shouldBe("rect1.height.animVal.value", "210");
    7     //shouldBe("rect1.height.baseVal.value", "210");
     7    shouldBe("rect1.height.baseVal.value", "210");
    88    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
    99}
     
    1111function sample2() {
    1212    shouldBe("rect1.height.animVal.value", "177");
    13     //shouldBe("rect1.height.baseVal.value", "210");
     13    shouldBe("rect1.height.baseVal.value", "210");
    1414    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-217");
    1515}
     
    1717function sample3() {
    1818    shouldBe("rect1.height.animVal.value", "121");
    19     //shouldBe("rect1.height.baseVal.value", "210");
     19    shouldBe("rect1.height.baseVal.value", "210");
    2020    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-161");
    2121}
     
    2323function sample4() {
    2424    shouldBe("rect1.height.animVal.value", "10");
    25     //shouldBe("rect1.height.baseVal.value", "210");
     25    shouldBe("rect1.height.baseVal.value", "210");
    2626    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
    2727}
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-10-t-drt.js

    r109215 r110545  
    55function sample1() {
    66    shouldBeCloseEnough("rect1.height.animVal.value", "210");
    7     //shouldBe("rect1.height.baseVal.value", "210");
     7    shouldBe("rect1.height.baseVal.value", "210");
    88    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
    99}
     
    1111function sample2() {
    1212    shouldBeCloseEnough("rect1.height.animVal.value", "177");
    13     //shouldBe("rect1.height.baseVal.value", "210");
     13    shouldBe("rect1.height.baseVal.value", "210");
    1414    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-217");
    1515}
     
    1717function sample3() {
    1818    shouldBeCloseEnough("rect1.height.animVal.value", "121");
    19     //shouldBe("rect1.height.baseVal.value", "210");
     19    shouldBe("rect1.height.baseVal.value", "210");
    2020    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-161");
    2121}
     
    2323function sample4() {
    2424    shouldBeCloseEnough("rect1.height.animVal.value", "10");
    25     //shouldBe("rect1.height.baseVal.value", "210");
     25    shouldBe("rect1.height.baseVal.value", "210");
    2626    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
    2727}
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-11-t-drt.js

    r109215 r110545  
    55function sample1() {
    66    shouldBeCloseEnough("rect1.height.animVal.value", "210");
    7     //shouldBe("rect1.height.baseVal.value", "210");
     7    shouldBe("rect1.height.baseVal.value", "210");
    88    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
    99}
     
    1111function sample2() {
    1212    shouldBeCloseEnough("rect1.height.animVal.value", "143.4");
    13     //shouldBe("rect1.height.baseVal.value", "210");
     13    shouldBe("rect1.height.baseVal.value", "210");
    1414    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-183.4");
    1515}
     
    1717function sample3() {
    1818    shouldBeCloseEnough("rect1.height.animVal.value", "76.7");
    19     //shouldBe("rect1.height.baseVal.value", "210");
     19    shouldBe("rect1.height.baseVal.value", "210");
    2020    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-116.7");
    2121}
     
    2323function sample4() {
    2424    shouldBeCloseEnough("rect1.height.animVal.value", "10");
    25     //shouldBe("rect1.height.baseVal.value", "210");
     25    shouldBe("rect1.height.baseVal.value", "210");
    2626    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
    2727}
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-12-t-drt.js

    r109215 r110545  
    55function sample1() {
    66    shouldBeCloseEnough("rect1.height.animVal.value", "210");
    7     //shouldBe("rect1.height.baseVal.value", "210");
     7    shouldBe("rect1.height.baseVal.value", "210");
    88    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
    99}
     
    1111function sample2() {
    1212    shouldBeCloseEnough("rect1.height.animVal.value", "177");
    13     //shouldBe("rect1.height.baseVal.value", "210");
     13    shouldBe("rect1.height.baseVal.value", "210");
    1414    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-217");
    1515}
     
    1717function sample3() {
    1818    shouldBeCloseEnough("rect1.height.animVal.value", "121");
    19     //shouldBe("rect1.height.baseVal.value", "210");
     19    shouldBe("rect1.height.baseVal.value", "210");
    2020    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-161");
    2121}
     
    2323function sample4() {
    2424    shouldBeCloseEnough("rect1.height.animVal.value", "10");
    25     //shouldBe("rect1.height.baseVal.value", "210");
     25    shouldBe("rect1.height.baseVal.value", "210");
    2626    expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
    2727}
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-13-t-drt.js

    r109215 r110545  
    55function sample1() {
    66    shouldBeCloseEnough("rect1.width.animVal.value", "30");
    7     //shouldBe("rect1.width.baseVal.value", "30");
     7    shouldBe("rect1.width.baseVal.value", "30");
    88}
    99
    1010function sample2() {
    1111    shouldBeCloseEnough("rect1.width.animVal.value", "165");
    12     //shouldBe("rect1.width.baseVal.value", "30");
     12    shouldBe("rect1.width.baseVal.value", "30");
    1313}
    1414
    1515function sample3() {
    1616    shouldBeCloseEnough("rect1.width.animVal.value", "300");
    17     //shouldBe("rect1.width.baseVal.value", "30");
     17    shouldBe("rect1.width.baseVal.value", "30");
    1818}
    1919
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-14-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 2s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 2s to 4s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "255");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 4s to 6s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "180");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 6s to 10s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-15-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 2.25s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 2.25s to 4.5s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "232.5");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 4.5s to 9s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "165");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 9s to 9s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-16-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 2s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 2s to 4s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "255");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 4s to 8s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "180");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 8s to 8s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-17-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 2s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 2s to 4s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "255");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 4s to 8s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "180");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 8s to 8s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-18-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 2s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 2s to 6s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "255");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 6s to 8s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "180");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 8s to 10s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-elem-19-t-drt.js

    r109215 r110545  
    55function sample1() { // From 0s to 4s
    66    shouldBeCloseEnough("rect.width.animVal.value", "300");
    7     //shouldBe("rect.width.baseVal.value", "300");
     7    shouldBe("rect.width.baseVal.value", "300");
    88}
    99
    1010function sample2() { // From 4s to 6s
    1111    shouldBeCloseEnough("rect.width.animVal.value", "255");
    12     //shouldBe("rect.width.baseVal.value", "300");
     12    shouldBe("rect.width.baseVal.value", "300");
    1313}
    1414
    1515function sample3() { // From 6s to 8s
    1616    shouldBeCloseEnough("rect.width.animVal.value", "180");
    17     //shouldBe("rect.width.baseVal.value", "300");
     17    shouldBe("rect.width.baseVal.value", "300");
    1818}
    1919
    2020function sample4() { // From 8s to 8s
    2121    shouldBeCloseEnough("rect.width.animVal.value", "30");
    22     //shouldBe("rect.width.baseVal.value", "300");
     22    shouldBe("rect.width.baseVal.value", "300");
    2323}
    2424
  • trunk/LayoutTests/svg/animations/script-tests/animate-end-attribute.js

    r107791 r110545  
    2929function sample2() {
    3030    shouldBe("rect.x.animVal.value", "50");
    31     shouldBe("rect.x.baseVal.value", "50");
     31    shouldBe("rect.x.baseVal.value", "100");
    3232}
    3333
    3434function sample3() {
    3535    shouldBeCloseEnough("rect.x.animVal.value", "200");
    36     shouldBeCloseEnough("rect.x.baseVal.value", "200");
     36    shouldBe("rect.x.baseVal.value", "100");
    3737}
    3838
  • trunk/LayoutTests/svg/animations/script-tests/animate-endElement-beginElement.js

    r107682 r110545  
    2727    // Check half-time conditions
    2828    shouldBe("rect.x.animVal.value", "50");
     29    shouldBe("rect.x.baseVal.value", "0");
    2930}
    3031
  • trunk/LayoutTests/svg/animations/script-tests/animate-from-to-keyTimes.js

    r107682 r110545  
    2323// Setup animation test
    2424function sample1() {
     25    shouldBe("rect.x.animVal.value", "100");
    2526    shouldBe("rect.x.baseVal.value", "100");
    2627}
    2728
    2829function sample2() {
    29     shouldBe("rect.x.baseVal.value", "200");
     30    shouldBe("rect.x.animVal.value", "200");
     31    shouldBe("rect.x.baseVal.value", "100");
    3032}
    3133
  • trunk/LayoutTests/svg/animations/script-tests/animate-insert-begin.js

    r107682 r110545  
    2424// Setup animation test
    2525function sample1() {
     26    shouldBe("rect.x.animVal.value", "0");
    2627    shouldBe("rect.x.baseVal.value", "0");
    2728}
    2829
    2930function sample2() {
    30     shouldBe("rect.x.baseVal.value", "90");
     31    shouldBe("rect.x.animVal.value", "90");
     32    shouldBe("rect.x.baseVal.value", "0");
    3133}
    3234
  • trunk/LayoutTests/svg/animations/script-tests/animate-insert-no-begin.js

    r107682 r110545  
    2424// Setup animation test
    2525function sample1() {
     26    shouldBe("rect.x.animVal.value", "0");
    2627    shouldBe("rect.x.baseVal.value", "0");
    2728}
    2829
    2930function sample2() {
    30     shouldBe("rect.x.baseVal.value", "90");
     31    shouldBe("rect.x.animVal.value", "90");
     32    shouldBe("rect.x.baseVal.value", "0");
    3133}
    3234
  • trunk/LayoutTests/svg/animations/script-tests/animate-keySplines.js

    r107682 r110545  
    2626function sample1() {
    2727    // Check initial/end conditions
    28     shouldBe("rect.height.baseVal.value", "167");
    29     shouldBe("rect.height.animVal.value", "167");
     28    shouldBeCloseEnough("rect.height.animVal.value", "167");
     29    shouldBe("rect.height.baseVal.value", "100");
    3030}
    3131
    3232function sample2() {
    3333    // Check half-time conditions
    34     shouldBe("rect.height.baseVal.value", "111");
    35     shouldBe("rect.height.animVal.value", "111");
     34    shouldBeCloseEnough("rect.height.animVal.value", "111");
     35    shouldBe("rect.height.baseVal.value", "100");
    3636}
    3737
    3838function sample3() {
    3939    // Check just before-end conditions
     40    shouldBeCloseEnough("rect.height.animVal.value", "100");
    4041    shouldBe("rect.height.baseVal.value", "100");
    41     shouldBe("rect.height.animVal.value", "100");
    4242}
    4343
  • trunk/LayoutTests/svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js

    r107682 r110545  
    2424// Setup animation test
    2525function sample1() {
     26    shouldBe("rect.x.animVal.value", "100");
    2627    shouldBe("rect.x.baseVal.value", "100");
    2728}
    2829
    2930function sample2() {
    30     shouldBe("rect.x.baseVal.value", "200");
     31    shouldBe("rect.x.animVal.value", "200");
     32    shouldBe("rect.x.baseVal.value", "100");
    3133}
    3234
    3335function sample3() {
    34     shouldBe("rect.x.baseVal.value", "300");
     36    shouldBe("rect.x.animVal.value", "300");
     37    shouldBe("rect.x.baseVal.value", "100");
    3538}
    3639
  • trunk/LayoutTests/svg/animations/script-tests/attributeTypes.js

    r109679 r110545  
    55function sample1() {
    66    shouldBeCloseEnough("rect1.width.animVal.value", "10");
    7     //shouldBe("rect1.width.baseVal.value", "10");
     7    shouldBe("rect1.width.baseVal.value", "10");
    88    shouldBeEqualToString("getComputedStyle(rect1).fill", "#008000");
    99
    1010    shouldBe("rect2.width.animVal.value", "100");
    11     //shouldBe("rect2.width.baseVal.value", "100");
     11    shouldBe("rect2.width.baseVal.value", "100");
    1212    shouldBeEqualToString("getComputedStyle(rect2).fill", "#008000");
    1313
    1414    shouldBe("rect3.width.animVal.value", "100");
    15     //shouldBe("rect3.width.baseVal.value", "100");
     15    shouldBe("rect3.width.baseVal.value", "100");
    1616    shouldBeEqualToString("getComputedStyle(rect3).fill", "#ff0000");
    1717    shouldBeEqualToString("rect3.getAttribute('fill')", "red");
    1818
    1919    shouldBe("rect4.width.animVal.value", "100");
    20     //shouldBe("rect4.width.baseVal.value", "100");
     20    shouldBe("rect4.width.baseVal.value", "100");
    2121    shouldBeEqualToString("getComputedStyle(rect4).fill", "#ff0000");
    2222    shouldBeEqualToString("rect4.getAttribute('fill')", "red");
     
    2525function sample2() {
    2626    shouldBeCloseEnough("rect1.width.animVal.value", "55");
    27     //shouldBe("rect1.width.baseVal.value", "10");
     27    shouldBe("rect1.width.baseVal.value", "10");
    2828    shouldBeEqualToString("getComputedStyle(rect1).fill", "#008000");
    2929
    3030    shouldBe("rect2.width.animVal.value", "100");
    31     //shouldBe("rect2.width.baseVal.value", "100");
     31    shouldBe("rect2.width.baseVal.value", "100");
    3232    shouldBeEqualToString("getComputedStyle(rect2).fill", "#008000");
    3333
    3434    shouldBe("rect3.width.animVal.value", "100");
    35     //shouldBe("rect3.width.baseVal.value", "100");
     35    shouldBe("rect3.width.baseVal.value", "100");
    3636    shouldBeEqualToString("getComputedStyle(rect3).fill", "#804000");
    3737    shouldBeEqualToString("rect3.getAttribute('fill')", "red");
    3838
    3939    shouldBe("rect4.width.animVal.value", "100");
    40     //shouldBe("rect4.width.baseVal.value", "100");
     40    shouldBe("rect4.width.baseVal.value", "100");
    4141    shouldBeEqualToString("getComputedStyle(rect4).fill", "#804000");
    4242    shouldBeEqualToString("rect4.getAttribute('fill')", "red");
     
    4545function sample3() {
    4646    shouldBeCloseEnough("rect1.width.animVal.value", "100");
    47     //shouldBe("rect1.width.baseVal.value", "10");
     47    shouldBe("rect1.width.baseVal.value", "10");
    4848    shouldBeEqualToString("getComputedStyle(rect1).fill", "#008000");
    4949
    5050    shouldBe("rect2.width.animVal.value", "100");
    51     //shouldBe("rect2.width.baseVal.value", "100");
     51    shouldBe("rect2.width.baseVal.value", "100");
    5252    shouldBeEqualToString("getComputedStyle(rect2).fill", "#008000");
    5353
    5454    shouldBe("rect3.width.animVal.value", "100");
    55     //shouldBe("rect3.width.baseVal.value", "100");
     55    shouldBe("rect3.width.baseVal.value", "100");
    5656    shouldBeEqualToString("getComputedStyle(rect3).fill", "#008000");
    5757    shouldBeEqualToString("rect3.getAttribute('fill')", "red");
    5858
    5959    shouldBe("rect4.width.animVal.value", "100");
    60     //shouldBe("rect4.width.baseVal.value", "100");
     60    shouldBe("rect4.width.baseVal.value", "100");
    6161    shouldBeEqualToString("getComputedStyle(rect4).fill", "#008000");
    6262    shouldBeEqualToString("rect4.getAttribute('fill')", "red");
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeHeight.js

    r107791 r110545  
    3535function sample2() {
    3636    shouldBe("rect.height.animVal.value", "150");
    37     shouldBe("rect.height.baseVal.value", "150");
     37    shouldBe("rect.height.baseVal.value", "100");
    3838}
    3939
    4040function sample3() {
    4141    shouldBeCloseEnough("rect.height.animVal.value", "200");
    42     shouldBeCloseEnough("rect.height.baseVal.value", "200");
     42    shouldBe("rect.height.baseVal.value", "100");
    4343}
    4444
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeOther.js

    r107791 r110545  
    3434function sample2() {
    3535    shouldBeCloseEnough("circle.r.animVal.value", "132.5");
    36     shouldBeCloseEnough("circle.r.baseVal.value", "132.5");
     36    shouldBe("circle.r.baseVal.value", "10");
    3737}
    3838
    3939function sample3() {
    4040    shouldBeCloseEnough("circle.r.animVal.value", "254.9");
    41     shouldBeCloseEnough("circle.r.baseVal.value", "254.9");
     41    shouldBe("circle.r.baseVal.value", "10");
    4242}
    4343
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeWidth.js

    r107791 r110545  
    3535function sample2() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "200");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
    4040function sample3() {
    4141    shouldBeCloseEnough("rect.width.animVal.value", "300");
    42     shouldBeCloseEnough("rect.width.baseVal.value", "300");
     42    shouldBe("rect.width.baseVal.value", "100");
    4343}
    4444
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-1.js

    r107682 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "0");
    32     shouldBe("rect.width.baseVal.value", "0");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-2.js

    r107682 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "0");
    32     shouldBe("rect.width.baseVal.value", "0");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-3.js

    r107682 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "0");
    32     shouldBe("rect.width.baseVal.value", "0");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-number-to-number.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "150");
    32     shouldBe("rect.width.baseVal.value", "150");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "200");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-cm.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBeCloseEnough("rect.width.animVal.value", "144.5");
    32     shouldBeCloseEnough("rect.width.baseVal.value", "144.5");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "189");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "189");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-ems.js

    r107791 r110545  
    3131function sample2() {
    3232    shouldBe("rect.width.animVal.value", "150");
    33     shouldBe("rect.width.baseVal.value", "150");
     33    shouldBe("rect.width.baseVal.value", "100");
    3434}
    3535
    3636function sample3() {
    3737    shouldBeCloseEnough("rect.width.animVal.value", "200");
    38     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     38    shouldBe("rect.width.baseVal.value", "100");
    3939}
    4040
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-exs.js

    r107791 r110545  
    3131function sample2() {
    3232    shouldBe("rect.width.animVal.value", "150");
    33     shouldBe("rect.width.baseVal.value", "150");
     33    shouldBe("rect.width.baseVal.value", "100");
    3434}
    3535
    3636function sample3() {
    3737    shouldBeCloseEnough("rect.width.animVal.value", "200");
    38     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     38    shouldBe("rect.width.baseVal.value", "100");
    3939}
    4040
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-in.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBeCloseEnough("rect.width.animVal.value", "170");
    32     shouldBeCloseEnough("rect.width.baseVal.value", "170");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "240");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "240");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-number.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "150");
    32     shouldBe("rect.width.baseVal.value", "150");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "200");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-pc.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "170");
    32     shouldBe("rect.width.baseVal.value", "170");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "240");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "240");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-percentage.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBeCloseEnough("rect.width.animVal.value", "350");
    32     shouldBeCloseEnough("rect.width.baseVal.value", "350");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "600", 1);
    37     shouldBeCloseEnough("rect.width.baseVal.value", "600", 1);
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-pt.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBeCloseEnough("rect.width.animVal.value", "161.2");
    32     shouldBeCloseEnough("rect.width.baseVal.value", "161.2");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "189");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "189");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-px-to-px.js

    r107791 r110545  
    3030function sample2() {
    3131    shouldBe("rect.width.animVal.value", "150");
    32     shouldBe("rect.width.baseVal.value", "150");
     32    shouldBe("rect.width.baseVal.value", "100");
    3333}
    3434
    3535function sample3() {
    3636    shouldBeCloseEnough("rect.width.animVal.value", "200");
    37     shouldBeCloseEnough("rect.width.baseVal.value", "200");
     37    shouldBe("rect.width.baseVal.value", "100");
    3838}
    3939
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-unitType.js

    r107682 r110545  
    2525    // Check initial/end conditions
    2626    shouldBe("rect.width.animVal.unitType", "SVGLength.SVG_LENGTHTYPE_NUMBER");
     27    shouldBe("rect.width.baseVal.unitType", "SVGLength.SVG_LENGTHTYPE_NUMBER");
    2728}
    2829
    2930function sample2() {
    3031    shouldBe("rect.width.animVal.unitType", "SVGLength.SVG_LENGTHTYPE_NUMBER");
     32    shouldBe("rect.width.baseVal.unitType", "SVGLength.SVG_LENGTHTYPE_NUMBER");
    3133}
    3234
    3335function sample3() {
    3436    shouldBe("rect.width.animVal.unitType", "SVGLength.SVG_LENGTHTYPE_PX");
     37    shouldBe("rect.width.baseVal.unitType", "SVGLength.SVG_LENGTHTYPE_NUMBER");
    3538}
    3639
  • trunk/LayoutTests/svg/animations/script-tests/svglength-animation-values.js

    r107791 r110545  
    2929function sample2() {
    3030    shouldBe("rect.width.animVal.value", "130");
    31     shouldBe("rect.width.baseVal.value", "130");
     31    shouldBe("rect.width.baseVal.value", "100");
    3232}
    3333
    3434function sample3() {
    3535    shouldBeCloseEnough("rect.width.animVal.value", "151.2");
    36     shouldBeCloseEnough("rect.width.baseVal.value", "151.2");
     36    shouldBe("rect.width.baseVal.value", "100");
    3737}
    3838
    3939function sample4() {
    4040    shouldBe("rect.width.animVal.value", "576");
    41     shouldBe("rect.width.baseVal.value", "576");
     41    shouldBe("rect.width.baseVal.value", "100");
    4242}
    4343
    4444function sample5() {
    4545    shouldBeCloseEnough("rect.width.animVal.value", "267");
    46     shouldBeCloseEnough("rect.width.baseVal.value", "267");
     46    shouldBe("rect.width.baseVal.value", "100");
    4747}
    4848
  • trunk/LayoutTests/svg/animations/svglength-animation-LengthModeHeight-expected.txt

    r107791 r110545  
    99PASS rect.height.baseVal.value is 100
    1010PASS rect.height.animVal.value is 150
    11 PASS rect.height.baseVal.value is 150
     11PASS rect.height.baseVal.value is 100
    1212PASS rect.height.animVal.value is 200
    13 PASS rect.height.baseVal.value is 200
     13PASS rect.height.baseVal.value is 100
    1414PASS rect.height.animVal.value is 100
    1515PASS rect.height.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-LengthModeOther-expected.txt

    r107791 r110545  
    99PASS circle.r.baseVal.value is 10
    1010PASS circle.r.animVal.value is 132.5
    11 PASS circle.r.baseVal.value is 132.5
     11PASS circle.r.baseVal.value is 10
    1212PASS circle.r.animVal.value is 254.9
    13 PASS circle.r.baseVal.value is 254.9
     13PASS circle.r.baseVal.value is 10
    1414PASS circle.r.animVal.value is 10
    1515PASS circle.r.baseVal.value is 10
  • trunk/LayoutTests/svg/animations/svglength-animation-LengthModeWidth-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 200
    11 PASS rect.width.baseVal.value is 200
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 300
    13 PASS rect.width.baseVal.value is 300
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-invalid-value-1-expected.txt

    r88663 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 0
    11 PASS rect.width.baseVal.value is 0
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 100
    1313PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-invalid-value-2-expected.txt

    r88663 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 0
    11 PASS rect.width.baseVal.value is 0
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 100
    1313PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-invalid-value-3-expected.txt

    r88663 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 0
    11 PASS rect.width.baseVal.value is 0
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 100
    1313PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-number-to-number-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 200
    13 PASS rect.width.baseVal.value is 200
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-cm-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 144.5
    11 PASS rect.width.baseVal.value is 144.5
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 189
    13 PASS rect.width.baseVal.value is 189
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-ems-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 200
    13 PASS rect.width.baseVal.value is 200
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-exs-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 200
    13 PASS rect.width.baseVal.value is 200
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-in-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 170
    11 PASS rect.width.baseVal.value is 170
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 240
    13 PASS rect.width.baseVal.value is 240
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-number-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 200
    13 PASS rect.width.baseVal.value is 200
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-pc-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 170
    11 PASS rect.width.baseVal.value is 170
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 240
    13 PASS rect.width.baseVal.value is 240
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-percentage-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 350
    11 PASS rect.width.baseVal.value is 350
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 600
    13 PASS rect.width.baseVal.value is 600
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-pt-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 161.2
    11 PASS rect.width.baseVal.value is 161.2
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 189
    13 PASS rect.width.baseVal.value is 189
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-px-to-px-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 150
    11 PASS rect.width.baseVal.value is 150
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 200
    13 PASS rect.width.baseVal.value is 200
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 100
    1515PASS rect.width.baseVal.value is 100
  • trunk/LayoutTests/svg/animations/svglength-animation-unitType-expected.txt

    r90219 r110545  
    77
    88PASS rect.width.animVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
     9PASS rect.width.baseVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
    910PASS rect.width.animVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
     11PASS rect.width.baseVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
    1012PASS rect.width.animVal.unitType is SVGLength.SVG_LENGTHTYPE_PX
     13PASS rect.width.baseVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
    1114PASS rect.width.animVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
     15PASS rect.width.baseVal.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER
    1216PASS successfullyParsed is true
    1317
  • trunk/LayoutTests/svg/animations/svglength-animation-values-expected.txt

    r107791 r110545  
    99PASS rect.width.baseVal.value is 100
    1010PASS rect.width.animVal.value is 130
    11 PASS rect.width.baseVal.value is 130
     11PASS rect.width.baseVal.value is 100
    1212PASS rect.width.animVal.value is 151.2
    13 PASS rect.width.baseVal.value is 151.2
     13PASS rect.width.baseVal.value is 100
    1414PASS rect.width.animVal.value is 576
    15 PASS rect.width.baseVal.value is 576
     15PASS rect.width.baseVal.value is 100
    1616PASS rect.width.animVal.value is 267
    17 PASS rect.width.baseVal.value is 267
     17PASS rect.width.baseVal.value is 100
    1818PASS rect.width.animVal.value is 100
    1919PASS rect.width.baseVal.value is 100
  • trunk/Source/WebCore/ChangeLog

    r110544 r110545  
     12012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        SVG Animations update baseVal instead of animVal
     4        https://bugs.webkit.org/show_bug.cgi?id=12437
     5
     6        Reviewed by Dirk Schulze.
     7
     8        Begin implementing the last missing core piece of the SVG DOM: proper animVal support.
     9        Most SVG DOM interfaces exposing eg. lengths use SVGAnimatedLength. eg. from SVGRectElement:
     10        "readonly attribute SVGAnimatedLength x;" SVGAnimatedXXX contains following methods:
     11        "readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;"
     12        From SVG DOM perspective, animVal and baseVal are two distinctive objects, animVal != baseVal.
     13        Its underlying value is the same though, if no animation is running on that attribute.
     14
     15        As soon as a SMIL animation starts animating an SVGAnimated* target attribute, its
     16        baseVal and animVal may begin to differ. The animVal always reflect the current animated
     17        value (including all effects of additive/accumulated animations) which is shown on screen
     18        when eg animating the width of a <rect>. The baseVal is is equal to the underlying XML
     19        property value / SVG DOM value, but may be influenced through dynamic changes.
     20        (Consider changing rect1.width.baseVal.value while 'width' is animated)
     21
     22        During the last year we prepared our animation code to turn on animVal support.
     23        This patch adds the last missing pieces to turn on animVal support for the SVGLength.
     24        SVGLengthList and all other types will follow, one after the other.
     25
     26        I've decided to write an exhaustive ChangeLog, as this as the base for any future
     27        work in this area - hopefully making this more reviewable.
     28
     29        Tests: svg/animations/additive-from-to-width-animation.html
     30               svg/animations/additive-values-width-animation.html
     31               svg/animations/change-baseVal-while-animating-fill-freeze-2.html
     32               svg/animations/change-baseVal-while-animating-fill-freeze.html
     33               svg/animations/change-baseVal-while-animating-fill-remove-2.html
     34               svg/animations/change-baseVal-while-animating-fill-remove.html
     35               svg/animations/change-target-while-animating-SVG-property.html
     36               svg/animations/multiple-animations-fill-freeze.html
     37               svg/animations/remove-animation-element-while-animation-is-running.html
     38               svg/repaint/repainting-after-animation-element-removal.svg
     39
     40        * svg/SVGAnimateElement.cpp: Remove unnecessary std namespace inclusion.
     41        (WebCore::SVGAnimateElement::SVGAnimateElement): Remove now-obsolete m_aboutToStopAnimation.
     42        (WebCore::SVGAnimateElement::calculateAnimatedValue): Swap assertion order, to test hasTagName() _before_ casting.
     43        (WebCore::SVGAnimateElement::resetToBaseValue):
     44            Stop relying on the cached baseValue (breaking additive="sum"+values animation) for SVG DOM primitive animations.
     45            Avoid any string roundtrips previously needed to reset the SVGAnimatedType to the base value. Just grab the
     46            currentBaseValue() from the associated SVGAnimatedProperty, which includes all dynamic changes to the baseVal
     47            either by SVG DOM or setAttribute() calls - this way we don't need to utilize the buggy cache in SMILTimeContainer,
     48            which can be removed once all SVG DOM primitive types switched to the new animVal concept.
     49
     50            NOTE: When multiple animations of the same attribute are applied to a target element, resetToBaseValue() will be called
     51            for the highest priority SVGSMILElement, on every animation step! Consider two <animate> elements, applied to a target
     52            <rect> which both animate the 'x' attribute, one from 0s to 2s, the other from 4s to 6s. The last <animate> element
     53            will reuse the SVGAnimatedType m_animatedType from the first <animate> element, and never create an own m_animatedType.
     54            When the animation starts the first time at 0s, we update the rect.x.animVals SVGLength* pointer, to point to the
     55            SVGAnimatedType of the first <animate> element, owning the m_animatedType. From that point on each call to rect.x.animVal
     56            will always return the same value as the SVGAnimatedType of the first <animate> element holds. Now after 2s the first
     57            <animate> element becomes inactive, but its m_animatedType remains alive. The bindings don't notice this change at all.
     58            Now at 4s, the second animation element gets active. It reuses the SVGAnimatedType of the first <animate> element, and
     59            applies its animation changes to that SVGAnimatedType, which is immediately reflected in the bindings w/o any additional
     60            work. It's very important for the understanding when animationStarted/animationEnded need to be called.
     61
     62        (WebCore::SVGAnimateElement::applyResultsToTarget): Remove now-obsolete m_aboutToStopAnimation logic. No need to know it at this point.
     63        (WebCore::SVGAnimateElement::targetElementWillChange):
     64            Renamed from targetElementDidChange(). This method is called from SVGSMILElement for following conditions:
     65            - animation element is destructed
     66            - animation element is removed from document
     67            - target element of animation is destructed
     68            - target element of animation is removed from document
     69            - target element of animation changes id
     70
     71            Whenever any of this happens, we need to reset the animVal. Resetting the animVal involves resetting the PropertyType* pointer,
     72            eg. SVGLength*, from the animVal property tear off, belonging to a certain SVGAnimatedProperty (eg. rect.x) to the initial
     73            value again, which is the 'm_x' of the SVGRectElement. This is needed as the SVGAnimatedType the animVal currently points to,
     74            if an animation is/was running, is destructed in targetElementWillChange(), to reset the SVGAnimateElement to the initial
     75            state before it received a target. This is the only place which destructed the m_animatedType, and thus the only place that
     76            needs to take care of resetting the animVal pointers.
     77
     78        * svg/SVGAnimatedLength.cpp:
     79        (WebCore::SVGAnimatedLengthAnimator::constructFromCopy):
     80            Add a new constructFromCopy(SVGGenericAnimatedType) function to SVGAnimatedLengthAnimator.
     81            It takes a type-unsafe SVGGenericAnimatedType - the caller has to guarantee the type matches.
     82            This is strictly enforced for the single caller of constructFromCopy, and guaranteed to be safe.
     83
     84        * svg/SVGAnimatedLength.h: Add new constructFromCopy method, which is used to avoid string-roundtrips when resetting to base values.
     85        * svg/SVGAnimatedType.cpp:
     86        (WebCore::SVGAnimatedType::supportsAnimVal): Only returns true for AnimatedLength, for now.
     87        (WebCore::SVGAnimatedType::setVariantValue): Takes a SVGGenericAnimatedType, assuming the type matches. Callers have to guarantee type-safety!
     88        * svg/SVGAnimatedType.h:
     89        (SVGAnimatedType): Add new static supportsAnimVal(AnimatedPropertyType) function.
     90        (WebCore::SVGAnimatedType::variantValue): Add a generic accessor for all animated types, called variant(). Only one place uses this.
     91        * svg/SVGAnimatedTypeAnimator.h:
     92        (WebCore::SVGAnimatedTypeAnimator::constructFromCopy):
     93            New method to construct an eg. SVGAnimatedLengthAnimator right from a SVGLength, instead of a String.
     94            In that case the SVGAnimatedType just stores a pointer to the underlying SVGLength, no copying and or other roundtrips involved.
     95
     96        * svg/SVGAnimationElement.cpp:
     97        (WebCore::SVGAnimationElement::svgAttributeChanged):
     98            Implement this instead of attributeChanged. The previous implementation reset the animation state to Inactive, causing a full
     99            rebuild, whenever any attribute changes, even though it might not be related for the animation element, eg.
     100            animate.setAttribute("stdDeviationX", "foobar"). Fix that by checking if we support the attribute (keyTimes/keySplines/etc..)
     101            , if not pass it on to SVGSMILElement (which supports begin/end/etc..) to check if it can handle that.
     102
     103        (WebCore::SVGAnimationElement::animationAttributeChanged):
     104            Called from our svgAttributeChanged, and/or from SVGSMILElement::svgAttributeChanged, whenever a _known_ attribute has changed.
     105            This sledgehammer should be used with care, instead of each time attributeChanged() is called :-)
     106
     107        (WebCore::setTargetAttributeAnimatedCSSValue):
     108            Remove support for removing properties from the override style sheet. I've added this optimization too early, we should reevaluate
     109            this once more types support animVal. It currently complexifies the logic too much, requiring setAttributeAnimatedValue to know
     110            if the animation ends (and that's not easy to figure out, at least not using started/endedActiveInterval, as I anticipated).
     111
     112        (WebCore::findMatchingAnimatedProperty):
     113            Add helper functions which retrieves a SVGAnimatedProperty* for a given SVGElement* targetElement, an attributeName, and an attribute
     114            type. eg. findMatchingAnimatedProperty(myRectElement, SVGNames::xAttr, AnimatedLength) returns the SVGAnimatedProperty which is
     115            exposed to JS, that holds: SVGProperty* baseVal, and SVGProperty* animVal. (Lazily created if they got accessed from JS.). This is
     116            used to update the animVal pointing to a new eg. SVGLength* value, once animation has started, to make rect->x() return that new
     117            SVGLength* value (internally), and to reflect the current animated value in rect.x.animVal.value from JS.
     118
     119        (WebCore::SVGAnimationElement::applyAnimatedValue): Refactored from setTargetAttributeAnimatedValue, to simplify the code.
     120        (WebCore::notifyAnimatedPropertyAboutAnimationBeginEnd):
     121            Helper function to share code betweeen animationStarted/animationEnded.
     122            It takes a SVGAnimatedProperty* and a SVGAnimatedType* which may be zero, indicating that the animation ended.
     123            It calls animationStarted/animationEnded on the given SVGAnimatedProperty, to update the animVal state.
     124            It also figures out all instances of the target element, and their SVGAnimatedProperties that may need updating.
     125
     126        (WebCore::SVGAnimationElement::animationStarted): Uses the helper above, passing on the given animatedType.
     127        (WebCore::SVGAnimationElement::animationEnded): Uses the helper above, passing 0 as animatedType.
     128        (WebCore::InstanceUpdateBlocker::InstanceUpdateBlocker):
     129            Added new helper struct, doing element->setInstancesUpdatedBlock(true) on construction and setInstancesUpdatesBlocked(false) on
     130            destruction, making it impossible to forget one. If we ever rewrite svgAttributeChanged & co to auto-update the cloned instances,
     131            this can go away.
     132
     133        (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
     134            Now takes an SVGAnimatedType* instead of a String parameter. In order to avoid string-roundtrips for animVal support, let us
     135            decide if we need to construct a String out of it, or not. For animations supporting animVal (only SVGLength) we don't need
     136            to update any attribute or animVal pointer here, that happens automatically! We only need to notify the targetElement eg,
     137            that its xAttr changed! Previously we had to call targetElement->setAttribute("x", "...") on every animation step for
     138            SVGLength animations - that's gone now! The SVGAnimatedType pointers remains the same during the whole animation, so there's
     139            no need to call animationStarted() at each animated step!
     140
     141        (WebCore::SVGAnimationElement::animatedPropertyForType):
     142            Helper function returning a SVGAnimatedProperty* for the current target element & current target attribute, if the
     143            current animation is running on a type supporting animVal (SVGLength), or returning 0. This is needed for SVGAnimateElement.
     144            Reuses the existing findMatchingAnimatedProperty code.
     145
     146        * svg/SVGAnimationElement.h:
     147        * svg/animation/SMILTimeContainer.cpp:
     148        (WebCore::SMILTimeContainer::updateAnimations):
     149            Add comment to clarify why caching baseValues is just wrong. For SVGLength animations the problem is now gone.
     150            This is exercised using the new additive-from-to-width-animation.html & additive-values-width-animation.html tests.
     151
     152        * svg/animation/SVGSMILElement.cpp:
     153        (WebCore::SVGSMILElement::removedFromDocument):
     154            Since animVal requires that the SVGAnimatedProperties are correctly reset if an animation element is removed from the document,
     155            we have to call targetElementWillChange(0) from here. That requires to move the "m_attributeName = anyQName()" line down,
     156            otherwise targetElementWillChange() would early exit, as no valid attributeName was specified.
     157           
     158            This is verified using the new svg/animations/remove-animation-element-while-animation-is-running.html
     159            and svg/repaint/repainting-after-animation-element-removal.svg tests.
     160
     161        (WebCore::SVGSMILElement::isSupportedAttribute): Add function like all SVG*Elements have identifying their supported attributes.
     162        (WebCore::SVGSMILElement::svgAttributeChanged):
     163            Implement svgAttributeChanged instead of attributeChanged. Only take action if the attribute is actually supported.
     164            If one of the common attributes like begin/end/etc. changed, be sure to call animationAttributeChanged() so that our
     165            ancestor-classes get notified about this and can take action as well. NOTE: This is not about animating begin/end attributes,
     166            but about pure DOM changes. begin/end/et.. are not exposed to the SVG DOM, we still reuse the svgAttributeChanged logic
     167            for consistency. (This does NOT make those attributes animatable, nothing this here as it came up while reviewing).
     168   
     169        (WebCore::SVGSMILElement::targetElement): Adapt logic to targetElementDidChange -> targetElementWillChange change.
     170        (WebCore::SVGSMILElement::targetElementWillChange):
     171            Renamed from targetElementDidChange. Added "oldTarget" as parameter as well. Our ancestor-classes like SVGAnimateElement
     172            use this to properly deregister the animVal in the old target, before resetting the SVGAnimatedType, otherwise we'd leave
     173            dangling pointers around (verified manually by guard malloc runs, that none of this happens).
     174
     175            Also add a default implementation here in targetElementWillChange, that ancestor classes have to call.
     176            Now we properly call endedActiveInterval() if the m_activeState is currently Active, so that animations are shut-down
     177            just like if the animation properly ends (use the same cleanup routines, etc.). Not doing that now leads to assertions.
     178
     179        (WebCore::SVGSMILElement::resetTargetElement):
     180            Instead of forcing m_activeState to be inactive, use the standard methods to end the animation.
     181            targetElementWillChange(m_targetElement, 0) and animationAttributeChanged().
     182
     183            resetTargetElement() is only called by SVGDocumentExtensions::removeAllAnimationElementsFromTarget() for following conditions:
     184            - targetElement gets destructed
     185            - targetElement gets removed from the document
     186            - targetElement id changes
     187
     188            If the targetElement gets destructed or removed, no actions need to be taken, as the SVGAnimatedPropertys are teared down
     189            as well. But if only the id changes, we still have to properly disconnect the animVals - this is all handled through
     190            targetElementWillChange now - that's why this has to be called from here as well.
     191            That explains why targetElementWillChange() now needs to check if the targetElement is destructing or not.
     192
     193        * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
     194            Pass the AnimatedPropertyType from the SVGPropertyInfo to the SVGAnimatedProperties.
     195            Requires mechanic changes in all SVGAnimated* classes. We need acccess to the AnimatedPropertyType
     196            to verify the SVGAnimatedType objects, passed to animationStarted, match our type. This is to enforce
     197            strict type-checking, whenever SVGGenericAnimatedTypes are passed around.
     198
     199        (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
     200        (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
     201        * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
     202        (WebCore::SVGAnimatedListPropertyTearOff::create):
     203        (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
     204        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
     205        (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
     206        (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
     207        * svg/properties/SVGAnimatedProperty.h: Store AnimatedPropertyType, add accessors.
     208        (WebCore::SVGAnimatedProperty::animatedPropertyType): Add accessor.
     209        (WebCore::SVGAnimatedProperty::animationValueChanged): New animVal related functions to be implemented in the animated tear offs.
     210        (WebCore::SVGAnimatedProperty::animationStarted): Ditto.
     211        (WebCore::SVGAnimatedProperty::animationEnded): Ditto.
     212        (WebCore::SVGAnimatedProperty::currentBaseValue):
     213            Generic accessor for the baseVal: returns a SVGGenericAnimatedType.
     214            It takes an AnimatedPropertyType as input, that's only needed to verify that the type we're returning matches
     215            the expectation of the caller. If not, return 0 to avoid any potential casting mistakes, which would lead to crashes.
     216
     217        (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Store m_animatedPropertyType.
     218        * svg/properties/SVGAnimatedPropertyTearOff.h:
     219        (WebCore::SVGAnimatedPropertyTearOff::create): Same changes as in the other tear offs: pass around AnimatedPropertyType.
     220        (WebCore::SVGAnimatedPropertyTearOff::currentBaseValue): Returns &m_property, if the type matches (see above).
     221        (SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
     222        (WebCore::SVGAnimatedPropertyTearOff::animationValueChanged): No-op for non list types, don't need to do anything here.
     223        (WebCore::SVGAnimatedPropertyTearOff::animationStarted):
     224        (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
     225            Store the currently animated value in the animVal() property tear off, that's also re-used as-is for the JS bindings.
     226            As this is important, here's an example of how this affects methods like rect->x() used in the renderers.
     227
     228            Setting m_isAnimating to true, redirects any rect->x() calls that previously returned rect->m_x, to
     229            rect->xAnimated()->animVal()->propertyReference() (which returns the same SVGLength& that the SVGAnimatedElement
     230            m_animatedType contains). Calling rect->setXBaseValue() still modifies rect->m_x, and is used by all parseAttribute()
     231            methods in svg/ as setAttribute() calls only ever modify the "baseValue", never the current animated value.
     232            rect.x.baseVal will return a SVGLength object corresponding to rect->m_x.
     233            rect.x.animVal will return a SVGLength object corresponding to rect->xAnimated()->animVal()->propertyReference().
     234
     235            These implementation details are all hidden in the SVGAnimatedPropertyMacros. Here's an example from SVGRectElement:
     236            DECLARE_ANIMATED_LENGTH(X, x) -> Replace PropertyType with 'SVGLength', LowerProperty with 'x', and UpperProperty with 'X'.
     237
     238            PropertyType& LowerProperty() const
     239            {
     240                if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType, IsDerivedFromSVGElement<UseOwnerType>::value>(this, LowerProperty##PropertyInfo())) {
     241                    if (wrapper->isAnimating())
     242                        return wrapper->currentAnimatedValue();
     243                }
     244                return m_##LowerProperty.value;
     245            }
     246
     247            PropertyType& LowerProperty##BaseValue() const
     248            {
     249                return m_##LowerProperty.value;
     250            }
     251
     252            void set##UpperProperty##BaseValue(const PropertyType& type)
     253            {
     254                m_##LowerProperty.value = type;
     255            }
     256
     257            Any code outside of svg/, eg. in rendering/svg, does not need to care about any baseVal/animVal differences.
     258            During layout eg. RenderSVGRect calls rect->x().value(someLengthContext) to get the current 'x' as float. If an animation
     259            is running on that rect element it will automatically retrieve the last set animated value here - all under the hood.
     260            I hope that sheds some light in those myserious functions, they were designed with animVal in mind, but we never had that until now :-)
     261
     262        (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
     263        (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): Add destructor to debug builds veryifing that m_isAnimating is false.
     264        * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
     265        (WebCore::SVGAnimatedStaticPropertyTearOff::create):
     266        (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
     267        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
     268        (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
     269        (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
     270        * svg/properties/SVGPropertyInfo.h: Add SVGGenericAnimatedType definition.
     271        * svg/properties/SVGPropertyTearOff.h: Remove obsolete updateAnimVal method - switched to using setValue directly.
     272
    12732012-03-13  Luke Macpherson   <macpherson@chromium.org>
    2274
  • trunk/Source/WebCore/svg/SVGAnimateElement.cpp

    r109342 r110545  
    3535#include "SVGStyledElement.h"
    3636
    37 using namespace std;
    38 
    3937namespace WebCore {
    4038
     
    4240    : SVGAnimationElement(tagName, document)
    4341    , m_animatedPropertyType(AnimatedString)
    44     , m_aboutToStopAnimation(false)
    4542    , m_fromPropertyValueType(RegularPropertyValue)
    4643    , m_toPropertyValueType(RegularPropertyValue)
     
    177174    ASSERT(m_toType);
    178175
     176    ASSERT(resultElement->hasTagName(SVGNames::animateTag)
     177        || resultElement->hasTagName(SVGNames::animateColorTag)
     178        || resultElement->hasTagName(SVGNames::setTag));
     179
    179180    SVGAnimateElement* resultAnimationElement = static_cast<SVGAnimateElement*>(resultElement);
    180181    ASSERT(resultAnimationElement->m_animatedType);
    181182    ASSERT(resultAnimationElement->m_animatedPropertyType == m_animatedPropertyType);
    182     ASSERT(resultAnimationElement->hasTagName(SVGNames::animateTag)
    183         || resultAnimationElement->hasTagName(SVGNames::animateColorTag)
    184         || resultAnimationElement->hasTagName(SVGNames::setTag));
    185183
    186184    if (hasTagName(SVGNames::setTag))
     
    218216void SVGAnimateElement::resetToBaseValue(const String& baseString)
    219217{
     218    // If animatedProperty is not null, we're dealing with a SVG DOM primitive animation.
     219    // In that case we don't need any base value strings, but can directly operate on these
     220    // SVG DOM primitives, like SVGLength.
     221    SVGAnimatedTypeAnimator* animator = ensureAnimator();
     222    if (SVGAnimatedProperty* animatedProperty = animatedPropertyForType(animator->type())) {
     223        if (!m_animatedType) {
     224            m_animatedType = animator->constructFromCopy(animatedProperty->currentBaseValue(animator->type()));
     225            animationStarted(animatedProperty, m_animatedType.get());
     226        } else
     227            m_animatedType->setVariantValue(animatedProperty->currentBaseValue(m_animator->type()));
     228        ASSERT(m_animatedPropertyType == animator->type());
     229        return;
     230    }
     231
    220232    if (!m_animatedType)
    221         m_animatedType = ensureAnimator()->constructFromString(baseString);
     233        m_animatedType = animator->constructFromString(baseString);
    222234    else
    223235        m_animatedType->setValueAsString(attributeName(), baseString);
    224     ASSERT(m_animatedPropertyType == m_animator->type());
    225 }
    226    
     236    ASSERT(m_animatedPropertyType == animator->type());
     237}
     238
    227239void SVGAnimateElement::applyResultsToTarget()
    228240{
     
    231243    ASSERT(m_animatedPropertyType != AnimatedUnknown);
    232244    ASSERT(m_animatedType);
    233 
    234     if (m_aboutToStopAnimation) {
    235         m_aboutToStopAnimation = false;
    236         resetAnimationState(m_animatedType->valueAsString());
    237         return;
     245    setTargetAttributeAnimatedValue(m_animatedType.get());
     246}
     247   
     248float SVGAnimateElement::calculateDistance(const String& fromString, const String& toString)
     249{
     250    // FIXME: A return value of float is not enough to support paced animations on lists.
     251    SVGElement* targetElement = this->targetElement();
     252    if (!targetElement)
     253        return -1;
     254
     255    return ensureAnimator()->calculateDistance(fromString, toString);
     256}
     257
     258void SVGAnimateElement::targetElementWillChange(SVGElement* currentTarget, SVGElement* newTarget)
     259{
     260    SVGSMILElement::targetElementWillChange(currentTarget, newTarget);
     261
     262    // Be sure to never execute any of this, while the target element is being removed from the document or destructed.
     263    if (currentTarget && currentTarget->inDocument() && currentTarget->parentNode()) {
     264        ASSERT(!currentTarget->m_deletionHasBegun);
     265        if (SVGAnimatedProperty* animatedProperty = animatedPropertyForType(m_animatedPropertyType))
     266            animationEnded(animatedProperty);
    238267    }
    239268
    240     setTargetAttributeAnimatedValue(m_animatedType->valueAsString());
    241 }
    242    
    243 float SVGAnimateElement::calculateDistance(const String& fromString, const String& toString)
    244 {
    245     // FIXME: A return value of float is not enough to support paced animations on lists.
    246     SVGElement* targetElement = this->targetElement();
    247     if (!targetElement)
    248         return -1;
    249 
    250     return ensureAnimator()->calculateDistance(fromString, toString);
    251 }
    252 
    253 void SVGAnimateElement::targetElementDidChange(SVGElement* targetElement)
    254 {
    255269    m_animatedType.clear();
    256270    m_fromType.clear();
    257271    m_toType.clear();
    258272    m_animator.clear();
    259     m_animatedPropertyType = targetElement ? determineAnimatedPropertyType(targetElement) : AnimatedString;
     273    m_animatedPropertyType = newTarget ? determineAnimatedPropertyType(newTarget) : AnimatedString;
    260274}
    261275
     
    268282}
    269283
    270 void SVGAnimateElement::endedActiveInterval()
    271 {
    272     SVGAnimationElement::endedActiveInterval();
    273     m_aboutToStopAnimation = true;
    274 }
    275 
    276 }
     284}
     285
    277286#endif // ENABLE(SVG)
  • trunk/Source/WebCore/svg/SVGAnimateElement.h

    r109342 r110545  
    6666    virtual float calculateDistance(const String& fromString, const String& toString);
    6767
    68     virtual void endedActiveInterval();
    69     virtual void targetElementDidChange(SVGElement* targetElement) OVERRIDE;
     68    virtual void targetElementWillChange(SVGElement* currentTarget, SVGElement* oldTarget) OVERRIDE;
    7069
    7170private:
     
    7473    virtual bool hasValidAttributeType();
    7574    AnimatedPropertyType m_animatedPropertyType;
    76     bool m_aboutToStopAnimation;
    7775
    7876    AnimatedPropertyValueType m_fromPropertyValueType;
  • trunk/Source/WebCore/svg/SVGAnimatedLength.cpp

    r99838 r110545  
    4646{
    4747    return SVGAnimatedType::createLength(new SVGLength(m_lengthMode, string));
     48}
     49
     50PassOwnPtr<SVGAnimatedType> SVGAnimatedLengthAnimator::constructFromCopy(SVGGenericAnimatedType* animatedType)
     51{
     52    ASSERT(animatedType);
     53    return SVGAnimatedType::createLength(new SVGLength(*reinterpret_cast<SVGLength*>(animatedType)));
    4854}
    4955
  • trunk/Source/WebCore/svg/SVGAnimatedLength.h

    r95901 r110545  
    3838
    3939class SVGAnimationElement;
     40class SVGGenericAnimatedType;
    4041
    4142class SVGAnimatedLengthAnimator : public SVGAnimatedTypeAnimator {
     
    4647
    4748    virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&);
     49    virtual PassOwnPtr<SVGAnimatedType> constructFromCopy(SVGGenericAnimatedType*);
    4850
    4951    virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString);
  • trunk/Source/WebCore/svg/SVGAnimatedType.cpp

    r95901 r110545  
    428428}
    429429
    430    
     430bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type)
     431{
     432    // FIXME: This lists the current state of our animVal support: only SVGLength is supported for now.
     433    switch (type) {
     434    case AnimatedLength:
     435        return true;
     436    case AnimatedAngle:
     437    case AnimatedBoolean:
     438    case AnimatedColor:
     439    case AnimatedEnumeration:
     440    case AnimatedInteger:
     441    case AnimatedLengthList:
     442    case AnimatedNumber:
     443    case AnimatedNumberList:
     444    case AnimatedNumberOptionalNumber:
     445    case AnimatedPath:
     446    case AnimatedPoints:
     447    case AnimatedPreserveAspectRatio:
     448    case AnimatedRect:
     449    case AnimatedString:
     450    case AnimatedTransformList:
     451    case AnimatedUnknown:
     452        return false;
     453    }
     454
     455    ASSERT_NOT_REACHED();
     456    return false;
     457}
     458
     459void SVGAnimatedType::setVariantValue(SVGGenericAnimatedType* type)
     460{
     461    // FIXME: This lists the current state of our animVal support: only SVGLength is supported for now.
     462    switch (m_type) {
     463    case AnimatedLength:
     464        *m_data.length = *reinterpret_cast<SVGLength*>(type);
     465        return;
     466    case AnimatedAngle:
     467    case AnimatedBoolean:
     468    case AnimatedColor:
     469    case AnimatedEnumeration:
     470    case AnimatedInteger:
     471    case AnimatedLengthList:
     472    case AnimatedNumber:
     473    case AnimatedNumberList:
     474    case AnimatedNumberOptionalNumber:
     475    case AnimatedPath:
     476    case AnimatedPoints:
     477    case AnimatedPreserveAspectRatio:
     478    case AnimatedRect:
     479    case AnimatedString:
     480    case AnimatedTransformList:
     481    case AnimatedUnknown:
     482        break;
     483    }
     484
     485    ASSERT_NOT_REACHED();
     486}
     487
    431488} // namespace WebCore
    432489
  • trunk/Source/WebCore/svg/SVGAnimatedType.h

    r95901 r110545  
    2929class FloatRect;
    3030class SVGAngle;
     31class SVGGenericAnimatedType;
    3132class SVGLength;
    3233class SVGLengthList;
     
    5556    static PassOwnPtr<SVGAnimatedType> createRect(FloatRect*);
    5657    static PassOwnPtr<SVGAnimatedType> createString(String*);
     58    static bool supportsAnimVal(AnimatedPropertyType);
    5759
    5860    AnimatedPropertyType type() const { return m_type; }
     
    7274    FloatRect& rect();
    7375    String& string();
     76
     77    // Use with care, the actual type of the generic animated object has to be equal to our type().
     78    void setVariantValue(SVGGenericAnimatedType*);
     79    SVGGenericAnimatedType* variantValue() const { return m_data.variant; }
    7480
    7581    String valueAsString();
     
    104110        FloatRect* rect;
    105111        String* string;
     112        SVGGenericAnimatedType* variant;
    106113    } m_data;
    107114};
  • trunk/Source/WebCore/svg/SVGAnimatedTypeAnimator.h

    r108134 r110545  
    2828
    2929class SVGAnimationElement;
     30class SVGGenericAnimatedType;
    3031
    3132class SVGAnimatedTypeAnimator {
     
    3435    virtual ~SVGAnimatedTypeAnimator() { }
    3536    virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&) = 0;
     37    // FIXME: Make this pure once all types implement this. Its needed for animVal, and currently only SVGLengthAnimator implements this.
     38    virtual PassOwnPtr<SVGAnimatedType> constructFromCopy(SVGGenericAnimatedType*) { return PassOwnPtr<SVGAnimatedType>(); }
    3639   
    3740    virtual void calculateFromAndToValues(OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, const String& fromString, const String& toString) = 0;
  • trunk/Source/WebCore/svg/SVGAnimationElement.cpp

    r109679 r110545  
    157157    return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName);
    158158}
    159      
     159
    160160void SVGAnimationElement::parseAttribute(Attribute* attr)
    161161{
     
    202202}
    203203
    204 void SVGAnimationElement::attributeChanged(Attribute* attr)
     204void SVGAnimationElement::svgAttributeChanged(const QualifiedName& attrName)
     205{
     206    if (!isSupportedAttribute(attrName)) {
     207        SVGSMILElement::svgAttributeChanged(attrName);
     208        return;
     209    }
     210
     211    animationAttributeChanged();
     212}
     213
     214void SVGAnimationElement::animationAttributeChanged()
    205215{
    206216    // Assumptions may not hold after an attribute change.
    207217    m_animationValid = false;
    208218    setInactive();
    209     SVGSMILElement::attributeChanged(attr);
    210219}
    211220
     
    334343{
    335344    StylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyleProperties();
    336     if (value.isNull()) {
    337         if (propertySet->removeProperty(cssPropertyID(attributeName.localName())))
    338             targetElement->setNeedsStyleRecalc();
    339         return;
    340     }
    341 
    342345    if (propertySet->setProperty(cssPropertyID(attributeName.localName()), value, false, 0))
    343346        targetElement->setNeedsStyleRecalc();
    344347}
    345348
    346 static inline void setTargetAttributeAnimatedXMLValue(SVGElement* targetElement, const QualifiedName& attributeName, const String& value)
    347 {
    348     // FIXME: Detach animVal, if value.isNull() - once animVal support is enabled.
    349     targetElement->setAttribute(attributeName, value);
    350 }
    351 
    352 void SVGAnimationElement::setTargetAttributeAnimatedValue(const String& value)
    353 {
     349static inline SVGAnimatedProperty* findMatchingAnimatedProperty(SVGElement* targetElement, const QualifiedName& attributeName, AnimatedPropertyType type)
     350{
     351    Vector<RefPtr<SVGAnimatedProperty> > properties;
     352    targetElement->localAttributeToPropertyMap().animatedPropertiesForAttribute(targetElement, attributeName, properties);
     353
     354    size_t propertiesSize = properties.size();
     355    for (size_t i = 0; i < propertiesSize; ++i) {
     356        SVGAnimatedProperty* property = properties[i].get();
     357        if (property->animatedPropertyType() != type)
     358            continue;
     359
     360        // FIXME: This check can go away once all types support animVal.
     361        if (SVGAnimatedType::supportsAnimVal(property->animatedPropertyType()))
     362            return property;
     363        return 0;
     364    }
     365
     366    return 0;
     367}
     368
     369void SVGAnimationElement::applyAnimatedValue(SVGAnimationElement::ShouldApplyAnimation shouldApply, SVGElement* targetElement, const QualifiedName& attributeName, SVGAnimatedType* animatedType)
     370{
     371    ASSERT(animatedType);
     372
     373    switch (shouldApply) {
     374    case DontApplyAnimation:
     375        ASSERT_NOT_REACHED();
     376        break;
     377    case ApplyCSSAnimation:
     378        setTargetAttributeAnimatedCSSValue(targetElement, attributeName, animatedType->valueAsString());
     379        break;
     380    case ApplyXMLAnimation:
     381        if (SVGAnimatedProperty* property = findMatchingAnimatedProperty(targetElement, attributeName, animatedType->type())) {
     382            property->animationValueChanged();
     383            break;
     384        }
     385
     386        // FIXME: Deprecated legacy code path which mutates the DOM.
     387        targetElement->setAttribute(attributeName, animatedType->valueAsString());
     388        break;
     389    }
     390}
     391
     392struct InstanceUpdateBlocker {
     393    InstanceUpdateBlocker(SVGElement* targetElement)
     394        : m_targetElement(targetElement->isStyled() ? static_cast<SVGStyledElement*>(targetElement) : 0)
     395    {
     396        if (m_targetElement)
     397            m_targetElement->setInstanceUpdatesBlocked(true);
     398    }
     399
     400    ~InstanceUpdateBlocker()
     401    {
     402        if (m_targetElement)
     403            m_targetElement->setInstanceUpdatesBlocked(false);
     404    }
     405
     406    SVGStyledElement* m_targetElement;
     407};
     408
     409void SVGAnimationElement::setTargetAttributeAnimatedValue(SVGAnimatedType* animatedType)
     410{
     411    ASSERT(animatedType);
     412
    354413    SVGElement* targetElement = this->targetElement();
    355414    const QualifiedName& attributeName = this->attributeName();
     
    358417        return;
    359418
    360     if (targetElement->isStyled())
    361         static_cast<SVGStyledElement*>(targetElement)->setInstanceUpdatesBlocked(true);
    362 
    363     if (shouldApply == ApplyCSSAnimation)
    364         setTargetAttributeAnimatedCSSValue(targetElement, attributeName, value);
    365     else
    366         setTargetAttributeAnimatedXMLValue(targetElement, attributeName, value);
    367 
    368     if (targetElement->isStyled())
    369         static_cast<SVGStyledElement*>(targetElement)->setInstanceUpdatesBlocked(false);
     419    // Scope this block, so instances updates will be unblocked, before we try to update the instances.
     420    {
     421        InstanceUpdateBlocker blocker(targetElement);
     422        applyAnimatedValue(shouldApply, targetElement, attributeName, animatedType);
     423    }
     424
     425    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
     426    const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
     427    const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
     428    for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
     429        if (SVGElement* shadowTreeElement = (*it)->shadowTreeElement())
     430            applyAnimatedValue(shouldApply, shadowTreeElement, attributeName, animatedType);
     431    }
     432}
     433
     434static inline void notifyAnimatedPropertyAboutAnimationBeginEnd(SVGAnimatedProperty* property, SVGAnimatedType* type, SVGElement* targetElement, const QualifiedName& attributeName)
     435{
     436    ASSERT(property);
     437    ASSERT(targetElement);
     438    ASSERT(property->contextElement() == targetElement);
     439    ASSERT(property->attributeName() == attributeName);
     440    if (type)
     441        property->animationStarted(type);
     442    else {
     443        // animationEnded() notifies the targetElement about the attribute change - take care of blocking
     444        // updates to instances of elements, otherwise they use trees got recloned, unncessary.
     445        InstanceUpdateBlocker blocker(targetElement);
     446        property->animationEnded();
     447    }
    370448
    371449    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
     
    377455            continue;
    378456
    379         if (shouldApply == ApplyCSSAnimation)
    380             setTargetAttributeAnimatedCSSValue(shadowTreeElement, attributeName, value);
     457        SVGAnimatedProperty* propertyInstance = findMatchingAnimatedProperty(shadowTreeElement, attributeName, property->animatedPropertyType());
     458        if (!propertyInstance)
     459            continue;
     460
     461        if (type)
     462            propertyInstance->animationStarted(type);
    381463        else
    382             setTargetAttributeAnimatedXMLValue(shadowTreeElement, attributeName, value);
    383     }
    384 }
    385 
    386 void SVGAnimationElement::resetAnimationState(const String& baseValue)
    387 {
    388     // FIXME: This extra check will go away, once animVal is enabled.
     464            propertyInstance->animationEnded();
     465    }
     466}
     467
     468void SVGAnimationElement::animationStarted(SVGAnimatedProperty* property, SVGAnimatedType* type)
     469{
     470    ASSERT(type);
     471    notifyAnimatedPropertyAboutAnimationBeginEnd(property, type, targetElement(), attributeName());
     472}
     473
     474void SVGAnimationElement::animationEnded(SVGAnimatedProperty* property)
     475{
     476    notifyAnimatedPropertyAboutAnimationBeginEnd(property, 0, targetElement(), attributeName());
     477}
     478
     479SVGAnimatedProperty* SVGAnimationElement::animatedPropertyForType(AnimatedPropertyType type)
     480{
    389481    SVGElement* targetElement = this->targetElement();
    390482    const QualifiedName& attributeName = this->attributeName();
    391483    ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement, attributeName);
    392     if (shouldApply == DontApplyAnimation)
    393         return;
    394 
    395     if (isFrozen() || shouldApply == ApplyXMLAnimation)
    396         setTargetAttributeAnimatedValue(baseValue);
    397     else // Only CSS animations support detaching previously animated properties so far, indicating by passing a null-string.
    398         setTargetAttributeAnimatedValue(String());
     484    if (shouldApply != ApplyXMLAnimation)
     485        return 0;
     486    return findMatchingAnimatedProperty(targetElement, attributeName, type);
    399487}
    400488
     
    663751
    664752}
     753
    665754#endif // ENABLE(SVG)
  • trunk/Source/WebCore/svg/SVGAnimationElement.h

    r109342 r110545  
    5858class ConditionEventListener;
    5959class TimeContainer;
     60class SVGAnimatedType;
    6061
    6162class SVGAnimationElement : public SVGSMILElement,
     
    8788    bool isSupportedAttribute(const QualifiedName&);
    8889    virtual void parseAttribute(Attribute*) OVERRIDE;
     90    virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
    8991
    9092    enum AttributeType {
     
    99101    String fromValue() const;
    100102
    101     String targetAttributeBaseValue() const;
    102     void setTargetAttributeAnimatedValue(const String&);
     103    String targetAttributeBaseValue();
     104    void setTargetAttributeAnimatedValue(SVGAnimatedType*);
     105    SVGAnimatedProperty* animatedPropertyForType(AnimatedPropertyType);
     106
     107    void animationStarted(SVGAnimatedProperty*, SVGAnimatedType*);
     108    void animationEnded(SVGAnimatedProperty*);
    103109
    104110    // from SVGSMILElement
     
    106112    virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement);
    107113
    108     void resetAnimationState(const String& baseValue);
    109 
    110114private:
    111     virtual void attributeChanged(Attribute*) OVERRIDE;
     115    virtual void animationAttributeChanged() OVERRIDE;
    112116
    113117    virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0;
     
    132136
    133137    ShouldApplyAnimation shouldApplyAnimation(SVGElement* targetElement, const QualifiedName& attributeName);
     138    void applyAnimatedValue(ShouldApplyAnimation, SVGElement* targetElement, const QualifiedName& attributeName, SVGAnimatedType*);
    134139
    135140    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAnimationElement)
  • trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp

    r107682 r110545  
    266266                continue;
    267267            resultElement = animation;
     268            // FIXME: As soon as we stop mutating the DOM, we can stop passing the cached baseValue here.
     269            // Caching the baseValue results in wrong additive="sum" behaviour. Reason: the m_savedBaseValues
     270            // is NEVER reset, it always contains the state of the baseValue, at the point where we first
     271            // called baseValueFor(), typically at the beginning of the animation.
    268272            resultElement->resetToBaseValue(baseValueFor(key));
    269273            resultsElements.add(key, resultElement);
  • trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp

    r109345 r110545  
    217217void SVGSMILElement::removedFromDocument()
    218218{
    219     m_attributeName = anyQName();
    220219    if (m_timeContainer) {
    221220        m_timeContainer->unschedule(this);
     
    230229    if (m_targetElement) {
    231230        document()->accessSVGExtensions()->removeAnimationElementFromTarget(this, m_targetElement);
     231        targetElementWillChange(m_targetElement, 0);
    232232        m_targetElement = 0;
    233233    }
    234234
     235    m_attributeName = anyQName();
    235236    SVGElement::removedFromDocument();
    236237}
     
    390391    }
    391392    sortTimeList(timeList);
     393}
     394
     395bool SVGSMILElement::isSupportedAttribute(const QualifiedName& attrName)
     396{
     397    DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
     398    if (supportedAttributes.isEmpty()) {
     399        supportedAttributes.add(SVGNames::beginAttr);
     400        supportedAttributes.add(SVGNames::endAttr);
     401        supportedAttributes.add(SVGNames::durAttr);
     402        supportedAttributes.add(SVGNames::repeatDurAttr);
     403        supportedAttributes.add(SVGNames::repeatCountAttr);
     404        supportedAttributes.add(SVGNames::minAttr);
     405        supportedAttributes.add(SVGNames::maxAttr);
     406        supportedAttributes.add(SVGNames::attributeNameAttr);
     407        supportedAttributes.add(XLinkNames::hrefAttr);
     408    }
     409    return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName);
    392410}
    393411
     
    416434}
    417435
    418 void SVGSMILElement::attributeChanged(Attribute* attr)
    419 {
    420     SVGElement::attributeChanged(attr);
    421 
    422     const QualifiedName& attrName = attr->name();
     436void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName)
     437{
     438    if (!isSupportedAttribute(attrName)) {
     439        SVGElement::svgAttributeChanged(attrName);
     440        return;
     441    }
     442
    423443    if (attrName == SVGNames::durAttr)
    424444        m_cachedDur = invalidCachedTime;
     
    431451    else if (attrName == SVGNames::maxAttr)
    432452        m_cachedMax = invalidCachedTime;
    433     else if (attrName == SVGNames::attributeNameAttr) {
    434         if (inDocument())
    435             m_attributeName = constructQualifiedName(this, attr->value());
    436     }
    437 
    438     if (inDocument()) {
     453    else if (inDocument()) {
    439454        if (attrName == SVGNames::beginAttr)
    440455            beginListChanged(elapsed());
    441456        else if (attrName == SVGNames::endAttr)
    442457            endListChanged(elapsed());
    443     }
     458        else if (attrName == SVGNames::attributeNameAttr)
     459            m_attributeName = constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr));
     460        else if (attrName.matches(XLinkNames::hrefAttr)) {
     461            if (SVGElement* targetElement = this->targetElement())
     462                document()->accessSVGExtensions()->removeAllAnimationElementsFromTarget(targetElement);
     463        }
     464    }
     465
     466    animationAttributeChanged();
    444467}
    445468
     
    519542        return m_targetElement;
    520543
    521     String href = xlinkHref();
     544    String href = getAttribute(XLinkNames::hrefAttr);
    522545    ContainerNode* target = href.isEmpty() ? parentNode() : SVGURIReference::targetElementFromIRIString(href, document());
    523546    if (!target || !target->isSVGElement())
    524547        return 0;
    525548
    526     m_targetElement = static_cast<SVGElement*>(target);
     549    SVGElement* targetElement = static_cast<SVGElement*>(target);
     550    targetElementWillChange(m_targetElement, targetElement);
     551    m_targetElement = targetElement;
    527552    document()->accessSVGExtensions()->addAnimationElementToTarget(this, m_targetElement);
    528 
    529     targetElementDidChange(m_targetElement);
    530 
    531553    return m_targetElement;
    532554}
    533555
     556void SVGSMILElement::targetElementWillChange(SVGElement*, SVGElement*)
     557{
     558    // If the animation state is Active, always reset to a clear state before leaving the old target element.
     559    if (m_activeState == Active)
     560        endedActiveInterval();
     561}
     562
    534563void SVGSMILElement::resetTargetElement()
    535564{
     565    targetElementWillChange(m_targetElement, 0);
    536566    m_targetElement = 0;
    537 
    538     // Force the animation to recompute values that are only calculated when an animation becomes active.
    539     // Failing to do this means that a target reset and change during active animation may result in
    540     // invalid state.
    541     m_activeState = Inactive;
    542 
    543     targetElementDidChange(0);
     567    animationAttributeChanged();
    544568}
    545569
     
    576600    const AtomicString& value = fastGetAttribute(SVGNames::fillAttr);
    577601    return value == freeze ? FillFreeze : FillRemove;
    578 }
    579    
    580 String SVGSMILElement::xlinkHref() const
    581 {   
    582     return getAttribute(XLinkNames::hrefAttr);
    583602}
    584603   
  • trunk/Source/WebCore/svg/animation/SVGSMILElement.h

    r109342 r110545  
    4545    static bool isSMILElement(Node*);
    4646
     47    bool isSupportedAttribute(const QualifiedName&);
    4748    virtual void parseAttribute(Attribute*) OVERRIDE;
    48     virtual void attributeChanged(Attribute*) OVERRIDE;
     49    virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
    4950    virtual void insertedIntoDocument();
    5051    virtual void removedFromDocument();
    5152   
    5253    virtual bool hasValidAttributeType() = 0;
     54    virtual void animationAttributeChanged() = 0;
    5355
    5456    SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); }
     
    7476
    7577    FillMode fill() const;
    76 
    77     String xlinkHref() const;
    7878
    7979    SMILTime dur() const;
     
    116116
    117117    // Sub-classes may need to take action when the target is changed.
    118     virtual void targetElementDidChange(SVGElement*) { }
     118    virtual void targetElementWillChange(SVGElement* currentTarget, SVGElement* newTarget);
    119119    virtual void endedActiveInterval();
    120120
  • trunk/Source/WebCore/svg/properties/SVGAnimatedEnumerationPropertyTearOff.h

    r95901 r110545  
    4141    }
    4242
    43     static PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<EnumType> > create(SVGElement* contextElement, const QualifiedName& attributeName, EnumType& property)
     43    static PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<EnumType> > create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, EnumType& property)
    4444    {
    4545        ASSERT(contextElement);
    46         return adoptRef(new SVGAnimatedEnumerationPropertyTearOff<EnumType>(contextElement, attributeName, reinterpret_cast<int&>(property)));
     46        return adoptRef(new SVGAnimatedEnumerationPropertyTearOff<EnumType>(contextElement, attributeName, animatedPropertyType, reinterpret_cast<int&>(property)));
    4747    }
    4848
     
    5050
    5151private:
    52     SVGAnimatedEnumerationPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, int& property)
    53         : SVGAnimatedStaticPropertyTearOff<int>(contextElement, attributeName, property)
     52    SVGAnimatedEnumerationPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, int& property)
     53        : SVGAnimatedStaticPropertyTearOff<int>(contextElement, attributeName, animatedPropertyType, property)
    5454    {
    5555    }
  • trunk/Source/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h

    r95901 r110545  
    8787    PropertyType& currentAnimatedValue() { return m_values; }
    8888
    89     static PassRefPtr<SVGAnimatedListPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& values)
     89    static PassRefPtr<SVGAnimatedListPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& values)
    9090    {
    9191        ASSERT(contextElement);
    92         return adoptRef(new SVGAnimatedListPropertyTearOff<PropertyType>(contextElement, attributeName, values));
     92        return adoptRef(new SVGAnimatedListPropertyTearOff<PropertyType>(contextElement, attributeName, animatedPropertyType, values));
    9393    }
    9494
    9595protected:
    96     SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& values)
    97         : SVGAnimatedProperty(contextElement, attributeName)
     96    SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& values)
     97        : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
    9898        , m_values(values)
    9999    {
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h

    r95901 r110545  
    5252    }
    5353
    54     static PassRefPtr<SVGAnimatedPathSegListPropertyTearOff> create(SVGElement* contextElement, const QualifiedName& attributeName, SVGPathSegList& values)
     54    static PassRefPtr<SVGAnimatedPathSegListPropertyTearOff> create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, SVGPathSegList& values)
    5555    {
    5656        ASSERT(contextElement);
    57         return adoptRef(new SVGAnimatedPathSegListPropertyTearOff(contextElement, attributeName, values));
     57        return adoptRef(new SVGAnimatedPathSegListPropertyTearOff(contextElement, attributeName, animatedPropertyType, values));
    5858    }
    5959
    6060private:
    61     SVGAnimatedPathSegListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, SVGPathSegList& values)
    62         : SVGAnimatedListPropertyTearOff<SVGPathSegList>(contextElement, attributeName, values)
     61    SVGAnimatedPathSegListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, SVGPathSegList& values)
     62        : SVGAnimatedListPropertyTearOff<SVGPathSegList>(contextElement, attributeName, animatedPropertyType, values)
    6363    {
    6464    }
  • trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h

    r95901 r110545  
    2929namespace WebCore {
    3030
     31class SVGAnimatedType;
    3132class SVGElement;
     33class SVGGenericAnimatedType;
    3234
    3335class SVGAnimatedProperty : public RefCounted<SVGAnimatedProperty> {
     
    3537    SVGElement* contextElement() const { return m_contextElement.get(); }
    3638    const QualifiedName& attributeName() const { return m_attributeName; }
     39    AnimatedPropertyType animatedPropertyType() const { return m_animatedPropertyType; }
    3740
    3841    void commitChange()
     
    4447
    4548    virtual bool isAnimatedListTearOff() const { return false; }
    46     virtual void updateAnimVal(void*) { ASSERT_NOT_REACHED(); }
     49
     50    virtual void animationStarted(SVGAnimatedType*) { ASSERT_NOT_REACHED(); }
     51    virtual void animationEnded() { ASSERT_NOT_REACHED(); }
     52    virtual void animationValueChanged() { ASSERT_NOT_REACHED(); }
     53    virtual SVGGenericAnimatedType* currentBaseValue(AnimatedPropertyType) const
     54    {
     55        ASSERT_NOT_REACHED();
     56        return 0;
     57    }
    4758
    4859    // Caching facilities.
     
    8394            RefPtr<SVGAnimatedProperty> wrapper = animatedPropertyCache()->get(key);
    8495            if (!wrapper) {
    85                 wrapper = TearOffType::create(element, info->attributeName, property);
     96                wrapper = TearOffType::create(element, info->attributeName, info->animatedPropertyType, property);
    8697                animatedPropertyCache()->set(key, wrapper);
    8798            }
     
    125136
    126137protected:
    127     SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName)
     138    SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType)
    128139        : m_contextElement(contextElement)
    129140        , m_attributeName(attributeName)
     141        , m_animatedPropertyType(animatedPropertyType)
    130142    {
    131143    }
     
    140152    RefPtr<SVGElement> m_contextElement;
    141153    const QualifiedName& m_attributeName;
     154    AnimatedPropertyType m_animatedPropertyType;
    142155};
    143156
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h

    r95901 r110545  
    2323#if ENABLE(SVG)
    2424#include "SVGAnimatedProperty.h"
     25#include "SVGAnimatedType.h"
    2526#include "SVGPropertyTearOff.h"
    2627
     
    4445    }
    4546
    46     static PassRefPtr<SVGAnimatedPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
     47    static PassRefPtr<SVGAnimatedPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
    4748    {
    4849        ASSERT(contextElement);
    49         return adoptRef(new SVGAnimatedPropertyTearOff<PropertyType>(contextElement, attributeName, property));
     50        return adoptRef(new SVGAnimatedPropertyTearOff<PropertyType>(contextElement, attributeName, animatedPropertyType, property));
    5051    }
    5152
     
    5960    }
    6061
    61     virtual void updateAnimVal(void* value)
     62    virtual SVGGenericAnimatedType* currentBaseValue(AnimatedPropertyType expectedPropertyType) const
    6263    {
    63         if (value) {
    64             static_cast<SVGPropertyTearOff<PropertyType>*>(animVal())->updateAnimVal(reinterpret_cast<PropertyType*>(value));
    65             m_isAnimating = true;
    66             return;
    67         }
     64        ASSERT_UNUSED(expectedPropertyType, animatedPropertyType() == expectedPropertyType);
     65        return reinterpret_cast<SVGGenericAnimatedType*>(&m_property);
     66    }
    6867
    69         static_cast<SVGPropertyTearOff<PropertyType>*>(animVal())->updateAnimVal(&m_property);
     68    virtual void animationStarted(SVGAnimatedType* animatedType)
     69    {
     70        ASSERT(animatedType);
     71        ASSERT(animatedType->type() == animatedPropertyType());
     72        static_cast<SVGPropertyTearOff<PropertyType>*>(animVal())->setValue(*reinterpret_cast<PropertyType*>(animatedType->variantValue()));
     73        m_isAnimating = true;
     74    }
     75
     76    virtual void animationEnded()
     77    {
     78        ASSERT(m_isAnimating);
     79        static_cast<SVGPropertyTearOff<PropertyType>*>(animVal())->setValue(m_property);
    7080        m_isAnimating = false;
     81
     82        ASSERT(contextElement());
     83        contextElement()->svgAttributeChanged(attributeName());
     84    }
     85
     86    virtual void animationValueChanged()
     87    {
     88        ASSERT(contextElement());
     89        contextElement()->svgAttributeChanged(attributeName());
    7190    }
    7291
    7392private:
    74     SVGAnimatedPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
    75         : SVGAnimatedProperty(contextElement, attributeName)
     93    SVGAnimatedPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
     94        : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
    7695        , m_property(property)
    7796        , m_isAnimating(false)
    7897    {
    7998    }
     99
     100#ifndef NDEBUG
     101    virtual ~SVGAnimatedPropertyTearOff()
     102    {
     103        ASSERT(!m_isAnimating);
     104    }
     105#endif
    80106
    81107    PropertyType& m_property;
  • trunk/Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h

    r95901 r110545  
    5050    PropertyType& currentAnimatedValue() { return m_property; }
    5151
    52     static PassRefPtr<SVGAnimatedStaticPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
     52    static PassRefPtr<SVGAnimatedStaticPropertyTearOff<PropertyType> > create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
    5353    {
    5454        ASSERT(contextElement);
    55         return adoptRef(new SVGAnimatedStaticPropertyTearOff<PropertyType>(contextElement, attributeName, property));
     55        return adoptRef(new SVGAnimatedStaticPropertyTearOff<PropertyType>(contextElement, attributeName, animatedPropertyType, property));
    5656    }
    5757
    5858protected:
    59     SVGAnimatedStaticPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& property)
    60         : SVGAnimatedProperty(contextElement, attributeName)
     59    SVGAnimatedStaticPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
     60        : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
    6161        , m_property(property)
    6262    {
  • trunk/Source/WebCore/svg/properties/SVGAnimatedTransformListPropertyTearOff.h

    r95901 r110545  
    4444    }
    4545
    46     static PassRefPtr<SVGAnimatedTransformListPropertyTearOff> create(SVGElement* contextElement, const QualifiedName& attributeName, SVGTransformList& values)
     46    static PassRefPtr<SVGAnimatedTransformListPropertyTearOff> create(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, SVGTransformList& values)
    4747    {
    4848        ASSERT(contextElement);
    49         return adoptRef(new SVGAnimatedTransformListPropertyTearOff(contextElement, attributeName, values));
     49        return adoptRef(new SVGAnimatedTransformListPropertyTearOff(contextElement, attributeName, animatedPropertyType, values));
    5050    }
    5151
    5252private:
    53     SVGAnimatedTransformListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, SVGTransformList& values)
    54         : SVGAnimatedListPropertyTearOff<SVGTransformList>(contextElement, attributeName, values)
     53    SVGAnimatedTransformListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, SVGTransformList& values)
     54        : SVGAnimatedListPropertyTearOff<SVGTransformList>(contextElement, attributeName, animatedPropertyType, values)
    5555    {
    5656    }
  • trunk/Source/WebCore/svg/properties/SVGPropertyTearOff.h

    r95901 r110545  
    5050    SVGAnimatedProperty* animatedProperty() const { return m_animatedProperty.get(); }
    5151
    52     // Used only by the list tear offs!
    5352    void setValue(PropertyType& value)
    5453    {
     
    9493    virtual SVGPropertyRole role() const { return m_role; }
    9594
    96     void updateAnimVal(PropertyType* value)
    97     {
    98         ASSERT(!m_valueIsCopy);
    99         ASSERT(m_role == AnimValRole);
    100         m_value = value;
    101     }
    102 
    10395protected:
    10496    SVGPropertyTearOff(SVGAnimatedProperty* animatedProperty, SVGPropertyRole role, PropertyType& value)
Note: See TracChangeset for help on using the changeset viewer.