mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1292432 part 10 - Make style/link elements return StyleSheet. r=heycam
MozReview-Commit-ID: EIcfdYGZ8UH --HG-- extra : source : 3fd1c648a97cef67b9ae080f26e22dba4f7be62f
This commit is contained in:
parent
ea2d289c2c
commit
80c70397ac
@ -39,15 +39,7 @@ public:
|
||||
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override = 0;
|
||||
|
||||
mozilla::CSSStyleSheet* GetSheet() const
|
||||
{
|
||||
// XXXheycam Return nullptr for ServoStyleSheets until we have a way of
|
||||
// exposing them to script.
|
||||
NS_ASSERTION(!mStyleSheet || mStyleSheet->IsGecko(),
|
||||
"stylo: ServoStyleSheets can't be exposed to script yet");
|
||||
return mStyleSheet && mStyleSheet->IsGecko() ? mStyleSheet->AsGecko() :
|
||||
nullptr;
|
||||
}
|
||||
mozilla::StyleSheet* GetSheet() const { return mStyleSheet; }
|
||||
|
||||
// nsIStyleSheetLinkingElement
|
||||
NS_IMETHOD SetStyleSheet(mozilla::StyleSheet* aStyleSheet) override;
|
||||
|
@ -95,7 +95,7 @@ NS_IMPL_ELEMENT_CLONE(HTMLLinkElement)
|
||||
bool
|
||||
HTMLLinkElement::Disabled()
|
||||
{
|
||||
CSSStyleSheet* ss = GetSheet();
|
||||
StyleSheet* ss = GetSheet();
|
||||
return ss && ss->Disabled();
|
||||
}
|
||||
|
||||
@ -109,8 +109,7 @@ HTMLLinkElement::GetMozDisabled(bool* aDisabled)
|
||||
void
|
||||
HTMLLinkElement::SetDisabled(bool aDisabled)
|
||||
{
|
||||
CSSStyleSheet* ss = GetSheet();
|
||||
if (ss) {
|
||||
if (StyleSheet* ss = GetSheet()) {
|
||||
ss->SetDisabled(aDisabled);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ HTMLStyleElement::GetMozDisabled(bool* aDisabled)
|
||||
bool
|
||||
HTMLStyleElement::Disabled()
|
||||
{
|
||||
CSSStyleSheet* ss = GetSheet();
|
||||
StyleSheet* ss = GetSheet();
|
||||
return ss && ss->Disabled();
|
||||
}
|
||||
|
||||
@ -82,8 +82,7 @@ HTMLStyleElement::SetMozDisabled(bool aDisabled)
|
||||
void
|
||||
HTMLStyleElement::SetDisabled(bool aDisabled)
|
||||
{
|
||||
CSSStyleSheet* ss = GetSheet();
|
||||
if (ss) {
|
||||
if (StyleSheet* ss = GetSheet()) {
|
||||
ss->SetDisabled(aDisabled);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user