mirror of
https://github.com/servo/servo.git
synced 2025-07-29 10:10:34 +01:00
Use SmallBitVec for important flags in PDB
This commit is contained in:
parent
21006fb752
commit
a5a0e9ffe8
7 changed files with 129 additions and 114 deletions
|
@ -1211,15 +1211,15 @@ impl StrongRuleNode {
|
|||
for node in element_rule_node.self_and_ancestors() {
|
||||
let source = node.style_source();
|
||||
let declarations = if source.is_some() {
|
||||
source.read(node.cascade_level().guard(guards)).declarations()
|
||||
source.read(node.cascade_level().guard(guards)).declaration_importance_iter()
|
||||
} else {
|
||||
continue
|
||||
};
|
||||
|
||||
// Iterate over declarations of the longhands we care about.
|
||||
let node_importance = node.importance();
|
||||
let longhands = declarations.iter().rev()
|
||||
.filter_map(|&(ref declaration, importance)| {
|
||||
let longhands = declarations.rev()
|
||||
.filter_map(|(declaration, importance)| {
|
||||
if importance != node_importance { return None }
|
||||
match declaration.id() {
|
||||
PropertyDeclarationId::Longhand(id) => {
|
||||
|
@ -1329,9 +1329,8 @@ impl StrongRuleNode {
|
|||
let mut result = (LonghandIdSet::new(), false);
|
||||
for node in iter {
|
||||
let style = node.style_source();
|
||||
for &(ref decl, important) in style.read(node.cascade_level().guard(guards))
|
||||
.declarations()
|
||||
.iter() {
|
||||
for (decl, important) in style.read(node.cascade_level().guard(guards))
|
||||
.declaration_importance_iter() {
|
||||
// Although we are only iterating over cascade levels that
|
||||
// override animations, in a given property declaration block we
|
||||
// can have a mixture of !important and non-!important
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue