Bug 1047928 patch 1 - Add more comments explaining eRestyle_Subtree vs. eRestyle_ForceDescendants. r=bzbarsky
--- a/layout/base/nsChangeHint.h
+++ b/layout/base/nsChangeHint.h
@@ -285,16 +285,19 @@ inline nsChangeHint NS_HintsNotHandledFo
enum nsRestyleHint {
// Rerun selector matching on the element. If a new style context
// results, update the style contexts of descendants. (Irrelevant if
// eRestyle_Subtree is also set, since that implies a superset of the
// work.)
eRestyle_Self = (1<<0),
// Rerun selector matching on the element and all of its descendants.
+ // (Implies eRestyle_ForceDescendants, which ensures that we continue
+ // the restyling process for all descendants, but doesn't cause
+ // selector matching.)
eRestyle_Subtree = (1<<1),
// Rerun selector matching on all later siblings of the element and
// all of their descendants.
eRestyle_LaterSiblings = (1<<2),
// Replace the style data coming from CSS transitions without updating
// any other style data. If a new style context results, update style
@@ -337,17 +340,19 @@ enum nsRestyleHint {
eRestyle_ChangeAnimationPhase = (1 << 7),
// Continue the restyling process to the current frame's children even
// if this frame's restyling resulted in no style changes.
eRestyle_Force = (1<<8),
// Continue the restyling process to all of the current frame's
// descendants, even if any frame's restyling resulted in no style
- // changes. (Implies eRestyle_Force.)
+ // changes. (Implies eRestyle_Force.) Note that this is weaker than
+ // eRestyle_Subtree, which makes us rerun selector matching on all
+ // descendants rather than just continuing the restyling process.
eRestyle_ForceDescendants = (1<<9),
};
// The functions below need an integral type to cast to to avoid
// infinite recursion.
typedef decltype(nsRestyleHint(0) + nsRestyleHint(0)) nsRestyleHint_size_t;
inline nsRestyleHint operator|(nsRestyleHint aLeft, nsRestyleHint aRight)