mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Implement ToCss serialization for CSSRules
This commit is contained in:
parent
22aebdf5d4
commit
fdbadcdce2
10 changed files with 198 additions and 28 deletions
|
@ -12,6 +12,7 @@ use dom::window::Window;
|
|||
use parking_lot::RwLock;
|
||||
use std::sync::Arc;
|
||||
use style::font_face::FontFaceRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSFontFaceRule {
|
||||
|
@ -44,7 +45,6 @@ impl SpecificCSSRule for CSSFontFaceRule {
|
|||
}
|
||||
|
||||
fn get_css(&self) -> DOMString {
|
||||
// self.fontfacerule.read().to_css_string().into()
|
||||
"".into()
|
||||
self.fontfacerule.read().to_css_string().into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ use dom::window::Window;
|
|||
use parking_lot::RwLock;
|
||||
use std::sync::Arc;
|
||||
use style::stylesheets::KeyframesRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSKeyframesRule {
|
||||
|
@ -44,7 +45,6 @@ impl SpecificCSSRule for CSSKeyframesRule {
|
|||
}
|
||||
|
||||
fn get_css(&self) -> DOMString {
|
||||
// self.keyframesrule.read().to_css_string().into()
|
||||
"".into()
|
||||
self.keyframesrule.read().to_css_string().into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ use dom::window::Window;
|
|||
use parking_lot::RwLock;
|
||||
use std::sync::Arc;
|
||||
use style::stylesheets::MediaRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSMediaRule {
|
||||
|
@ -45,7 +46,6 @@ impl SpecificCSSRule for CSSMediaRule {
|
|||
}
|
||||
|
||||
fn get_css(&self) -> DOMString {
|
||||
// self.mediarule.read().to_css_string().into()
|
||||
"".into()
|
||||
self.mediarule.read().to_css_string().into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ use dom::window::Window;
|
|||
use parking_lot::RwLock;
|
||||
use std::sync::Arc;
|
||||
use style::stylesheets::NamespaceRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSNamespaceRule {
|
||||
|
@ -44,7 +45,6 @@ impl SpecificCSSRule for CSSNamespaceRule {
|
|||
}
|
||||
|
||||
fn get_css(&self) -> DOMString {
|
||||
// self.namespacerule.read().to_css_string().into()
|
||||
"".into()
|
||||
self.namespacerule.read().to_css_string().into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ use dom::window::Window;
|
|||
use parking_lot::RwLock;
|
||||
use std::sync::Arc;
|
||||
use style::viewport::ViewportRule;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSSViewportRule {
|
||||
|
@ -44,7 +45,6 @@ impl SpecificCSSRule for CSSViewportRule {
|
|||
}
|
||||
|
||||
fn get_css(&self) -> DOMString {
|
||||
// self.viewportrule.read().to_css_string().into()
|
||||
"".into()
|
||||
self.viewportrule.read().to_css_string().into()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue