aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/stylesheet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/stylesheet.rs')
-rw-r--r--components/script/dom/stylesheet.rs30
1 files changed, 19 insertions, 11 deletions
diff --git a/components/script/dom/stylesheet.rs b/components/script/dom/stylesheet.rs
index d53971cf927..94a26755699 100644
--- a/components/script/dom/stylesheet.rs
+++ b/components/script/dom/stylesheet.rs
@@ -22,9 +22,11 @@ pub struct StyleSheet {
impl StyleSheet {
#[allow(unrooted_must_root)]
- pub fn new_inherited(type_: DOMString,
- href: Option<DOMString>,
- title: Option<DOMString>) -> StyleSheet {
+ pub fn new_inherited(
+ type_: DOMString,
+ href: Option<DOMString>,
+ title: Option<DOMString>,
+ ) -> StyleSheet {
StyleSheet {
reflector_: Reflector::new(),
type_: type_,
@@ -34,16 +36,20 @@ impl StyleSheet {
}
#[allow(unrooted_must_root)]
- pub fn new(window: &Window, type_: DOMString,
- href: Option<DOMString>,
- title: Option<DOMString>) -> DomRoot<StyleSheet> {
- reflect_dom_object(Box::new(StyleSheet::new_inherited(type_, href, title)),
- window,
- StyleSheetBinding::Wrap)
+ pub fn new(
+ window: &Window,
+ type_: DOMString,
+ href: Option<DOMString>,
+ title: Option<DOMString>,
+ ) -> DomRoot<StyleSheet> {
+ reflect_dom_object(
+ Box::new(StyleSheet::new_inherited(type_, href, title)),
+ window,
+ StyleSheetBinding::Wrap,
+ )
}
}
-
impl StyleSheetMethods for StyleSheet {
// https://drafts.csswg.org/cssom/#dom-stylesheet-type
fn Type_(&self) -> DOMString {
@@ -67,6 +73,8 @@ impl StyleSheetMethods for StyleSheet {
// https://drafts.csswg.org/cssom/#dom-stylesheet-disabled
fn SetDisabled(&self, disabled: bool) {
- self.downcast::<CSSStyleSheet>().unwrap().set_disabled(disabled)
+ self.downcast::<CSSStyleSheet>()
+ .unwrap()
+ .set_disabled(disabled)
}
}