Bug 1435132 part 1. Remove NS_IMETHOD noise from never-failing nsIStyleSheetLinkingElement methods. r=mccr8

MozReview-Commit-ID: EibysYsW1rv
This commit is contained in:
Boris Zbarsky 2018-02-02 08:21:32 -05:00
Родитель 6605f20fc4
Коммит 54a6506018
3 изменённых файлов: 12 добавлений и 18 удалений

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

@ -28,14 +28,14 @@ public:
* @param aStyleSheet the style sheet associated with this
* element.
*/
NS_IMETHOD SetStyleSheet(mozilla::StyleSheet* aStyleSheet) = 0;
virtual void SetStyleSheet(mozilla::StyleSheet* aStyleSheet) = 0;
/**
* Used to obtain the style sheet linked in by this element.
*
* @return the style sheet associated with this element.
*/
NS_IMETHOD_(mozilla::StyleSheet*) GetStyleSheet() = 0;
virtual mozilla::StyleSheet* GetStyleSheet() = 0;
/**
* Initialize the stylesheet linking element. If aDontLoadStyle is
@ -43,7 +43,7 @@ public:
* element that would cause a stylesheet to be loaded. Subsequent
* modifications to the element will not be ignored.
*/
NS_IMETHOD InitStyleLinkElement(bool aDontLoadStyle) = 0;
virtual void InitStyleLinkElement(bool aDontLoadStyle) = 0;
/**
* Tells this element to update the stylesheet.
@ -72,7 +72,7 @@ public:
*
* @param aEnableUpdates update on changes or not.
*/
NS_IMETHOD SetEnableUpdates(bool aEnableUpdates) = 0;
virtual void SetEnableUpdates(bool aEnableUpdates) = 0;
/**
* Gets the charset that the element claims the style sheet is in

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

@ -69,7 +69,7 @@ nsStyleLinkElement::Traverse(nsCycleCollectionTraversalCallback &cb)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheet);
}
NS_IMETHODIMP
void
nsStyleLinkElement::SetStyleSheet(StyleSheet* aStyleSheet)
{
if (mStyleSheet) {
@ -83,30 +83,24 @@ nsStyleLinkElement::SetStyleSheet(StyleSheet* aStyleSheet)
mStyleSheet->SetOwningNode(node);
}
}
return NS_OK;
}
NS_IMETHODIMP_(StyleSheet*)
StyleSheet*
nsStyleLinkElement::GetStyleSheet()
{
return mStyleSheet;
}
NS_IMETHODIMP
void
nsStyleLinkElement::InitStyleLinkElement(bool aDontLoadStyle)
{
mDontLoadStyle = aDontLoadStyle;
return NS_OK;
}
NS_IMETHODIMP
void
nsStyleLinkElement::SetEnableUpdates(bool aEnableUpdates)
{
mUpdatesEnabled = aEnableUpdates;
return NS_OK;
}
NS_IMETHODIMP

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

@ -43,14 +43,14 @@ public:
mozilla::StyleSheet* GetSheet() const { return mStyleSheet; }
// nsIStyleSheetLinkingElement
NS_IMETHOD SetStyleSheet(mozilla::StyleSheet* aStyleSheet) override;
NS_IMETHOD_(mozilla::StyleSheet*) GetStyleSheet() override;
NS_IMETHOD InitStyleLinkElement(bool aDontLoadStyle) override;
void SetStyleSheet(mozilla::StyleSheet* aStyleSheet) override;
mozilla::StyleSheet* GetStyleSheet() override;
void InitStyleLinkElement(bool aDontLoadStyle) override;
NS_IMETHOD UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
bool* aWillNotify,
bool* aIsAlternate,
bool aForceReload) override;
NS_IMETHOD SetEnableUpdates(bool aEnableUpdates) override;
void SetEnableUpdates(bool aEnableUpdates) override;
NS_IMETHOD GetCharset(nsAString& aCharset) override;
virtual void OverrideBaseURI(nsIURI* aNewBaseURI) override;