Bug 822766. Be a bit more careful with our level assert in ReplaceAnimationRule. r=dbaron

This commit is contained in:
Boris Zbarsky 2012-12-22 00:27:27 -08:00
parent 7390f14e53
commit a76857bd47
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<style>
@-moz-keyframes togreen {
100% {
color: green;
}
}
.a:after {
animation-name: togreen;
animation-duration: 10s;
}
</style>
<script>
function boom()
{
document.documentElement.setAttribute("class", "a");
document.documentElement.offsetHeight;
document.documentElement.appendChild(document.createElement("span"));
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="boom();"></body>
</html>

View File

@ -83,3 +83,4 @@ load 788836.html
load 806310-1.html
load 812824.html
load 822842.html
load 822766-1.html

View File

@ -516,7 +516,8 @@ ReplaceAnimationRule(nsRuleNode *aOldRuleNode,
}
NS_ABORT_IF_FALSE(!IsMoreSpecificThanAnimation(n) &&
n->GetLevel() != nsStyleSet::eAnimationSheet,
(n->IsRoot() ||
n->GetLevel() != nsStyleSet::eAnimationSheet),
"wrong level");
if (aNewAnimRule) {