diff options
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r-- | components/style/selector_matching.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 228ff41af05..b1fbd5042e8 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -799,6 +799,13 @@ pub fn common_style_affecting_attributes() -> [CommonStyleAffectingAttributeInfo ] } +/// Attributes that, if present, disable style sharing. All legacy HTML attributes must be in +/// either this list or `common_style_affecting_attributes`. See the comment in +/// `synthesize_presentational_hints_for_legacy_attributes`. +pub fn rare_style_affecting_attributes() -> [Atom, ..1] { + [ atom!("border") ] +} + /// Determines whether the given element matches the given single selector. /// /// NB: If you add support for any new kinds of selectors to this routine, be sure to set @@ -993,6 +1000,12 @@ pub fn matches_simple_selector<'a,E,N>(selector: &SimpleSelector, matches_generic_nth_child(element, 0, 1, true, true) } + ServoNonzeroBorder => { + *shareable = false; + let elem = element.as_element(); + elem.has_nonzero_border() + } + Negation(ref negated) => { *shareable = false; !negated.iter().all(|s| matches_simple_selector(s, element, shareable)) |