aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssfontfacerule.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/cssfontfacerule.rs')
-rw-r--r--components/script/dom/cssfontfacerule.rs29
1 files changed, 21 insertions, 8 deletions
diff --git a/components/script/dom/cssfontfacerule.rs b/components/script/dom/cssfontfacerule.rs
index 8f2970abc39..5865ec76008 100644
--- a/components/script/dom/cssfontfacerule.rs
+++ b/components/script/dom/cssfontfacerule.rs
@@ -22,8 +22,10 @@ pub struct CSSFontFaceRule {
}
impl CSSFontFaceRule {
- fn new_inherited(parent_stylesheet: &CSSStyleSheet, fontfacerule: Arc<Locked<FontFaceRule>>)
- -> CSSFontFaceRule {
+ fn new_inherited(
+ parent_stylesheet: &CSSStyleSheet,
+ fontfacerule: Arc<Locked<FontFaceRule>>,
+ ) -> CSSFontFaceRule {
CSSFontFaceRule {
cssrule: CSSRule::new_inherited(parent_stylesheet),
fontfacerule: fontfacerule,
@@ -31,11 +33,19 @@ impl CSSFontFaceRule {
}
#[allow(unrooted_must_root)]
- pub fn new(window: &Window, parent_stylesheet: &CSSStyleSheet,
- fontfacerule: Arc<Locked<FontFaceRule>>) -> DomRoot<CSSFontFaceRule> {
- reflect_dom_object(Box::new(CSSFontFaceRule::new_inherited(parent_stylesheet, fontfacerule)),
- window,
- CSSFontFaceRuleBinding::Wrap)
+ pub fn new(
+ window: &Window,
+ parent_stylesheet: &CSSStyleSheet,
+ fontfacerule: Arc<Locked<FontFaceRule>>,
+ ) -> DomRoot<CSSFontFaceRule> {
+ reflect_dom_object(
+ Box::new(CSSFontFaceRule::new_inherited(
+ parent_stylesheet,
+ fontfacerule,
+ )),
+ window,
+ CSSFontFaceRuleBinding::Wrap,
+ )
}
}
@@ -47,6 +57,9 @@ impl SpecificCSSRule for CSSFontFaceRule {
fn get_css(&self) -> DOMString {
let guard = self.cssrule.shared_lock().read();
- self.fontfacerule.read_with(&guard).to_css_string(&guard).into()
+ self.fontfacerule
+ .read_with(&guard)
+ .to_css_string(&guard)
+ .into()
}
}