mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
240c05f13b
commit
6fbf006680
1 changed files with 4 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue