mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Upgrade Stylo to 2023-12-01 (#32032)
* Upgrade Stylo to 2023-12-01 * Fixup for https://phabricator.services.mozilla.com/D191362 * Fixup for https://phabricator.services.mozilla.com/D191522 * Fixup for https://phabricator.services.mozilla.com/D191613 * Fixup for https://phabricator.services.mozilla.com/D191161 * Fixup for https://phabricator.services.mozilla.com/D191615 * Fixup for https://phabricator.services.mozilla.com/D193048 * Fixup for https://phabricator.services.mozilla.com/D193547 * Update test expectations
This commit is contained in:
parent
89a4820519
commit
5acfce5b89
17 changed files with 88 additions and 274 deletions
|
@ -12,13 +12,17 @@ use style::custom_properties::{
|
|||
use style::font_metrics::FontMetrics;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::properties::style_structs::Font;
|
||||
use style::properties::{CustomDeclaration, CustomDeclarationValue};
|
||||
use style::properties::{CustomDeclaration, CustomDeclarationValue, StyleBuilder};
|
||||
use style::rule_cache::RuleCacheConditions;
|
||||
use style::rule_tree::CascadeLevel;
|
||||
use style::servo::media_queries::FontMetricsProvider;
|
||||
use style::stylesheets::container_rule::ContainerSizeQuery;
|
||||
use style::stylesheets::layer_rule::LayerOrder;
|
||||
use style::stylesheets::UrlExtraData;
|
||||
use style::stylist::Stylist;
|
||||
use style::values::computed::Length;
|
||||
use style::values::computed::{Context, Length};
|
||||
use test::{self, Bencher};
|
||||
use url::Url;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct DummyMetricsProvider;
|
||||
|
@ -40,13 +44,16 @@ fn cascade(
|
|||
name_and_value: &[(&str, &str)],
|
||||
inherited: &ComputedCustomProperties,
|
||||
) -> ComputedCustomProperties {
|
||||
let dummy_url_data = UrlExtraData::from(Url::parse("about:blank").unwrap());
|
||||
let declarations = name_and_value
|
||||
.iter()
|
||||
.map(|&(name, value)| {
|
||||
let mut input = ParserInput::new(value);
|
||||
let mut parser = Parser::new(&mut input);
|
||||
let name = Name::from(name);
|
||||
let value = CustomDeclarationValue::Value(SpecifiedValue::parse(&mut parser).unwrap());
|
||||
let value = CustomDeclarationValue::Value(
|
||||
SpecifiedValue::parse(&mut parser, &dummy_url_data).unwrap(),
|
||||
);
|
||||
CustomDeclaration { name, value }
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
@ -59,7 +66,16 @@ fn cascade(
|
|||
Box::new(DummyMetricsProvider),
|
||||
);
|
||||
let stylist = Stylist::new(device, QuirksMode::NoQuirks);
|
||||
let mut builder = CustomPropertiesBuilder::new(inherited, &stylist, false);
|
||||
let mut builder = StyleBuilder::new(stylist.device(), Some(&stylist), None, None, None, false);
|
||||
builder.custom_properties = inherited.clone();
|
||||
let mut rule_cache_conditions = RuleCacheConditions::default();
|
||||
let context = Context::new(
|
||||
builder,
|
||||
stylist.quirks_mode(),
|
||||
&mut rule_cache_conditions,
|
||||
ContainerSizeQuery::none(),
|
||||
);
|
||||
let mut builder = CustomPropertiesBuilder::new(&stylist, &context);
|
||||
|
||||
for declaration in &declarations {
|
||||
builder.cascade(
|
||||
|
|
|
@ -67,7 +67,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec<Vec<Rule>>, SharedRwLock) {
|
|||
let guard = shared_lock.read();
|
||||
let rule = locked.read_with(&guard);
|
||||
rule.selectors
|
||||
.0
|
||||
.slice()
|
||||
.iter()
|
||||
.map(|s| {
|
||||
Rule::new(
|
||||
|
@ -93,10 +93,11 @@ fn parse_selectors(selectors: &[&str]) -> Vec<Selector<SelectorImpl>> {
|
|||
.map(|x| {
|
||||
SelectorParser::parse_author_origin_no_namespace(x, &dummy_url_data)
|
||||
.unwrap()
|
||||
.0
|
||||
.slice()
|
||||
.into_iter()
|
||||
.next()
|
||||
.unwrap()
|
||||
.clone()
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[nested-color-mix-with-currentcolor.html]
|
||||
[Nested color-mix function with inner currentColor should inherit unresolved]
|
||||
expected: FAIL
|
|
@ -17,9 +17,6 @@
|
|||
[Property color value 'color-mix(in hsl specified hue, hsl(320deg 50% 50%), hsl(20deg 50% 50%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl, hsl(120deg 40% 40% / none), hsl(0deg 40% 40% / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl, color(display-p3 0 1 0) 100%, rgb(0, 0, 0) 0%)']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -65,9 +62,6 @@
|
|||
[Property color value 'color-mix(in hwb specified hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hwb, hwb(120deg 10% 20% / none), hwb(30deg 30% 40% / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hwb, color(display-p3 0 1 0) 100%, rgb(0, 0, 0) 0%)']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -377,12 +371,6 @@
|
|||
[Property color value 'color-mix(in oklab, oklab(10 20 30 / none), oklab(50 60 70 / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, transparent, lch(0.3 0.4 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, transparent 10%, lch(0.3 0.4 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent, oklch(30 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -395,29 +383,8 @@
|
|||
[Property color value 'color-mix(in oklch, oklch(10 20 120deg / 0) 10%, oklch(30 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent, oklch(0.3 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent 10%, oklch(0.3 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl longer hue, hsl(60deg 50% 50%), hsl(60deg 50% 50%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, lab(50 0 0), black)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, oklab(0.5 0 0), black)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, white, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, white 10%, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, white, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, white 10%, blue)']
|
||||
expected: FAIL
|
||||
|
|
|
@ -10,45 +10,3 @@
|
|||
|
||||
[e.style['color'\] = "hsl(90 50% 50% / calc(-infinity))" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30% 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30% 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50% / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 none 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 none 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 none / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50 / none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(30 -50% 60)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(0 -50 40%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(30 -50 60)" should set the property value]
|
||||
expected: FAIL
|
||||
|
|
|
@ -10,36 +10,3 @@
|
|||
|
||||
[e.style['color'\] = "hwb(90 20% 10% / calc(-infinity))" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30% 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30% 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50% / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 none 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 none 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 none / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50 / none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,24 @@
|
|||
[animation-002.html]
|
||||
expected: CRASH
|
||||
[Logical properties in animations respect the writing-mode]
|
||||
expected: FAIL
|
||||
|
||||
[Logical properties are able to override physical properties in @keyframes declaration blocks]
|
||||
expected: FAIL
|
||||
|
||||
[Declaration order is respected amongst logical properties within @keyframes declaration blocks]
|
||||
expected: FAIL
|
||||
|
||||
[Animations update when the writing-mode is changed]
|
||||
expected: FAIL
|
||||
|
||||
[Filling animations update when the writing-mode is changed]
|
||||
expected: FAIL
|
||||
|
||||
[The number of interpolating properties can be increased when the writing-mode is changed]
|
||||
expected: FAIL
|
||||
|
||||
[The number of interpolating properties can be decreased when the writing-mode is changed]
|
||||
expected: FAIL
|
||||
|
||||
[Animations update when the writing-mode is changed through a CSS variable]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[viewport-units-extreme-scale.html]
|
||||
[calc((1vw - 6.3999px) * 10000000) computes to 1000px]
|
||||
expected: FAIL
|
||||
|
||||
[calc((100vh - 479px) * 60000) computes to 60000px]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[nested-color-mix-with-currentcolor.html]
|
||||
[Nested color-mix function with inner currentColor should inherit unresolved]
|
||||
expected: FAIL
|
|
@ -17,9 +17,6 @@
|
|||
[Property color value 'color-mix(in hsl specified hue, hsl(320deg 50% 50%), hsl(20deg 50% 50%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl, hsl(120deg 40% 40% / none), hsl(0deg 40% 40% / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl, color(display-p3 0 1 0) 100%, rgb(0, 0, 0) 0%)']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -65,9 +62,6 @@
|
|||
[Property color value 'color-mix(in hwb specified hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hwb, hwb(120deg 10% 20% / none), hwb(30deg 30% 40% / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hwb, color(display-p3 0 1 0) 100%, rgb(0, 0, 0) 0%)']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -377,12 +371,6 @@
|
|||
[Property color value 'color-mix(in oklab, oklab(10 20 30 / none), oklab(50 60 70 / none))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, transparent, lch(0.3 0.4 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, transparent 10%, lch(0.3 0.4 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent, oklch(30 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -395,29 +383,8 @@
|
|||
[Property color value 'color-mix(in oklch, oklch(10 20 120deg / 0) 10%, oklch(30 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent, oklch(0.3 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, transparent 10%, oklch(0.3 40 30deg))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in hsl longer hue, hsl(60deg 50% 50%), hsl(60deg 50% 50%))']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, lab(50 0 0), black)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, oklab(0.5 0 0), black)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, white, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in lch, white 10%, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, white, blue)']
|
||||
expected: FAIL
|
||||
|
||||
[Property color value 'color-mix(in oklch, white 10%, blue)']
|
||||
expected: FAIL
|
||||
|
|
|
@ -10,45 +10,3 @@
|
|||
|
||||
[e.style['color'\] = "hsl(90 50% 50% / calc(-infinity))" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30% 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30% 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50% / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 none 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 none 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 none / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(120 30 50 / none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(30 -50% 60)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(0 -50 40%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hsl(30 -50 60)" should set the property value]
|
||||
expected: FAIL
|
||||
|
|
|
@ -10,36 +10,3 @@
|
|||
|
||||
[e.style['color'\] = "hwb(90 20% 10% / calc(-infinity))" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30% 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30% 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50% / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 none 50)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 none 50 / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 none / 0.5)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "hwb(120 30 50 / none)" should set the property value]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
[animation-002.html]
|
||||
expected: CRASH
|
||||
bug: https://github.com/servo/servo/issues/29891
|
||||
|
||||
[Logical properties in animations respect the writing-mode]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -29,8 +27,5 @@
|
|||
[Animations update when the writing-mode is changed through a CSS variable]
|
||||
expected: FAIL
|
||||
|
||||
[Logical shorthand with variable references animates correctly]
|
||||
expected: FAIL
|
||||
|
||||
[Animations update when the direction is changed]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue