Bug 1289916 - Check tree dirtiness in ProcessPendingRestyles before triggering traversal. r=emilio

It's possible (and in fact, desirable) for the restyle hints to all evaluate
to 0, which means the tree stays clean even though the map was non-empty.
This commit is contained in:
Bobby Holley 2016-07-27 14:00:29 -07:00
parent 2dafae2906
commit 7988d386c8

View File

@ -203,8 +203,10 @@ ServoRestyleManager::ProcessPendingRestyles()
}
}
styleSet->RestyleSubtree(root);
RecreateStyleContexts(root, nullptr, styleSet);
if (root->IsDirtyForServo() || root->HasDirtyDescendantsForServo()) {
styleSet->RestyleSubtree(root);
RecreateStyleContexts(root, nullptr, styleSet);
}
}
mModifiedElements.Clear();