mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make replace_rules returning boolean.
We only use whether the return value is IMPORTANT_RULES_CHANGED or not, so we can just return true if an important rules was changed in the function. Also, we can just return false in case of animation rules changes sine for animation we can ensure there is no importan rules. Because of these changes, replace_rule_node does not borrow |result| so that we can drop a scope there.
This commit is contained in:
parent
fce7c2d885
commit
a921d1af22
2 changed files with 55 additions and 59 deletions
|
@ -770,11 +770,11 @@ fn compute_style<E, D>(_traversal: &D,
|
|||
)
|
||||
}
|
||||
CascadeWithReplacements(flags) => {
|
||||
let rules_changed = element.replace_rules(flags, context, data);
|
||||
let important_rules_changed = element.replace_rules(flags, context, data);
|
||||
element.cascade_primary_and_pseudos(
|
||||
context,
|
||||
data,
|
||||
rules_changed.important_rules_changed()
|
||||
important_rules_changed
|
||||
)
|
||||
}
|
||||
CascadeOnly => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue