mirror of
https://github.com/servo/servo.git
synced 2025-07-04 05:53:39 +01:00
style: Fix layer statement with nested layer names
When we had: @layer A.B; We were registering "A" and "B", not "A" and "A.B", which was the intention. Fix is trivial. Depends on D124620 Differential Revision: https://phabricator.services.mozilla.com/D124621
This commit is contained in:
parent
a6f9a364db
commit
0cc049946e
1 changed files with 4 additions and 0 deletions
|
@ -2404,9 +2404,13 @@ impl CascadeData {
|
||||||
}
|
}
|
||||||
LayerRuleKind::Statement { ref names } => {
|
LayerRuleKind::Statement { ref names } => {
|
||||||
for name in &**names {
|
for name in &**names {
|
||||||
|
let mut pushed = 0;
|
||||||
for name in name.layer_names() {
|
for name in name.layer_names() {
|
||||||
current_layer.0.push(name.clone());
|
current_layer.0.push(name.clone());
|
||||||
maybe_register_layer(self, ¤t_layer);
|
maybe_register_layer(self, ¤t_layer);
|
||||||
|
pushed += 1;
|
||||||
|
}
|
||||||
|
for _ in 0..pushed {
|
||||||
current_layer.0.pop();
|
current_layer.0.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue