зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1444580: Devirtualize more animation stuff. r=smaug
MozReview-Commit-ID: 4U6oIg81Pdw
This commit is contained in:
Родитель
64c7ec5de6
Коммит
54f085ea7b
|
@ -6723,7 +6723,7 @@ nsDocument::EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData)
|
|||
}
|
||||
|
||||
nsSMILAnimationController*
|
||||
nsDocument::GetAnimationController()
|
||||
nsIDocument::GetAnimationController()
|
||||
{
|
||||
// We create the animation controller lazily because most documents won't want
|
||||
// one and only SVG documents and the like will call this
|
||||
|
@ -6754,7 +6754,7 @@ nsDocument::GetAnimationController()
|
|||
}
|
||||
|
||||
PendingAnimationTracker*
|
||||
nsDocument::GetOrCreatePendingAnimationTracker()
|
||||
nsIDocument::GetOrCreatePendingAnimationTracker()
|
||||
{
|
||||
if (!mPendingAnimationTracker) {
|
||||
mPendingAnimationTracker = new PendingAnimationTracker(this);
|
||||
|
|
|
@ -503,19 +503,6 @@ public:
|
|||
virtual void
|
||||
EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) override;
|
||||
|
||||
// Returns our (lazily-initialized) animation controller.
|
||||
// If HasAnimationController is true, this is guaranteed to return non-null.
|
||||
nsSMILAnimationController* GetAnimationController() override;
|
||||
|
||||
virtual mozilla::PendingAnimationTracker*
|
||||
GetPendingAnimationTracker() final
|
||||
{
|
||||
return mPendingAnimationTracker;
|
||||
}
|
||||
|
||||
virtual mozilla::PendingAnimationTracker*
|
||||
GetOrCreatePendingAnimationTracker() override;
|
||||
|
||||
virtual void SuppressEventHandling(uint32_t aIncrease) override;
|
||||
|
||||
virtual void UnsuppressEventHandlingAndFireEvents(bool aFireEvents) override;
|
||||
|
@ -644,10 +631,6 @@ protected:
|
|||
|
||||
void EnsureOnloadBlocker();
|
||||
|
||||
// Tracker for animations that are waiting to start.
|
||||
// nullptr until GetOrCreatePendingAnimationTracker is called.
|
||||
RefPtr<mozilla::PendingAnimationTracker> mPendingAnimationTracker;
|
||||
|
||||
public:
|
||||
RefPtr<mozilla::EventListenerManager> mListenerManager;
|
||||
|
||||
|
|
|
@ -2533,19 +2533,23 @@ public:
|
|||
// Getter for this document's SMIL Animation Controller. Performs lazy
|
||||
// initialization, if this document supports animation and if
|
||||
// mAnimationController isn't yet initialized.
|
||||
virtual nsSMILAnimationController* GetAnimationController() = 0;
|
||||
//
|
||||
// If HasAnimationController is true, this is guaranteed to return non-null.
|
||||
nsSMILAnimationController* GetAnimationController();
|
||||
|
||||
// Gets the tracker for animations that are waiting to start.
|
||||
// Returns nullptr if there is no pending animation tracker for this document
|
||||
// which will be the case if there have never been any CSS animations or
|
||||
// transitions on elements in the document.
|
||||
virtual mozilla::PendingAnimationTracker* GetPendingAnimationTracker() = 0;
|
||||
mozilla::PendingAnimationTracker* GetPendingAnimationTracker()
|
||||
{
|
||||
return mPendingAnimationTracker;
|
||||
}
|
||||
|
||||
// Gets the tracker for animations that are waiting to start and
|
||||
// creates it if it doesn't already exist. As a result, the return value
|
||||
// will never be nullptr.
|
||||
virtual mozilla::PendingAnimationTracker*
|
||||
GetOrCreatePendingAnimationTracker() = 0;
|
||||
mozilla::PendingAnimationTracker* GetOrCreatePendingAnimationTracker();
|
||||
|
||||
/**
|
||||
* Prevents user initiated events from being dispatched to the document and
|
||||
|
@ -4178,6 +4182,10 @@ protected:
|
|||
nsRefPtrHashtable<nsPtrHashKey<nsIContent>, mozilla::dom::BoxObject>*
|
||||
mBoxObjectTable;
|
||||
|
||||
// Tracker for animations that are waiting to start.
|
||||
// nullptr until GetOrCreatePendingAnimationTracker is called.
|
||||
RefPtr<mozilla::PendingAnimationTracker> mPendingAnimationTracker;
|
||||
|
||||
public:
|
||||
js::ExpandoAndGeneration mExpandoAndGeneration;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче