mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Format style component.
This commit is contained in:
parent
31fc6cd565
commit
8dab4d659a
120 changed files with 2207 additions and 1417 deletions
|
@ -46,7 +46,9 @@ pub trait ElementSnapshot: Sized {
|
|||
/// Gets the attribute information of the snapshot as a string.
|
||||
///
|
||||
/// Only for debugging purposes.
|
||||
fn debug_list_attributes(&self) -> String { String::new() }
|
||||
fn debug_list_attributes(&self) -> String {
|
||||
String::new()
|
||||
}
|
||||
|
||||
/// The ID attribute per this snapshot. Should only be called if
|
||||
/// `has_attrs()` returns true.
|
||||
|
@ -233,7 +235,8 @@ where
|
|||
// :lang() needs to match using the closest ancestor xml:lang="" or
|
||||
// lang="" attribtue from snapshots.
|
||||
NonTSPseudoClass::Lang(ref lang_arg) => {
|
||||
return self.element
|
||||
return self
|
||||
.element
|
||||
.match_element_lang(Some(self.get_lang()), lang_arg);
|
||||
},
|
||||
|
||||
|
@ -242,12 +245,14 @@ where
|
|||
|
||||
let flag = pseudo_class.state_flag();
|
||||
if flag.is_empty() {
|
||||
return self.element
|
||||
return self
|
||||
.element
|
||||
.match_non_ts_pseudo_class(pseudo_class, context, &mut |_, _| {});
|
||||
}
|
||||
match self.snapshot().and_then(|s| s.state()) {
|
||||
Some(snapshot_state) => snapshot_state.intersects(flag),
|
||||
None => self.element
|
||||
None => self
|
||||
.element
|
||||
.match_non_ts_pseudo_class(pseudo_class, context, &mut |_, _| {}),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue