Only cascade at a priority level rules that have declarations of that priority.

This commit is contained in:
Simon Sapin 2016-08-19 17:13:20 +02:00
parent 16bbc2f26e
commit a175c9981e
6 changed files with 99 additions and 36 deletions

View file

@ -93,6 +93,8 @@ fn test_parse_stylesheet() {
longhands::display::SpecifiedValue::none)),
Importance::Important),
]),
any_normal: false,
any_important: true,
},
}),
CSSRule::Style(StyleRule {
@ -138,6 +140,8 @@ fn test_parse_stylesheet() {
longhands::display::SpecifiedValue::block)),
Importance::Normal),
]),
any_normal: true,
any_important: false,
},
}),
CSSRule::Style(StyleRule {
@ -192,6 +196,8 @@ fn test_parse_stylesheet() {
(PropertyDeclaration::BackgroundClip(DeclaredValue::Initial),
Importance::Normal),
]),
any_normal: true,
any_important: false,
},
}),
CSSRule::Keyframes(KeyframesRule {