Commit 1fc2475b authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1729289 - Fix layer statement with nested layer names. r=boris

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
parent f4095b32
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2429,9 +2429,13 @@ impl CascadeData {
                        }
                        LayerRuleKind::Statement { ref names } => {
                            for name in &**names {
                                let mut pushed = 0;
                                for name in name.layer_names() {
                                    current_layer.0.push(name.clone());
                                    maybe_register_layer(self, &current_layer);
                                    pushed += 1;
                                }
                                for _ in 0..pushed {
                                    current_layer.0.pop();
                                }
                            }
+0 −2
Original line number Diff line number Diff line
[layer-basic.html]
  prefs: [layout.css.cascade-layers.enabled:true]
  [E4 Statement syntax]
    expected: FAIL
+0 −6
Original line number Diff line number Diff line
[layer-import.html]
  prefs: [layout.css.cascade-layers.enabled:true]

  [D5 Layer statement with imports]
    expected: FAIL

  [D6 Layer statement with imports]
    expected: FAIL