mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Refactor the traversal so it's more easy to read and straight-forward.
This commit is contained in:
parent
8859aa004f
commit
2594cb9c33
5 changed files with 162 additions and 113 deletions
|
@ -184,13 +184,11 @@ impl RuleTree {
|
|||
/// Replaces a rule in a given level (if present) for another rule.
|
||||
///
|
||||
/// Returns the resulting node that represents the new path.
|
||||
///
|
||||
/// TODO(emilio): Maybe this should be in `StrongRuleNode`?
|
||||
pub fn replace_rule_at_level_if_applicable(&self,
|
||||
level: CascadeLevel,
|
||||
pdb: Option<&Arc<RwLock<PropertyDeclarationBlock>>>,
|
||||
path: StrongRuleNode)
|
||||
-> StrongRuleNode {
|
||||
pub fn update_rule_at_level(&self,
|
||||
level: CascadeLevel,
|
||||
pdb: Option<&Arc<RwLock<PropertyDeclarationBlock>>>,
|
||||
path: StrongRuleNode)
|
||||
-> StrongRuleNode {
|
||||
debug_assert!(level.is_unique_per_element());
|
||||
// TODO(emilio): Being smarter with lifetimes we could avoid a bit of
|
||||
// the refcount churn.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue