Upgrade Stylo to 2024-01-16 (#32066)

* Upgrade Stylo to 2024-01-16

* Fixup for https://phabricator.services.mozilla.com/D187736

* Fixup for https://phabricator.services.mozilla.com/D196415

* Fixup for https://phabricator.services.mozilla.com/D197147

* Fixup for https://phabricator.services.mozilla.com/D196194

* Fixup for https://phabricator.services.mozilla.com/D196195

* Update test expectations
This commit is contained in:
Oriol Brufau 2024-04-13 19:42:09 +02:00 committed by GitHub
parent 93bb276602
commit a5e97525a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 105 additions and 9370 deletions

View file

@ -637,7 +637,7 @@ fn create_font_declaration(
let mut declarations = SourcePropertyDeclaration::default();
let result = parse_one_declaration_into(
&mut declarations,
PropertyId::Shorthand(ShorthandId::Font),
PropertyId::NonCustom(ShorthandId::Font.into()),
value,
Origin::Author,
&UrlExtraData(url_data.get_arc()),
@ -766,10 +766,14 @@ pub fn process_resolved_style_request<'dom>(
);
let style = styles.primary();
let longhand_id = match *property {
PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
PropertyId::ShorthandAlias(..) | PropertyId::Shorthand(_) => return String::new(),
PropertyId::NonCustom(id) => {
match id.unaliased().as_longhand() {
Some(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
None => return String::new(),
}
},
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name));
},
@ -811,10 +815,14 @@ fn process_resolved_style_request_internal<'dom>(
let style = &*layout_el.resolved_style();
let longhand_id = match *property {
PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
PropertyId::ShorthandAlias(..) | PropertyId::Shorthand(_) => return String::new(),
PropertyId::NonCustom(id) => {
match id.unaliased().as_longhand() {
Some(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
None => return String::new(),
}
},
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name));
},