mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 709256 part 5. Fast-path nsAnimationManager::DispatchEvents when there are no events. r=dbaron
This commit is contained in:
parent
06d90319eb
commit
aec38ceac3
@ -904,7 +904,7 @@ nsAnimationManager::WillRefresh(mozilla::TimeStamp aTime)
|
||||
}
|
||||
|
||||
void
|
||||
nsAnimationManager::DispatchEvents()
|
||||
nsAnimationManager::DoDispatchEvents()
|
||||
{
|
||||
EventArray events;
|
||||
mPendingEvents.SwapElements(events);
|
||||
|
@ -131,7 +131,12 @@ public:
|
||||
* accumulate animationstart events at other points when style
|
||||
* contexts are created.
|
||||
*/
|
||||
void DispatchEvents();
|
||||
void DispatchEvents() {
|
||||
// Fast-path the common case: no events
|
||||
if (!mPendingEvents.IsEmpty()) {
|
||||
DoDispatchEvents();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ElementAnimations* GetElementAnimations(mozilla::dom::Element *aElement,
|
||||
@ -149,6 +154,9 @@ private:
|
||||
|
||||
nsCSSKeyframesRule* KeyframesRuleFor(const nsSubstring& aName);
|
||||
|
||||
// The guts of DispatchEvents
|
||||
void DoDispatchEvents();
|
||||
|
||||
bool mKeyframesListIsDirty;
|
||||
nsDataHashtable<nsStringHashKey, nsCSSKeyframesRule*> mKeyframesRules;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user