mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +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);
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[letter-spacing-percent-001.html]
|
||||
expected: FAIL
|
|
@ -1,12 +0,0 @@
|
|||
[letter-spacing-computed.html]
|
||||
[Property letter-spacing value '110%']
|
||||
expected: FAIL
|
||||
|
||||
[Property letter-spacing value '-5%']
|
||||
expected: FAIL
|
||||
|
||||
[Property letter-spacing value 'calc(10% - 20%)']
|
||||
expected: FAIL
|
||||
|
||||
[Property letter-spacing value 'calc(10px - (5% + 10%)']
|
||||
expected: FAIL
|
|
@ -1,12 +0,0 @@
|
|||
[letter-spacing-valid.html]
|
||||
[e.style['letter-spacing'\] = "120%" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['letter-spacing'\] = "-10%" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['letter-spacing'\] = "calc(2ch - 30%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['letter-spacing'\] = "calc(40% + 50px)" should set the property value]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[calc-letter-spacing.html]
|
||||
[testing letter-spacing: calc(100%)]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[calc-serialization-002.html]
|
||||
[testing calc((min(10px, 20%) + max(1rem, 2%)) * 2)]
|
||||
expected: FAIL
|
|
@ -40,6 +40,3 @@
|
|||
|
||||
['scale(calc(hypot(1) * 0.5))' as a computed value should serialize as 'matrix(0.5, 0, 0, 0.5, 0, 0)'.]
|
||||
expected: FAIL
|
||||
|
||||
['hypot(2px, 40%)' as a specified value should serialize as 'hypot(2px, 40%)'.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -4,9 +4,3 @@
|
|||
|
||||
['max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)' as a computed value should serialize as 'max(10px + (10px + min(10%, 30px)) * 2, 5% + 80px)'.]
|
||||
expected: FAIL
|
||||
|
||||
['max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)' as a specified value should serialize as 'max(10px + (2 * (10px + min(10%, 30px))), 5% + 5em)'.]
|
||||
expected: FAIL
|
||||
|
||||
['max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)' as a computed value should serialize as 'max(10px + (2 * (10px + min(10%, 30px))), 5% + 80px)'.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[round-function.html]
|
||||
[round(down, (7 - 1) / 3, 1) should be used-value-equivalent to 2]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-always-matches-negated-first-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-always-matches-negated-last-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-is-never-matches-negated-first-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-is-never-matches-negated-last-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-negated-first-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[negated-negated-last-of-type-when-ancestor-changes.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue