From 357fc0332391bb6603b29453e644d9326807afbb Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 22:01:22 -0700 Subject: [PATCH 01/18] Update WebRender --- Cargo.lock | 228 +++++++++++++++++++++++++---------------------------- 1 file changed, 106 insertions(+), 122 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 623c094c9cf..76b4ceab2b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,7 +83,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -161,7 +161,7 @@ dependencies = [ "mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "unwind-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -206,7 +206,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -282,7 +282,7 @@ dependencies = [ "embedder_traits 0.0.1", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -398,7 +398,7 @@ dependencies = [ "cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -419,13 +419,13 @@ version = "0.0.1" dependencies = [ "cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pixels 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -450,8 +450,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -486,7 +486,7 @@ name = "cgl" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -599,7 +599,7 @@ dependencies = [ "embedder_traits 0.0.1", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -655,7 +655,7 @@ dependencies = [ "net_traits 0.0.1", "profile_traits 0.0.1", "script_traits 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "servo_geometry 0.0.1", "servo_rand 0.0.1", @@ -824,7 +824,7 @@ dependencies = [ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -999,7 +999,7 @@ dependencies = [ "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1015,7 +1015,7 @@ dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1087,8 +1087,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1099,6 +1099,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1119,7 +1121,7 @@ dependencies = [ "msg 0.0.1", "num-derive 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "style_traits 0.0.1", "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", @@ -1228,7 +1230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "euclid_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1451,7 +1453,7 @@ dependencies = [ "ordered-float 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "packed_simd 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "range 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_allocator 0.0.1", "servo_arc 0.1.1", @@ -1476,7 +1478,7 @@ dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "range 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1520,7 +1522,7 @@ dependencies = [ [[package]] name = "gleam" -version = "0.6.16" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2107,7 +2109,7 @@ dependencies = [ "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2209,7 +2211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2235,7 +2237,7 @@ dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.18 (git+https://github.com/servo/mio.git?branch=servo)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2304,7 +2306,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2344,7 +2346,7 @@ dependencies = [ "script_layout_interface 0.0.1", "script_traits 0.0.1", "selectors 0.21.0", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "servo_atoms 0.0.1", @@ -2541,7 +2543,7 @@ dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.2.0 (git+https://github.com/servo/gaol)", "gfx 0.0.1", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "layout_thread_2013 0.0.1", @@ -2688,7 +2690,7 @@ dependencies = [ "hyper_serde 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.21.0", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2728,8 +2730,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2966,7 +2968,7 @@ version = "0.0.1" dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "size_of_test 0.0.1", "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", ] @@ -3011,7 +3013,7 @@ dependencies = [ "pixels 0.0.1", "profile_traits 0.0.1", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo_allocator 0.0.1", "servo_arc 0.1.1", @@ -3060,7 +3062,7 @@ dependencies = [ "msg 0.0.1", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "pixels 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "servo_config 0.0.1", "servo_url 0.0.1", @@ -3201,13 +3203,13 @@ dependencies = [ "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3416,7 +3418,7 @@ dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3490,7 +3492,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo_allocator 0.0.1", "servo_config 0.0.1", @@ -3519,7 +3521,7 @@ dependencies = [ "energymon 0.3.0 (git+https://github.com/energymon/energymon-rust.git)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3653,7 +3655,7 @@ dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3753,7 +3755,7 @@ name = "ron" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3764,7 +3766,7 @@ dependencies = [ "bindgen 0.49.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3780,10 +3782,10 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_injected_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3865,7 +3867,7 @@ dependencies = [ "enum-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3905,7 +3907,7 @@ dependencies = [ "script_plugins 0.0.1", "script_traits 0.0.1", "selectors 0.21.0", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo-media 0.1.0 (git+https://github.com/servo/media)", @@ -4013,7 +4015,7 @@ dependencies = [ "net_traits 0.0.1", "pixels 0.0.1", "profile_traits 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_atoms 0.0.1", "servo_url 0.0.1", "style_traits 0.0.1", @@ -4059,10 +4061,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.80" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4070,12 +4072,12 @@ name = "serde_bytes" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.80" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4091,7 +4093,7 @@ dependencies = [ "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4104,7 +4106,7 @@ dependencies = [ "clipboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4183,10 +4185,9 @@ dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo-media-traits 0.1.0 (git+https://github.com/servo/media)", - "servo_media_derive 0.1.0 (git+https://github.com/servo/media)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4269,8 +4270,8 @@ version = "0.1.0" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f" dependencies = [ "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo-media-streams 0.1.0 (git+https://github.com/servo/media)", "servo-media-traits 0.1.0 (git+https://github.com/servo/media)", ] @@ -4308,7 +4309,7 @@ dependencies = [ "cmake 0.1.40 (git+https://github.com/alexcrichton/cmake-rs)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4332,7 +4333,7 @@ name = "servo_arc" version = "0.1.1" dependencies = [ "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4356,8 +4357,8 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config_plugins 0.0.1", "servo_geometry 0.0.1", @@ -4422,7 +4423,7 @@ version = "0.0.1" dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_rand 0.0.1", "to_shmem 0.0.1", "to_shmem_derive 0.0.1", @@ -4442,11 +4443,6 @@ dependencies = [ "opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "sha2" version = "0.8.0" @@ -4547,7 +4543,7 @@ name = "smallvec" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4611,7 +4607,7 @@ dependencies = [ "new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4677,7 +4673,7 @@ dependencies = [ "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.21.0", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "servo_atoms 0.0.1", "servo_config 0.0.1", @@ -4745,7 +4741,7 @@ dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.21.0", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "servo_atoms 0.0.1", "servo_url 0.0.1", @@ -4754,6 +4750,11 @@ dependencies = [ "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", ] +[[package]] +name = "svg_fmt" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "sw-composite" version = "0.5.3" @@ -4900,7 +4901,7 @@ name = "to_shmem" version = "0.0.1" dependencies = [ "cssparser 0.25.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.1.1", "smallbitvec 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5086,7 +5087,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5171,8 +5172,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5235,7 +5236,7 @@ name = "url_serde" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5258,7 +5259,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5365,8 +5366,8 @@ dependencies = [ "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5392,7 +5393,7 @@ dependencies = [ "pixels 0.0.1", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "servo_url 0.0.1", @@ -5404,9 +5405,8 @@ dependencies = [ [[package]] name = "webrender" version = "0.60.0" -source = "git+https://github.com/jdm/webrender?branch=servo-hl#005b785bfa91cff265077b4b9c4dafea8768b526" +source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" dependencies = [ - "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5416,10 +5416,11 @@ dependencies = [ "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 13.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "cstr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5429,22 +5430,23 @@ dependencies = [ "plane-split 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "svg_fmt 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "thread_profiler 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_build 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "wr_malloc_size_of 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_build 0.0.1 (git+https://github.com/servo/webrender)", + "wr_malloc_size_of 0.0.1 (git+https://github.com/servo/webrender)", + "ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webrender_api" version = "0.60.0" -source = "git+https://github.com/jdm/webrender?branch=servo-hl#005b785bfa91cff265077b4b9c4dafea8768b526" +source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5456,9 +5458,9 @@ dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "wr_malloc_size_of 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)", ] @@ -5466,7 +5468,7 @@ dependencies = [ [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/jdm/webrender?branch=servo-hl#005b785bfa91cff265077b4b9c4dafea8768b526" +source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5487,7 +5489,7 @@ dependencies = [ "canvas_traits 0.0.1", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -5505,7 +5507,7 @@ dependencies = [ "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "rust-webvr-api 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5527,7 +5529,7 @@ dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5618,29 +5620,12 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/jdm/webrender?branch=servo-hl#005b785bfa91cff265077b4b9c4dafea8768b526" +source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ws" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.18 (git+https://github.com/servo/mio.git?branch=servo)", - "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ws" version = "0.8.1" @@ -5872,7 +5857,7 @@ dependencies = [ "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0ffaf173cf76c73a73e080366bf556b4776ece104b06961766ff11449f38604" "checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd" -"checksum gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "39bb69499005e11b7b7cc0af38404a1bc0f53d954bffa8adcdb6e8d5b14f75d5" +"checksum gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7f46fd8874e043ffac0d638ed1567a2584f7814f6d72b4db37ab1689004a26c4" "checksum glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d70d737019da0473a7cd6d9240571cf58c6897dcb10edf32b90774f4ba237c1b" "checksum glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b86a9169fbc9cf9a0ef315039c2304b09d5c575c5fde7defba3576a0311b863" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" @@ -6068,9 +6053,9 @@ dependencies = [ "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" +"checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" "checksum serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)" = "adb6e51a6b3696b301bc221d785f898b4457c619b51d7ce195a6d20baecb37b3" -"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" +"checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" "checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" "checksum servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21069a884c33fe6ee596975e1f3849ed88c4ec857fbaf11d33672d8ebe051217" "checksum servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9" @@ -6089,7 +6074,6 @@ dependencies = [ "checksum servo-skia 0.30000021.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0a65022054874fc1f38dc45e19192accbae775784c3ff05c3875bcc176c19" "checksum servo_media_derive 0.1.0 (git+https://github.com/servo/media)" = "" "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum shared_library 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8254bf098ce4d8d7cc7cc6de438c5488adc5297e5b7ffef88816c0a91bd289c1" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" @@ -6108,6 +6092,7 @@ dependencies = [ "checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da" "checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum svg_fmt 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c666f0fed8e1e20e057af770af9077d72f3d5a33157b8537c1475dd8ffd6d32b" "checksum sw-composite 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1638f200d9594cad22e9e58baf046382d8f5a38d40878db1705dcaeae239093" "checksum swapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e454d048db5527d000bfddb77bd072bbf3a1e2ae785f16d9bd116e07c2ab45eb" "checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" @@ -6188,8 +6173,7 @@ dependencies = [ "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum winit 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d233301129ddd33260b47f76900b50e154b7254546e2edba0e5468a1a5fe4de3" "checksum winres 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "27d9192d6356d7efe8405dec6c5506b67543cf64b6049968f39f4c4623b4f25d" -"checksum wr_malloc_size_of 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "" -"checksum ws 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "329d3e6dd450a9c5c73024e1047f0be7e24121a68484eb0b5368977bee3cf8c3" +"checksum wr_malloc_size_of 0.0.1 (git+https://github.com/servo/webrender)" = "" "checksum ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec91ea61b83ce033c43c06c52ddc7532f465c0153281610d44c58b74083aee1a" "checksum x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5c4ac579b5d324dc4add02312b5d0e3e0218521e2d5779d526ac39ee4bb171" "checksum x11-clipboard 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d8617c6185c96e5fcf57ff156496d73c9c82b7f09a5fea21b518dd32c10e2e05" From 2f9c9cefdb74713593c47eec2002c5dd5416848b Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 15:21:58 -0700 Subject: [PATCH 02/18] WebRender units are no longer reexported. --- components/canvas/canvas_data.rs | 2 +- components/canvas/webgl_mode/inprocess.rs | 4 ++-- components/canvas/webgl_thread.rs | 2 +- components/compositing/compositor.rs | 21 ++++++++----------- components/compositing/compositor_thread.rs | 3 ++- components/compositing/windowing.rs | 7 +++---- components/embedder_traits/lib.rs | 2 +- components/geometry/lib.rs | 2 +- components/layout/display_list/border.rs | 4 ++-- components/layout/display_list/builder.rs | 11 +++++----- components/layout/display_list/conversions.rs | 20 +++++++++--------- components/layout/display_list/items.rs | 10 ++++----- .../layout/display_list/webrender_helpers.rs | 9 ++++---- components/layout/flow.rs | 2 +- components/layout/fragment.rs | 3 ++- components/layout/sequential.rs | 2 +- components/layout_thread/lib.rs | 7 ++++--- components/net/image_cache.rs | 3 ++- components/script/dom/screen.rs | 2 +- components/script/dom/window.rs | 3 ++- components/script_traits/lib.rs | 5 ++--- components/script_traits/script_msg.rs | 2 +- components/style_traits/lib.rs | 2 +- components/webrender_traits/lib.rs | 5 +++-- 24 files changed, 65 insertions(+), 68 deletions(-) diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index aa6539ebbb9..4a55529066c 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -941,7 +941,7 @@ impl<'a> CanvasData<'a> { let size = self.drawtarget.get_size(); let descriptor = webrender_api::ImageDescriptor { - size: webrender_api::DeviceIntSize::new(size.width, size.height), + size: webrender_api::units::DeviceIntSize::new(size.width, size.height), stride: None, format: webrender_api::ImageFormat::BGRA8, offset: 0, diff --git a/components/canvas/webgl_mode/inprocess.rs b/components/canvas/webgl_mode/inprocess.rs index d0203f7498b..8584289b904 100644 --- a/components/canvas/webgl_mode/inprocess.rs +++ b/components/canvas/webgl_mode/inprocess.rs @@ -159,7 +159,7 @@ impl webrender::OutputImageHandler for OutputHandler { fn lock( &mut self, id: webrender_api::PipelineId, - ) -> Option<(u32, webrender_api::FramebufferIntSize)> { + ) -> Option<(u32, webrender_api::units::FramebufferIntSize)> { // Insert a fence in the WR command queue let gl_sync = self .webrender_gl @@ -172,7 +172,7 @@ impl webrender::OutputImageHandler for OutputHandler { self.lock_channel.1.recv().unwrap().map(|(tex_id, size)| { ( tex_id, - webrender_api::FramebufferIntSize::new(size.width, size.height), + webrender_api::units::FramebufferIntSize::new(size.width, size.height), ) }) } diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 4b2e59dd216..8bda48d0739 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -643,7 +643,7 @@ impl WebGLThread { /// Helper function to create a `webrender_api::ImageDescriptor`. fn image_descriptor(size: Size2D, alpha: bool) -> webrender_api::ImageDescriptor { webrender_api::ImageDescriptor { - size: webrender_api::DeviceIntSize::new(size.width, size.height), + size: webrender_api::units::DeviceIntSize::new(size.width, size.height), stride: None, format: webrender_api::ImageFormat::BGRA8, offset: 0, diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index bb8f4d8f2f0..c4ee45bb8e7 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -42,10 +42,8 @@ use std::rc::Rc; use style_traits::viewport::ViewportConstraints; use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use time::{now, precise_time_ns, precise_time_s}; -use webrender_api::{ - self, DeviceIntPoint, DevicePoint, FramebufferIntSize, HitTestFlags, HitTestResult, -}; -use webrender_api::{LayoutVector2D, ScrollLocation}; +use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation}; +use webrender_api::units::{DeviceIntPoint, DevicePoint, FramebufferIntSize, LayoutVector2D}; use webvr_traits::WebVRMainThreadHeartbeat; #[derive(Debug, PartialEq)] @@ -724,7 +722,7 @@ impl IOCompositor { let dppx = self.page_zoom * self.hidpi_factor(); let scaled_point = (point / dppx).to_untyped(); - let world_cursor = webrender_api::WorldPoint::from_untyped(&scaled_point); + let world_cursor = webrender_api::units::WorldPoint::from_untyped(&scaled_point); self.webrender_api.hit_test( self.webrender_document, None, @@ -844,8 +842,8 @@ impl IOCompositor { let cursor = TypedPoint2D::new(-1, -1); // Make sure this hits the base layer. self.pending_scroll_zoom_events.push(ScrollZoomEvent { magnification: magnification, - scroll_location: ScrollLocation::Delta( - webrender_api::LayoutVector2D::from_untyped(&scroll_delta.to_untyped()), + scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped( + &scroll_delta.to_untyped()), ), cursor: cursor, event_count: 1, @@ -933,8 +931,8 @@ impl IOCompositor { last_combined_event @ &mut None => { *last_combined_event = Some(ScrollZoomEvent { magnification: scroll_event.magnification, - scroll_location: ScrollLocation::Delta( - webrender_api::LayoutVector2D::from_untyped(&this_delta.to_untyped()), + scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped( + &this_delta.to_untyped()), ), cursor: this_cursor, event_count: 1, @@ -966,15 +964,14 @@ impl IOCompositor { let scaled_delta = (TypedVector2D::from_untyped(&delta.to_untyped()) / self.scale) .to_untyped(); - let calculated_delta = - webrender_api::LayoutVector2D::from_untyped(&scaled_delta); + let calculated_delta = LayoutVector2D::from_untyped(&scaled_delta); ScrollLocation::Delta(calculated_delta) }, // Leave ScrollLocation unchanged if it is Start or End location. sl @ ScrollLocation::Start | sl @ ScrollLocation::End => sl, }; let cursor = (combined_event.cursor.to_f32() / self.scale).to_untyped(); - let cursor = webrender_api::WorldPoint::from_untyped(&cursor); + let cursor = webrender_api::units::WorldPoint::from_untyped(&cursor); let mut txn = webrender_api::Transaction::new(); txn.scroll(scroll_location, cursor); if combined_event.magnification != 1.0 { diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index 8ef56c813c3..ad318368b69 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -17,7 +17,8 @@ use profile_traits::time; use script_traits::{AnimationState, ConstellationMsg, EventResult}; use std::fmt::{Debug, Error, Formatter}; use style_traits::viewport::ViewportConstraints; -use webrender_api::{self, DeviceIntPoint, DeviceIntSize}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; +use webrender_api; use webvr_traits::WebVRMainThreadHeartbeat; /// Sends messages to the compositor. diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 91d954a281a..64607668f27 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -19,10 +19,9 @@ use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use std::time::Duration; use style_traits::DevicePixel; -use webrender_api::{ - DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint, FramebufferIntRect, - FramebufferIntSize, ScrollLocation, -}; +use webrender_api::ScrollLocation; +use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint}; +use webrender_api::units::{FramebufferIntRect, FramebufferIntSize}; use webvr::VRServiceManager; use webvr_traits::WebVRMainThreadHeartbeat; diff --git a/components/embedder_traits/lib.rs b/components/embedder_traits/lib.rs index ac427c42995..7622f0e5822 100644 --- a/components/embedder_traits/lib.rs +++ b/components/embedder_traits/lib.rs @@ -19,7 +19,7 @@ use keyboard_types::KeyboardEvent; use msg::constellation_msg::{InputMethodType, PipelineId, TopLevelBrowsingContextId}; use servo_url::ServoUrl; use std::fmt::{Debug, Error, Formatter}; -use webrender_api::{DeviceIntPoint, DeviceIntSize}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; /// A cursor for the window. This is different from a CSS cursor (see /// `CursorKind`) in that it has no `Auto` value. diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs index 45d423f0ab5..155551ee3d9 100644 --- a/components/geometry/lib.rs +++ b/components/geometry/lib.rs @@ -8,7 +8,7 @@ extern crate malloc_size_of_derive; use app_units::{Au, MAX_AU, MIN_AU}; use euclid::{Length, Point2D, Rect, Size2D}; use std::f32; -use webrender_api::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize}; +use webrender_api::units::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize}; // Units for use with euclid::length and euclid::scale_factor. diff --git a/components/layout/display_list/border.rs b/components/layout/display_list/border.rs index 848386cb630..fff18fcf6c0 100644 --- a/components/layout/display_list/border.rs +++ b/components/layout/display_list/border.rs @@ -12,8 +12,8 @@ use style::values::computed::{BorderCornerRadius, BorderImageWidth}; use style::values::computed::{BorderImageSideWidth, NonNegativeLengthOrNumber}; use style::values::generics::rect::Rect as StyleRect; use style::values::generics::NonNegative; -use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF}; -use webrender_api::{LayoutSideOffsets, LayoutSize, NormalBorder}; +use webrender_api::units::{LayoutSideOffsets, LayoutSize}; +use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF, NormalBorder}; /// Computes a border radius size against the containing size. /// diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 8d32ec01520..1653afbc198 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -64,12 +64,11 @@ use style::values::generics::image::{GradientKind, PaintWorklet}; use style::values::specified::ui::CursorKind; use style::values::{Either, RGBA}; use style_traits::ToCss; -use webrender_api::{ - self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF, ColorU, - ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LayoutRect, LayoutSize, - LayoutTransform, LayoutVector2D, LineStyle, NinePatchBorder, NinePatchBorderSource, - NormalBorder, ScrollSensitivity, StickyOffsetBounds, -}; +use webrender_api::units::{LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D}; +use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle}; +use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder}; +use webrender_api::{ScrollSensitivity, StickyOffsetBounds}; +use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; static THREAD_TINT_COLORS: [ColorF; 8] = [ ColorF { diff --git a/components/layout/display_list/conversions.rs b/components/layout/display_list/conversions.rs index f541ef581ac..4624b5f8dd0 100644 --- a/components/layout/display_list/conversions.rs +++ b/components/layout/display_list/conversions.rs @@ -114,23 +114,23 @@ impl ToLayout for RGBA { } impl ToLayout for Point2D { - type Type = wr::LayoutPoint; + type Type = wr::units::LayoutPoint; fn to_layout(&self) -> Self::Type { - wr::LayoutPoint::new(self.x.to_f32_px(), self.y.to_f32_px()) + wr::units::LayoutPoint::new(self.x.to_f32_px(), self.y.to_f32_px()) } } impl ToLayout for Rect { - type Type = wr::LayoutRect; + type Type = wr::units::LayoutRect; fn to_layout(&self) -> Self::Type { - wr::LayoutRect::new(self.origin.to_layout(), self.size.to_layout()) + wr::units::LayoutRect::new(self.origin.to_layout(), self.size.to_layout()) } } impl ToLayout for SideOffsets2D { - type Type = wr::LayoutSideOffsets; + type Type = wr::units::LayoutSideOffsets; fn to_layout(&self) -> Self::Type { - wr::LayoutSideOffsets::new( + wr::units::LayoutSideOffsets::new( self.top.to_f32_px(), self.right.to_f32_px(), self.bottom.to_f32_px(), @@ -140,16 +140,16 @@ impl ToLayout for SideOffsets2D { } impl ToLayout for Size2D { - type Type = wr::LayoutSize; + type Type = wr::units::LayoutSize; fn to_layout(&self) -> Self::Type { - wr::LayoutSize::new(self.width.to_f32_px(), self.height.to_f32_px()) + wr::units::LayoutSize::new(self.width.to_f32_px(), self.height.to_f32_px()) } } impl ToLayout for Vector2D { - type Type = wr::LayoutVector2D; + type Type = wr::units::LayoutVector2D; fn to_layout(&self) -> Self::Type { - wr::LayoutVector2D::new(self.x.to_f32_px(), self.y.to_f32_px()) + wr::units::LayoutVector2D::new(self.x.to_f32_px(), self.y.to_f32_px()) } } diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs index 10d3b81a8d8..6dee68f85df 100644 --- a/components/layout/display_list/items.rs +++ b/components/layout/display_list/items.rs @@ -24,12 +24,10 @@ use std::f32; use std::fmt; use style::computed_values::_servo_top_layer::T as InTopLayer; use webrender_api as wr; -use webrender_api::{BorderRadius, ClipMode}; -use webrender_api::{ComplexClipRegion, ExternalScrollId, FilterOp}; -use webrender_api::{GlyphInstance, GradientStop, ImageKey, LayoutPoint}; -use webrender_api::{LayoutRect, LayoutSize, LayoutTransform}; -use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow}; -use webrender_api::{StickyOffsetBounds, TransformStyle}; +use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D}; +use webrender_api::{BorderRadius, ClipMode, ComplexClipRegion, ExternalScrollId, FilterOp}; +use webrender_api::{GlyphInstance, GradientStop, ImageKey, MixBlendMode, ScrollSensitivity}; +use webrender_api::{Shadow, StickyOffsetBounds, TransformStyle}; pub use style::dom::OpaqueNode; diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index 099a1d1807a..e9c8b8d81b3 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -10,10 +10,9 @@ use crate::display_list::items::{ClipScrollNode, ClipScrollNodeType}; use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType}; use msg::constellation_msg::PipelineId; -use webrender_api::{ - self, ClipId, DisplayListBuilder, RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, -}; -use webrender_api::{LayoutPoint, PropertyBinding, SpecificDisplayItem}; +use webrender_api::units::LayoutPoint; +use webrender_api::{self, ClipId, DisplayListBuilder, RasterSpace, ReferenceFrameKind}; +use webrender_api::{SpaceAndClipInfo, SpatialId, SpecificDisplayItem}; pub trait WebRenderDisplayListConverter { fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder; @@ -306,7 +305,7 @@ impl WebRenderDisplayItemConverter for DisplayItem { sticky_data.margins, sticky_data.vertical_offset_bounds, sticky_data.horizontal_offset_bounds, - webrender_api::LayoutVector2D::zero(), + webrender_api::units::LayoutVector2D::zero(), ); state.spatial_ids[item.node_index.to_index()] = Some(id); diff --git a/components/layout/flow.rs b/components/layout/flow.rs index bcc38252b9b..d7ab73cd8d3 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -65,7 +65,7 @@ use style::properties::ComputedValues; use style::selector_parser::RestyleDamage; use style::servo::restyle_damage::ServoRestyleDamage; use style::values::computed::LengthPercentageOrAuto; -use webrender_api::LayoutTransform; +use webrender_api::units::LayoutTransform; /// This marker trait indicates that a type is a struct with `#[repr(C)]` whose first field /// is of type `BaseFlow` or some type that also implements this trait. diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 72029fb2484..aa8a8605642 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -65,7 +65,8 @@ use style::values::computed::{LengthPercentage, LengthPercentageOrAuto, Size, Ve use style::values::generics::box_::{Perspective, VerticalAlignKeyword}; use style::values::generics::transform; use style::Zero; -use webrender_api::{self, LayoutTransform}; +use webrender_api::units::LayoutTransform; +use webrender_api; // From gfxFontConstants.h in Firefox. static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20; diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index a1fe086d79f..dfa8fddd82c 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -17,7 +17,7 @@ use app_units::Au; use euclid::{Point2D, Vector2D}; use servo_config::opts; use style::servo::restyle_damage::ServoRestyleDamage; -use webrender_api::LayoutPoint; +use webrender_api::units::LayoutPoint; pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) { ResolveGeneratedContent::new(&layout_context).traverse(root, 0); diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 3d192f6bbe6..bbd3c238b5b 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -833,7 +833,7 @@ impl LayoutThread { let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y); let mut txn = webrender_api::Transaction::new(); txn.scroll_node_with_id( - webrender_api::LayoutPoint::from_untyped(&point), + webrender_api::units::LayoutPoint::from_untyped(&point), state.scroll_id, webrender_api::ScrollClamping::ToContentBounds, ); @@ -1247,7 +1247,7 @@ impl LayoutThread { epoch.next(); self.epoch.set(epoch); - let viewport_size = webrender_api::LayoutSize::from_untyped(&viewport_size); + let viewport_size = webrender_api::units::LayoutSize::from_untyped(&viewport_size); // Observe notifications about rendered frames if needed right before // sending the display list to WebRender in order to set time related @@ -1669,7 +1669,8 @@ impl LayoutThread { // particular pipeline, so we need to tell WebRender about that. flags.insert(webrender_api::HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT); - let client_point = webrender_api::WorldPoint::from_untyped(&client_point); + let client_point = + webrender_api::units::WorldPoint::from_untyped(&client_point); let results = self.webrender_api.hit_test( self.webrender_document, Some(self.id.to_webrender()), diff --git a/components/net/image_cache.rs b/components/net/image_cache.rs index e610be15412..bfa87fc0687 100644 --- a/components/net/image_cache.rs +++ b/components/net/image_cache.rs @@ -17,6 +17,7 @@ use std::io; use std::mem; use std::sync::{Arc, Mutex}; use std::thread; +use webrender_api::units::DeviceIntSize; /// /// TODO(gw): Remaining work on image cache: @@ -72,7 +73,7 @@ fn set_webrender_image_key(webrender_api: &webrender_api::RenderApi, image: &mut }, }; let descriptor = webrender_api::ImageDescriptor { - size: webrender_api::DeviceIntSize::new(image.width as i32, image.height as i32), + size: DeviceIntSize::new(image.width as i32, image.height as i32), stride: None, format: webrender_api::ImageFormat::BGRA8, offset: 0, diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs index a7cf8160114..ff90224d53a 100644 --- a/components/script/dom/screen.rs +++ b/components/script/dom/screen.rs @@ -16,7 +16,7 @@ use euclid::TypedSize2D; use profile_traits::ipc; use script_traits::ScriptMsg; use style_traits::CSSPixel; -use webrender_api::DeviceIntSize; +use webrender_api::units::DeviceIntSize; #[dom_struct] pub struct Screen { diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 8ca1e324511..524d44ffba2 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -132,7 +132,8 @@ use style::str::HTML_SPACE_CHARACTERS; use style::stylesheets::CssRuleType; use style_traits::{CSSPixel, DevicePixel, ParsingMode}; use url::Position; -use webrender_api::{DeviceIntPoint, DeviceIntSize, DocumentId, ExternalScrollId, RenderApiSender}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; +use webrender_api::{DocumentId, ExternalScrollId, RenderApiSender}; use webvr_traits::WebVRMsg; /// Current state of the window object diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 4b87a104a4d..4ed3f4f5d75 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -58,9 +58,8 @@ use std::sync::Arc; use std::time::Duration; use style_traits::CSSPixel; use style_traits::SpeculativePainter; -use webrender_api::{ - DeviceIntSize, DevicePixel, DocumentId, ExternalScrollId, ImageKey, RenderApiSender, -}; +use webrender_api::units::{DeviceIntSize, DevicePixel}; +use webrender_api::{DocumentId, ExternalScrollId, ImageKey, RenderApiSender}; use webvr_traits::{WebVREvent, WebVRMsg}; pub use crate::script_msg::{ diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 6f11e2356df..4f7e45718e7 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -28,7 +28,7 @@ use servo_url::ServoUrl; use std::fmt; use style_traits::viewport::ViewportConstraints; use style_traits::CSSPixel; -use webrender_api::{DeviceIntPoint, DeviceIntSize}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; /// A particular iframe's size, associated with a browsing context. #[derive(Clone, Copy, Debug, Deserialize, Serialize)] diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index 4e89f6fdf67..b2dcc8431cb 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -36,7 +36,7 @@ extern crate to_shmem_derive; #[cfg(feature = "servo")] extern crate webrender_api; #[cfg(feature = "servo")] -pub use webrender_api::DevicePixel; +pub use webrender_api::units::DevicePixel; use cssparser::{CowRcStr, Token}; use selectors::parser::SelectorParseErrorKind; diff --git a/components/webrender_traits/lib.rs b/components/webrender_traits/lib.rs index 40d9f0956c3..60492121663 100644 --- a/components/webrender_traits/lib.rs +++ b/components/webrender_traits/lib.rs @@ -7,6 +7,7 @@ use euclid::Size2D; use std::collections::HashMap; use std::sync::{Arc, Mutex}; +use webrender_api::units::TexelRect; /// This trait is used as a bridge between the different GL clients /// in Servo that handles WebRender ExternalImages and the WebRender @@ -117,14 +118,14 @@ impl webrender::ExternalImageHandler for WebrenderExternalImageHandlers { let (texture_id, size) = self.webgl_handler.as_mut().unwrap().lock(key.0); ( texture_id, - webrender_api::TexelRect::new(0.0, size.height as f32, size.width as f32, 0.0), + TexelRect::new(0.0, size.height as f32, size.width as f32, 0.0), ) }, WebrenderImageHandlerType::Media => { let (texture_id, size) = self.media_handler.as_mut().unwrap().lock(key.0); ( texture_id, - webrender_api::TexelRect::new(0.0, 0.0, size.width as f32, size.height as f32), + TexelRect::new(0.0, 0.0, size.width as f32, size.height as f32), ) }, }; From ae420485404c72c7cbc0cd0bd1b05bf599c4898d Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 22:24:36 -0700 Subject: [PATCH 03/18] A few fixes to the compositor for WebRender --- components/compositing/compositor.rs | 5 +++-- components/compositing/windowing.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index c4ee45bb8e7..01b4bc5e801 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -43,7 +43,8 @@ use style_traits::viewport::ViewportConstraints; use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use time::{now, precise_time_ns, precise_time_s}; use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation}; -use webrender_api::units::{DeviceIntPoint, DevicePoint, FramebufferIntSize, LayoutVector2D}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePoint}; +use webrender_api::units::{FramebufferIntSize, LayoutVector2D}; use webvr_traits::WebVRMainThreadHeartbeat; #[derive(Debug, PartialEq)] @@ -1280,7 +1281,7 @@ impl IOCompositor { || { debug!("compositor: compositing"); - let size = FramebufferIntSize::from_untyped( + let size = DeviceIntSize::from_untyped( &self.embedder_coordinates.framebuffer.to_untyped(), ); diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 64607668f27..d64f422d14b 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -197,10 +197,10 @@ pub struct EmbedderCoordinates { } impl EmbedderCoordinates { - pub fn get_flipped_viewport(&self) -> FramebufferIntRect { + pub fn get_flipped_viewport(&self) -> DeviceIntRect { let fb_height = self.framebuffer.height; let mut view = self.viewport.clone(); view.origin.y = fb_height - view.origin.y - view.size.height; - FramebufferIntRect::from_untyped(&view.to_untyped()) + DeviceIntRect::from_untyped(&view.to_untyped()) } } From 7915a7099f066fa6f1cdfb3c6e5fc6e84684c58a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 17:10:02 -0700 Subject: [PATCH 04/18] Fix WebRender churn in `compositing` --- components/compositing/compositor.rs | 8 ++++---- components/compositing/windowing.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 01b4bc5e801..dcff6ef66fe 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -43,8 +43,7 @@ use style_traits::viewport::ViewportConstraints; use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use time::{now, precise_time_ns, precise_time_s}; use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation}; -use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePoint}; -use webrender_api::units::{FramebufferIntSize, LayoutVector2D}; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePoint, LayoutVector2D}; use webvr_traits::WebVRMainThreadHeartbeat; #[derive(Debug, PartialEq)] @@ -1167,7 +1166,8 @@ impl IOCompositor { for (id, _) in &self.pipeline_details { let webrender_pipeline_id = id.to_webrender(); if let Some(webrender_api::Epoch(epoch)) = - self.webrender.current_epoch(webrender_pipeline_id) + self.webrender.current_epoch(self.webrender_document, + webrender_pipeline_id) { let epoch = Epoch(epoch); pipeline_epochs.insert(*id, epoch); @@ -1303,7 +1303,7 @@ impl IOCompositor { for (id, pending_epoch) in &self.pending_paint_metrics { // we get the last painted frame id from webrender if let Some(webrender_api::Epoch(epoch)) = - self.webrender.current_epoch(id.to_webrender()) + self.webrender.current_epoch(self.webrender_document, id.to_webrender()) { // and check if it is the one the layout thread is expecting, let epoch = Epoch(epoch); diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index d64f422d14b..aa0bdc21384 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -20,8 +20,8 @@ use std::rc::Rc; use std::time::Duration; use style_traits::DevicePixel; use webrender_api::ScrollLocation; -use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint}; -use webrender_api::units::{FramebufferIntRect, FramebufferIntSize}; +use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize}; +use webrender_api::units::{DevicePoint, FramebufferIntSize}; use webvr::VRServiceManager; use webvr_traits::WebVRMainThreadHeartbeat; From 7ca570dd1d32a640d6d99fb3032bbfe22fa9406b Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 21:15:14 -0700 Subject: [PATCH 05/18] Upgrade display list building for the WebRender update. --- components/layout/display_list/builder.rs | 62 +++++- components/layout/display_list/items.rs | 19 +- .../layout/display_list/webrender_helpers.rs | 196 +++++++++--------- 3 files changed, 168 insertions(+), 109 deletions(-) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 1653afbc198..02bde1f6741 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -13,7 +13,7 @@ use crate::context::LayoutContext; use crate::display_list::background::{self, get_cyclic}; use crate::display_list::border; use crate::display_list::gradient; -use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, BLUR_INFLATION_FACTOR}; +use crate::display_list::items::{self, BaseDisplayItem, ClipScrollNode, BLUR_INFLATION_FACTOR}; use crate::display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling}; use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList}; use crate::display_list::items::{CommonDisplayItem, DisplayListSection}; @@ -43,7 +43,7 @@ use net_traits::image_cache::UsePlaceholder; use range::Range; use script_traits::IFrameSize; use servo_config::opts; -use servo_geometry::MaxRect; +use servo_geometry::{self, MaxRect}; use std::default::Default; use std::f32; use std::mem; @@ -716,6 +716,7 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { color: background_color.to_layout(), + common: items::empty_common_item_properties(), }, ))); }); @@ -854,6 +855,8 @@ impl Fragment { state.add_image_item( base, webrender_api::ImageDisplayItem { + bounds: placement.bounds.to_f32_px(), + common: items::empty_common_item_properties(), image_key: webrender_image.key.unwrap(), stretch_size: placement.tile_size.to_layout(), tile_spacing: placement.tile_spacing.to_layout(), @@ -976,6 +979,8 @@ impl Fragment { ); let item = webrender_api::GradientDisplayItem { gradient, + bounds: placement.bounds.to_f32_px(), + common: items::empty_common_item_properties(), tile_size: placement.tile_size.to_layout(), tile_spacing: placement.tile_spacing.to_layout(), }; @@ -992,6 +997,8 @@ impl Fragment { ); let item = webrender_api::RadialGradientDisplayItem { gradient, + bounds: placement.bounds.to_f32_px(), + common: items::empty_common_item_properties(), tile_size: placement.tile_size.to_layout(), tile_spacing: placement.tile_spacing.to_layout(), }; @@ -1034,6 +1041,7 @@ impl Fragment { state.add_display_item(DisplayItem::BoxShadow(CommonDisplayItem::new( base, webrender_api::BoxShadowDisplayItem { + common: items::empty_common_item_properties(), box_bounds: absolute_bounds.to_layout(), color: style.resolve_color(box_shadow.base.color).to_layout(), offset: LayoutVector2D::new( @@ -1157,9 +1165,12 @@ impl Fragment { radius: border_radius, do_aa: true, }); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: border_widths.to_layout(), details, }, @@ -1261,9 +1272,12 @@ impl Fragment { border_image_outset.left.to_f32_px(), ), }); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: border_image_width, details, }, @@ -1313,9 +1327,12 @@ impl Fragment { get_cursor(&style, Cursor::Default), DisplayListSection::Outlines, ); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(width).to_layout(), details: BorderDetails::Normal(border::simple(color, outline_style.to_layout())), }, @@ -1344,9 +1361,12 @@ impl Fragment { get_cursor(&style, Cursor::Default), DisplayListSection::Content, ); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(1)).to_layout(), details: BorderDetails::Normal(border::simple( ColorU::new(0, 0, 200, 1).into(), @@ -1375,9 +1395,12 @@ impl Fragment { ); // TODO(gw): Use a better estimate for wavy line thickness. let wavy_line_thickness = (0.33 * base.bounds.size.height).ceil(); + let area = base.bounds; state.add_display_item(DisplayItem::Line(CommonDisplayItem::new( base, webrender_api::LineDisplayItem { + common: items::empty_common_item_properties(), + area, orientation: webrender_api::LineOrientation::Horizontal, wavy_line_thickness, color: ColorU::new(0, 200, 0, 1).into(), @@ -1401,9 +1424,12 @@ impl Fragment { get_cursor(&self.style, Cursor::Default), DisplayListSection::Content, ); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(1)).to_layout(), details: BorderDetails::Normal(border::simple( ColorU::new(0, 0, 200, 1).into(), @@ -1446,6 +1472,7 @@ impl Fragment { state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { + common: items::empty_common_item_properties(), color: background_color.to_layout(), }, ))); @@ -1492,6 +1519,7 @@ impl Fragment { state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { + common: items::empty_common_item_properties(), color: self.style().get_inherited_text().color.to_layout(), }, ))); @@ -1676,6 +1704,7 @@ impl Fragment { state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { + common: items::empty_common_item_properties(), color: ColorF::TRANSPARENT, }, ))); @@ -1824,9 +1853,12 @@ impl Fragment { if let Some(ref image) = image_fragment.image { if let Some(id) = image.id { let base = create_base_display_item(state); + let bounds = base.bounds; state.add_image_item( base, webrender_api::ImageDisplayItem { + bounds, + common: items::empty_common_item_properties(), image_key: id, stretch_size: stacking_relative_content_box.size.to_layout(), tile_spacing: LayoutSize::zero(), @@ -1845,9 +1877,12 @@ impl Fragment { SpecificFragmentInfo::Media(ref fragment_info) => { if let Some((ref image_key, _, _)) = fragment_info.current_frame { let base = create_base_display_item(state); + let bounds = base.bounds; state.add_image_item( base, webrender_api::ImageDisplayItem { + bounds, + common: items::empty_common_item_properties(), image_key: *image_key, stretch_size: stacking_relative_border_box.size.to_layout(), tile_spacing: LayoutSize::zero(), @@ -1879,6 +1914,8 @@ impl Fragment { let base = create_base_display_item(state); let display_item = webrender_api::ImageDisplayItem { + bounds: base.bounds, + common: items::empty_common_item_properties(), image_key, stretch_size: stacking_relative_content_box.size.to_layout(), tile_spacing: LayoutSize::zero(), @@ -2015,7 +2052,6 @@ impl Fragment { offset: LayoutVector2D::new(shadow.horizontal.px(), shadow.vertical.px()), color: self.style.resolve_color(shadow.color).to_layout(), blur_radius: shadow.blur.px(), - should_inflate: true, }, }, ))); @@ -2075,6 +2111,8 @@ impl Fragment { state.add_display_item(DisplayItem::Text(CommonDisplayItem::with_data( base.clone(), webrender_api::TextDisplayItem { + bounds: base.bounds, + common: items::empty_common_item_properties(), font_key: text_fragment.run.font_key, color: text_color.to_layout(), glyph_options: None, @@ -2130,9 +2168,12 @@ impl Fragment { // TODO(gw): Use a better estimate for wavy line thickness. let wavy_line_thickness = (0.33 * base.bounds.size.height).ceil(); + let area = base.bounds; state.add_display_item(DisplayItem::Line(CommonDisplayItem::new( base, webrender_api::LineDisplayItem { + common: items::empty_common_item_properties(), + area, orientation: webrender_api::LineOrientation::Horizontal, wavy_line_thickness, color: color.to_layout(), @@ -2843,9 +2884,12 @@ impl BaseFlow { None, DisplayListSection::Content, ); + let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { + bounds, + common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(2)).to_layout(), details: BorderDetails::Normal(border::simple( color, @@ -3011,3 +3055,15 @@ impl IndexableText { ) } } + +trait ToF32Px { + type Output; + fn to_f32_px(&self) -> Self::Output; +} + +impl ToF32Px for TypedRect { + type Output = LayoutRect; + fn to_f32_px(&self) -> LayoutRect { + LayoutRect::from_untyped(&servo_geometry::au_rect_to_f32_rect(*self)) + } +} diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs index 6dee68f85df..8563d17d023 100644 --- a/components/layout/display_list/items.rs +++ b/components/layout/display_list/items.rs @@ -24,10 +24,11 @@ use std::f32; use std::fmt; use style::computed_values::_servo_top_layer::T as InTopLayer; use webrender_api as wr; -use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D}; -use webrender_api::{BorderRadius, ClipMode, ComplexClipRegion, ExternalScrollId, FilterOp}; -use webrender_api::{GlyphInstance, GradientStop, ImageKey, MixBlendMode, ScrollSensitivity}; -use webrender_api::{Shadow, StickyOffsetBounds, TransformStyle}; +use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform}; +use webrender_api::{BorderRadius, ClipId, ClipMode, CommonItemProperties, ComplexClipRegion}; +use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, GradientStop, ImageKey}; +use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow, SpatialId}; +use webrender_api::{StickyOffsetBounds, TransformStyle}; pub use style::dom::OpaqueNode; @@ -466,6 +467,16 @@ impl BaseDisplayItem { } } +pub fn empty_common_item_properties() -> CommonItemProperties { + CommonItemProperties { + clip_rect: LayoutRect::max_rect(), + clip_id: ClipId::root(wr::PipelineId::dummy()), + spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()), + hit_info: None, + is_backface_visible: false, + } +} + /// A clipping region for a display item. Currently, this can describe rectangles, rounded /// rectangles (for `border-radius`), or arbitrary intersections of the two. Arbitrary transforms /// are not supported because those are handled by the higher-level `StackingContext` abstraction. diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index e9c8b8d81b3..c55beb7ec17 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -7,15 +7,16 @@ // This might be achieved by sharing types between WR and Servo display lists, or // completely converting layout to directly generate WebRender display lists, for example. -use crate::display_list::items::{ClipScrollNode, ClipScrollNodeType}; +use crate::display_list::items::{BaseDisplayItem, ClipScrollNode, ClipScrollNodeType}; use crate::display_list::items::{DisplayItem, DisplayList, StackingContextType}; use msg::constellation_msg::PipelineId; use webrender_api::units::LayoutPoint; -use webrender_api::{self, ClipId, DisplayListBuilder, RasterSpace, ReferenceFrameKind}; -use webrender_api::{SpaceAndClipInfo, SpatialId, SpecificDisplayItem}; +use webrender_api::{self, ClipId, CommonItemProperties, DisplayItem as WrDisplayItem}; +use webrender_api::{DisplayListBuilder, PropertyBinding, PushStackingContextDisplayItem}; +use webrender_api::{RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext}; pub trait WebRenderDisplayListConverter { - fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder; + fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder; } struct ClipScrollState { @@ -26,9 +27,8 @@ struct ClipScrollState { } trait WebRenderDisplayItemConverter { - fn prim_info(&self) -> webrender_api::LayoutPrimitiveInfo; fn convert_to_webrender( - &self, + &mut self, clip_scroll_nodes: &[ClipScrollNode], state: &mut ClipScrollState, builder: &mut DisplayListBuilder, @@ -36,7 +36,7 @@ trait WebRenderDisplayItemConverter { } impl WebRenderDisplayListConverter for DisplayList { - fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder { + fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder { let mut clip_ids = vec![None; self.clip_scroll_nodes.len()]; let mut spatial_ids = vec![None; self.clip_scroll_nodes.len()]; @@ -65,7 +65,7 @@ impl WebRenderDisplayListConverter for DisplayList { 1024 * 1024, // 1 MB of space ); - for item in &self.list { + for item in &mut self.list { item.convert_to_webrender(&self.clip_scroll_nodes, &mut state, &mut builder); } @@ -74,22 +74,8 @@ impl WebRenderDisplayListConverter for DisplayList { } impl WebRenderDisplayItemConverter for DisplayItem { - fn prim_info(&self) -> webrender_api::LayoutPrimitiveInfo { - let tag = match self.base().metadata.pointing { - Some(cursor) => Some((self.base().metadata.node.0 as u64, cursor)), - None => None, - }; - webrender_api::LayoutPrimitiveInfo { - rect: self.base().bounds, - clip_rect: self.base().clip_rect, - // TODO(gw): Make use of the WR backface visibility functionality. - is_backface_visible: true, - tag, - } - } - fn convert_to_webrender( - &self, + &mut self, clip_scroll_nodes: &[ClipScrollNode], state: &mut ClipScrollState, builder: &mut DisplayListBuilder, @@ -117,92 +103,74 @@ impl WebRenderDisplayItemConverter for DisplayItem { state.active_clip_id = cur_clip_id; } - let space_clip_info = SpaceAndClipInfo { - spatial_id: state.active_spatial_id, - clip_id: state.active_clip_id, - }; match *self { - DisplayItem::Rectangle(ref item) => { - builder.push_item( - &SpecificDisplayItem::Rectangle(item.item), - &self.prim_info(), - &space_clip_info, - ); + DisplayItem::Rectangle(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); + builder.push_item(&WrDisplayItem::Rectangle(item.item)); }, - DisplayItem::Text(ref item) => { - builder.push_item( - &SpecificDisplayItem::Text(item.item), - &self.prim_info(), - &space_clip_info, - ); + DisplayItem::Text(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); + builder.push_item(&WrDisplayItem::Text(item.item)); builder.push_iter(item.data.iter()); }, - DisplayItem::Image(ref item) => { - builder.push_item( - &SpecificDisplayItem::Image(item.item), - &self.prim_info(), - &space_clip_info, - ); + DisplayItem::Image(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); + builder.push_item(&WrDisplayItem::Image(item.item)); }, - DisplayItem::Border(ref item) => { + DisplayItem::Border(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); if !item.data.is_empty() { builder.push_stops(item.data.as_ref()); } - builder.push_item( - &SpecificDisplayItem::Border(item.item), - &self.prim_info(), - &space_clip_info, - ); + builder.push_item(&WrDisplayItem::Border(item.item)); }, - DisplayItem::Gradient(ref item) => { + DisplayItem::Gradient(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); builder.push_stops(item.data.as_ref()); - builder.push_item( - &SpecificDisplayItem::Gradient(item.item), - &self.prim_info(), - &space_clip_info, - ); + builder.push_item(&WrDisplayItem::Gradient(item.item)); }, - DisplayItem::RadialGradient(ref item) => { + DisplayItem::RadialGradient(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); builder.push_stops(item.data.as_ref()); - builder.push_item( - &SpecificDisplayItem::RadialGradient(item.item), - &self.prim_info(), - &space_clip_info, - ); + builder.push_item(&WrDisplayItem::RadialGradient(item.item)); }, - DisplayItem::Line(ref item) => { - builder.push_item( - &SpecificDisplayItem::Line(item.item), - &self.prim_info(), - &space_clip_info, - ); + DisplayItem::Line(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); + builder.push_item(&WrDisplayItem::Line(item.item)); }, - DisplayItem::BoxShadow(ref item) => { - builder.push_item( - &SpecificDisplayItem::BoxShadow(item.item), - &self.prim_info(), - &space_clip_info, - ); + DisplayItem::BoxShadow(ref mut item) => { + item.item.common = build_common_item_properties(&item.base, state); + builder.push_item(&WrDisplayItem::BoxShadow(item.item)); }, - DisplayItem::PushTextShadow(ref item) => { - builder.push_shadow(&self.prim_info(), &space_clip_info, item.shadow); + DisplayItem::PushTextShadow(ref mut item) => { + let common = build_common_item_properties(&item.base, state); + builder.push_shadow(&SpaceAndClipInfo { + spatial_id: common.spatial_id, + clip_id: common.clip_id, + }, + item.shadow, + true); }, DisplayItem::PopAllTextShadows(_) => { - builder.pop_all_shadows(); + builder.push_item(&WrDisplayItem::PopAllShadows); }, - DisplayItem::Iframe(ref item) => { - builder.push_iframe( - &self.prim_info(), - &space_clip_info, - item.iframe.to_webrender(), - true, - ); + DisplayItem::Iframe(ref mut item) => { + let common = build_common_item_properties(&item.base, state); + builder.push_iframe(item.base.bounds, + common.clip_rect, + &SpaceAndClipInfo { + spatial_id: common.spatial_id, + clip_id: common.clip_id, + }, + item.iframe.to_webrender(), + true); }, - DisplayItem::PushStackingContext(ref item) => { + DisplayItem::PushStackingContext(ref mut item) => { let stacking_context = &item.stacking_context; debug_assert_eq!(stacking_context.context_type, StackingContextType::Real); - let mut info = webrender_api::LayoutPrimitiveInfo::new(stacking_context.bounds); + //let mut info = webrender_api::LayoutPrimitiveInfo::new(stacking_context.bounds); + let mut bounds = stacking_context.bounds; let spatial_id = if let Some(frame_index) = stacking_context.established_reference_frame { let (transform, ref_frame) = @@ -224,7 +192,7 @@ impl WebRenderDisplayItemConverter for DisplayItem { }; let spatial_id = builder.push_reference_frame( - &stacking_context.bounds, + stacking_context.bounds.origin, state.active_spatial_id, stacking_context.transform_style, PropertyBinding::Value(transform), @@ -234,27 +202,35 @@ impl WebRenderDisplayItemConverter for DisplayItem { state.spatial_ids[frame_index.to_index()] = Some(spatial_id); state.clip_ids[frame_index.to_index()] = Some(cur_clip_id); - info.rect.origin = LayoutPoint::zero(); - info.clip_rect.origin = LayoutPoint::zero(); + bounds.origin = LayoutPoint::zero(); spatial_id } else { state.active_spatial_id }; - builder.push_stacking_context( - &info, + if !stacking_context.filters.is_empty() { + builder.push_item(&WrDisplayItem::SetFilterOps); + builder.push_iter(&stacking_context.filters); + } + + let wr_item = PushStackingContextDisplayItem { + origin: bounds.origin, spatial_id, - None, - stacking_context.transform_style, - stacking_context.mix_blend_mode, - &stacking_context.filters, - &[], - RasterSpace::Screen, - /* cache_tiles = */ false, - ); + is_backface_visible: true, + stacking_context: StackingContext { + transform_style: stacking_context.transform_style, + mix_blend_mode: stacking_context.mix_blend_mode, + clip_id: None, + raster_space: RasterSpace::Screen, + // TODO(pcwalton): Enable picture caching? + cache_tiles: false, + }, + }; + + builder.push_item(&WrDisplayItem::PushStackingContext(wr_item)); }, DisplayItem::PopStackingContext(_) => builder.pop_stacking_context(), - DisplayItem::DefineClipScrollNode(ref item) => { + DisplayItem::DefineClipScrollNode(ref mut item) => { let node = &clip_scroll_nodes[item.node_index.to_index()]; let item_rect = node.clip.main; @@ -290,7 +266,7 @@ impl WebRenderDisplayItemConverter for DisplayItem { node.clip.complex.clone(), None, scroll_sensitivity, - webrender_api::LayoutVector2D::zero(), + webrender_api::units::LayoutVector2D::zero(), ); state.clip_ids[item.node_index.to_index()] = Some(space_clip_info.clip_id); @@ -319,3 +295,19 @@ impl WebRenderDisplayItemConverter for DisplayItem { } } } + +fn build_common_item_properties(base: &BaseDisplayItem, state: &ClipScrollState) + -> CommonItemProperties { + let tag = match base.metadata.pointing { + Some(cursor) => Some((base.metadata.node.0 as u64, cursor)), + None => None, + }; + CommonItemProperties { + clip_rect: base.clip_rect, + spatial_id: state.active_spatial_id, + clip_id: state.active_clip_id, + // TODO(gw): Make use of the WR backface visibility functionality. + is_backface_visible: true, + hit_info: tag, + } +} From 6b9924bec437b2a5504656ad1d27ffa99e3735bc Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 21:21:31 -0700 Subject: [PATCH 06/18] Stop storing display lists in an `Arc` --- components/layout/query.rs | 2 +- components/layout_thread/lib.rs | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/components/layout/query.rs b/components/layout/query.rs index a74eda165e2..789056753d5 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -51,7 +51,7 @@ pub struct LayoutThreadData { pub constellation_chan: IpcSender, /// The root stacking context. - pub display_list: Option>, + pub display_list: Option, pub indexable_text: IndexableText, diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index bbd3c238b5b..1afe8e37e9f 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1203,7 +1203,7 @@ impl LayoutThread { &mut build_state.indexable_text, IndexableText::default(), ); - rw_data.display_list = Some(Arc::new(build_state.to_display_list())); + rw_data.display_list = Some(build_state.to_display_list()); } } @@ -1220,7 +1220,8 @@ impl LayoutThread { if let Some(document) = document { document.will_paint(); } - let display_list = (*rw_data.display_list.as_ref().unwrap()).clone(); + + let display_list = rw_data.display_list.as_mut().unwrap(); if self.dump_display_list { display_list.print(); @@ -1232,11 +1233,7 @@ impl LayoutThread { debug!("Layout done!"); // TODO: Avoid the temporary conversion and build webrender sc/dl directly! - let builder = rw_data - .display_list - .as_ref() - .unwrap() - .convert_to_webrender(self.id); + let builder = display_list.convert_to_webrender(self.id); let viewport_size = Size2D::new( self.viewport_size.width.to_f32_px(), From e57e2121b27b09ceb8c87d3463f09f9c227b0565 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 4 Jun 2019 21:39:59 -0700 Subject: [PATCH 07/18] Get the `servo` crate building with the new WebRender --- components/compositing/compositor.rs | 16 ++++++++++++---- components/compositing/windowing.rs | 4 ++-- components/servo/lib.rs | 9 ++++++++- ports/glutin/headed_window.rs | 7 +++---- ports/glutin/headless_window.rs | 4 ++-- ports/glutin/window_trait.rs | 2 +- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index dcff6ef66fe..c440796453b 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -32,7 +32,7 @@ use script_traits::{ MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId, WheelDelta, }; use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType}; -use servo_geometry::DeviceIndependentPixel; +use servo_geometry::{DeviceIndependentPixel, FramebufferUintLength}; use std::collections::HashMap; use std::env; use std::fs::{create_dir_all, File}; @@ -1268,7 +1268,9 @@ impl IOCompositor { CompositeTarget::Window => gl::RenderTargetInfo::default(), #[cfg(feature = "gl")] CompositeTarget::WindowAndPng | CompositeTarget::PngFile => { - gl::initialize_png(&*self.window.gl(), width, height) + gl::initialize_png(&*self.window.gl(), + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get())) }, #[cfg(not(feature = "gl"))] _ => (), @@ -1330,7 +1332,10 @@ impl IOCompositor { CompositeTarget::Window => None, #[cfg(feature = "gl")] CompositeTarget::WindowAndPng => { - let img = gl::draw_img(&*self.window.gl(), rt_info, width, height); + let img = gl::draw_img(&*self.window.gl(), + rt_info, + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get())); Some(Image { width: img.width(), height: img.height(), @@ -1349,7 +1354,10 @@ impl IOCompositor { || match self.output_file.as_ref() { Some(path) => match File::create(path) { Ok(mut file) => { - let img = gl::draw_img(gl, rt_info, width, height); + let img = gl::draw_img(gl, + rt_info, + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get())); let dynamic_image = DynamicImage::ImageRgb8(img); if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG) { diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index aa0bdc21384..90ced19bc09 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -21,7 +21,7 @@ use std::time::Duration; use style_traits::DevicePixel; use webrender_api::ScrollLocation; use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize}; -use webrender_api::units::{DevicePoint, FramebufferIntSize}; +use webrender_api::units::DevicePoint; use webvr::VRServiceManager; use webvr_traits::WebVRMainThreadHeartbeat; @@ -191,7 +191,7 @@ pub struct EmbedderCoordinates { /// Size of the native window. pub window: (DeviceIntSize, DeviceIntPoint), /// Size of the GL buffer in the window. - pub framebuffer: FramebufferIntSize, + pub framebuffer: DeviceIntSize, /// Coordinates of the document within the framebuffer. pub viewport: DeviceIntRect, } diff --git a/components/servo/lib.rs b/components/servo/lib.rs index b75433bb213..feb31036fdc 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -84,6 +84,7 @@ use constellation::{FromCompositorLogger, FromScriptLogger}; use crossbeam_channel::{unbounded, Sender}; use embedder_traits::{EmbedderMsg, EmbedderProxy, EmbedderReceiver, EventLoopWaker}; use env_logger::Builder as EnvLoggerBuilder; +use euclid::TypedSize2D; #[cfg(all( not(target_os = "windows"), not(target_os = "ios"), @@ -303,11 +304,16 @@ where let render_notifier = Box::new(RenderNotifier::new(compositor_proxy.clone())); + // Cast from `DeviceIndependentPixel` to `DevicePixel` + let device_pixel_ratio = coordinates.hidpi_factor.get(); + let window_size = TypedSize2D::from_untyped( + &(opts.initial_window_size.to_f32() / device_pixel_ratio).to_i32().to_untyped()); + webrender::Renderer::new( window.gl(), render_notifier, webrender::RendererOptions { - device_pixel_ratio: coordinates.hidpi_factor.get(), + device_pixel_ratio, resource_override_path: opts.shaders_dir.clone(), enable_aa: opts.enable_text_antialiasing, debug_flags: debug_flags, @@ -323,6 +329,7 @@ where ..Default::default() }, None, + window_size, ) .expect("Unable to initialize webrender!") }; diff --git a/ports/glutin/headed_window.rs b/ports/glutin/headed_window.rs index c19d2bdb63b..fa416cbcc61 100644 --- a/ports/glutin/headed_window.rs +++ b/ports/glutin/headed_window.rs @@ -27,9 +27,8 @@ use servo::script_traits::{TouchEventType, WheelMode, WheelDelta}; use servo::servo_config::{opts, pref}; use servo::servo_geometry::DeviceIndependentPixel; use servo::style_traits::DevicePixel; -use servo::webrender_api::{ - DeviceIntPoint, DeviceIntRect, DeviceIntSize, FramebufferIntSize, ScrollLocation, -}; +use servo::webrender_api::ScrollLocation; +use servo::webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize}; use servo_media::player::context::{GlApi, GlContext as PlayerGLContext, NativeDisplay}; use std::cell::{Cell, RefCell}; use std::mem; @@ -500,7 +499,7 @@ impl WindowMethods for Window { .expect("Failed to get window inner size."); let inner_size = (TypedSize2D::new(width as f32, height as f32) * dpr).to_i32(); let viewport = DeviceIntRect::new(TypedPoint2D::zero(), inner_size); - let framebuffer = FramebufferIntSize::from_untyped(&viewport.size.to_untyped()); + let framebuffer = DeviceIntSize::from_untyped(&viewport.size.to_untyped()); EmbedderCoordinates { viewport, diff --git a/ports/glutin/headless_window.rs b/ports/glutin/headless_window.rs index 63b45cc5de7..a91e073ed1d 100644 --- a/ports/glutin/headless_window.rs +++ b/ports/glutin/headless_window.rs @@ -13,7 +13,7 @@ use servo::compositing::windowing::{EmbedderCoordinates, WindowMethods}; use servo::servo_config::opts; use servo::servo_geometry::DeviceIndependentPixel; use servo::style_traits::DevicePixel; -use servo::webrender_api::{DeviceIntRect, FramebufferIntSize}; +use servo::webrender_api::units::{DeviceIntRect, DeviceIntSize}; use servo_media::player::context as MediaPlayerCtxt; use std::cell::Cell; #[cfg(any(target_os = "linux", target_os = "macos"))] @@ -178,7 +178,7 @@ impl WindowMethods for Window { let size = (TypedSize2D::new(self.context.width, self.context.height).to_f32() * dpr).to_i32(); let viewport = DeviceIntRect::new(TypedPoint2D::zero(), size); - let framebuffer = FramebufferIntSize::from_untyped(&size.to_untyped()); + let framebuffer = DeviceIntSize::from_untyped(&size.to_untyped()); EmbedderCoordinates { viewport, framebuffer, diff --git a/ports/glutin/window_trait.rs b/ports/glutin/window_trait.rs index 83b208fe993..2f1fbebd973 100644 --- a/ports/glutin/window_trait.rs +++ b/ports/glutin/window_trait.rs @@ -8,7 +8,7 @@ use glutin; use servo::compositing::windowing::{WindowEvent, WindowMethods}; use servo::embedder_traits::Cursor; -use servo::webrender_api::{DeviceIntPoint, DeviceIntSize}; +use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize}; // This should vary by zoom level and maybe actual text size (focused or under cursor) pub const LINE_HEIGHT: f32 = 38.0; From 10ab466e5d25652ae4a062eb62fbe4f67585d400 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 10 Jun 2019 17:09:44 -0400 Subject: [PATCH 08/18] Create a solid rectangle display list entry for the page background. --- Cargo.lock | 8 ++++---- components/layout/display_list/builder.rs | 4 ++-- components/layout/sequential.rs | 25 +++++++++++++++++++++-- components/layout_thread/lib.rs | 11 +++++++--- 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76b4ceab2b7..90740083aa0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5405,7 +5405,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.60.0" -source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" +source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5446,7 +5446,7 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.60.0" -source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" +source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5468,7 +5468,7 @@ dependencies = [ [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" +source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/servo/webrender#fb1c0cf5ee16724820d004ad77e9f72beeeb7181" +source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 02bde1f6741..bb2bbe58b34 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -345,7 +345,7 @@ impl<'a> DisplayListBuildState<'a> { } } - fn add_display_item(&mut self, display_item: DisplayItem) { + pub fn add_display_item(&mut self, display_item: DisplayItem) { let items = self .items .entry(display_item.stacking_context_id()) @@ -374,7 +374,7 @@ impl<'a> DisplayListBuildState<'a> { self.processing_scrolling_overflow_element } - fn create_base_display_item( + pub fn create_base_display_item( &self, bounds: Rect, clip_rect: Rect, diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index dfa8fddd82c..6a0b99dab8c 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -6,6 +6,7 @@ use crate::context::LayoutContext; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; +use crate::display_list::items::{self, CommonDisplayItem, DisplayItem, DisplayListSection}; use crate::floats::SpeculatedFloatPlacement; use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils}; use crate::fragment::{CoordinateSystem, FragmentBorderBoxIterator}; @@ -14,7 +15,7 @@ use crate::incremental::RelayoutMode; use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList}; use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal}; use app_units::Au; -use euclid::{Point2D, Vector2D}; +use euclid::{Point2D, Rect, Size2D, Vector2D}; use servo_config::opts; use style::servo::restyle_damage::ServoRestyleDamage; use webrender_api::units::LayoutPoint; @@ -72,11 +73,31 @@ pub fn reflow(root: &mut dyn Flow, layout_context: &LayoutContext, relayout_mode pub fn build_display_list_for_subtree<'a>( flow_root: &mut dyn Flow, layout_context: &'a LayoutContext, + background_color: webrender_api::ColorF, + client_size: Size2D, ) -> DisplayListBuildState<'a> { let mut state = StackingContextCollectionState::new(layout_context.id); flow_root.collect_stacking_contexts(&mut state); - let state = DisplayListBuildState::new(layout_context, state); + let mut state = DisplayListBuildState::new(layout_context, state); + + // Create a base rectangle for the page background based on the root + // background color. + let base = state.create_base_display_item( + Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), + Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), + flow_root.as_block().fragment.node, + None, + DisplayListSection::BackgroundAndBorders, + ); + state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( + base, + webrender_api::RectangleDisplayItem { + color: background_color, + common: items::empty_common_item_properties(), + }, + ))); + let mut build_display_list = BuildDisplayList { state: state }; build_display_list.traverse(flow_root); build_display_list.state diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 1afe8e37e9f..1d8448c6e74 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1138,8 +1138,13 @@ impl LayoutThread { rw_data.display_list.is_none() { if reflow_goal.needs_display_list() { - let mut build_state = - sequential::build_display_list_for_subtree(layout_root, layout_context); + let background_color = get_root_flow_background_color(layout_root); + let mut build_state = sequential::build_display_list_for_subtree( + layout_root, + layout_context, + background_color, + data.page_clip_rect.size, + ); debug!("Done building display list."); @@ -1255,7 +1260,7 @@ impl LayoutThread { let mut txn = webrender_api::Transaction::new(); txn.set_display_list( webrender_api::Epoch(epoch.0), - Some(get_root_flow_background_color(layout_root)), + None, viewport_size, builder.finalize(), true, From 644addd1598426f9b5d1f178bfff7886b36f822c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 13 Jun 2019 18:19:56 -0400 Subject: [PATCH 09/18] WebRender rectangles items are sized based on their clipping rectangles. --- components/layout/display_list/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index bb2bbe58b34..54091f85389 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -1464,7 +1464,7 @@ impl Fragment { let background_color = style.resolve_color(style.get_background().background_color); let base = state.create_base_display_item( stacking_relative_border_box, - clip, + stacking_relative_border_box, self.node, get_cursor(&self.style, Cursor::Default), display_list_section, @@ -1511,7 +1511,7 @@ impl Fragment { let base = state.create_base_display_item( insertion_point_bounds, - clip, + insertion_point_bounds, self.node, get_cursor(&self.style, cursor), display_list_section, From f1b10393c2b10ed3c54dfeff05a3b1b4d767f55a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 13 Jun 2019 18:20:05 -0400 Subject: [PATCH 10/18] rustfmt --- components/compositing/compositor.rs | 51 ++++++++++--------- components/compositing/compositor_thread.rs | 2 +- components/compositing/windowing.rs | 4 +- components/layout/display_list/builder.rs | 2 +- .../layout/display_list/webrender_helpers.rs | 42 ++++++++------- components/layout/fragment.rs | 2 +- components/layout/sequential.rs | 2 +- components/servo/lib.rs | 5 +- python/tidy/servo_tidy/tidy.py | 4 ++ servo-tidy.toml | 1 - 10 files changed, 67 insertions(+), 48 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index c440796453b..9f8736e619c 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -42,8 +42,8 @@ use std::rc::Rc; use style_traits::viewport::ViewportConstraints; use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use time::{now, precise_time_ns, precise_time_s}; -use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation}; use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePoint, LayoutVector2D}; +use webrender_api::{self, HitTestFlags, HitTestResult, ScrollLocation}; use webvr_traits::WebVRMainThreadHeartbeat; #[derive(Debug, PartialEq)] @@ -843,8 +843,8 @@ impl IOCompositor { self.pending_scroll_zoom_events.push(ScrollZoomEvent { magnification: magnification, scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped( - &scroll_delta.to_untyped()), - ), + &scroll_delta.to_untyped(), + )), cursor: cursor, event_count: 1, }); @@ -932,8 +932,8 @@ impl IOCompositor { *last_combined_event = Some(ScrollZoomEvent { magnification: scroll_event.magnification, scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped( - &this_delta.to_untyped()), - ), + &this_delta.to_untyped(), + )), cursor: this_cursor, event_count: 1, }) @@ -1165,9 +1165,9 @@ impl IOCompositor { let mut pipeline_epochs = HashMap::new(); for (id, _) in &self.pipeline_details { let webrender_pipeline_id = id.to_webrender(); - if let Some(webrender_api::Epoch(epoch)) = - self.webrender.current_epoch(self.webrender_document, - webrender_pipeline_id) + if let Some(webrender_api::Epoch(epoch)) = self + .webrender + .current_epoch(self.webrender_document, webrender_pipeline_id) { let epoch = Epoch(epoch); pipeline_epochs.insert(*id, epoch); @@ -1267,11 +1267,11 @@ impl IOCompositor { #[cfg(feature = "gl")] CompositeTarget::Window => gl::RenderTargetInfo::default(), #[cfg(feature = "gl")] - CompositeTarget::WindowAndPng | CompositeTarget::PngFile => { - gl::initialize_png(&*self.window.gl(), - FramebufferUintLength::new(width.get()), - FramebufferUintLength::new(height.get())) - }, + CompositeTarget::WindowAndPng | CompositeTarget::PngFile => gl::initialize_png( + &*self.window.gl(), + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get()), + ), #[cfg(not(feature = "gl"))] _ => (), }; @@ -1304,8 +1304,9 @@ impl IOCompositor { // For each pending paint metrics pipeline id for (id, pending_epoch) in &self.pending_paint_metrics { // we get the last painted frame id from webrender - if let Some(webrender_api::Epoch(epoch)) = - self.webrender.current_epoch(self.webrender_document, id.to_webrender()) + if let Some(webrender_api::Epoch(epoch)) = self + .webrender + .current_epoch(self.webrender_document, id.to_webrender()) { // and check if it is the one the layout thread is expecting, let epoch = Epoch(epoch); @@ -1332,10 +1333,12 @@ impl IOCompositor { CompositeTarget::Window => None, #[cfg(feature = "gl")] CompositeTarget::WindowAndPng => { - let img = gl::draw_img(&*self.window.gl(), - rt_info, - FramebufferUintLength::new(width.get()), - FramebufferUintLength::new(height.get())); + let img = gl::draw_img( + &*self.window.gl(), + rt_info, + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get()), + ); Some(Image { width: img.width(), height: img.height(), @@ -1354,10 +1357,12 @@ impl IOCompositor { || match self.output_file.as_ref() { Some(path) => match File::create(path) { Ok(mut file) => { - let img = gl::draw_img(gl, - rt_info, - FramebufferUintLength::new(width.get()), - FramebufferUintLength::new(height.get())); + let img = gl::draw_img( + gl, + rt_info, + FramebufferUintLength::new(width.get()), + FramebufferUintLength::new(height.get()), + ); let dynamic_image = DynamicImage::ImageRgb8(img); if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG) { diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index ad318368b69..9250d25e5bf 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -17,8 +17,8 @@ use profile_traits::time; use script_traits::{AnimationState, ConstellationMsg, EventResult}; use std::fmt::{Debug, Error, Formatter}; use style_traits::viewport::ViewportConstraints; -use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; use webrender_api; +use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; use webvr_traits::WebVRMainThreadHeartbeat; /// Sends messages to the compositor. diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 90ced19bc09..d668b03979e 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -19,9 +19,9 @@ use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use std::time::Duration; use style_traits::DevicePixel; -use webrender_api::ScrollLocation; -use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize}; use webrender_api::units::DevicePoint; +use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize}; +use webrender_api::ScrollLocation; use webvr::VRServiceManager; use webvr_traits::WebVRMainThreadHeartbeat; diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 54091f85389..00fc8495857 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -65,10 +65,10 @@ use style::values::specified::ui::CursorKind; use style::values::{Either, RGBA}; use style_traits::ToCss; use webrender_api::units::{LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D}; +use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle}; use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder}; use webrender_api::{ScrollSensitivity, StickyOffsetBounds}; -use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; static THREAD_TINT_COLORS: [ColorF; 8] = [ ColorF { diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index c55beb7ec17..34b6d093d53 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -13,7 +13,9 @@ use msg::constellation_msg::PipelineId; use webrender_api::units::LayoutPoint; use webrender_api::{self, ClipId, CommonItemProperties, DisplayItem as WrDisplayItem}; use webrender_api::{DisplayListBuilder, PropertyBinding, PushStackingContextDisplayItem}; -use webrender_api::{RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext}; +use webrender_api::{ + RasterSpace, ReferenceFrameKind, SpaceAndClipInfo, SpatialId, StackingContext, +}; pub trait WebRenderDisplayListConverter { fn convert_to_webrender(&mut self, pipeline_id: PipelineId) -> DisplayListBuilder; @@ -144,26 +146,30 @@ impl WebRenderDisplayItemConverter for DisplayItem { }, DisplayItem::PushTextShadow(ref mut item) => { let common = build_common_item_properties(&item.base, state); - builder.push_shadow(&SpaceAndClipInfo { - spatial_id: common.spatial_id, - clip_id: common.clip_id, - }, - item.shadow, - true); + builder.push_shadow( + &SpaceAndClipInfo { + spatial_id: common.spatial_id, + clip_id: common.clip_id, + }, + item.shadow, + true, + ); }, DisplayItem::PopAllTextShadows(_) => { builder.push_item(&WrDisplayItem::PopAllShadows); }, DisplayItem::Iframe(ref mut item) => { let common = build_common_item_properties(&item.base, state); - builder.push_iframe(item.base.bounds, - common.clip_rect, - &SpaceAndClipInfo { - spatial_id: common.spatial_id, - clip_id: common.clip_id, - }, - item.iframe.to_webrender(), - true); + builder.push_iframe( + item.base.bounds, + common.clip_rect, + &SpaceAndClipInfo { + spatial_id: common.spatial_id, + clip_id: common.clip_id, + }, + item.iframe.to_webrender(), + true, + ); }, DisplayItem::PushStackingContext(ref mut item) => { let stacking_context = &item.stacking_context; @@ -296,8 +302,10 @@ impl WebRenderDisplayItemConverter for DisplayItem { } } -fn build_common_item_properties(base: &BaseDisplayItem, state: &ClipScrollState) - -> CommonItemProperties { +fn build_common_item_properties( + base: &BaseDisplayItem, + state: &ClipScrollState, +) -> CommonItemProperties { let tag = match base.metadata.pointing { Some(cursor) => Some((base.metadata.node.0 as u64, cursor)), None => None, diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index aa8a8605642..879e2af2f64 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -65,8 +65,8 @@ use style::values::computed::{LengthPercentage, LengthPercentageOrAuto, Size, Ve use style::values::generics::box_::{Perspective, VerticalAlignKeyword}; use style::values::generics::transform; use style::Zero; -use webrender_api::units::LayoutTransform; use webrender_api; +use webrender_api::units::LayoutTransform; // From gfxFontConstants.h in Firefox. static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20; diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 6a0b99dab8c..113330f0162 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -5,8 +5,8 @@ //! Implements sequential traversals over the DOM and flow trees. use crate::context::LayoutContext; -use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::display_list::items::{self, CommonDisplayItem, DisplayItem, DisplayListSection}; +use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::floats::SpeculatedFloatPlacement; use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils}; use crate::fragment::{CoordinateSystem, FragmentBorderBoxIterator}; diff --git a/components/servo/lib.rs b/components/servo/lib.rs index feb31036fdc..531ca628ce6 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -307,7 +307,10 @@ where // Cast from `DeviceIndependentPixel` to `DevicePixel` let device_pixel_ratio = coordinates.hidpi_factor.get(); let window_size = TypedSize2D::from_untyped( - &(opts.initial_window_size.to_f32() / device_pixel_ratio).to_i32().to_untyped()); + &(opts.initial_window_size.to_f32() / device_pixel_ratio) + .to_i32() + .to_untyped(), + ); webrender::Renderer::new( window.gl(), diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index b54bc35bfbf..46da89d3907 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -371,6 +371,10 @@ def check_lock(file_name, contents): source = "crates.io" packages_by_name.setdefault(package["name"], []).append((package["version"], source)) + for name in exceptions: + if name not in packages_by_name: + yield (1, "duplicates are allowed for `{}` but it is not a dependency".format(name)) + for (name, packages) in packages_by_name.iteritems(): has_duplicates = len(packages) > 1 duplicates_allowed = name in exceptions diff --git a/servo-tidy.toml b/servo-tidy.toml index 14fcdb5fbe1..ca8cff08917 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -46,7 +46,6 @@ packages = [ "rand_core", "scopeguard", "unicase", - "ws", ] # Files that are ignored for all tidy and lint checks. files = [ From 089823ae201ce5721fececd3cfec70c73d05d2c3 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 14 Jun 2019 00:03:31 -0400 Subject: [PATCH 11/18] Remove sometimes-unused bounds field from base display item to prevent confusion. --- components/layout/display_list/builder.rs | 93 +++++-------------- components/layout/display_list/items.rs | 26 ++++-- .../layout/display_list/webrender_helpers.rs | 2 +- components/layout/sequential.rs | 1 - 4 files changed, 43 insertions(+), 79 deletions(-) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 00fc8495857..e6ead2505ca 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -13,7 +13,7 @@ use crate::context::LayoutContext; use crate::display_list::background::{self, get_cyclic}; use crate::display_list::border; use crate::display_list::gradient; -use crate::display_list::items::{self, BaseDisplayItem, ClipScrollNode, BLUR_INFLATION_FACTOR}; +use crate::display_list::items::{self, BaseDisplayItem, ClipScrollNode}; use crate::display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, ClippingAndScrolling}; use crate::display_list::items::{ClippingRegion, DisplayItem, DisplayItemMetadata, DisplayList}; use crate::display_list::items::{CommonDisplayItem, DisplayListSection}; @@ -32,7 +32,7 @@ use crate::table_cell::CollapsedBordersForCell; use app_units::{Au, AU_PER_PX}; use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg}; use embedder_traits::Cursor; -use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedRect, TypedSize2D, Vector2D}; +use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedRect, TypedSize2D}; use fnv::FnvHashMap; use gfx::text::glyph::ByteIndex; use gfx::text::TextRun; @@ -376,7 +376,6 @@ impl<'a> DisplayListBuildState<'a> { pub fn create_base_display_item( &self, - bounds: Rect, clip_rect: Rect, node: OpaqueNode, cursor: Option, @@ -390,7 +389,6 @@ impl<'a> DisplayListBuildState<'a> { self.current_clipping_and_scrolling }; self.create_base_display_item_with_clipping_and_scrolling( - bounds, clip_rect, node, cursor, @@ -401,7 +399,6 @@ impl<'a> DisplayListBuildState<'a> { fn create_base_display_item_with_clipping_and_scrolling( &self, - bounds: Rect, clip_rect: Rect, node: OpaqueNode, cursor: Option, @@ -409,7 +406,6 @@ impl<'a> DisplayListBuildState<'a> { clipping_and_scrolling: ClippingAndScrolling, ) -> BaseDisplayItem { BaseDisplayItem::new( - bounds.to_layout(), DisplayItemMetadata { node, // Store cursor id in display list. @@ -706,7 +702,6 @@ impl Fragment { } let base = state.create_base_display_item( - bounds, bounds, self.node, get_cursor(&style, Cursor::Default), @@ -844,7 +839,6 @@ impl Fragment { // Create the image display item. let base = state.create_base_display_item( - placement.bounds, placement.clip_rect, self.node, get_cursor(&style, Cursor::Default), @@ -961,7 +955,6 @@ impl Fragment { } let base = state.create_base_display_item( - placement.bounds, placement.clip_rect, self.node, get_cursor(&style, Cursor::Default), @@ -1021,17 +1014,7 @@ impl Fragment { ) { // NB: According to CSS-BACKGROUNDS, box shadows render in *reverse* order (front to back). for box_shadow in style.get_effects().box_shadow.0.iter().rev() { - let bounds = shadow_bounds( - absolute_bounds.translate(&Vector2D::new( - Au::from(box_shadow.base.horizontal), - Au::from(box_shadow.base.vertical), - )), - Au::from(box_shadow.base.blur), - Au::from(box_shadow.spread), - ); - let base = state.create_base_display_item( - bounds, clip, self.node, get_cursor(&style, Cursor::Default), @@ -1116,7 +1099,6 @@ impl Fragment { // Append the border to the display list. let base = state.create_base_display_item( - bounds, clip, self.node, get_cursor(&style, Cursor::Default), @@ -1165,11 +1147,10 @@ impl Fragment { radius: border_radius, do_aa: true, }); - let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: bounds.to_layout(), common: items::empty_common_item_properties(), widths: border_widths.to_layout(), details, @@ -1272,11 +1253,10 @@ impl Fragment { border_image_outset.left.to_f32_px(), ), }); - let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: bounds.to_layout(), common: items::empty_common_item_properties(), widths: border_image_width, details, @@ -1321,17 +1301,15 @@ impl Fragment { .resolve_color(style.get_outline().outline_color) .to_layout(); let base = state.create_base_display_item( - bounds, clip, self.node, get_cursor(&style, Cursor::Default), DisplayListSection::Outlines, ); - let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: bounds.to_layout(), common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(width).to_layout(), details: BorderDetails::Normal(border::simple(color, outline_style.to_layout())), @@ -1355,17 +1333,15 @@ impl Fragment { // Compute the text fragment bounds and draw a border surrounding them. let base = state.create_base_display_item( - stacking_relative_border_box, clip, self.node, get_cursor(&style, Cursor::Default), DisplayListSection::Content, ); - let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: stacking_relative_border_box.to_layout(), common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(1)).to_layout(), details: BorderDetails::Normal(border::simple( @@ -1387,15 +1363,14 @@ impl Fragment { let baseline = baseline.to_physical(self.style.writing_mode, container_size); let base = state.create_base_display_item( - baseline, clip, self.node, get_cursor(&style, Cursor::Default), DisplayListSection::Content, ); // TODO(gw): Use a better estimate for wavy line thickness. - let wavy_line_thickness = (0.33 * base.bounds.size.height).ceil(); - let area = base.bounds; + let area = baseline.to_layout(); + let wavy_line_thickness = (0.33 * area.size.height).ceil(); state.add_display_item(DisplayItem::Line(CommonDisplayItem::new( base, webrender_api::LineDisplayItem { @@ -1418,17 +1393,15 @@ impl Fragment { ) { // This prints a debug border around the border of this fragment. let base = state.create_base_display_item( - stacking_relative_border_box, clip, self.node, get_cursor(&self.style, Cursor::Default), DisplayListSection::Content, ); - let bounds = base.bounds; state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: stacking_relative_border_box.to_layout(), common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(1)).to_layout(), details: BorderDetails::Normal(border::simple( @@ -1447,7 +1420,6 @@ impl Fragment { state: &mut DisplayListBuildState, stacking_relative_border_box: Rect, display_list_section: DisplayListSection, - clip: Rect, ) { let scanned_text_fragment_info = match self.specific { SpecificFragmentInfo::ScannedText(ref scanned_text_fragment_info) => { @@ -1463,7 +1435,6 @@ impl Fragment { let style = self.selected_style(); let background_color = style.resolve_color(style.get_background().background_color); let base = state.create_base_display_item( - stacking_relative_border_box, stacking_relative_border_box, self.node, get_cursor(&self.style, Cursor::Default), @@ -1510,7 +1481,6 @@ impl Fragment { }; let base = state.create_base_display_item( - insertion_point_bounds, insertion_point_bounds, self.node, get_cursor(&self.style, cursor), @@ -1676,7 +1646,6 @@ impl Fragment { state, stacking_relative_border_box, display_list_section, - clip, ); } @@ -1693,7 +1662,6 @@ impl Fragment { // scrollable ancestor. let content_size = TypedRect::new(stacking_relative_border_box.origin, content_size); let base = state.create_base_display_item_with_clipping_and_scrolling( - content_size, content_size, self.node, // FIXME(emilio): Why does this ignore pointer-events? @@ -1747,7 +1715,6 @@ impl Fragment { } state.create_base_display_item( - stacking_relative_content_box, stacking_relative_border_box, self.node, get_cursor(&self.style, Cursor::Default), @@ -1834,12 +1801,16 @@ impl Fragment { }; let base = create_base_display_item(state); + let bounds = stacking_relative_content_box.to_layout(); let item = DisplayItem::Iframe(Box::new(IframeDisplayItem { base, + bounds, iframe: pipeline_id, })); - let size = Size2D::new(item.bounds().size.width, item.bounds().size.height); + // XXXjdm: This sleight-of-hand to convert LayoutRect -> Size2D + // looks bogus. + let size = Size2D::new(bounds.size.width, bounds.size.height); state.iframe_sizes.push(IFrameSize { id: browsing_context_id, size: TypedSize2D::from_untyped(&size), @@ -1853,11 +1824,10 @@ impl Fragment { if let Some(ref image) = image_fragment.image { if let Some(id) = image.id { let base = create_base_display_item(state); - let bounds = base.bounds; state.add_image_item( base, webrender_api::ImageDisplayItem { - bounds, + bounds: stacking_relative_content_box.to_layout(), common: items::empty_common_item_properties(), image_key: id, stretch_size: stacking_relative_content_box.size.to_layout(), @@ -1877,11 +1847,10 @@ impl Fragment { SpecificFragmentInfo::Media(ref fragment_info) => { if let Some((ref image_key, _, _)) = fragment_info.current_frame { let base = create_base_display_item(state); - let bounds = base.bounds; state.add_image_item( base, webrender_api::ImageDisplayItem { - bounds, + bounds: stacking_relative_content_box.to_layout(), common: items::empty_common_item_properties(), image_key: *image_key, stretch_size: stacking_relative_border_box.size.to_layout(), @@ -1914,7 +1883,7 @@ impl Fragment { let base = create_base_display_item(state); let display_item = webrender_api::ImageDisplayItem { - bounds: base.bounds, + bounds: stacking_relative_border_box.to_layout(), common: items::empty_common_item_properties(), image_key, stretch_size: stacking_relative_content_box.size.to_layout(), @@ -2033,7 +2002,6 @@ impl Fragment { // Base item for all text/shadows let base = state.create_base_display_item( - stacking_relative_content_box, clip, self.node, get_cursor(&self.style, cursor), @@ -2111,7 +2079,7 @@ impl Fragment { state.add_display_item(DisplayItem::Text(CommonDisplayItem::with_data( base.clone(), webrender_api::TextDisplayItem { - bounds: base.bounds, + bounds: stacking_relative_content_box.to_layout(), common: items::empty_common_item_properties(), font_key: text_fragment.run.font_key, color: text_color.to_layout(), @@ -2159,7 +2127,6 @@ impl Fragment { let stacking_relative_box = stacking_relative_box.to_physical(self.style.writing_mode, container_size); let base = state.create_base_display_item( - stacking_relative_box, clip, self.node, get_cursor(&self.style, Cursor::Default), @@ -2167,8 +2134,8 @@ impl Fragment { ); // TODO(gw): Use a better estimate for wavy line thickness. - let wavy_line_thickness = (0.33 * base.bounds.size.height).ceil(); - let area = base.bounds; + let area = stacking_relative_box.to_layout(); + let wavy_line_thickness = (0.33 * area.size.height).ceil(); state.add_display_item(DisplayItem::Line(CommonDisplayItem::new( base, webrender_api::LineDisplayItem { @@ -2877,18 +2844,13 @@ impl BaseFlow { let mut color = THREAD_TINT_COLORS[thread_id as usize % THREAD_TINT_COLORS.len()]; color.a = 1.0; - let base = state.create_base_display_item( - stacking_context_relative_bounds.inflate(Au::from_px(2), Au::from_px(2)), - self.clip, - node, - None, - DisplayListSection::Content, - ); - let bounds = base.bounds; + let base = + state.create_base_display_item(self.clip, node, None, DisplayListSection::Content); + let bounds = stacking_context_relative_bounds.inflate(Au::from_px(2), Au::from_px(2)); state.add_display_item(DisplayItem::Border(CommonDisplayItem::with_data( base, webrender_api::BorderDisplayItem { - bounds, + bounds: bounds.to_layout(), common: items::empty_common_item_properties(), widths: SideOffsets2D::new_all_same(Au::from_px(2)).to_layout(), details: BorderDetails::Normal(border::simple( @@ -2951,13 +2913,6 @@ fn get_cursor(values: &ComputedValues, default_cursor: Cursor) -> Option }) } -/// Adjusts `content_rect` as necessary for the given spread, and blur so that the resulting -/// bounding rect contains all of a shadow's ink. -fn shadow_bounds(content_rect: Rect, blur: Au, spread: Au) -> Rect { - let inflation = spread + blur * BLUR_INFLATION_FACTOR; - content_rect.inflate(inflation, inflation) -} - /// Adjusts borders as appropriate to account for a fragment's status as the /// first or last fragment within the range of an element. /// diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs index 8563d17d023..b6674d972fe 100644 --- a/components/layout/display_list/items.rs +++ b/components/layout/display_list/items.rs @@ -12,7 +12,7 @@ //! They are therefore not exactly analogous to constructs like Skia pictures, which consist of //! low-level drawing primitives. -use euclid::{SideOffsets2D, TypedRect, Vector2D}; +use euclid::{SideOffsets2D, Vector2D}; use gfx_traits::print_tree::PrintTree; use gfx_traits::{self, StackingContextId}; use msg::constellation_msg::PipelineId; @@ -409,9 +409,6 @@ pub enum DisplayItem { /// Information common to all display items. #[derive(Clone, Serialize)] pub struct BaseDisplayItem { - /// The boundaries of the display item, in layer coordinates. - pub bounds: LayoutRect, - /// Metadata attached to this display item. pub metadata: DisplayItemMetadata, @@ -431,7 +428,6 @@ pub struct BaseDisplayItem { impl BaseDisplayItem { #[inline(always)] pub fn new( - bounds: LayoutRect, metadata: DisplayItemMetadata, clip_rect: LayoutRect, section: DisplayListSection, @@ -439,7 +435,6 @@ impl BaseDisplayItem { clipping_and_scrolling: ClippingAndScrolling, ) -> BaseDisplayItem { BaseDisplayItem { - bounds, metadata, clip_rect, section, @@ -451,7 +446,6 @@ impl BaseDisplayItem { #[inline(always)] pub fn empty() -> BaseDisplayItem { BaseDisplayItem { - bounds: TypedRect::zero(), metadata: DisplayItemMetadata { node: OpaqueNode(0), pointing: None, @@ -618,6 +612,7 @@ pub enum TextOrientation { pub struct IframeDisplayItem { pub base: BaseDisplayItem, pub iframe: PipelineId, + pub bounds: LayoutRect, } #[derive(Clone, Serialize)] @@ -720,7 +715,22 @@ impl DisplayItem { } pub fn bounds(&self) -> LayoutRect { - self.base().bounds + match *self { + DisplayItem::Rectangle(ref item) => item.item.common.clip_rect, + DisplayItem::Text(ref item) => item.item.bounds, + DisplayItem::Image(ref item) => item.item.bounds, + DisplayItem::Border(ref item) => item.item.bounds, + DisplayItem::Gradient(ref item) => item.item.bounds, + DisplayItem::RadialGradient(ref item) => item.item.bounds, + DisplayItem::Line(ref item) => item.item.area, + DisplayItem::BoxShadow(ref item) => item.item.box_bounds, + DisplayItem::PushTextShadow(_) => LayoutRect::zero(), + DisplayItem::PopAllTextShadows(_) => LayoutRect::zero(), + DisplayItem::Iframe(ref item) => item.bounds, + DisplayItem::PushStackingContext(ref item) => item.stacking_context.bounds, + DisplayItem::PopStackingContext(_) => LayoutRect::zero(), + DisplayItem::DefineClipScrollNode(_) => LayoutRect::zero(), + } } } diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index 34b6d093d53..6bdb1bfcfdc 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -161,7 +161,7 @@ impl WebRenderDisplayItemConverter for DisplayItem { DisplayItem::Iframe(ref mut item) => { let common = build_common_item_properties(&item.base, state); builder.push_iframe( - item.base.bounds, + item.bounds, common.clip_rect, &SpaceAndClipInfo { spatial_id: common.spatial_id, diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 113330f0162..16dd3b8d4da 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -84,7 +84,6 @@ pub fn build_display_list_for_subtree<'a>( // Create a base rectangle for the page background based on the root // background color. let base = state.create_base_display_item( - Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), flow_root.as_block().fragment.node, None, From 20450500ed197d7feb4a97129e21a9406f7dcc14 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 14 Jun 2019 01:43:50 -0400 Subject: [PATCH 12/18] Mark test with tiny AA difference from reference as fuzzy match. --- ...ermediate-element-overflow-hidden-and-border-radius.html.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini diff --git a/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini new file mode 100644 index 00000000000..d8f5591b8fd --- /dev/null +++ b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini @@ -0,0 +1,2 @@ +[mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html] + fuzzy: /css/compositing/mix-blend-mode/reference/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius-ref.html:9;8 From bb01d495dbe718c7105bfd6a8206fc746c6c896b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 14 Jun 2019 02:21:40 -0400 Subject: [PATCH 13/18] Mark underline rendering expected failure on linux. --- ...nd-mode-both-parent-and-blended-with-3D-transform.html.ini | 3 ++- .../meta/css/text_decoration_underline_subpx_a.html.ini | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/wpt/mozilla/meta/css/text_decoration_underline_subpx_a.html.ini diff --git a/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-both-parent-and-blended-with-3D-transform.html.ini b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-both-parent-and-blended-with-3D-transform.html.ini index c65930090be..53ab4250231 100644 --- a/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-both-parent-and-blended-with-3D-transform.html.ini +++ b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-both-parent-and-blended-with-3D-transform.html.ini @@ -1,3 +1,4 @@ [mix-blend-mode-both-parent-and-blended-with-3D-transform.html] type: reftest - expected: FAIL + expected: + if os == "linux": FAIL diff --git a/tests/wpt/mozilla/meta/css/text_decoration_underline_subpx_a.html.ini b/tests/wpt/mozilla/meta/css/text_decoration_underline_subpx_a.html.ini new file mode 100644 index 00000000000..fb0e61c9144 --- /dev/null +++ b/tests/wpt/mozilla/meta/css/text_decoration_underline_subpx_a.html.ini @@ -0,0 +1,4 @@ +[text_decoration_underline_subpx_a.html] + bug: https://github.com/servo/servo/issues/23569 + expected: + if os == "linux": FAIL From 179c825e59ed12dd8919d24162ccc15f9d5798cb Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 14 Jun 2019 02:27:23 -0400 Subject: [PATCH 14/18] Fix unit test. --- tests/unit/metrics/paint_time.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/metrics/paint_time.rs b/tests/unit/metrics/paint_time.rs index 7c7502adf29..c404e4d6e7b 100644 --- a/tests/unit/metrics/paint_time.rs +++ b/tests/unit/metrics/paint_time.rs @@ -9,7 +9,8 @@ use metrics::{PaintTimeMetrics, ProfilerMetadataFactory, ProgressiveWebMetric}; use msg::constellation_msg::TEST_PIPELINE_ID; use profile_traits::time::{ProfilerChan, TimerMetadata}; use servo_url::ServoUrl; -use webrender_api::{AlphaType, ColorF, ImageDisplayItem, ImageKey, ImageRendering, LayoutSize}; +use webrender_api::units::{LayoutRect, LayoutSize}; +use webrender_api::{AlphaType, ColorF, ImageDisplayItem, ImageKey, ImageRendering}; struct DummyProfilerMetadataFactory {} impl ProfilerMetadataFactory for DummyProfilerMetadataFactory { @@ -118,6 +119,8 @@ fn test_first_contentful_paint_setter() { let image = DisplayItem::Image(CommonDisplayItem::new( BaseDisplayItem::empty(), ImageDisplayItem { + bounds: LayoutRect::zero(), + common: layout::display_list::items::empty_common_item_properties(), image_key: ImageKey::DUMMY, stretch_size: LayoutSize::zero(), tile_spacing: LayoutSize::zero(), From 6adf2cac8735076c03702c5847fd99541c5cc101 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 9 Jul 2019 10:42:05 -0400 Subject: [PATCH 15/18] Update webrender. --- Cargo.lock | 83 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 4 --- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90740083aa0..7cb07bd377e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,8 +408,8 @@ dependencies = [ "raqote 0.4.1-alpha.0 (git+https://github.com/jrmuizel/raqote)", "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", - "webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webrender_traits 0.0.1", ] @@ -429,7 +429,7 @@ dependencies = [ "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", ] @@ -617,8 +617,8 @@ dependencies = [ "style_traits 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webvr 0.0.1", "webvr_traits 0.0.1", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", @@ -662,7 +662,7 @@ dependencies = [ "servo_remutex 0.0.1", "servo_url 0.0.1", "style_traits 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", ] @@ -1124,7 +1124,7 @@ dependencies = [ "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo_url 0.0.1", "style_traits 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -1212,7 +1212,7 @@ name = "erased-serde" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1466,7 +1466,7 @@ dependencies = [ "ucd 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "xml5ever 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2359,7 +2359,7 @@ dependencies = [ "style_traits 0.0.1", "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2413,7 +2413,7 @@ dependencies = [ "style 0.0.1", "style_traits 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -2434,7 +2434,7 @@ dependencies = [ "script_traits 0.0.1", "servo_geometry 0.0.1", "servo_url 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -2452,7 +2452,7 @@ dependencies = [ "script_traits 0.0.1", "servo_geometry 0.0.1", "servo_url 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -2568,8 +2568,8 @@ dependencies = [ "style 0.0.1", "style_traits 0.0.1", "webdriver_server 0.0.1", - "webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webrender_traits 0.0.1", "webvr 0.0.1", "webvr_traits 0.0.1", @@ -2700,7 +2700,7 @@ dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "xml5ever 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2752,11 +2752,11 @@ dependencies = [ "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo-media 0.1.0 (git+https://github.com/servo/media)", "servo_config 0.0.1", - "webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webrender_traits 0.0.1", ] @@ -2817,7 +2817,7 @@ dependencies = [ "profile_traits 0.0.1", "servo_url 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -2970,7 +2970,7 @@ dependencies = [ "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "size_of_test 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -3027,7 +3027,7 @@ dependencies = [ "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3070,7 +3070,7 @@ dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -3929,7 +3929,7 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", "xml5ever 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3963,7 +3963,7 @@ dependencies = [ "servo_url 0.0.1", "style 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -4021,7 +4021,7 @@ dependencies = [ "style_traits 0.0.1", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", ] @@ -4188,6 +4188,7 @@ dependencies = [ "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "servo-media-traits 0.1.0 (git+https://github.com/servo/media)", + "servo_media_derive 0.1.0 (git+https://github.com/servo/media)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4386,7 +4387,7 @@ dependencies = [ "malloc_size_of 0.0.1", "malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "style_traits 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -4747,7 +4748,7 @@ dependencies = [ "servo_url 0.0.1", "to_shmem 0.0.1", "to_shmem_derive 0.0.1", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -5118,7 +5119,7 @@ dependencies = [ "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "inventory 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "typetag-impl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5405,7 +5406,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.60.0" -source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" +source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5446,7 +5447,7 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.60.0" -source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" +source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5462,13 +5463,13 @@ dependencies = [ "serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "wr_malloc_size_of 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "wr_malloc_size_of 0.0.1 (git+https://github.com/servo/webrender)", ] [[package]] name = "webrender_build" version = "0.0.1" -source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" +source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64" dependencies = [ "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5478,8 +5479,8 @@ name = "webrender_traits" version = "0.0.1" dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", - "webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)", + "webrender 0.60.0 (git+https://github.com/servo/webrender)", + "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] [[package]] @@ -5516,7 +5517,7 @@ version = "0.0.1" source = "git+https://github.com/servo/webxr#39600af83b714e910389c912706d7cd06406c7bb" dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "webxr-api 0.0.1 (git+https://github.com/servo/webxr)", ] @@ -5527,7 +5528,7 @@ version = "0.0.1" source = "git+https://github.com/servo/webxr#39600af83b714e910389c912706d7cd06406c7bb" dependencies = [ "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "typetag 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5620,7 +5621,7 @@ dependencies = [ [[package]] name = "wr_malloc_size_of" version = "0.0.1" -source = "git+https://github.com/servo/webrender#81703c1274cd4935f82412d4e5819942934d0c96" +source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6159,9 +6160,9 @@ dependencies = [ "checksum wayland-scanner 0.21.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f1927ee62e4e149c010dc9eca8ca47e238416cd6f45f688eb9f8a8e9c3794c30" "checksum wayland-sys 0.21.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ca41ed78a12256f81df6f53fcbe4503213ba442e02cdad3c9c888a64a668eaf4" "checksum webdriver 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0533b0b0a05e2e5c081317759a038482806c6085c9605dded03c8bbd2498b042" -"checksum webrender 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "" -"checksum webrender_api 0.60.0 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "" -"checksum webrender_build 0.0.1 (git+https://github.com/jdm/webrender?branch=servo-hl)" = "" +"checksum webrender 0.60.0 (git+https://github.com/servo/webrender)" = "" +"checksum webrender_api 0.60.0 (git+https://github.com/servo/webrender)" = "" +"checksum webrender_build 0.0.1 (git+https://github.com/servo/webrender)" = "" "checksum webxr 0.0.1 (git+https://github.com/servo/webxr)" = "" "checksum webxr-api 0.0.1 (git+https://github.com/servo/webxr)" = "" "checksum weedle 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc44aa200daee8b1f3a004beaf16554369746f1b4486f0cf93b0caf8a3c2d1e" diff --git a/Cargo.toml b/Cargo.toml index 8f74656b720..060be41a5d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,3 @@ opt-level = 3 mio = { git = "https://github.com/servo/mio.git", branch = "servo" } iovec = { git = "https://github.com/servo/iovec.git", branch = "servo" } cmake = { git = "https://github.com/alexcrichton/cmake-rs" } - -[patch."https://github.com/servo/webrender"] -webrender = { git = "https://github.com/jdm/webrender", branch = "servo-hl" } -webrender_api = { git = "https://github.com/jdm/webrender", branch = "servo-hl" } From 4de93a145affb220120f724c976354a1930f1371 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 11 Jul 2019 09:37:36 -0400 Subject: [PATCH 16/18] Update dwrote. --- Cargo.lock | 15 +-------------- components/gfx/Cargo.toml | 2 +- servo-tidy.toml | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cb07bd377e..dd063ad0d72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1080,18 +1080,6 @@ dependencies = [ "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "dwrote" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "dwrote" version = "0.9.0" @@ -1437,7 +1425,7 @@ dependencies = [ "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 13.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fontsan 0.4.0 (git+https://github.com/servo/fontsan)", @@ -5816,7 +5804,6 @@ dependencies = [ "checksum downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "18df8ce4470c189d18aa926022da57544f31e154631eb4cfe796aea97051fe6c" "checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" "checksum dtoa-short 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe6f727b406462fd57c95fed84d1b0dbfb5f0136fcac005adba9ea0367c05cc8" -"checksum dwrote 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c31c624339dab99c223a4b26c2e803b7c248adaca91549ce654c76f39a03f5c8" "checksum dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bd1369e02db5e9b842a9b67bce8a2fcc043beafb2ae8a799dd482d46ea1ff0d" "checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a" "checksum encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ca20350a7cb5aab5b9034731123d6d412caf3e92d4985e739e411ba0955fd0eb" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index a95fb6d1046..8d2dbd33ad9 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -60,5 +60,5 @@ servo-fontconfig = "0.4" xml5ever = {version = "0.14"} [target.'cfg(target_os = "windows")'.dependencies] -dwrote = "0.8" +dwrote = "0.9" truetype = "0.26" diff --git a/servo-tidy.toml b/servo-tidy.toml index ca8cff08917..8d9783f1983 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -35,7 +35,6 @@ packages = [ "crossbeam-deque", "crossbeam-epoch", "crossbeam-utils", - "dwrote", "gl_generator", # https://github.com/servo/servo/pull/23288#issuecomment-494687746 "lock_api", "memmap", From 921d91f731d2db797312a17c3763134042176045 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 11 Jul 2019 22:20:59 -0400 Subject: [PATCH 17/18] Fix simpleservo. --- ports/libsimpleservo/api/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs index 2935852ad86..213379c927d 100644 --- a/ports/libsimpleservo/api/src/lib.rs +++ b/ports/libsimpleservo/api/src/lib.rs @@ -22,7 +22,8 @@ use servo::script_traits::{TouchEventType, TouchId}; use servo::servo_config::opts; use servo::servo_config::{pref, set_pref}; use servo::servo_url::ServoUrl; -use servo::webrender_api::{DevicePixel, FramebufferPixel, ScrollLocation}; +use servo::webrender_api::units::DevicePixel; +use servo::webrender_api::ScrollLocation; use servo::webvr::{VRExternalShmemPtr, VRMainThreadHeartbeat, VRService, VRServiceManager}; use servo::{self, gl, BrowserId, Servo}; use servo_media::player::context as MediaPlayerContext; @@ -61,7 +62,7 @@ pub enum VRInitOptions { #[derive(Clone, Debug)] pub struct Coordinates { pub viewport: TypedRect, - pub framebuffer: TypedSize2D, + pub framebuffer: TypedSize2D, } impl Coordinates { From 30ea2827209c3c6982c4552c7d3f1193883025b1 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 12 Jul 2019 07:53:20 -0400 Subject: [PATCH 18/18] Fix mlservo. --- ports/libmlservo/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/libmlservo/src/lib.rs b/ports/libmlservo/src/lib.rs index 56739a54f23..87b5de33dcd 100644 --- a/ports/libmlservo/src/lib.rs +++ b/ports/libmlservo/src/lib.rs @@ -14,9 +14,7 @@ use rust_webvr::api::MagicLeapVRService; use servo::euclid::TypedScale; use servo::keyboard_types::Key; use servo::servo_url::ServoUrl; -use servo::webrender_api::DevicePixel; -use servo::webrender_api::DevicePoint; -use servo::webrender_api::LayoutPixel; +use servo::webrender_api::units::{DevicePixel, DevicePoint, LayoutPixel}; use simpleservo::{self, deinit, gl_glue, MouseButton, ServoGlue, SERVO}; use simpleservo::{Coordinates, EventLoopWaker, HostTrait, InitOptions, VRInitOptions}; use smallvec::SmallVec;