mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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
This commit is contained in:
parent
94c1f2c992
commit
c07484fcb6
67 changed files with 235 additions and 491 deletions
37
Cargo.lock
generated
37
Cargo.lock
generated
|
@ -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",
|
||||
|
|
20
Cargo.toml
20
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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<Color, LengthPercentage>],
|
||||
direction: LineDirection,
|
||||
_color_interpolation_method: &ColorInterpolationMethod,
|
||||
repeating: bool,
|
||||
flags: GradientFlags,
|
||||
) -> (Gradient, Vec<GradientStop>) {
|
||||
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<GradientStop>) {
|
||||
let repeating = flags.contains(GradientFlags::REPEATING);
|
||||
let center = Point2D::new(
|
||||
center.horizontal.to_used_value(size.width),
|
||||
center.vertical.to_used_value(size.height),
|
||||
|
|
|
@ -771,7 +771,7 @@ impl CollapsedBorder {
|
|||
CollapsedBorder {
|
||||
style: BorderStyle::None,
|
||||
width: Au(0),
|
||||
color: Color::transparent(),
|
||||
color: Color::TRANSPARENT,
|
||||
provenance: CollapsedBorderFrom::Table,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Color, LengthPercentage>],
|
||||
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<Color, AngleOrPercentage>],
|
||||
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()
|
||||
|
|
|
@ -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<CanvasGradient>),
|
||||
Pattern(Dom<CanvasPattern>),
|
||||
}
|
||||
|
@ -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<Font>,
|
||||
#[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<RGBA, ()> {
|
||||
pub fn parse_color(canvas: Option<&HTMLCanvasElement>, string: &str) -> Result<RgbaLegacy, ()> {
|
||||
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<R
|
|||
// https://drafts.css-houdini.org/css-paint-api/#2d-rendering-context
|
||||
// Whenever "currentColor" is used as a color in the PaintRenderingContext2D API,
|
||||
// it is treated as opaque black.
|
||||
None => AbsoluteColor::black(),
|
||||
None => AbsoluteColor::BLACK,
|
||||
Some(ref canvas) => {
|
||||
let canvas_element = canvas.upcast::<Element>();
|
||||
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<R
|
|||
let rgba = color
|
||||
.resolve_to_absolute(¤t_color)
|
||||
.to_color_space(ColorSpace::Srgb);
|
||||
Ok(RGBA::from_floats(
|
||||
Some(rgba.components.0),
|
||||
Some(rgba.components.1),
|
||||
Some(rgba.components.2),
|
||||
Some(rgba.alpha),
|
||||
Ok(RgbaLegacy::from_floats(
|
||||
rgba.components.0,
|
||||
rgba.components.1,
|
||||
rgba.components.2,
|
||||
rgba.alpha,
|
||||
))
|
||||
},
|
||||
None => Err(()),
|
||||
|
@ -1737,16 +1737,17 @@ pub fn is_rect_valid(rect: Rect<f64>) -> bool {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#serialisation-of-a-color
|
||||
pub fn serialize<W>(color: &RGBA, dest: &mut W) -> fmt::Result
|
||||
pub fn serialize<W>(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}",
|
||||
|
|
|
@ -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<Element> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
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<Element> 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 {
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_color(self) -> Option<RGBA>;
|
||||
fn get_background_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_background(self) -> Option<ServoUrl>;
|
||||
}
|
||||
|
||||
impl HTMLBodyElementLayoutHelpers for LayoutDom<'_, HTMLBodyElement> {
|
||||
fn get_background_color(self) -> Option<RGBA> {
|
||||
fn get_background_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
|
||||
.and_then(AttrValue::as_color)
|
||||
.cloned()
|
||||
}
|
||||
|
||||
fn get_color(self) -> Option<RGBA> {
|
||||
fn get_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("text"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_face(self) -> Option<Atom>;
|
||||
fn get_size(self) -> Option<u32>;
|
||||
}
|
||||
|
||||
impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> {
|
||||
fn get_color(self) -> Option<RGBA> {
|
||||
fn get_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("color"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_width(self) -> LengthOrPercentageOrAuto;
|
||||
}
|
||||
|
||||
impl HTMLHRLayoutHelpers for LayoutDom<'_, HTMLHRElement> {
|
||||
fn get_color(self) -> Option<RGBA> {
|
||||
fn get_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("color"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -126,7 +126,6 @@ impl HTMLStyleElement {
|
|||
Some(&loader),
|
||||
css_error_reporter,
|
||||
doc.quirks_mode(),
|
||||
self.line_number as u32,
|
||||
AllowImportRules::Yes,
|
||||
);
|
||||
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_background_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_colspan(self) -> Option<u32>;
|
||||
fn get_rowspan(self) -> Option<u32>;
|
||||
fn get_table(self) -> Option<LayoutDom<'dom, HTMLTableElement>>;
|
||||
|
@ -114,7 +114,7 @@ pub trait HTMLTableCellElementLayoutHelpers<'dom> {
|
|||
}
|
||||
|
||||
impl<'dom> HTMLTableCellElementLayoutHelpers<'dom> for LayoutDom<'dom, HTMLTableCellElement> {
|
||||
fn get_background_color(self) -> Option<RGBA> {
|
||||
fn get_background_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_background_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_border(self) -> Option<u32>;
|
||||
fn get_cellpadding(self) -> Option<u32>;
|
||||
fn get_cellspacing(self) -> Option<u32>;
|
||||
|
@ -433,7 +433,7 @@ pub trait HTMLTableElementLayoutHelpers {
|
|||
}
|
||||
|
||||
impl HTMLTableElementLayoutHelpers for LayoutDom<'_, HTMLTableElement> {
|
||||
fn get_background_color(self) -> Option<RGBA> {
|
||||
fn get_background_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_background_color(self) -> Option<RgbaLegacy>;
|
||||
}
|
||||
|
||||
impl HTMLTableRowElementLayoutHelpers for LayoutDom<'_, HTMLTableRowElement> {
|
||||
fn get_background_color(self) -> Option<RGBA> {
|
||||
fn get_background_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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<RGBA>;
|
||||
fn get_background_color(self) -> Option<RgbaLegacy>;
|
||||
}
|
||||
|
||||
impl HTMLTableSectionElementLayoutHelpers for LayoutDom<'_, HTMLTableSectionElement> {
|
||||
fn get_background_color(self) -> Option<RGBA> {
|
||||
fn get_background_color(self) -> Option<RgbaLegacy> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[malformed-decl-block-001.xht]
|
||||
expected: FAIL
|
|
@ -325,30 +325,3 @@
|
|||
|
||||
[Web Animations: property <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[lab-l-over-100-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lab-l-over-100-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lch-l-over-100-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lch-l-over-100-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklab-l-over-1-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklab-l-over-1-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklch-l-over-1-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklch-l-over-1-2.html]
|
||||
expected: FAIL
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[at-supports-048.html]
|
||||
expected: FAIL
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[transition-001.html]
|
||||
[parse '1s width linear(0, .5 10% 20%, 1, .5 50%, 1) 2s']
|
||||
expected: FAIL
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[wide-keyword-fallback-002.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[malformed-decl-block-001.xht]
|
||||
expected: FAIL
|
|
@ -322,30 +322,3 @@
|
|||
|
||||
[Web Animations: property <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> 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 <color> from [color(srgb 0 0 0)\] to [color(srgb 1 1 1)\] at (1.5) should be [oklab(1 0 0)\]]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[lab-l-over-100-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lab-l-over-100-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lch-l-over-100-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[lch-l-over-100-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklab-l-over-1-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklab-l-over-1-2.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklch-l-over-1-1.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[oklch-l-over-1-2.html]
|
||||
expected: FAIL
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[at-supports-048.html]
|
||||
expected: FAIL
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[transition-001.html]
|
||||
[parse '1s width linear(0, .5 10% 20%, 1, .5 50%, 1) 2s']
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[clamp-length-computed.html]
|
||||
[Property letter-spacing value 'calc(0px - clamp(30px, 100px, 20px))']
|
||||
expected: FAIL
|
|
@ -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
|
|
@ -1,3 +0,0 @@
|
|||
[revert-in-fallback.html]
|
||||
[var(--unknown, revert) in custom property]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[wide-keyword-fallback-002.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue