mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Dishonor display: -moz-box if -webkit-box was specified before.
Bug: 1407701
This commit is contained in:
parent
25c303ee62
commit
6d694a4bcd
2 changed files with 46 additions and 0 deletions
|
@ -500,6 +500,25 @@ impl PropertyDeclarationBlock {
|
|||
return true;
|
||||
}
|
||||
DeclarationSource::Parsing => {
|
||||
// As a compatibility hack, specially on Android,
|
||||
// don't allow to override a prefixed webkit display
|
||||
// value with an unprefixed version from parsing
|
||||
// code.
|
||||
//
|
||||
// TODO(emilio): Unship.
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE(emilio): We could avoid this and just override for
|
||||
// properties not affected by logical props, but it's not
|
||||
// clear it's worth it given the `definitely_new` check.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue