mirror of
https://github.com/servo/servo.git
synced 2025-08-17 19:35:33 +01:00
Update Stylo to 2023-10-16 (#31932)
* Update Stylo to 2023-10-16 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D188216 * Fixup for https://phabricator.services.mozilla.com/D185677 * Fixup for https://phabricator.services.mozilla.com/D188566 * Fixup for https://phabricator.services.mozilla.com/D188727 * Fixup for https://phabricator.services.mozilla.com/D189475 * Fixup for https://phabricator.services.mozilla.com/D189521 * Fixup for https://phabricator.services.mozilla.com/D188812 * Fixup for https://phabricator.services.mozilla.com/D189484 * Update test expectations
This commit is contained in:
parent
a7ad92d9a3
commit
fff9ef87e6
48 changed files with 97 additions and 181 deletions
|
@ -21,9 +21,10 @@ fn srgb_legacy_from_floats(red: f32, green: f32, blue: f32, alpha: f32) -> Absol
|
|||
// Color
|
||||
#[test]
|
||||
fn test_rgba_color_interepolation_preserves_transparent() {
|
||||
let transparent = AbsoluteColor::TRANSPARENT_BLACK;
|
||||
assert_eq!(
|
||||
interpolate_color(AbsoluteColor::TRANSPARENT, AbsoluteColor::TRANSPARENT, 0.5),
|
||||
AbsoluteColor::TRANSPARENT
|
||||
interpolate_color(transparent, transparent, 0.5),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use euclid::{Scale, Size2D};
|
||||
use servo_arc::Arc;
|
||||
use style::applicable_declarations::CascadePriority;
|
||||
use style::context::QuirksMode;
|
||||
use style::custom_properties::{
|
||||
CustomPropertiesBuilder, CustomPropertiesMap, Name, SpecifiedValue,
|
||||
ComputedCustomProperties, CustomPropertiesBuilder, Name, SpecifiedValue,
|
||||
};
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::properties::{CustomDeclaration, CustomDeclarationValue};
|
||||
|
@ -19,8 +18,8 @@ use test::{self, Bencher};
|
|||
|
||||
fn cascade(
|
||||
name_and_value: &[(&str, &str)],
|
||||
inherited: Option<&Arc<CustomPropertiesMap>>,
|
||||
) -> Option<Arc<CustomPropertiesMap>> {
|
||||
inherited: &ComputedCustomProperties,
|
||||
) -> ComputedCustomProperties {
|
||||
let declarations = name_and_value
|
||||
.iter()
|
||||
.map(|&(name, value)| {
|
||||
|
@ -39,7 +38,7 @@ fn cascade(
|
|||
Scale::new(1.0),
|
||||
);
|
||||
let stylist = Stylist::new(device, QuirksMode::NoQuirks);
|
||||
let mut builder = CustomPropertiesBuilder::new(inherited, &stylist);
|
||||
let mut builder = CustomPropertiesBuilder::new(inherited, &stylist, false);
|
||||
|
||||
for declaration in &declarations {
|
||||
builder.cascade(
|
||||
|
@ -54,11 +53,14 @@ fn cascade(
|
|||
#[bench]
|
||||
fn cascade_custom_simple(b: &mut Bencher) {
|
||||
b.iter(|| {
|
||||
let parent = cascade(&[("foo", "10px"), ("bar", "100px")], None);
|
||||
let parent = cascade(
|
||||
&[("foo", "10px"), ("bar", "100px")],
|
||||
&ComputedCustomProperties::default(),
|
||||
);
|
||||
|
||||
test::black_box(cascade(
|
||||
&[("baz", "calc(40em + 4px)"), ("bazz", "calc(30em + 4px)")],
|
||||
parent.as_ref(),
|
||||
&parent,
|
||||
))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
[opacity-valid.html]
|
||||
[e.style['opacity'\] = "clamp(50%, 0%, 70%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "clamp(50%, 80%, 70%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "min(50%, 0%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "max(0%, 50%)" should set the property value]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[rlh-in-monospace.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[getComputedStyle-calc-mixed-units-002.html]
|
||||
[testing width: calc(8lh + 7px)]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lh-unit-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lh-unit-002.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[lh-unit-005.html]
|
||||
[lh relative to line-height inherited from parent]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[rlh-invalidation.html]
|
||||
[CSS Values and Units Test: rlh invalidation]
|
||||
expected: FAIL
|
|
@ -82,21 +82,3 @@
|
|||
|
||||
[widows: inherit]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr( |bar )]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo-bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo_bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(|bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo, "")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr( |foo , "" )]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[parent-style-relative-units.html]
|
||||
[Font-size based on canvas element line-height]
|
||||
expected: FAIL
|
|
@ -1,12 +0,0 @@
|
|||
[opacity-valid.html]
|
||||
[e.style['opacity'\] = "clamp(50%, 0%, 70%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "clamp(50%, 80%, 70%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "min(50%, 0%)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['opacity'\] = "max(0%, 50%)" should set the property value]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[rlh-in-monospace.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[getComputedStyle-calc-mixed-units-002.html]
|
||||
[testing width: calc(8lh + 7px)]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lh-unit-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lh-unit-002.html]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[lh-unit-005.html]
|
||||
[lh relative to line-height inherited from parent]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[rlh-invalidation.html]
|
||||
[CSS Values and Units Test: rlh invalidation]
|
||||
expected: FAIL
|
|
@ -148,21 +148,3 @@
|
|||
|
||||
[unicode-bidi: inherit]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr( |bar )]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo-bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo_bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(|bar, "fallback")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr(foo, "")]
|
||||
expected: FAIL
|
||||
|
||||
[content: attr( |foo , "" )]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[parent-style-relative-units.html]
|
||||
[Font-size based on canvas element line-height]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue