Bug 996796 patch 6 - Adjust checks of restyle types to accomodate new types weaker than eRestyle_Self. r=heycam

FIXME: Adjust for eRestyle_Force if bug 931668 lands first.

Later patches will add such types that are like eRestyle_Self but that
only replace the style attribute, animation rule, or transition rule.
This commit is contained in:
L. David Baron 2014-08-02 19:37:43 -07:00
parent 7edfef701e
commit 67f83f31cd
3 changed files with 3 additions and 7 deletions

View File

@ -2346,11 +2346,7 @@ ElementRestyler::Restyle(nsRestyleHint aRestyleHint)
}
}
nsRestyleHint childRestyleHint = aRestyleHint;
if (childRestyleHint == eRestyle_Self) {
childRestyleHint = nsRestyleHint(0);
}
nsRestyleHint childRestyleHint = nsRestyleHint(aRestyleHint & eRestyle_Subtree);
{
nsRefPtr<nsStyleContext> oldContext = mFrame->StyleContext();

View File

@ -117,7 +117,7 @@ RestyleTracker::ProcessOneRestyle(Element* aElement,
"Element has unexpected document");
nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
if (aRestyleHint & (eRestyle_Self | eRestyle_Subtree)) {
if (aRestyleHint & ~eRestyle_LaterSiblings) {
mRestyleManager->RestyleElement(aElement, primaryFrame, aChangeHint,
*this, aRestyleHint);
} else if (aChangeHint &&

View File

@ -380,7 +380,7 @@ inline bool RestyleTracker::AddPendingRestyle(Element* aElement,
// We can only treat this element as a restyle root if we would
// actually restyle its descendants (so either call
// ReResolveStyleContext on it or just reframe it).
if ((aRestyleHint & (eRestyle_Self | eRestyle_Subtree)) ||
if ((aRestyleHint & ~eRestyle_LaterSiblings) ||
(aMinChangeHint & nsChangeHint_ReconstructFrame)) {
for (const Element* cur = aElement; !cur->HasFlag(RootBit()); ) {
nsIContent* parent = cur->GetFlattenedTreeParent();