Clear the current interval when no more intervals can be resolved #19619
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When no more intervals can be resolved, ResolveInterval(...) will return
an interval that return false from IsResolved() (meaning it has no
finite begin time). When this happens we should "clear" |interval_| by
setting it to an unresolved interval.
This fixes the behavior of SVGAnimationElement.getStartTime() which now
correctly report (throws) when the last interval of element has ended.
Add a new test for that and move an old somewhat related test to WPT.
Also adjust SVGAnimationTestCase.js which uses this to offset the sample
times (although in most cases) to avoid the debug dump when there's no
current interval (no tests actually rely on the old broken behavior).
This makes us match Firefox.
Bug: 998526
Change-Id: Idcf348343768ffc9392e29af2e976b9a3a1e31aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849897
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#705019}