mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
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:
parent
a6db3cb702
commit
97f53021b1
19 changed files with 44 additions and 90 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue