gecko-dev/layout/style/crashtests/1356601-1.html
Cameron McCormack 57789c06eb Bug 1356601 - Don't force computation of a Variables struct when animations are involved. r=dbaron
Without this change, we can end up asserting in ComputeVariablesData and
crashing in CSSVariableResolver::Resolve due to not finding any variable
declarations on the rules we matched, when we have content like in the
crashtest added here, i.e. variables inheriting into a pseudo like
::first-line and animations on the element inside the ::first-line.

We could solve this alternatively by removing the assertion and making
CSSVariableResolver::Resolve handle a null aDeclarations more gracefully,
but since we can save the effort of recomputing the Variables struct in
this case, we may as well.

MozReview-Commit-ID: 6l06ZF3WGsy
2017-04-18 22:27:04 +10:00

19 lines
248 B
HTML

<!doctype html>
<html>
<style>
div::first-line {
--bar: left;
}
span {
animation: var(--bar) 5s infinite alternate;
}
@keyframes left {
from {left: 0;}
to {left: 30px;}
}
</style>
<div>
<span>Crash</span>
</div>
</html>