Cleanup invalidation of SMIL timing/animation parameters
The main gist is that timing and animation should be essentially independent - i.e the former only feeds into the latter by means of the progress state. Based on this we can perform some cleanups: * Any change to the animation target will also invalidate the animation parameter state via WillChangeAnimationTarget(), so any such change (SetTargetElement, SetAttributeType and SetAttributeName) needn't be followed by a call to AnimationAttributeChanged(), so remove those. * Any change to timing state (such as 'dur', 'repeatDur', 'repeatCount', 'min', 'max', 'begin' and 'end') will only influence the timing and not animation state, so we can drop calls to AnimationAttributeChanged() in those cases as well. * Since changing animation state should not affect timing, drop the call to SetInactive() from AnimationAttributeChanged() - this will be handled by timing updates when needed. This also means that SetInactive() is no longer used so it can be removed. After the above changes AnimationAttributeChanged() no longer needs to be virtual, and can reside in SVGAnimationElement alone. Also fold InvalidatedValuesCache() into AnimationAttributeChanged() since it is the only caller. Take this opportunity to move some state updates from the SvgAttributeChanged() override (which is for attributes which have an SVG DOM representation - and 'href' attributes because of how the dependency notifications work) to ParseAttribute(). Bug: 998526 Change-Id: Id50407cb5fb59601fea573e5963a7d4e1158a317 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869210Reviewed-by:Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#707366}
Showing
Please register or sign in to comment