#402: M1356601 (M1353312)

This commit is contained in:
Cameron Kaiser 2017-05-29 17:46:30 -07:00
parent b18ed9971f
commit b384d72987
3 changed files with 36 additions and 3 deletions

View File

@ -0,0 +1,18 @@
<!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>

View File

@ -136,3 +136,4 @@ load border-image-visited-link.html
load font-face-truncated-src.html
load large_border_image_width.html
load long-url-list-stack-overflow.html
load 1356601-1.html

View File

@ -2364,9 +2364,23 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID aSID,
if (!highestNode)
highestNode = rootNode;
if (!ruleData.mConditions.CacheableWithoutDependencies())
detail = eRulePartialMixed; // Treat as though some data is specified to avoid
// the optimizations and force data computation.
MOZ_ASSERT(!(aSID == eStyleStruct_Variables && startStruct),
"if we start caching Variables structs in the rule tree, then "
"not forcing detail to eRulePartialMixed just below is no "
"longer valid");
if (!ruleData.mConditions.CacheableWithoutDependencies() &&
aSID != eStyleStruct_Variables) {
// Treat as though some data is specified to avoid the optimizations and
// force data computation.
//
// We don't need to do this for Variables structs since we know those are
// never cached in the rule tree, and it avoids wasteful computation of a
// new Variables struct when we have no additional variable declarations,
// which otherwise could happen when there is an AnimValuesStyleRule
// (which calls SetUncacheable for style contexts with pseudo data).
detail = eRulePartialMixed;
}
if (detail == eRuleNone && startStruct) {
// We specified absolutely no rule information, but a parent rule in the tree