mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1063384 - Make RestyleTracker::DoProcessRestyle's restylesToProcess not have an mDescendants array in each element. r=dbaron
This commit is contained in:
parent
66db16ba8b
commit
0eecbadff8
@ -49,9 +49,13 @@ CollectLaterSiblings(nsISupports* aElement,
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
struct RestyleEnumerateData : RestyleTracker::Hints {
|
||||
nsRefPtr<dom::Element> mElement;
|
||||
};
|
||||
|
||||
struct RestyleCollector {
|
||||
RestyleTracker* tracker;
|
||||
RestyleTracker::RestyleEnumerateData** restyleArrayPtr;
|
||||
RestyleEnumerateData** restyleArrayPtr;
|
||||
};
|
||||
|
||||
static PLDHashOperator
|
||||
@ -91,10 +95,8 @@ CollectRestyles(nsISupports* aElement,
|
||||
element->UnsetFlags(collector->tracker->RestyleBit() |
|
||||
collector->tracker->RootBit());
|
||||
|
||||
RestyleTracker::RestyleEnumerateData** restyleArrayPtr =
|
||||
collector->restyleArrayPtr;
|
||||
RestyleTracker::RestyleEnumerateData* currentRestyle =
|
||||
*restyleArrayPtr;
|
||||
RestyleEnumerateData** restyleArrayPtr = collector->restyleArrayPtr;
|
||||
RestyleEnumerateData* currentRestyle = *restyleArrayPtr;
|
||||
currentRestyle->mElement = element;
|
||||
currentRestyle->mRestyleHint = aData->mRestyleHint;
|
||||
currentRestyle->mChangeHint = aData->mChangeHint;
|
||||
@ -231,8 +233,6 @@ RestyleTracker::DoProcessRestyles()
|
||||
ProcessOneRestyle(currentRestyle->mElement,
|
||||
currentRestyle->mRestyleHint,
|
||||
currentRestyle->mChangeHint);
|
||||
|
||||
MOZ_ASSERT(currentRestyle->mDescendants.IsEmpty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +287,12 @@ public:
|
||||
return mRestyleBits & ~ELEMENT_PENDING_RESTYLE_FLAGS;
|
||||
}
|
||||
|
||||
struct RestyleData {
|
||||
struct Hints {
|
||||
nsRestyleHint mRestyleHint; // What we want to restyle
|
||||
nsChangeHint mChangeHint; // The minimal change hint for "self"
|
||||
};
|
||||
|
||||
struct RestyleData : Hints {
|
||||
RestyleData() {
|
||||
mRestyleHint = nsRestyleHint(0);
|
||||
mChangeHint = NS_STYLE_HINT_NONE;
|
||||
@ -298,9 +303,6 @@ public:
|
||||
mChangeHint = aChangeHint;
|
||||
}
|
||||
|
||||
nsRestyleHint mRestyleHint; // What we want to restyle
|
||||
nsChangeHint mChangeHint; // The minimal change hint for "self"
|
||||
|
||||
// Descendant elements we must check that we ended up restyling, ordered
|
||||
// with the same invariant as mRestyleRoots. The elements here are those
|
||||
// that we called AddPendingRestyle for and found the element this is
|
||||
@ -340,10 +342,6 @@ public:
|
||||
*/
|
||||
inline nsIDocument* Document() const;
|
||||
|
||||
struct RestyleEnumerateData : public RestyleData {
|
||||
nsRefPtr<Element> mElement;
|
||||
};
|
||||
|
||||
private:
|
||||
bool AddPendingRestyleToTable(Element* aElement, nsRestyleHint aRestyleHint,
|
||||
nsChangeHint aMinChangeHint);
|
||||
|
Loading…
Reference in New Issue
Block a user