gecko-dev/layout/reftests/css-animations/change-animation-name-in-rule-ref.html
Hiroyuki Ikezoe 3fc40c42f2 Bug 1392851 - Try to update running CSS animations when CSS rules are changed. r=birtles
In the case where values in CSS rules changed directly by CSSOM, the old
value in the CSS rule block is immediately replaced by the new one. So if
the element, which is applied to the CSS rule, has running animations, the
new value is used during cascading process in animation-only restyle. Thus
in a subsequent normal restyle, we can't tell whether the value in the CSS
rule has changed or not. As a result, transitions may not be triggered
(bug 1393323) and CSS animations may not be cancelled if the updated
animation-name is 'none' (this bug).

For the latter case of CSS animations where animation-name has been updated to
'none', this patch introduces a workaround whereby we trigger an update of
running animations whenever the traversal is triggered by changes to CSS rules
and we have existing CSS animations.

change-animation-name-to-none-in-rule.html fails without servo #18214, succeeds
with this patch.  Other two tests succeed regardless of the PR.

MozReview-Commit-ID: BrZgTNk9w41

--HG--
extra : rebase_source : 7a55f54a0f94c8db02639f9d8c89f785b3a17a1b
2017-08-24 18:27:10 +09:00

11 lines
120 B
HTML

<!DOCTYPE html>
<html>
<style>
div {
background-color: green;
width: 100px;
height: 100px;
}
</style>
<div></div>