mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Make emtpy rule can be inserted into rule tree
This commit is contained in:
parent
f93c6dfbd5
commit
a6ceafe3da
1 changed files with 4 additions and 1 deletions
|
@ -210,7 +210,10 @@ impl RuleTree {
|
||||||
_ => {},
|
_ => {},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if any_normal {
|
// We really want to ensure empty rule nodes appear in the rule tree for
|
||||||
|
// devtools, this condition ensures that if we find an empty rule node, we
|
||||||
|
// insert it at the normal level.
|
||||||
|
if any_normal || !any_important {
|
||||||
if matches!(level, Transitions) && found_important {
|
if matches!(level, Transitions) && found_important {
|
||||||
// There can be at most one transition, and it will come at
|
// There can be at most one transition, and it will come at
|
||||||
// the end of the iterator. Stash it and apply it after
|
// the end of the iterator. Stash it and apply it after
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue