Bug 882573 patch 1: Move the style attribute style sheet from nsDocument to nsIDocument, and devirtualize its getter. r=bzbarsky

This commit is contained in:
L. David Baron 2013-06-13 22:34:37 -07:00
Родитель d71663e21d
Коммит c7efed2042
2 изменённых файлов: 4 добавлений и 10 удалений

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

@ -766,7 +766,9 @@ public:
* Get this document's inline style sheet. May return null if there
* isn't one
*/
virtual nsHTMLCSSStyleSheet* GetInlineStyleSheet() const = 0;
nsHTMLCSSStyleSheet* GetInlineStyleSheet() const {
return mStyleAttrStyleSheet;
}
/**
* Get/set the object from which a document can get a script context
@ -2178,6 +2180,7 @@ protected:
nsRefPtr<mozilla::css::Loader> mCSSLoader;
nsRefPtr<mozilla::css::ImageLoader> mStyleImageLoader;
nsRefPtr<nsHTMLStyleSheet> mAttrStyleSheet;
nsRefPtr<nsHTMLCSSStyleSheet> mStyleAttrStyleSheet;
// The set of all object, embed, applet, video and audio elements for
// which this is the owner document. (They might not be in the document.)

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

@ -641,14 +641,6 @@ public:
return mChannel;
}
/**
* Get this document's inline style sheet. May return null if there
* isn't one
*/
virtual nsHTMLCSSStyleSheet* GetInlineStyleSheet() const MOZ_OVERRIDE {
return mStyleAttrStyleSheet;
}
/**
* Set the object from which a document can get a script context.
* This is the context within which all scripts (during document
@ -1308,7 +1300,6 @@ protected:
// The channel that got passed to StartDocumentLoad(), if any
nsCOMPtr<nsIChannel> mChannel;
nsRefPtr<nsHTMLCSSStyleSheet> mStyleAttrStyleSheet;
// A document "without a browsing context" that owns the content of
// HTMLTemplateElement.