aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssfontfacerule.rs
diff options
context:
space:
mode:
authorchansuke <chansuke@georepublic.de>2018-09-18 23:24:15 +0900
committerJosh Matthews <josh@joshmatthews.net>2018-09-19 17:40:47 -0400
commitc37a345dc9f4dda6ea29c42f96f6c7201c42cbac (patch)
tree1f05b49bac02318455a59d5b143c186fd872bdb9 /components/script/dom/cssfontfacerule.rs
parent2ca7a134736bb4759ff209c1bc0b6dc3cc1984c9 (diff)
downloadservo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.tar.gz
servo-c37a345dc9f4dda6ea29c42f96f6c7201c42cbac.zip
Format script component
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()
}
}