mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
7edfef701e
commit
67f83f31cd
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user