mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move CSSStyleDeclaration.GetPropertyPriority logic to style
This commit is contained in:
parent
bd37f4e694
commit
fc6a536b3a
3 changed files with 32 additions and 36 deletions
|
@ -872,17 +872,6 @@ impl Element {
|
|||
self.sync_property_with_attrs_style();
|
||||
}
|
||||
|
||||
pub fn get_inline_style_declaration<F, R>(&self, property: &str, f: F) -> R
|
||||
where F: FnOnce(Option<&(PropertyDeclaration, Importance)>) -> R {
|
||||
let style_attr = self.style_attribute.borrow();
|
||||
if let Some(ref block) = *style_attr {
|
||||
let block = block.read();
|
||||
f(block.get(property))
|
||||
} else {
|
||||
f(None)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn serialize(&self, traversal_scope: TraversalScope) -> Fallible<DOMString> {
|
||||
let mut writer = vec![];
|
||||
match serialize(&mut writer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue