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
Родитель 29e1f8c013
Коммит fea45deb80
3 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -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();

Просмотреть файл

@ -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 &&

Просмотреть файл

@ -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();