mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868729 - Remove nsHTMLCSSStyleSheet::Init; r=bz
This commit is contained in:
parent
f2e25db30c
commit
651b9b2b24
@ -2232,9 +2232,7 @@ nsDocument::ResetStylesheetsToURI(nsIURI* aURI)
|
||||
}
|
||||
mStyleAttrStyleSheet->Reset(aURI);
|
||||
} else {
|
||||
mStyleAttrStyleSheet = new nsHTMLCSSStyleSheet();
|
||||
nsresult rv = mStyleAttrStyleSheet->Init(aURI, this);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mStyleAttrStyleSheet = new nsHTMLCSSStyleSheet(aURI, this);
|
||||
}
|
||||
|
||||
// The loop over style sets below will handle putting this sheet
|
||||
|
@ -39,9 +39,13 @@ ClearAttrCache(const nsAString& aKey, MiscContainer*& aValue, void*)
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
nsHTMLCSSStyleSheet::nsHTMLCSSStyleSheet()
|
||||
: mDocument(nullptr)
|
||||
nsHTMLCSSStyleSheet::nsHTMLCSSStyleSheet(nsIURI* aURL, nsIDocument* aDocument)
|
||||
: mURL(aURL)
|
||||
, mDocument(aDocument) // not refcounted!
|
||||
{
|
||||
MOZ_ASSERT(aURL);
|
||||
MOZ_ASSERT(aDocument);
|
||||
mCachedStyleAttrs.Init();
|
||||
}
|
||||
|
||||
nsHTMLCSSStyleSheet::~nsHTMLCSSStyleSheet()
|
||||
@ -102,22 +106,6 @@ nsHTMLCSSStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
nsHTMLCSSStyleSheet::Init(nsIURI* aURL, nsIDocument* aDocument)
|
||||
{
|
||||
NS_PRECONDITION(aURL && aDocument, "null ptr");
|
||||
if (! aURL || ! aDocument)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (mURL || mDocument)
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
mDocument = aDocument; // not refcounted!
|
||||
mURL = aURL;
|
||||
mCachedStyleAttrs.Init();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Test if style is dependent on content state
|
||||
/* virtual */ nsRestyleHint
|
||||
nsHTMLCSSStyleSheet::HasStateDependentStyle(StateRuleProcessorData* aData)
|
||||
|
@ -20,14 +20,14 @@
|
||||
struct MiscContainer;
|
||||
|
||||
class nsHTMLCSSStyleSheet MOZ_FINAL : public nsIStyleSheet,
|
||||
public nsIStyleRuleProcessor {
|
||||
public nsIStyleRuleProcessor
|
||||
{
|
||||
public:
|
||||
nsHTMLCSSStyleSheet();
|
||||
nsHTMLCSSStyleSheet(nsIURI* aURL, nsIDocument* aDocument);
|
||||
~nsHTMLCSSStyleSheet();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsresult Init(nsIURI* aURL, nsIDocument* aDocument);
|
||||
void Reset(nsIURI* aURL);
|
||||
|
||||
// nsIStyleSheet
|
||||
|
Loading…
Reference in New Issue
Block a user