Upgrade Stylo to 2024-11-01 (#34322)

* Upgrade Stylo to 2024-11-01

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

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

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Update test expectations

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-11-21 16:14:45 +01:00 committed by GitHub
parent a6db3cb702
commit 97f53021b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 44 additions and 90 deletions

View file

@ -2,18 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use style::values::generics::text::Spacing;
use style::values::specified::text::Spacing;
use crate::parsing::parse;
#[test]
fn negative_letter_spacing_should_parse_properly() {
use style::properties::longhands::letter_spacing;
use style::values::specified::length::{FontRelativeLength, Length, NoCalcLength};
use style::values::specified::length::{FontRelativeLength, LengthPercentage, NoCalcLength};
use style::values::specified::LetterSpacing;
let negative_value = parse_longhand!(letter_spacing, "-0.5em");
let expected = Spacing::Value(Length::NoCalc(NoCalcLength::FontRelative(
FontRelativeLength::Em(-0.5),
let expected = LetterSpacing(Spacing::Value(LengthPercentage::Length(
NoCalcLength::FontRelative(FontRelativeLength::Em(-0.5)),
)));
assert_eq!(negative_value, expected);
}
@ -22,10 +23,11 @@ fn negative_letter_spacing_should_parse_properly() {
fn negative_word_spacing_should_parse_properly() {
use style::properties::longhands::word_spacing;
use style::values::specified::length::{FontRelativeLength, LengthPercentage, NoCalcLength};
use style::values::specified::WordSpacing;
let negative_value = parse_longhand!(word_spacing, "-0.5em");
let expected = Spacing::Value(LengthPercentage::Length(NoCalcLength::FontRelative(
FontRelativeLength::Em(-0.5),
let expected = WordSpacing(Spacing::Value(LengthPercentage::Length(
NoCalcLength::FontRelative(FontRelativeLength::Em(-0.5)),
)));
assert_eq!(negative_value, expected);
}