mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 709256 part 1. Fast-path RestyleTracker::ProcessRestyles when there aren't any restyles to process. r=roc
This commit is contained in:
parent
33c5ecc6a8
commit
42b713ed34
@ -166,7 +166,7 @@ RestyleTracker::ProcessOneRestyle(Element* aElement,
|
||||
}
|
||||
|
||||
void
|
||||
RestyleTracker::ProcessRestyles()
|
||||
RestyleTracker::DoProcessRestyles()
|
||||
{
|
||||
SAMPLE_LABEL("CSS", "ProcessRestyles");
|
||||
// Make sure to not rebuild quote or counter lists while we're
|
||||
|
@ -94,7 +94,13 @@ public:
|
||||
/**
|
||||
* Process the restyles we've been tracking.
|
||||
*/
|
||||
void ProcessRestyles();
|
||||
void ProcessRestyles() {
|
||||
// Fast-path the common case (esp. for the animation restyle
|
||||
// tracker) of not having anything to do.
|
||||
if (mPendingRestyles.Count()) {
|
||||
DoProcessRestyles();
|
||||
}
|
||||
}
|
||||
|
||||
// Return our ELEMENT_HAS_PENDING_(ANIMATION_)RESTYLE bit
|
||||
PRUint32 RestyleBit() const {
|
||||
@ -143,6 +149,11 @@ private:
|
||||
nsRestyleHint aRestyleHint,
|
||||
nsChangeHint aChangeHint);
|
||||
|
||||
/**
|
||||
* The guts of our restyle processing.
|
||||
*/
|
||||
void DoProcessRestyles();
|
||||
|
||||
typedef nsDataHashtable<nsISupportsHashKey, RestyleData> PendingRestyleTable;
|
||||
typedef nsAutoTArray< nsRefPtr<Element>, 32> RestyleRootArray;
|
||||
// Our restyle bits. These will be a subset of ELEMENT_ALL_RESTYLE_FLAGS, and
|
||||
|
Loading…
Reference in New Issue
Block a user