mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Allow style sharing for elements with ids as long as the ID is not being used for styling.
This commit is contained in:
parent
d031b5badb
commit
ad1309552d
5 changed files with 93 additions and 8 deletions
|
@ -159,6 +159,12 @@ impl SelectorMap<Rule> {
|
|||
|block| (block.specificity, block.source_order));
|
||||
}
|
||||
|
||||
/// Check whether we have rules for the given id
|
||||
#[inline]
|
||||
pub fn has_rules_for_id(&self, id: &Atom) -> bool {
|
||||
self.id_hash.get(id).is_some()
|
||||
}
|
||||
|
||||
/// Append to `rule_list` all universal Rules (rules with selector `*|*`) in
|
||||
/// `self` sorted by specificity and source order.
|
||||
pub fn get_universal_rules(&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue