Bug 1444580: Devirtualize FindImageMap. r=smaug

MozReview-Commit-ID: 4J6Yc3vW1Vf
This commit is contained in:
Emilio Cobos Álvarez 2018-03-11 12:53:59 +01:00
Родитель 837af28813
Коммит cde280f7f4
3 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -9797,7 +9797,7 @@ nsIDocument::SetNavigationTiming(nsDOMNavigationTiming* aTiming)
} }
Element* Element*
nsDocument::FindImageMap(const nsAString& aUseMapValue) nsIDocument::FindImageMap(const nsAString& aUseMapValue)
{ {
if (aUseMapValue.IsEmpty()) { if (aUseMapValue.IsEmpty()) {
return nullptr; return nullptr;

Просмотреть файл

@ -658,8 +658,6 @@ public:
virtual nsresult GetStateObject(nsIVariant** aResult) override; virtual nsresult GetStateObject(nsIVariant** aResult) override;
virtual Element* FindImageMap(const nsAString& aNormalizedMapName) override;
// Returns the size of the mBlockedTrackingNodes array. (nsIDocument.h) // Returns the size of the mBlockedTrackingNodes array. (nsIDocument.h)
// //
// This array contains nodes that have been blocked to prevent // This array contains nodes that have been blocked to prevent
@ -867,8 +865,6 @@ private:
// Set if we've found a URL for the current picture // Set if we've found a URL for the current picture
nsString mPreloadPictureFoundSource; nsString mPreloadPictureFoundSource;
RefPtr<nsContentList> mImageMaps;
nsCString mScrollToRef; nsCString mScrollToRef;
uint8_t mScrolledToRefAlready : 1; uint8_t mScrolledToRefAlready : 1;
uint8_t mChangeScrollPosWhenScrollingToRef : 1; uint8_t mChangeScrollPosWhenScrollingToRef : 1;

Просмотреть файл

@ -2798,7 +2798,7 @@ public:
void SetNavigationTiming(nsDOMNavigationTiming* aTiming); void SetNavigationTiming(nsDOMNavigationTiming* aTiming);
virtual Element* FindImageMap(const nsAString& aNormalizedMapName) = 0; Element* FindImageMap(const nsAString& aNormalizedMapName);
// Add aLink to the set of links that need their status resolved. // Add aLink to the set of links that need their status resolved.
void RegisterPendingLinkUpdate(mozilla::dom::Link* aLink); void RegisterPendingLinkUpdate(mozilla::dom::Link* aLink);
@ -4054,10 +4054,13 @@ protected:
RefPtr<mozilla::dom::DOMImplementation> mDOMImplementation; RefPtr<mozilla::dom::DOMImplementation> mDOMImplementation;
RefPtr<nsContentList> mImageMaps;
public: public:
js::ExpandoAndGeneration mExpandoAndGeneration; js::ExpandoAndGeneration mExpandoAndGeneration;
protected: protected:
nsTArray<RefPtr<mozilla::StyleSheet>> mOnDemandBuiltInUASheets; nsTArray<RefPtr<mozilla::StyleSheet>> mOnDemandBuiltInUASheets;
nsTArray<RefPtr<mozilla::StyleSheet>> mAdditionalSheets[AdditionalSheetTypeCount]; nsTArray<RefPtr<mozilla::StyleSheet>> mAdditionalSheets[AdditionalSheetTypeCount];