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

@ -127,9 +127,9 @@ pub fn process_resolved_style_request<'dom>(
let style = &*layout_element.resolved_style();
let longhand_id = match *property {
PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
PropertyId::ShorthandAlias(id, _) | PropertyId::Shorthand(id) => {
return shorthand_to_css_string(id, style);
PropertyId::NonCustom(id) => match id.longhand_or_shorthand() {
Ok(longhand_id) => longhand_id,
Err(shorthand_id) => return shorthand_to_css_string(shorthand_id, style),
},
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name));
@ -263,9 +263,9 @@ pub fn process_resolved_style_request_for_unstyled_node<'dom>(
);
let style = styles.primary();
let longhand_id = match *property {
PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
PropertyId::ShorthandAlias(id, _) | PropertyId::Shorthand(id) => {
return shorthand_to_css_string(id, style);
PropertyId::NonCustom(id) => match id.longhand_or_shorthand() {
Ok(longhand_id) => longhand_id,
Err(shorthand_id) => return shorthand_to_css_string(shorthand_id, style),
},
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name));
@ -528,7 +528,7 @@ where
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()),