style: Fixup the hack added in #18867.

The declaration can indeed have the same id if it contains variables, or is a
CSS keyword value.

This was making a WPT test fail, so this is tested, though Servo's WPT import
didn't catch this for some reason.
This commit is contained in:
Emilio Cobos Álvarez 2017-10-14 15:28:10 +02:00
parent 240c05f13b
commit 6fbf006680
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -509,13 +509,10 @@ impl PropertyDeclarationBlock {
if let PropertyDeclaration::Display(old_display) = *slot {
use properties::longhands::display::computed_value::T as display;
let new_display = match declaration {
PropertyDeclaration::Display(new_display) => new_display,
_ => unreachable!("How could the declaration id be the same?"),
};
if display::should_ignore_parsed_value(old_display, new_display) {
return false;
if let PropertyDeclaration::Display(new_display) = declaration {
if display::should_ignore_parsed_value(old_display, new_display) {
return false;
}
}
}