Bug 1384542: Make possible to cache NS_STYLE_JUSTIFY_AUTO position structs. r?heycam
MozReview-Commit-ID: FsMTnBDS5Sa
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -8682,19 +8682,17 @@ nsRuleNode::ComputePositionData(void* aS
conditions.SetUncacheable();
} else {
SetValue(justifyItemsValue,
pos->mSpecifiedJustifyItems, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentPos->mSpecifiedJustifyItems, // unused, we handle 'inherit' above
NS_STYLE_JUSTIFY_AUTO);
if (pos->mSpecifiedJustifyItems == NS_STYLE_JUSTIFY_AUTO) {
- // FIXME(emilio): This is kind of unfortunate because this is a reset
- // property and AUTO is the default value... Can we do better?
- conditions.SetUncacheable();
+ conditions.SetParentJustifyItemsDependency(parentPos->mJustifyItems);
}
}
pos->mJustifyItems = ComputedJustifyItems(pos->mSpecifiedJustifyItems,
parentPos->mJustifyItems);
// justify-self: enum, inherit, initial
SetValue(*aRuleData->ValueForJustifySelf(),