From c07484fcb605a9ab0a3f9fba4cb4ddd24d89cb87 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Mon, 18 Mar 2024 14:52:40 +0100 Subject: [PATCH] Update Stylo to 2023-09-01 (#31609) * Update Stylo to 2023-09-01 * Fixup for https://phabricator.services.mozilla.com/D184929 * Fixup for https://phabricator.services.mozilla.com/D184526 * Fixup for https://phabricator.services.mozilla.com/D184525 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D184685 * Fixup for https://phabricator.services.mozilla.com/D185916 * Fixup for https://phabricator.services.mozilla.com/D185492 * Fixup for https://phabricator.services.mozilla.com/D186626 * Update test expectations --- Cargo.lock | 37 ++++++------ Cargo.toml | 20 +++---- components/canvas/canvas_data.rs | 6 +- components/canvas/raqote_backend.rs | 30 +++++----- components/layout/display_list/builder.rs | 16 ++--- components/layout/display_list/gradient.rs | 10 +++- components/layout/table_row.rs | 2 +- .../layout_2020/display_list/gradient.rs | 49 ++++++++------- components/script/canvas_state.rs | 41 ++++++------- components/script/dom/element.rs | 29 +++++++++ components/script/dom/htmlbodyelement.rs | 10 ++-- components/script/dom/htmlfontelement.rs | 6 +- components/script/dom/htmlhrelement.rs | 6 +- components/script/dom/htmlstyleelement.rs | 1 - components/script/dom/htmltablecellelement.rs | 6 +- components/script/dom/htmltableelement.rs | 6 +- components/script/dom/htmltablerowelement.rs | 6 +- .../script/dom/htmltablesectionelement.rs | 6 +- components/script/dom/node.rs | 6 +- components/script/layout_dom/element.rs | 14 +++++ components/shared/canvas/canvas.rs | 8 +-- tests/unit/style/animated_properties.rs | 60 ++++++++++++------- tests/unit/style/custom_properties.rs | 4 +- tests/unit/style/rule_tree/bench.rs | 1 - tests/unit/style/stylesheets.rs | 26 ++++---- .../syntax/malformed-decl-block-001.xht.ini | 2 - .../animation/color-interpolation.html.ini | 27 --------- .../css/css-color/lab-l-over-100-1.html.ini | 2 - .../css/css-color/lab-l-over-100-2.html.ini | 2 - .../css/css-color/lch-l-over-100-1.html.ini | 2 - .../css/css-color/lch-l-over-100-2.html.ini | 2 - .../css/css-color/oklab-l-over-1-1.html.ini | 2 - .../css/css-color/oklab-l-over-1-2.html.ini | 2 - .../css/css-color/oklch-l-over-1-1.html.ini | 2 - .../css/css-color/oklch-l-over-1-2.html.ini | 2 - .../parsing/color-computed-lab.html.ini | 18 ------ .../color-valid-color-mix-function.html.ini | 12 ---- .../parsing/color-valid-lab.html.ini | 18 ------ .../css-conditional/at-supports-048.html.ini | 2 - ...timing-functions-syntax.tentative.html.ini | 33 ---------- .../transition-timing-function-valid.html.ini | 9 --- .../css-transitions/transition-001.html.ini | 3 - .../css-values/clamp-length-computed.html.ini | 3 - .../clamp-length-serialize.html.ini | 12 ---- .../css-variables/revert-in-fallback.html.ini | 3 - .../wide-keyword-fallback-002.html.ini | 2 - .../syntax/malformed-decl-block-001.xht.ini | 2 - .../animation/color-interpolation.html.ini | 27 --------- .../css/css-color/lab-l-over-100-1.html.ini | 2 - .../css/css-color/lab-l-over-100-2.html.ini | 2 - .../css/css-color/lch-l-over-100-1.html.ini | 2 - .../css/css-color/lch-l-over-100-2.html.ini | 2 - .../css/css-color/oklab-l-over-1-1.html.ini | 2 - .../css/css-color/oklab-l-over-1-2.html.ini | 2 - .../css/css-color/oklch-l-over-1-1.html.ini | 2 - .../css/css-color/oklch-l-over-1-2.html.ini | 2 - .../parsing/color-computed-lab.html.ini | 18 ------ .../color-valid-color-mix-function.html.ini | 12 ---- .../parsing/color-valid-lab.html.ini | 18 ------ .../css-conditional/at-supports-048.html.ini | 2 - ...timing-functions-syntax.tentative.html.ini | 33 ---------- .../transition-timing-function-valid.html.ini | 9 --- .../css-transitions/transition-001.html.ini | 3 - .../css-values/clamp-length-computed.html.ini | 3 - .../clamp-length-serialize.html.ini | 12 ---- .../css-variables/revert-in-fallback.html.ini | 3 - .../wide-keyword-fallback-002.html.ini | 2 - 67 files changed, 235 insertions(+), 491 deletions(-) delete mode 100644 tests/wpt/meta-legacy-layout/css/CSS2/syntax/malformed-decl-block-001.xht.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-1.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-2.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-1.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-2.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-1.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-2.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-1.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-2.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-conditional/at-supports-048.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-easing/linear-timing-functions-syntax.tentative.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-transitions/transition-001.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-values/clamp-length-serialize.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-variables/wide-keyword-fallback-002.html.ini delete mode 100644 tests/wpt/meta/css/CSS2/syntax/malformed-decl-block-001.xht.ini delete mode 100644 tests/wpt/meta/css/css-color/lab-l-over-100-1.html.ini delete mode 100644 tests/wpt/meta/css/css-color/lab-l-over-100-2.html.ini delete mode 100644 tests/wpt/meta/css/css-color/lch-l-over-100-1.html.ini delete mode 100644 tests/wpt/meta/css/css-color/lch-l-over-100-2.html.ini delete mode 100644 tests/wpt/meta/css/css-color/oklab-l-over-1-1.html.ini delete mode 100644 tests/wpt/meta/css/css-color/oklab-l-over-1-2.html.ini delete mode 100644 tests/wpt/meta/css/css-color/oklch-l-over-1-1.html.ini delete mode 100644 tests/wpt/meta/css/css-color/oklch-l-over-1-2.html.ini delete mode 100644 tests/wpt/meta/css/css-conditional/at-supports-048.html.ini delete mode 100644 tests/wpt/meta/css/css-easing/linear-timing-functions-syntax.tentative.html.ini delete mode 100644 tests/wpt/meta/css/css-transitions/transition-001.html.ini delete mode 100644 tests/wpt/meta/css/css-values/clamp-length-computed.html.ini delete mode 100644 tests/wpt/meta/css/css-values/clamp-length-serialize.html.ini delete mode 100644 tests/wpt/meta/css/css-variables/revert-in-fallback.html.ini delete mode 100644 tests/wpt/meta/css/css-variables/wide-keyword-fallback-002.html.ini diff --git a/Cargo.lock b/Cargo.lock index a4c448f60d5..e40d3f5db73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1092,9 +1092,9 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.31.2" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3df4f93e5fbbe73ec01ec8d3f68bba73107993a5b1e7519273c32db9b0d5be" +checksum = "2d54fe63cb80af11947c98a880393db44448d0b512f9b6c318398ae355794cb9" dependencies = [ "cssparser-macros", "dtoa-short", @@ -1121,7 +1121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ "bitflags 2.4.2", - "libloading 0.7.4", + "libloading 0.8.3", "winapi", ] @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "derive_common" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "darling", "proc-macro2", @@ -1317,7 +1317,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.3", ] [[package]] @@ -3464,7 +3464,7 @@ dependencies = [ [[package]] name = "malloc_size_of" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "accountable-refcell", "app_units", @@ -5075,7 +5075,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.24.0" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "bitflags 1.3.2", "cssparser", @@ -5363,7 +5363,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.2.0" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "nodrop", "serde", @@ -5373,7 +5373,7 @@ dependencies = [ [[package]] name = "servo_atoms" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "string_cache", "string_cache_codegen", @@ -5579,7 +5579,7 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "size_of_test" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "static_assertions", ] @@ -5705,7 +5705,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "static_prefs" version = "0.1.0" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" [[package]] name = "str-buf" @@ -5748,7 +5748,7 @@ dependencies = [ [[package]] name = "style" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "app_units", "arrayvec", @@ -5779,6 +5779,7 @@ dependencies = [ "parking_lot", "precomputed-hash", "rayon", + "rayon-core", "selectors", "serde", "servo_arc", @@ -5806,7 +5807,7 @@ dependencies = [ [[package]] name = "style_config" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "lazy_static", ] @@ -5814,7 +5815,7 @@ dependencies = [ [[package]] name = "style_derive" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "darling", "derive_common", @@ -5845,7 +5846,7 @@ dependencies = [ [[package]] name = "style_traits" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "app_units", "bitflags 1.3.2", @@ -6188,7 +6189,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "cssparser", "servo_arc", @@ -6201,7 +6202,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.0.1" -source = "git+https://github.com/servo/stylo.git?branch=2023-07-23#2c775e4f7269d7f2018fdb70d6f15dc49d3460e2" +source = "git+https://github.com/servo/stylo.git?branch=2023-09-01#1e35d0e9ef342928a070af2e94d9369b0cffadb0" dependencies = [ "darling", "derive_common", @@ -7021,7 +7022,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.7.4", + "libloading 0.8.3", "log", "metal 0.27.0", "naga", diff --git a/Cargo.toml b/Cargo.toml index 2b86c25f1f1..08c42343d5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ compositing_traits = { path = "components/shared/compositing" } content-security-policy = { version = "0.5", features = ["serde"] } cookie = "0.12" crossbeam-channel = "0.5" -cssparser = "0.31.2" +cssparser = "0.32" darling = { version = "0.20", default-features = false } data-url = "0.1.0" devtools_traits = { path = "components/shared/devtools" } @@ -64,7 +64,7 @@ keyboard-types = "0.6" lazy_static = "1.4" libc = "0.2" log = "0.4" -malloc_size_of = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23", features = ["servo"] } +malloc_size_of = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01", features = ["servo"] } malloc_size_of_derive = "0.1" mime = "0.3.13" mime_guess = "2.0.3" @@ -87,31 +87,31 @@ rustls = { version = "0.21.10", features = ["dangerous_configuration"] } rustls-pemfile = "1.0.4" script_layout_interface = { path = "components/shared/script_layout" } script_traits = { path = "components/shared/script" } -selectors = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } +selectors = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } serde = "1.0.197" serde_bytes = "0.11" serde_json = "1.0" servo-media = { git = "https://github.com/servo/media" } servo-media-dummy = { git = "https://github.com/servo/media" } servo-media-gstreamer = { git = "https://github.com/servo/media" } -servo_arc = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } -servo_atoms = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } -size_of_test = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } +servo_arc = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } +servo_atoms = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } +size_of_test = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } smallbitvec = "2.5.2" smallvec = "1.13" sparkle = "0.1.26" string_cache = "0.8" string_cache_codegen = "0.5" -style = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23", features = ["servo"] } -style_config = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } -style_traits = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23", features = ["servo"] } +style = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01", features = ["servo"] } +style_config = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } +style_traits = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01", features = ["servo"] } # NOTE: the sm-angle feature only enables ANGLE on Windows, not other platforms! surfman = { version = "0.9", features = ["chains", "sm-angle", "sm-angle-default"] } syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } synstructure = "0.13" thin-vec = "0.2.13" time = "0.1.41" -to_shmem = { git = "https://github.com/servo/stylo.git", branch = "2023-07-23" } +to_shmem = { git = "https://github.com/servo/stylo.git", branch = "2023-09-01" } tokio = "1" tokio-rustls = "0.24" tungstenite = "0.20" diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index b125eb4e65c..c9855b1937b 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -7,7 +7,7 @@ use std::mem; use std::sync::{Arc, Mutex}; use canvas_traits::canvas::*; -use cssparser::RGBA; +use cssparser::RgbaLegacy; use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D}; use euclid::{point2, vec2}; use font_kit::family_name::FamilyName; @@ -74,7 +74,7 @@ impl PathState { pub trait Backend { fn get_composition_op(&self, opts: &DrawOptions) -> CompositionOp; fn need_to_draw_shadow(&self, color: &Color) -> bool; - fn set_shadow_color(&mut self, color: RGBA, state: &mut CanvasPaintState<'_>); + fn set_shadow_color(&mut self, color: RgbaLegacy, state: &mut CanvasPaintState<'_>); fn set_fill_style( &mut self, style: FillOrStrokeStyle, @@ -1156,7 +1156,7 @@ impl<'a> CanvasData<'a> { self.state.shadow_blur = value; } - pub fn set_shadow_color(&mut self, value: RGBA) { + pub fn set_shadow_color(&mut self, value: RgbaLegacy) { self.backend.set_shadow_color(value, &mut self.state); } diff --git a/components/canvas/raqote_backend.rs b/components/canvas/raqote_backend.rs index aa3737897eb..ae7266475af 100644 --- a/components/canvas/raqote_backend.rs +++ b/components/canvas/raqote_backend.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use canvas_traits::canvas::*; -use cssparser::RGBA; +use cssparser::RgbaLegacy; use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D}; use euclid::Angle; use font_kit::font::Font; @@ -29,7 +29,7 @@ impl Backend for RaqoteBackend { color.as_raqote().a != 0 } - fn set_shadow_color(&mut self, color: RGBA, state: &mut CanvasPaintState<'_>) { + fn set_shadow_color(&mut self, color: RgbaLegacy, state: &mut CanvasPaintState<'_>) { state.shadow_color = Color::Raqote(color.to_raqote_style()); } @@ -880,10 +880,10 @@ pub fn clamp_floor_256_f32(val: f32) -> u8 { impl ToRaqoteGradientStop for CanvasGradientStop { fn to_raqote(self) -> raqote::GradientStop { let color = raqote::Color::new( - self.color.alpha.map(clamp_unit_f32).unwrap_or(0), - self.color.red.unwrap_or(0), - self.color.green.unwrap_or(0), - self.color.blue.unwrap_or(0), + clamp_unit_f32(self.color.alpha), + self.color.red, + self.color.green, + self.color.blue, ); let position = self.offset as f32; raqote::GradientStop { position, color } @@ -897,10 +897,10 @@ impl ToRaqotePattern<'_> for FillOrStrokeStyle { match self { Color(color) => Some(Pattern::Color( - color.alpha.map(clamp_unit_f32).unwrap_or(0), - color.red.unwrap_or(0), - color.green.unwrap_or(0), - color.blue.unwrap_or(0), + clamp_unit_f32(color.alpha), + color.red, + color.green, + color.blue, )), LinearGradient(style) => { let start = Point2D::new(style.x0 as f32, style.y0 as f32); @@ -951,15 +951,15 @@ impl Color { } } -impl ToRaqoteStyle for RGBA { +impl ToRaqoteStyle for RgbaLegacy { type Target = raqote::SolidSource; fn to_raqote_style(self) -> Self::Target { raqote::SolidSource::from_unpremultiplied_argb( - self.alpha.map(clamp_unit_f32).unwrap_or(0), - self.red.unwrap_or(0), - self.green.unwrap_or(0), - self.blue.unwrap_or(0), + clamp_unit_f32(self.alpha), + self.red, + self.green, + self.blue, ) } } diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index c2cd9f19c21..d3f19ea1537 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -984,7 +984,7 @@ impl Fragment { ref direction, ref color_interpolation_method, ref items, - ref repeating, + ref flags, compat_mode: _, } => { let (gradient, stops) = gradient::linear( @@ -993,7 +993,7 @@ impl Fragment { items, *direction, color_interpolation_method, - *repeating, + *flags, ); let item = webrender_api::GradientDisplayItem { gradient, @@ -1009,7 +1009,7 @@ impl Fragment { ref position, ref color_interpolation_method, ref items, - ref repeating, + ref flags, compat_mode: _, } => { let (gradient, stops) = gradient::radial( @@ -1019,7 +1019,7 @@ impl Fragment { shape, position, color_interpolation_method, - *repeating, + *flags, ); let item = webrender_api::RadialGradientDisplayItem { gradient, @@ -1252,7 +1252,7 @@ impl Fragment { ref direction, ref color_interpolation_method, ref items, - ref repeating, + ref flags, compat_mode: _, } => { let (wr_gradient, linear_stops) = gradient::linear( @@ -1261,7 +1261,7 @@ impl Fragment { items, *direction, color_interpolation_method, - *repeating, + *flags, ); stops = linear_stops; NinePatchBorderSource::Gradient(wr_gradient) @@ -1271,7 +1271,7 @@ impl Fragment { ref position, ref color_interpolation_method, ref items, - ref repeating, + ref flags, compat_mode: _, } => { let (wr_gradient, radial_stops) = gradient::radial( @@ -1281,7 +1281,7 @@ impl Fragment { shape, position, color_interpolation_method, - *repeating, + *flags, ); stops = radial_stops; NinePatchBorderSource::RadialGradient(wr_gradient) diff --git a/components/layout/display_list/gradient.rs b/components/layout/display_list/gradient.rs index acc68811786..dc126476a92 100644 --- a/components/layout/display_list/gradient.rs +++ b/components/layout/display_list/gradient.rs @@ -8,7 +8,9 @@ use style::color::mix::ColorInterpolationMethod; use style::properties::ComputedValues; use style::values::computed::image::{EndingShape, LineDirection}; use style::values::computed::{Angle, Color, LengthPercentage, Percentage, Position}; -use style::values::generics::image::{Circle, ColorStop, Ellipse, GradientItem, ShapeExtent}; +use style::values::generics::image::{ + Circle, ColorStop, Ellipse, GradientFlags, GradientItem, ShapeExtent, +}; use webrender_api::{ExtendMode, Gradient, GradientBuilder, GradientStop, RadialGradient}; use crate::display_list::ToLayout; @@ -242,10 +244,11 @@ pub fn linear( stops: &[GradientItem], direction: LineDirection, _color_interpolation_method: &ColorInterpolationMethod, - repeating: bool, + flags: GradientFlags, ) -> (Gradient, Vec) { use style::values::specified::position::HorizontalPositionKeyword::*; use style::values::specified::position::VerticalPositionKeyword::*; + let repeating = flags.contains(GradientFlags::REPEATING); let angle = match direction { LineDirection::Angle(angle) => angle.radians(), LineDirection::Horizontal(x) => match x { @@ -310,8 +313,9 @@ pub fn radial( shape: &EndingShape, center: &Position, _color_interpolation_method: &ColorInterpolationMethod, - repeating: bool, + flags: GradientFlags, ) -> (RadialGradient, Vec) { + let repeating = flags.contains(GradientFlags::REPEATING); let center = Point2D::new( center.horizontal.to_used_value(size.width), center.vertical.to_used_value(size.height), diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs index fbc441055da..d8ecda844eb 100644 --- a/components/layout/table_row.rs +++ b/components/layout/table_row.rs @@ -771,7 +771,7 @@ impl CollapsedBorder { CollapsedBorder { style: BorderStyle::None, width: Au(0), - color: Color::transparent(), + color: Color::TRANSPARENT, provenance: CollapsedBorderFrom::Table, } } diff --git a/components/layout_2020/display_list/gradient.rs b/components/layout_2020/display_list/gradient.rs index f088ee91faa..582b7ea19de 100644 --- a/components/layout_2020/display_list/gradient.rs +++ b/components/layout_2020/display_list/gradient.rs @@ -8,7 +8,9 @@ use style::values::computed::image::{EndingShape, Gradient, LineDirection}; use style::values::computed::{ Angle, AngleOrPercentage, Color, Length, LengthPercentage, Position, }; -use style::values::generics::image::{Circle, ColorStop, Ellipse, GradientItem, ShapeExtent}; +use style::values::generics::image::{ + Circle, ColorStop, Ellipse, GradientFlags, GradientItem, ShapeExtent, +}; use webrender_api::{self as wr, units}; use wr::ColorF; @@ -23,18 +25,14 @@ pub(super) fn build( ref items, ref direction, ref color_interpolation_method, - ref repeating, + ref flags, compat_mode: _, } => build_linear( style, items, direction, color_interpolation_method, - if *repeating { - wr::ExtendMode::Repeat - } else { - wr::ExtendMode::Clamp - }, + *flags, layer, builder, ), @@ -43,7 +41,7 @@ pub(super) fn build( ref position, ref color_interpolation_method, ref items, - ref repeating, + ref flags, compat_mode: _, } => build_radial( style, @@ -51,11 +49,7 @@ pub(super) fn build( shape, position, color_interpolation_method, - if *repeating { - wr::ExtendMode::Repeat - } else { - wr::ExtendMode::Clamp - }, + *flags, layer, builder, ), @@ -64,18 +58,14 @@ pub(super) fn build( position, color_interpolation_method, items, - repeating, + flags, } => build_conic( style, *angle, position, *color_interpolation_method, items, - if *repeating { - wr::ExtendMode::Repeat - } else { - wr::ExtendMode::Clamp - }, + *flags, layer, builder, ), @@ -88,7 +78,7 @@ pub(super) fn build_linear( items: &[GradientItem], line_direction: &LineDirection, _color_interpolation_method: &ColorInterpolationMethod, - extend_mode: wr::ExtendMode, + flags: GradientFlags, layer: &super::background::BackgroundLayer, builder: &mut super::DisplayListBuilder, ) { @@ -173,6 +163,11 @@ pub(super) fn build_linear( let mut color_stops = gradient_items_to_color_stops(style, items, Length::new(gradient_line_length)); let stops = fixup_stops(&mut color_stops); + let extend_mode = if flags.contains(GradientFlags::REPEATING) { + wr::ExtendMode::Repeat + } else { + wr::ExtendMode::Clamp + }; let linear_gradient = builder .wr() .create_gradient(start_point, end_point, stops, extend_mode); @@ -193,7 +188,7 @@ pub(super) fn build_radial( shape: &EndingShape, center: &Position, _color_interpolation_method: &ColorInterpolationMethod, - extend_mode: wr::ExtendMode, + flags: GradientFlags, layer: &super::background::BackgroundLayer, builder: &mut super::DisplayListBuilder, ) { @@ -277,6 +272,11 @@ pub(super) fn build_radial( let mut color_stops = gradient_items_to_color_stops(style, items, Length::new(gradient_line_length)); let stops = fixup_stops(&mut color_stops); + let extend_mode = if flags.contains(GradientFlags::REPEATING) { + wr::ExtendMode::Repeat + } else { + wr::ExtendMode::Clamp + }; let radial_gradient = builder .wr() .create_radial_gradient(center, radii, stops, extend_mode); @@ -297,7 +297,7 @@ fn build_conic( center: &Position, _color_interpolation_method: ColorInterpolationMethod, items: &[GradientItem], - extend_mode: wr::ExtendMode, + flags: GradientFlags, layer: &super::background::BackgroundLayer, builder: &mut super::DisplayListBuilder<'_>, ) { @@ -314,6 +314,11 @@ fn build_conic( ); let mut color_stops = conic_gradient_items_to_color_stops(style, items); let stops = fixup_stops(&mut color_stops); + let extend_mode = if flags.contains(GradientFlags::REPEATING) { + wr::ExtendMode::Repeat + } else { + wr::ExtendMode::Clamp + }; let conic_gradient = builder .wr() diff --git a/components/script/canvas_state.rs b/components/script/canvas_state.rs index 0658153739b..03e1fcc7568 100644 --- a/components/script/canvas_state.rs +++ b/components/script/canvas_state.rs @@ -12,7 +12,7 @@ use canvas_traits::canvas::{ FillRule, LineCapStyle, LineJoinStyle, LinearGradientStyle, RadialGradientStyle, RepetitionStyle, TextAlign, TextBaseline, }; -use cssparser::{Parser, ParserInput, RGBA}; +use cssparser::{Parser, ParserInput, RgbaLegacy}; use euclid::default::{Point2D, Rect, Size2D, Transform2D}; use euclid::vec2; use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory}; @@ -62,7 +62,7 @@ use crate::unpremultiplytable::UNPREMULTIPLY_TABLE; #[derive(Clone, JSTraceable, MallocSizeOf)] #[allow(dead_code)] pub(crate) enum CanvasFillOrStrokeStyle { - Color(#[no_trace] RGBA), + Color(#[no_trace] RgbaLegacy), Gradient(Dom), Pattern(Dom), } @@ -98,7 +98,7 @@ pub(crate) struct CanvasContextState { shadow_offset_y: f64, shadow_blur: f64, #[no_trace] - shadow_color: RGBA, + shadow_color: RgbaLegacy, #[no_trace] font_style: Option, #[no_trace] @@ -113,7 +113,7 @@ impl CanvasContextState { const DEFAULT_FONT_STYLE: &'static str = "10px sans-serif"; pub(crate) fn new() -> CanvasContextState { - let black = RGBA::new(Some(0), Some(0), Some(0), Some(1.0)); + let black = RgbaLegacy::new(0, 0, 0, 1.0); CanvasContextState { global_alpha: 1.0, global_composition: CompositionOrBlending::default(), @@ -128,7 +128,7 @@ impl CanvasContextState { shadow_offset_x: 0.0, shadow_offset_y: 0.0, shadow_blur: 0.0, - shadow_color: RGBA::new(Some(0), Some(0), Some(0), Some(0.0)), + shadow_color: RgbaLegacy::new(0, 0, 0, 0.0), font_style: None, text_align: Default::default(), text_baseline: Default::default(), @@ -1679,7 +1679,7 @@ impl CanvasState { } } -pub fn parse_color(canvas: Option<&HTMLCanvasElement>, string: &str) -> Result { +pub fn parse_color(canvas: Option<&HTMLCanvasElement>, string: &str) -> Result { let mut input = ParserInput::new(string); let mut parser = Parser::new(&mut input); let url = Url::parse("about:blank").unwrap().into(); @@ -1704,14 +1704,14 @@ pub fn parse_color(canvas: Option<&HTMLCanvasElement>, string: &str) -> Result AbsoluteColor::black(), + None => AbsoluteColor::BLACK, Some(ref canvas) => { let canvas_element = canvas.upcast::(); match canvas_element.style() { Some(ref s) if canvas_element.has_css_layout_box() => { s.get_inherited_text().color }, - _ => AbsoluteColor::black(), + _ => AbsoluteColor::BLACK, } }, }; @@ -1719,11 +1719,11 @@ pub fn parse_color(canvas: Option<&HTMLCanvasElement>, string: &str) -> Result Err(()), @@ -1737,16 +1737,17 @@ pub fn is_rect_valid(rect: Rect) -> bool { } // https://html.spec.whatwg.org/multipage/#serialisation-of-a-color -pub fn serialize(color: &RGBA, dest: &mut W) -> fmt::Result +pub fn serialize(color: &RgbaLegacy, dest: &mut W) -> fmt::Result where W: fmt::Write, { - let red = color.red.unwrap_or(0); - let green = color.green.unwrap_or(0); - let blue = color.blue.unwrap_or(0); - let alpha = color.alpha.unwrap_or(0.0); - - if alpha == 1.0 { + let RgbaLegacy { + red, + green, + blue, + alpha, + } = color; + if *alpha == 1.0 { write!( dest, "#{:x}{:x}{:x}{:x}{:x}{:x}", diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index da0ad78d91e..9ddde5d0d86 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -30,6 +30,7 @@ use net_traits::request::CorsSettings; use net_traits::ReferrerPolicy; use script_layout_interface::message::ReflowGoal; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; +use selectors::bloom::{BloomFilter, BLOOM_HASH_MASK}; use selectors::matching::{ElementSelectorFlags, MatchingContext}; use selectors::sink::Push; use selectors::Element as SelectorsElement; @@ -3393,6 +3394,34 @@ impl<'a> SelectorsElement for DomRoot { } } } + + fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool { + let mut f = |hash| filter.insert_hash(hash & BLOOM_HASH_MASK); + + // We can't use style::bloom::each_relevant_element_hash(*self, f) + // since DomRoot doesn't have the TElement trait. + f(Element::local_name(self).get_hash()); + f(Element::namespace(self).get_hash()); + + if let Some(ref id) = *self.id_attribute.borrow() { + f(id.get_hash()); + } + + if let Some(attr) = self.get_attribute(&ns!(), &local_name!("class")) { + for class in attr.value().as_tokens() { + f(AtomIdent::cast(class).get_hash()); + } + } + + for attr in self.attrs.borrow().iter() { + let name = style::values::GenericAtomIdent::cast(attr.local_name()); + if !style::bloom::is_attr_name_excluded_from_filter(name) { + f(name.get_hash()); + } + } + + true + } } impl Element { diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index 0ecd130914f..64f482f054c 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use embedder_traits::EmbedderMsg; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; @@ -100,20 +100,20 @@ impl HTMLBodyElementMethods for HTMLBodyElement { } pub trait HTMLBodyElementLayoutHelpers { - fn get_background_color(self) -> Option; - fn get_color(self) -> Option; + fn get_background_color(self) -> Option; + fn get_color(self) -> Option; fn get_background(self) -> Option; } impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> { - fn get_background_color(self) -> Option { + fn get_background_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .and_then(AttrValue::as_color) .cloned() } - fn get_color(self) -> Option { + fn get_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("text")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs index fb1fa3f53a9..9bdd32bb5c4 100644 --- a/components/script/dom/htmlfontelement.rs +++ b/components/script/dom/htmlfontelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -105,13 +105,13 @@ impl VirtualMethods for HTMLFontElement { } pub trait HTMLFontElementLayoutHelpers { - fn get_color(self) -> Option; + fn get_color(self) -> Option; fn get_face(self) -> Option; fn get_size(self) -> Option; } impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> { - fn get_color(self) -> Option { + fn get_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("color")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index f28a592000b..1a63747aa57 100644 --- a/components/script/dom/htmlhrelement.rs +++ b/components/script/dom/htmlhrelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -70,12 +70,12 @@ impl HTMLHRElementMethods for HTMLHRElement { } pub trait HTMLHRLayoutHelpers { - fn get_color(self) -> Option; + fn get_color(self) -> Option; fn get_width(self) -> LengthOrPercentageOrAuto; } impl HTMLHRLayoutHelpers for LayoutDom<'_, HTMLHRElement> { - fn get_color(self) -> Option { + fn get_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("color")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs index a42355167e9..c298db7398e 100644 --- a/components/script/dom/htmlstyleelement.rs +++ b/components/script/dom/htmlstyleelement.rs @@ -126,7 +126,6 @@ impl HTMLStyleElement { Some(&loader), css_error_reporter, doc.quirks_mode(), - self.line_number as u32, AllowImportRules::Yes, ); diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index c2cb14afb34..2b4406feb95 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -106,7 +106,7 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement { } pub trait HTMLTableCellElementLayoutHelpers<'dom> { - fn get_background_color(self) -> Option; + fn get_background_color(self) -> Option; fn get_colspan(self) -> Option; fn get_rowspan(self) -> Option; fn get_table(self) -> Option>; @@ -114,7 +114,7 @@ pub trait HTMLTableCellElementLayoutHelpers<'dom> { } impl<'dom> HTMLTableCellElementLayoutHelpers<'dom> for LayoutDom<'dom, HTMLTableCellElement> { - fn get_background_color(self) -> Option { + fn get_background_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index 4c50349cf70..93c40a5e930 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -4,7 +4,7 @@ use std::cell::Cell; -use cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -425,7 +425,7 @@ impl HTMLTableElementMethods for HTMLTableElement { } pub trait HTMLTableElementLayoutHelpers { - fn get_background_color(self) -> Option; + fn get_background_color(self) -> Option; fn get_border(self) -> Option; fn get_cellpadding(self) -> Option; fn get_cellspacing(self) -> Option; @@ -433,7 +433,7 @@ pub trait HTMLTableElementLayoutHelpers { } impl HTMLTableElementLayoutHelpers for LayoutDom<'_, HTMLTableElement> { - fn get_background_color(self) -> Option { + fn get_background_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index a5fe4e2fec6..c400ac8011a 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -153,11 +153,11 @@ impl HTMLTableRowElementMethods for HTMLTableRowElement { } pub trait HTMLTableRowElementLayoutHelpers { - fn get_background_color(self) -> Option; + fn get_background_color(self) -> Option; } impl HTMLTableRowElementLayoutHelpers for LayoutDom<'_, HTMLTableRowElement> { - fn get_background_color(self) -> Option { + fn get_background_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs index 9daf6393154..6dd042a0187 100644 --- a/components/script/dom/htmltablesectionelement.rs +++ b/components/script/dom/htmltablesectionelement.rs @@ -2,7 +2,7 @@ * 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 cssparser::RGBA; +use cssparser::RgbaLegacy; use dom_struct::dom_struct; use html5ever::{local_name, namespace_url, ns, LocalName, Prefix}; use js::rust::HandleObject; @@ -91,11 +91,11 @@ impl HTMLTableSectionElementMethods for HTMLTableSectionElement { } pub trait HTMLTableSectionElementLayoutHelpers { - fn get_background_color(self) -> Option; + fn get_background_color(self) -> Option; } impl HTMLTableSectionElementLayoutHelpers for LayoutDom<'_, HTMLTableSectionElement> { - fn get_background_color(self) -> Option { + fn get_background_color(self) -> Option { self.upcast::() .get_attr_for_layout(&ns!(), &local_name!("bgcolor")) .and_then(AttrValue::as_color) diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 9e6f4feeee9..ee1e563ef1d 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -31,7 +31,7 @@ use script_layout_interface::{ }; use script_traits::{DocumentActivity, UntrustedNodeAddress}; use selectors::matching::{ - matches_selector_list, IgnoreNthChildForInvalidation, MatchingContext, MatchingMode, + matches_selector_list, MatchingContext, MatchingForInvalidation, MatchingMode, NeedsSelectorFlags, }; use selectors::parser::SelectorList; @@ -481,7 +481,7 @@ impl<'a> Iterator for QuerySelectorIterator { &mut nth_index_cache, node.owner_doc().quirks_mode(), NeedsSelectorFlags::No, - IgnoreNthChildForInvalidation::No, + MatchingForInvalidation::No, ); if let Some(element) = DomRoot::downcast(node) { if matches_selector_list(selectors, &element, &mut ctx) { @@ -978,7 +978,7 @@ impl Node { &mut nth_index_cache, doc.quirks_mode(), NeedsSelectorFlags::No, - IgnoreNthChildForInvalidation::No, + MatchingForInvalidation::No, ); Ok(self .traverse_preorder(ShadowIncluding::No) diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs index 40d7f0a8aa3..ab2a2f52c7c 100644 --- a/components/script/layout_dom/element.rs +++ b/components/script/layout_dom/element.rs @@ -15,6 +15,7 @@ use script_layout_interface::wrapper_traits::{ }; use script_layout_interface::{LayoutNodeType, StyleAndOpaqueLayoutData, StyleData}; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; +use selectors::bloom::{BloomFilter, BLOOM_HASH_MASK}; use selectors::matching::{ElementSelectorFlags, MatchingContext, VisitedHandlingMode}; use selectors::sink::Push; use servo_arc::{Arc, ArcBorrow}; @@ -22,6 +23,7 @@ use servo_atoms::Atom; use style::animation::AnimationSetKey; use style::applicable_declarations::ApplicableDeclarationBlock; use style::attr::AttrValue; +use style::bloom::each_relevant_element_hash; use style::context::SharedStyleContext; use style::data::ElementData; use style::dom::{DomChildren, LayoutIterator, TDocument, TElement, TNode, TShadowRoot}; @@ -682,6 +684,11 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element } } } + + fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool { + each_relevant_element_hash(*self, |hash| filter.insert_hash(hash & BLOOM_HASH_MASK)); + true + } } /// A wrapper around elements that ensures layout can only @@ -941,6 +948,13 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element } } } + + fn add_element_unique_hashes(&self, filter: &mut BloomFilter) -> bool { + each_relevant_element_hash(self.element, |hash| { + filter.insert_hash(hash & BLOOM_HASH_MASK) + }); + true + } } impl<'dom, LayoutDataType: LayoutDataTrait> GetStyleAndOpaqueLayoutData<'dom> diff --git a/components/shared/canvas/canvas.rs b/components/shared/canvas/canvas.rs index f656b5dc92d..aaea3969bb8 100644 --- a/components/shared/canvas/canvas.rs +++ b/components/shared/canvas/canvas.rs @@ -5,7 +5,7 @@ use std::default::Default; use std::str::FromStr; -use cssparser::RGBA; +use cssparser::RgbaLegacy; use euclid::default::{Point2D, Rect, Size2D, Transform2D}; use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSender, IpcSharedMemory}; use malloc_size_of_derive::MallocSizeOf; @@ -75,7 +75,7 @@ pub enum Canvas2dMsg { SetShadowOffsetX(f64), SetShadowOffsetY(f64), SetShadowBlur(f64), - SetShadowColor(RGBA), + SetShadowColor(RgbaLegacy), SetFont(FontStyleStruct), SetTextAlign(TextAlign), SetTextBaseline(TextBaseline), @@ -94,7 +94,7 @@ pub enum FromScriptMsg { #[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] pub struct CanvasGradientStop { pub offset: f64, - pub color: RGBA, + pub color: RgbaLegacy, } #[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] @@ -183,7 +183,7 @@ impl SurfaceStyle { #[derive(Clone, Debug, Deserialize, Serialize)] pub enum FillOrStrokeStyle { - Color(RGBA), + Color(RgbaLegacy), LinearGradient(LinearGradientStyle), RadialGradient(RadialGradientStyle), Surface(SurfaceStyle), diff --git a/tests/unit/style/animated_properties.rs b/tests/unit/style/animated_properties.rs index e34f5d771be..d8e0abd68ed 100644 --- a/tests/unit/style/animated_properties.rs +++ b/tests/unit/style/animated_properties.rs @@ -2,7 +2,7 @@ * 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::color::AbsoluteColor; +use style::color::{AbsoluteColor, ColorSpace}; use style::values::animated::{Animate, Procedure, ToAnimatedValue}; fn interpolate_color(from: AbsoluteColor, to: AbsoluteColor, progress: f64) -> AbsoluteColor { @@ -14,28 +14,40 @@ fn interpolate_color(from: AbsoluteColor, to: AbsoluteColor, progress: f64) -> A ) } +fn srgb_legacy_from_floats(red: f32, green: f32, blue: f32, alpha: f32) -> AbsoluteColor { + AbsoluteColor::new(ColorSpace::Srgb, red, green, blue, alpha).into_srgb_legacy() +} + // Color #[test] fn test_rgba_color_interepolation_preserves_transparent() { assert_eq!( - interpolate_color( - AbsoluteColor::transparent(), - AbsoluteColor::transparent(), - 0.5 - ), - AbsoluteColor::transparent() + interpolate_color(AbsoluteColor::TRANSPARENT, AbsoluteColor::TRANSPARENT, 0.5), + AbsoluteColor::TRANSPARENT ); } #[test] -fn test_rgba_color_interepolation_alpha() { +fn test_rgba_color_interepolation_alpha_1() { assert_eq!( interpolate_color( - AbsoluteColor::srgb(0.6, 0.0, 0.0, 0.4), - AbsoluteColor::srgb(0.0, 0.6, 0.0, 0.8), + AbsoluteColor::srgb_legacy(150, 0, 0, 0.4), + AbsoluteColor::srgb_legacy(0, 150, 0, 0.8), 0.5 ), - AbsoluteColor::srgb(0.2, 0.4, 0.0, 0.6) + AbsoluteColor::srgb_legacy(50, 100, 0, 0.6) + ); +} + +#[test] +fn test_rgba_color_interepolation_alpha_2() { + assert_eq!( + interpolate_color( + srgb_legacy_from_floats(0.6, 0.0, 0.0, 0.4), + srgb_legacy_from_floats(0.0, 0.6, 0.0, 0.8), + 0.5 + ), + srgb_legacy_from_floats(0.2, 0.4, 0.0, 0.6) ); } @@ -43,13 +55,15 @@ fn test_rgba_color_interepolation_alpha() { fn test_rgba_color_interepolation_out_of_range_1() { // Some cubic-bezier functions produce values that are out of range [0, 1]. // Unclamped cases. + // Note `AbsoluteColor::srgb_legacy` doesn't accept out of range values, + // so we only test with `srgb_legacy_from_floats`. assert_eq!( interpolate_color( - AbsoluteColor::srgb(0.3, 0.0, 0.0, 0.4), - AbsoluteColor::srgb(0.0, 1.0, 0.0, 0.6), + srgb_legacy_from_floats(0.3, 0.0, 0.0, 0.4), + srgb_legacy_from_floats(0.0, 1.0, 0.0, 0.6), -0.5 ), - AbsoluteColor::srgb(0.6, -1.0, 0.0, 0.3) + srgb_legacy_from_floats(0.6, -1.0, 0.0, 0.3) ); } @@ -57,11 +71,11 @@ fn test_rgba_color_interepolation_out_of_range_1() { fn test_rgba_color_interepolation_out_of_range_2() { assert_eq!( interpolate_color( - AbsoluteColor::srgb(1.0, 0.0, 0.0, 0.6), - AbsoluteColor::srgb(0.0, 0.3, 0.0, 0.4), + srgb_legacy_from_floats(1.0, 0.0, 0.0, 0.6), + srgb_legacy_from_floats(0.0, 0.3, 0.0, 0.4), 1.5 ), - AbsoluteColor::srgb(-1.0, 0.6, 0.0, 0.3) + srgb_legacy_from_floats(-1.0, 0.6, 0.0, 0.3) ); } @@ -69,11 +83,11 @@ fn test_rgba_color_interepolation_out_of_range_2() { fn test_rgba_color_interepolation_out_of_range_clamped_1() { assert_eq!( interpolate_color( - AbsoluteColor::srgb(1.0, 0.0, 0.0, 0.8), - AbsoluteColor::srgb(0.0, 1.0, 0.0, 0.2), + srgb_legacy_from_floats(1.0, 0.0, 0.0, 0.8), + srgb_legacy_from_floats(0.0, 1.0, 0.0, 0.2), -0.5 ), - AbsoluteColor::srgb(1.2, -0.1, 0.0, 1.0) + srgb_legacy_from_floats(1.2, -0.1, 0.0, 1.0) ); } @@ -81,10 +95,10 @@ fn test_rgba_color_interepolation_out_of_range_clamped_1() { fn test_rgba_color_interepolation_out_of_range_clamped_2() { assert_eq!( interpolate_color( - AbsoluteColor::srgb(1.0, 0.0, 0.0, 0.8), - AbsoluteColor::srgb(0.0, 1.0, 0.0, 0.2), + srgb_legacy_from_floats(1.0, 0.0, 0.0, 0.8), + srgb_legacy_from_floats(0.0, 1.0, 0.0, 0.2), 1.5 ), - AbsoluteColor::srgb(-0.4, 0.3, 0.0, 0.0) + srgb_legacy_from_floats(-0.4, 0.3, 0.0, 0.0) ); } diff --git a/tests/unit/style/custom_properties.rs b/tests/unit/style/custom_properties.rs index 21ce2ba3f86..d41a1bb35aa 100644 --- a/tests/unit/style/custom_properties.rs +++ b/tests/unit/style/custom_properties.rs @@ -14,6 +14,7 @@ use style::media_queries::{Device, MediaType}; use style::properties::{CustomDeclaration, CustomDeclarationValue}; use style::rule_tree::CascadeLevel; use style::stylesheets::layer_rule::LayerOrder; +use style::stylist::Stylist; use test::{self, Bencher}; fn cascade( @@ -37,7 +38,8 @@ fn cascade( Size2D::new(800., 600.), Scale::new(1.0), ); - let mut builder = CustomPropertiesBuilder::new(inherited, &device); + let stylist = Stylist::new(device, QuirksMode::NoQuirks); + let mut builder = CustomPropertiesBuilder::new(inherited, &stylist); for declaration in &declarations { builder.cascade( diff --git a/tests/unit/style/rule_tree/bench.rs b/tests/unit/style/rule_tree/bench.rs index b1cda2ff1e4..a19aa0a555b 100644 --- a/tests/unit/style/rule_tree/bench.rs +++ b/tests/unit/style/rule_tree/bench.rs @@ -74,7 +74,6 @@ fn parse_rules(lock: &SharedRwLock, css: &str) -> Vec<(StyleSource, CascadeLevel None, Some(&ErrorringErrorReporter), QuirksMode::NoQuirks, - 0, AllowImportRules::Yes, ); let guard = s.shared_lock.read(); diff --git a/tests/unit/style/stylesheets.rs b/tests/unit/style/stylesheets.rs index 2b153d9d5aa..4c8b780a357 100644 --- a/tests/unit/style/stylesheets.rs +++ b/tests/unit/style/stylesheets.rs @@ -107,33 +107,32 @@ fn test_report_error_stylesheet() { None, Some(&error_reporter), QuirksMode::NoQuirks, - 5, AllowImportRules::Yes, ); error_reporter.assert_messages_contain(&[ ( - 8, + 3, 18, "Unsupported property declaration: 'display: invalid;'", ), ( - 9, + 4, 43, "Unsupported property declaration: 'background-image:", ), // FIXME: column should be around 56 - (10, 17, "Unsupported property declaration: 'invalid: true;'"), - (12, 28, "Invalid media rule"), + (5, 17, "Unsupported property declaration: 'invalid: true;'"), + (7, 28, "Invalid media rule"), // When @counter-style is supported, this should be replaced with two errors - (14, 19, "Invalid rule: '@counter-style "), + (9, 19, "Invalid rule: '@counter-style "), // When @font-feature-values is supported, this should be replaced with two errors - (15, 25, "Invalid rule: '@font-feature-values "), - (16, 13, "Invalid rule: '@invalid'"), - (17, 29, "Invalid rule: '@invalid'"), - (18, 34, "Invalid rule: '@supports "), - (19, 26, "Invalid keyframe rule: 'from invalid '"), + (10, 25, "Invalid rule: '@font-feature-values "), + (11, 13, "Invalid rule: '@invalid'"), + (12, 29, "Invalid rule: '@invalid'"), + (13, 34, "Invalid rule: '@supports "), + (14, 26, "Invalid keyframe rule: 'from invalid '"), ( - 19, + 14, 52, "Unsupported keyframe property declaration: 'margin: 0 invalid 0;'", ), @@ -165,7 +164,6 @@ fn test_no_report_unrecognized_vendor_properties() { None, Some(&error_reporter), QuirksMode::NoQuirks, - 0, AllowImportRules::Yes, ); @@ -199,7 +197,6 @@ fn test_source_map_url() { None, None, QuirksMode::NoQuirks, - 0, AllowImportRules::Yes, ); let url_opt = stylesheet.contents.source_map_url.read(); @@ -227,7 +224,6 @@ fn test_source_url() { None, None, QuirksMode::NoQuirks, - 0, AllowImportRules::Yes, ); let url_opt = stylesheet.contents.source_url.read(); diff --git a/tests/wpt/meta-legacy-layout/css/CSS2/syntax/malformed-decl-block-001.xht.ini b/tests/wpt/meta-legacy-layout/css/CSS2/syntax/malformed-decl-block-001.xht.ini deleted file mode 100644 index ef727f8fcae..00000000000 --- a/tests/wpt/meta-legacy-layout/css/CSS2/syntax/malformed-decl-block-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[malformed-decl-block-001.xht] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/animation/color-interpolation.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/animation/color-interpolation.html.ini index fc710b47aa7..8c7be1b7be2 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/animation/color-interpolation.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/animation/color-interpolation.html.ini @@ -325,30 +325,3 @@ [Web Animations: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] expected: FAIL - - [CSS Transitions: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-1.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-1.html.ini deleted file mode 100644 index 1268be360f7..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lab-l-over-100-1.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-2.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-2.html.ini deleted file mode 100644 index 5e35aa2a18c..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/lab-l-over-100-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lab-l-over-100-2.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-1.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-1.html.ini deleted file mode 100644 index a33b5625711..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lch-l-over-100-1.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-2.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-2.html.ini deleted file mode 100644 index 3576be46a62..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/lch-l-over-100-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lch-l-over-100-2.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-1.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-1.html.ini deleted file mode 100644 index e17a8f176ef..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklab-l-over-1-1.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-2.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-2.html.ini deleted file mode 100644 index e804f1df128..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/oklab-l-over-1-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklab-l-over-1-2.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-1.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-1.html.ini deleted file mode 100644 index 3a1231976ac..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklch-l-over-1-1.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-2.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-2.html.ini deleted file mode 100644 index 9f918b7b99f..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-color/oklch-l-over-1-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklch-l-over-1-2.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-lab.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-lab.html.ini index 39ed8d86858..17fe1348a9b 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-lab.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-lab.html.ini @@ -1,10 +1,4 @@ [color-computed-lab.html] - [Property color value 'lab(400 0 10/50%)'] - expected: FAIL - - [Property color value 'lab(calc(50 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklab(20 0 10/0.5)'] expected: FAIL @@ -38,9 +32,6 @@ [Property color value 'oklab(20 none none / none)'] expected: FAIL - [Property color value 'lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklch(100 230 0deg / 0.5)'] expected: FAIL @@ -104,18 +95,9 @@ [Property color value 'oklch(20% 0 10/0.5)'] expected: FAIL - [Property color value 'oklab(4 0 0.1/50%)'] - expected: FAIL - - [Property color value 'oklab(calc(0.5 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklab(20% 0 0.1/0.5)'] expected: FAIL - [Property color value 'oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'lab(calc(NaN) 0 0)'] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini index 928fcb9476b..45fe5b3df7b 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1,16 +1,4 @@ [color-valid-color-mix-function.html] - [e.style['color'\] = "color-mix(in hsl, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hsl, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hwb, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - [e.style['color'\] = "color-mix(in oklch, oklch(10 20 30deg), oklch(50 60 70deg))" should set the property value] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-lab.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-lab.html.ini index ccc983760a2..c1f82f1dc4a 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-lab.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-lab.html.ini @@ -1,10 +1,4 @@ [color-valid-lab.html] - [e.style['color'\] = "lab(400 0 10/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "lab(calc(50 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "oklab(20 0 10/0.5)" should set the property value] expected: FAIL @@ -38,9 +32,6 @@ [e.style['color'\] = "oklab(20 none none / none)" should set the property value] expected: FAIL - [e.style['color'\] = "lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "oklch(100 230 0deg / 0.5)" should set the property value] expected: FAIL @@ -92,15 +83,6 @@ [e.style['color'\] = "oklch(20 none none / none)" should set the property value] expected: FAIL - [e.style['color'\] = "oklab(4 0 0.1/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "oklab(calc(0.5 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - - [e.style['color'\] = "oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "lab(calc(infinity) 0 0)" should set the property value] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-conditional/at-supports-048.html.ini b/tests/wpt/meta-legacy-layout/css/css-conditional/at-supports-048.html.ini deleted file mode 100644 index f23f24659a2..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-conditional/at-supports-048.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[at-supports-048.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-easing/linear-timing-functions-syntax.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-easing/linear-timing-functions-syntax.tentative.html.ini deleted file mode 100644 index bf4ef93cf16..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-easing/linear-timing-functions-syntax.tentative.html.ini +++ /dev/null @@ -1,33 +0,0 @@ -[linear-timing-functions-syntax.tentative.html] - [e.style['animation-timing-function'\] = "linear(0 0%, 1 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0 0% 50%, 1 50% 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0, 0.5 25% 75%, 1 100% 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 1.004, 0.998, 1 100% 100%)" should set the property value] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 1)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(0%), 0 calc(100%))'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(50% - 50%), 0 calc(50% + 50%))'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(min(50%, 60%)), 0 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 0% 50%, 1 50% 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 0.5 25% 75%, 1 100% 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 0.998, 1 100% 100%)'] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/parsing/transition-timing-function-valid.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/parsing/transition-timing-function-valid.html.ini index 676df1b4c3c..97d03404f9f 100644 --- a/tests/wpt/meta-legacy-layout/css/css-transitions/parsing/transition-timing-function-valid.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/parsing/transition-timing-function-valid.html.ini @@ -10,12 +10,3 @@ [e.style['transition-timing-function'\] = "steps(2, jump-end)" should set the property value] expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 0.5 50%, 1 100%)" should set the property value] - expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 10 10%, 10 50%, 25.4 75%, 100 100%)" should set the property value] - expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 1 100%)" should set the property value] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/transition-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/transition-001.html.ini deleted file mode 100644 index ea7e84ffda3..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-transitions/transition-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[transition-001.html] - [parse '1s width linear(0, .5 10% 20%, 1, .5 50%, 1) 2s'] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-computed.html.ini index 860d2cb5f2a..add1bb314b6 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-computed.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-computed.html.ini @@ -10,6 +10,3 @@ [Property letter-spacing value 'clamp(10px, 20px, 30px)' computes to '20px'] expected: FAIL - - [Property letter-spacing value 'calc(0px - clamp(30px, 100px, 20px))'] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-serialize.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-serialize.html.ini deleted file mode 100644 index 944c6860e3e..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-values/clamp-length-serialize.html.ini +++ /dev/null @@ -1,12 +0,0 @@ -[clamp-length-serialize.html] - [e.style['letter-spacing'\] = "calc(0px - clamp(30px, 100px, 20px))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(calc(0px - clamp(30px, 100px, 20px)))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(0px - clamp(1px, 1em, 1vh))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(calc(0px - clamp(1px, 1em, 1vh)))" should set the property value] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-variables/revert-in-fallback.html.ini b/tests/wpt/meta-legacy-layout/css/css-variables/revert-in-fallback.html.ini index f7b34f65f24..2dce2c17e6c 100644 --- a/tests/wpt/meta-legacy-layout/css/css-variables/revert-in-fallback.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-variables/revert-in-fallback.html.ini @@ -1,6 +1,3 @@ [revert-in-fallback.html] - [var(--unknown, revert) in custom property] - expected: FAIL - [var(--unknown, revert-layer) in shorthand observed via longhand] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-variables/wide-keyword-fallback-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-variables/wide-keyword-fallback-002.html.ini deleted file mode 100644 index 2591556c763..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-variables/wide-keyword-fallback-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[wide-keyword-fallback-002.html] - expected: FAIL diff --git a/tests/wpt/meta/css/CSS2/syntax/malformed-decl-block-001.xht.ini b/tests/wpt/meta/css/CSS2/syntax/malformed-decl-block-001.xht.ini deleted file mode 100644 index ef727f8fcae..00000000000 --- a/tests/wpt/meta/css/CSS2/syntax/malformed-decl-block-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[malformed-decl-block-001.xht] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/animation/color-interpolation.html.ini b/tests/wpt/meta/css/css-color/animation/color-interpolation.html.ini index a621ce40b86..2e01b624778 100644 --- a/tests/wpt/meta/css/css-color/animation/color-interpolation.html.ini +++ b/tests/wpt/meta/css/css-color/animation/color-interpolation.html.ini @@ -322,30 +322,3 @@ [Web Animations: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] expected: FAIL - - [CSS Transitions: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [rgb(0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [color(srgb 0 0 0)\] to [rgb(255 255 255)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Transitions with transition: all: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL - - [CSS Animations: property from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/lab-l-over-100-1.html.ini b/tests/wpt/meta/css/css-color/lab-l-over-100-1.html.ini deleted file mode 100644 index 1268be360f7..00000000000 --- a/tests/wpt/meta/css/css-color/lab-l-over-100-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lab-l-over-100-1.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/lab-l-over-100-2.html.ini b/tests/wpt/meta/css/css-color/lab-l-over-100-2.html.ini deleted file mode 100644 index 5e35aa2a18c..00000000000 --- a/tests/wpt/meta/css/css-color/lab-l-over-100-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lab-l-over-100-2.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/lch-l-over-100-1.html.ini b/tests/wpt/meta/css/css-color/lch-l-over-100-1.html.ini deleted file mode 100644 index a33b5625711..00000000000 --- a/tests/wpt/meta/css/css-color/lch-l-over-100-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lch-l-over-100-1.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/lch-l-over-100-2.html.ini b/tests/wpt/meta/css/css-color/lch-l-over-100-2.html.ini deleted file mode 100644 index 3576be46a62..00000000000 --- a/tests/wpt/meta/css/css-color/lch-l-over-100-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[lch-l-over-100-2.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/oklab-l-over-1-1.html.ini b/tests/wpt/meta/css/css-color/oklab-l-over-1-1.html.ini deleted file mode 100644 index e17a8f176ef..00000000000 --- a/tests/wpt/meta/css/css-color/oklab-l-over-1-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklab-l-over-1-1.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/oklab-l-over-1-2.html.ini b/tests/wpt/meta/css/css-color/oklab-l-over-1-2.html.ini deleted file mode 100644 index e804f1df128..00000000000 --- a/tests/wpt/meta/css/css-color/oklab-l-over-1-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklab-l-over-1-2.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/oklch-l-over-1-1.html.ini b/tests/wpt/meta/css/css-color/oklch-l-over-1-1.html.ini deleted file mode 100644 index 3a1231976ac..00000000000 --- a/tests/wpt/meta/css/css-color/oklch-l-over-1-1.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklch-l-over-1-1.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/oklch-l-over-1-2.html.ini b/tests/wpt/meta/css/css-color/oklch-l-over-1-2.html.ini deleted file mode 100644 index 9f918b7b99f..00000000000 --- a/tests/wpt/meta/css/css-color/oklch-l-over-1-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[oklch-l-over-1-2.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-color/parsing/color-computed-lab.html.ini b/tests/wpt/meta/css/css-color/parsing/color-computed-lab.html.ini index 39ed8d86858..17fe1348a9b 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-computed-lab.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-computed-lab.html.ini @@ -1,10 +1,4 @@ [color-computed-lab.html] - [Property color value 'lab(400 0 10/50%)'] - expected: FAIL - - [Property color value 'lab(calc(50 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklab(20 0 10/0.5)'] expected: FAIL @@ -38,9 +32,6 @@ [Property color value 'oklab(20 none none / none)'] expected: FAIL - [Property color value 'lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklch(100 230 0deg / 0.5)'] expected: FAIL @@ -104,18 +95,9 @@ [Property color value 'oklch(20% 0 10/0.5)'] expected: FAIL - [Property color value 'oklab(4 0 0.1/50%)'] - expected: FAIL - - [Property color value 'oklab(calc(0.5 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'oklab(20% 0 0.1/0.5)'] expected: FAIL - [Property color value 'oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))'] - expected: FAIL - [Property color value 'lab(calc(NaN) 0 0)'] expected: FAIL diff --git a/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini index 928fcb9476b..45fe5b3df7b 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1,16 +1,4 @@ [color-valid-color-mix-function.html] - [e.style['color'\] = "color-mix(in hsl, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hsl, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hwb, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value] - expected: FAIL - [e.style['color'\] = "color-mix(in oklch, oklch(10 20 30deg), oklch(50 60 70deg))" should set the property value] expected: FAIL diff --git a/tests/wpt/meta/css/css-color/parsing/color-valid-lab.html.ini b/tests/wpt/meta/css/css-color/parsing/color-valid-lab.html.ini index ccc983760a2..c1f82f1dc4a 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-valid-lab.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-valid-lab.html.ini @@ -1,10 +1,4 @@ [color-valid-lab.html] - [e.style['color'\] = "lab(400 0 10/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "lab(calc(50 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "oklab(20 0 10/0.5)" should set the property value] expected: FAIL @@ -38,9 +32,6 @@ [e.style['color'\] = "oklab(20 none none / none)" should set the property value] expected: FAIL - [e.style['color'\] = "lch(calc(50 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "oklch(100 230 0deg / 0.5)" should set the property value] expected: FAIL @@ -92,15 +83,6 @@ [e.style['color'\] = "oklch(20 none none / none)" should set the property value] expected: FAIL - [e.style['color'\] = "oklab(4 0 0.1/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "oklab(calc(0.5 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - - [e.style['color'\] = "oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))" should set the property value] - expected: FAIL - [e.style['color'\] = "lab(calc(infinity) 0 0)" should set the property value] expected: FAIL diff --git a/tests/wpt/meta/css/css-conditional/at-supports-048.html.ini b/tests/wpt/meta/css/css-conditional/at-supports-048.html.ini deleted file mode 100644 index f23f24659a2..00000000000 --- a/tests/wpt/meta/css/css-conditional/at-supports-048.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[at-supports-048.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-easing/linear-timing-functions-syntax.tentative.html.ini b/tests/wpt/meta/css/css-easing/linear-timing-functions-syntax.tentative.html.ini deleted file mode 100644 index bf4ef93cf16..00000000000 --- a/tests/wpt/meta/css/css-easing/linear-timing-functions-syntax.tentative.html.ini +++ /dev/null @@ -1,33 +0,0 @@ -[linear-timing-functions-syntax.tentative.html] - [e.style['animation-timing-function'\] = "linear(0 0%, 1 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0 0% 50%, 1 50% 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0, 0.5 25% 75%, 1 100% 100%)" should set the property value] - expected: FAIL - - [e.style['animation-timing-function'\] = "linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 1.004, 0.998, 1 100% 100%)" should set the property value] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 1)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(0%), 0 calc(100%))'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(50% - 50%), 0 calc(50% + 50%))'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 calc(min(50%, 60%)), 0 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0 0% 50%, 1 50% 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 0.5 25% 75%, 1 100% 100%)'] - expected: FAIL - - [Property animation-timing-function value 'linear(0, 1.3, 1, 0.92, 1, 0.99, 1, 0.998, 1 100% 100%)'] - expected: FAIL diff --git a/tests/wpt/meta/css/css-transitions/parsing/transition-timing-function-valid.html.ini b/tests/wpt/meta/css/css-transitions/parsing/transition-timing-function-valid.html.ini index e3841f8ea94..ea8b877a25d 100644 --- a/tests/wpt/meta/css/css-transitions/parsing/transition-timing-function-valid.html.ini +++ b/tests/wpt/meta/css/css-transitions/parsing/transition-timing-function-valid.html.ini @@ -10,12 +10,3 @@ [e.style['transition-timing-function'\] = "steps(2, jump-start)" should set the property value] expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 0.5 50%, 1 100%)" should set the property value] - expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 10 10%, 10 50%, 25.4 75%, 100 100%)" should set the property value] - expected: FAIL - - [e.style['transition-timing-function'\] = "linear(0 0%, 1 100%)" should set the property value] - expected: FAIL diff --git a/tests/wpt/meta/css/css-transitions/transition-001.html.ini b/tests/wpt/meta/css/css-transitions/transition-001.html.ini deleted file mode 100644 index ea7e84ffda3..00000000000 --- a/tests/wpt/meta/css/css-transitions/transition-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[transition-001.html] - [parse '1s width linear(0, .5 10% 20%, 1, .5 50%, 1) 2s'] - expected: FAIL diff --git a/tests/wpt/meta/css/css-values/clamp-length-computed.html.ini b/tests/wpt/meta/css/css-values/clamp-length-computed.html.ini deleted file mode 100644 index dc0b1693871..00000000000 --- a/tests/wpt/meta/css/css-values/clamp-length-computed.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[clamp-length-computed.html] - [Property letter-spacing value 'calc(0px - clamp(30px, 100px, 20px))'] - expected: FAIL diff --git a/tests/wpt/meta/css/css-values/clamp-length-serialize.html.ini b/tests/wpt/meta/css/css-values/clamp-length-serialize.html.ini deleted file mode 100644 index 944c6860e3e..00000000000 --- a/tests/wpt/meta/css/css-values/clamp-length-serialize.html.ini +++ /dev/null @@ -1,12 +0,0 @@ -[clamp-length-serialize.html] - [e.style['letter-spacing'\] = "calc(0px - clamp(30px, 100px, 20px))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(calc(0px - clamp(30px, 100px, 20px)))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(0px - clamp(1px, 1em, 1vh))" should set the property value] - expected: FAIL - - [e.style['letter-spacing'\] = "calc(calc(0px - clamp(1px, 1em, 1vh)))" should set the property value] - expected: FAIL diff --git a/tests/wpt/meta/css/css-variables/revert-in-fallback.html.ini b/tests/wpt/meta/css/css-variables/revert-in-fallback.html.ini deleted file mode 100644 index 850f84ca3cc..00000000000 --- a/tests/wpt/meta/css/css-variables/revert-in-fallback.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[revert-in-fallback.html] - [var(--unknown, revert) in custom property] - expected: FAIL diff --git a/tests/wpt/meta/css/css-variables/wide-keyword-fallback-002.html.ini b/tests/wpt/meta/css/css-variables/wide-keyword-fallback-002.html.ini deleted file mode 100644 index 2591556c763..00000000000 --- a/tests/wpt/meta/css/css-variables/wide-keyword-fallback-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[wide-keyword-fallback-002.html] - expected: FAIL