From 42d64d002ada0028329d4d8d5fad5c05e3701b2b Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Mon, 30 Sep 2019 17:41:11 +0200 Subject: [PATCH 1/2] euclid update --- Cargo.lock | 88 +++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f019a379a12..c22cbf50586 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,7 +141,7 @@ version = "0.36.1" source = "git+https://github.com/servo/rust-azure#5996612af3139cc3c5eafb019d8218f8ca1634de" dependencies = [ "cmake 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo-skia 0.30000022.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -396,7 +396,7 @@ dependencies = [ "canvas_traits 0.0.1", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.18 (registry+https://github.com/rust-lang/crates.io-index)", "half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -420,7 +420,7 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (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", @@ -612,7 +612,7 @@ version = "0.0.1" dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -654,7 +654,7 @@ dependencies = [ "debugger 0.0.1", "devtools_traits 0.0.1", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.2.0 (git+https://github.com/servo/gaol)", "gfx 0.0.1", "gfx_traits 0.0.1", @@ -1193,7 +1193,7 @@ dependencies = [ [[package]] name = "euclid" -version = "0.20.0" +version = "0.20.1" 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)", @@ -1258,7 +1258,7 @@ dependencies = [ "core-text 13.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "dirs 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "float-ord 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1387,7 +1387,7 @@ 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)", "dwrote 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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)", "freetype 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2274,7 +2274,7 @@ dependencies = [ "canvas_traits 0.0.1", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -2320,7 +2320,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", @@ -2350,7 +2350,7 @@ dependencies = [ "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -2396,7 +2396,7 @@ dependencies = [ "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", @@ -2439,7 +2439,7 @@ name = "layout_traits" version = "0.0.1" dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "metrics 0.0.1", @@ -2540,7 +2540,7 @@ dependencies = [ "devtools_traits 0.0.1", "embedder_traits 0.0.1", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2633,7 +2633,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2678,7 +2678,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "hashglobe 0.1.0", "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2741,7 +2741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "media" version = "0.0.1" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3187,7 +3187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.13.1 (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)", @@ -3338,7 +3338,7 @@ name = "peek-poke" version = "0.2.0" source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "peek-poke-derive 0.2.0 (git+https://github.com/servo/webrender)", ] @@ -3411,7 +3411,7 @@ dependencies = [ name = "pixels" version = "0.0.1" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.88 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3428,7 +3428,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3663,7 +3663,7 @@ name = "raqote" version = "0.6.5-alpha.0" source = "git+https://github.com/jrmuizel/raqote#c9d6d9c65ffac5fe91e2699f9854b3fbaa3c85c2" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "font-kit 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lyon_geom 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3780,7 +3780,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3885,7 +3885,7 @@ dependencies = [ "embedder_traits 0.0.1", "encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)", "enum-iterator 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "headers 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3967,7 +3967,7 @@ dependencies = [ "canvas_traits 0.0.1", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "html5ever 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4007,7 +4007,7 @@ dependencies = [ name = "script_tests" version = "0.0.1" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "servo_url 0.0.1", @@ -4023,7 +4023,7 @@ dependencies = [ "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", "embedder_traits 0.0.1", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4140,7 +4140,7 @@ dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "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.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4217,7 +4217,7 @@ source = "git+https://github.com/servo/media#7776958f353b5881fa1d6ec97a236940f7a dependencies = [ "boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.88 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4357,7 +4357,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)", "cmake 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.18 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4402,7 +4402,7 @@ dependencies = [ "dirs 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "embedder_traits 0.0.1", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.17 (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)", @@ -4431,7 +4431,7 @@ name = "servo_geometry" version = "0.0.1" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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)", "style_traits 0.0.1", @@ -4715,7 +4715,7 @@ dependencies = [ "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "fallible 0.0.1", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "hashglobe 0.1.0", @@ -4781,7 +4781,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.21.0", @@ -4803,7 +4803,7 @@ dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.25.9 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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)", @@ -5513,7 +5513,7 @@ dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.11.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.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5549,7 +5549,7 @@ dependencies = [ "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.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (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.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5586,7 +5586,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)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (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)", "peek-poke 0.2.0 (git+https://github.com/servo/webrender)", @@ -5609,7 +5609,7 @@ dependencies = [ name = "webrender_traits" version = "0.0.1" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "webrender 0.60.0 (git+https://github.com/servo/webrender)", "webrender_api 0.60.0 (git+https://github.com/servo/webrender)", ] @@ -5620,7 +5620,7 @@ version = "0.0.1" dependencies = [ "canvas_traits 0.0.1", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5649,7 +5649,7 @@ version = "0.0.1" source = "git+https://github.com/servo/webxr#876424c9adbe4592518f76888452c0cdbb6adbed" dependencies = [ "bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5666,7 +5666,7 @@ name = "webxr-api" version = "0.0.1" source = "git+https://github.com/servo/webxr#876424c9adbe4592518f76888452c0cdbb6adbed" dependencies = [ - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5770,7 +5770,7 @@ version = "0.0.1" source = "git+https://github.com/servo/webrender#4646982f69d90f0b39b6345be4e4dbd96ce5ac05" dependencies = [ "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5972,7 +5972,7 @@ dependencies = [ "checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -"checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106" +"checksum euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89c879a4e57d6a2785d517b0771ea6857916173debef0102bf81142d36ca9254" "checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" From e65f1c9dbf4cec933998e6785d5d542e8a08b2e1 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Mon, 30 Sep 2019 17:43:00 +0200 Subject: [PATCH 2/2] Make it possible to rotate in webxr glwindow view --- Cargo.lock | 4 +- ports/glutin/app.rs | 70 +++++++++++++++++++++++---------- ports/glutin/headed_window.rs | 56 ++++++++++++++++++++------ ports/glutin/headless_window.rs | 19 +++++---- ports/glutin/window_trait.rs | 2 +- 5 files changed, 109 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c22cbf50586..e453b1eafa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5646,7 +5646,7 @@ dependencies = [ [[package]] name = "webxr" version = "0.0.1" -source = "git+https://github.com/servo/webxr#876424c9adbe4592518f76888452c0cdbb6adbed" +source = "git+https://github.com/servo/webxr#72d85b8254f8ce5d10f91d59ed35cd5969d15ed8" dependencies = [ "bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5664,7 +5664,7 @@ dependencies = [ [[package]] name = "webxr-api" version = "0.0.1" -source = "git+https://github.com/servo/webxr#876424c9adbe4592518f76888452c0cdbb6adbed" +source = "git+https://github.com/servo/webxr#72d85b8254f8ce5d10f91d59ed35cd5969d15ed8" dependencies = [ "euclid 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/glutin/app.rs b/ports/glutin/app.rs index 991662808f2..77bd3eb41dc 100644 --- a/ports/glutin/app.rs +++ b/ports/glutin/app.rs @@ -9,19 +9,24 @@ use crate::embedder::EmbedderCallbacks; use crate::window_trait::WindowPortsMethods; use crate::events_loop::EventsLoop; use crate::{headed_window, headless_window}; +use glutin::WindowId; use servo::compositing::windowing::WindowEvent; use servo::config::opts::{self, parse_url_or_filename}; use servo::servo_config::pref; use servo::servo_url::ServoUrl; use servo::{BrowserId, Servo}; use std::cell::{Cell, RefCell}; +use std::collections::HashMap; use std::env; use std::mem; use std::rc::Rc; +thread_local! { + pub static WINDOWS: RefCell>> = RefCell::new(HashMap::new()); +} + pub struct App { events_loop: Rc>, - window: Rc, servo: RefCell>, browser: RefCell>, event_queue: RefCell>, @@ -54,10 +59,11 @@ impl App { servo.handle_events(vec![WindowEvent::NewBrowser(get_default_url(), browser_id)]); servo.setup_logging(); + register_window(window); + let app = App { event_queue: RefCell::new(vec![]), events_loop, - window: window, browser: RefCell::new(browser), servo: RefCell::new(servo), suspended: Cell::new(false), @@ -89,18 +95,24 @@ impl App { glutin::Event::WindowEvent { window_id, event, .. } => { - if Some(window_id) != self.window.id() { - warn!("Got an event from unknown window"); - } else { - // Resize events need to be handled during run_forever - let cont = if let glutin::WindowEvent::Resized(_) = event { - glutin::ControlFlow::Continue - } else { - glutin::ControlFlow::Break - }; - self.window.winit_event_to_servo_event(event); - return cont; - } + return WINDOWS.with(|windows| { + match windows.borrow().get(&window_id) { + None => { + warn!("Got an event from unknown window"); + glutin::ControlFlow::Break + }, + Some(window) => { + // Resize events need to be handled during run_forever + let cont = if let glutin::WindowEvent::Resized(_) = event { + glutin::ControlFlow::Continue + } else { + glutin::ControlFlow::Break + }; + window.winit_event_to_servo_event(event); + return cont; + } + } + }); }, } glutin::ControlFlow::Break @@ -108,7 +120,10 @@ impl App { fn run_loop(self) { loop { - if !self.window.is_animating() || self.suspended.get() { + let animating = WINDOWS.with(|windows| { + windows.borrow().iter().any(|(_, window)| window.is_animating()) + }); + if !animating || self.suspended.get() { // If there's no animations running then we block on the window event loop. self.events_loop.borrow_mut().run_forever(|e| { let cont = self.winit_event_to_servo_event(e); @@ -141,18 +156,27 @@ impl App { let mut browser = self.browser.borrow_mut(); let mut servo = self.servo.borrow_mut(); - let win_events = self.window.get_events(); + // FIXME: + // As of now, we support only one browser (self.browser) + // but have multiple windows (dom.webxr.glwindow). We forward + // the events of all the windows combined to that single + // browser instance. Pressing the "a" key on the glwindow + // will send a key event to the servo window. + + let mut app_events = self.get_events(); + WINDOWS.with(|windows| { + for (_win_id, window) in &*windows.borrow() { + app_events.extend(window.get_events()); + } + }); // FIXME: this could be handled by Servo. We don't need // a repaint_synchronously function exposed. - let need_resize = win_events.iter().any(|e| match *e { + let need_resize = app_events.iter().any(|e| match *e { WindowEvent::Resize => true, _ => false, }); - let mut app_events = self.get_events(); - app_events.extend(win_events); - browser.handle_window_events(app_events); let mut servo_events = servo.get_events(); @@ -189,6 +213,12 @@ fn get_default_url() -> ServoUrl { cmdline_url.or(pref_url).or(blank_url).unwrap() } +pub fn register_window(window: Rc) { + WINDOWS.with(|w| { + w.borrow_mut().insert(window.id(), window); + }); +} + pub fn gl_version() -> glutin::GlRequest { if opts::get().angle { glutin::GlRequest::Specific(glutin::Api::OpenGlEs, (3, 0)) diff --git a/ports/glutin/headed_window.rs b/ports/glutin/headed_window.rs index 294f9c2973c..034cbe3a945 100644 --- a/ports/glutin/headed_window.rs +++ b/ports/glutin/headed_window.rs @@ -9,7 +9,7 @@ use crate::context::GlContext; use crate::events_loop::EventsLoop; use crate::keyutils::keyboard_event_from_winit; use crate::window_trait::{WindowPortsMethods, LINE_HEIGHT}; -use euclid::{default::Size2D as UntypedSize2D, Point2D, Scale, Size2D, Vector2D}; +use euclid::{Angle, default::Size2D as UntypedSize2D, Point2D, Rotation3D, Scale, Size2D, UnknownUnit, Vector2D}; use gleam::gl; use glutin::dpi::{LogicalPosition, LogicalSize, PhysicalSize}; #[cfg(target_os = "macos")] @@ -17,7 +17,7 @@ use glutin::os::macos::{ActivationPolicy, WindowBuilderExt}; use glutin::Api; #[cfg(any(target_os = "linux", target_os = "windows"))] use glutin::Icon; -use glutin::{ElementState, KeyboardInput, MouseButton, MouseScrollDelta, TouchPhase}; +use glutin::{ElementState, KeyboardInput, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode}; #[cfg(any(target_os = "linux", target_os = "windows"))] use image; use keyboard_types::{Key, KeyState, KeyboardEvent}; @@ -68,6 +68,7 @@ pub struct Window { animation_state: Cell, fullscreen: Cell, gl: Rc, + xr_rotation: Cell>, } #[cfg(not(target_os = "windows"))] @@ -194,6 +195,7 @@ impl Window { inner_size: Cell::new(inner_size), primary_monitor, screen_size, + xr_rotation: Cell::new(Rotation3D::identity()), }; window.present(); @@ -235,12 +237,36 @@ impl Window { self.last_pressed.set(Some(event)); } else if event.key != Key::Unidentified { self.last_pressed.set(None); + self.handle_xr_rotation(&input); self.event_queue .borrow_mut() .push(WindowEvent::Keyboard(event)); } } + fn handle_xr_rotation(&self, input: &KeyboardInput) { + if input.state != glutin::ElementState::Pressed { + return; + } + let mut x = 0.0; + let mut y = 0.0; + match input.virtual_keycode { + Some(VirtualKeyCode::Up) => x = 1.0, + Some(VirtualKeyCode::Down) => x = -1.0, + Some(VirtualKeyCode::Left) => y = 1.0, + Some(VirtualKeyCode::Right) => y = -1.0, + _ => return, + }; + if input.modifiers.shift { + x = 10.0 * x; + y = 10.0 * y; + } + let x: Rotation3D<_, UnknownUnit, UnknownUnit> = Rotation3D::around_x(Angle::degrees(x)); + let y: Rotation3D<_, UnknownUnit, UnknownUnit> = Rotation3D::around_y(Angle::degrees(y)); + let rotation = self.xr_rotation.get().post_rotate(&x).post_rotate(&y); + self.xr_rotation.set(rotation); + } + /// Helper function to handle a click fn handle_mouse( &self, @@ -394,8 +420,8 @@ impl WindowPortsMethods for Window { self.animation_state.get() == AnimationState::Animating } - fn id(&self) -> Option { - Some(self.gl_context.borrow().window().id()) + fn id(&self) -> glutin::WindowId { + self.gl_context.borrow().window().id() } fn winit_event_to_servo_event(&self, event: glutin::WindowEvent) { @@ -486,15 +512,15 @@ impl WindowPortsMethods for Window { } impl webxr::glwindow::GlWindow for Window { - fn make_current(&mut self) { + fn make_current(&self) { debug!("Making window {:?} current", self.gl_context.borrow().window().id()); - self.gl_context.get_mut().make_current(); + self.gl_context.borrow_mut().make_current(); } - fn swap_buffers(&mut self) { + fn swap_buffers(&self) { debug!("Swapping buffers on window {:?}", self.gl_context.borrow().window().id()); - self.gl_context.get_mut().swap_buffers(); - self.gl_context.get_mut().make_not_current(); + self.gl_context.borrow().swap_buffers(); + self.gl_context.borrow_mut().make_not_current(); } fn size(&self) -> UntypedSize2D { @@ -508,12 +534,18 @@ impl webxr::glwindow::GlWindow for Window { Size2D::new(width * dpr, height *dpr).to_i32() } - fn new_window(&self) -> Result, ()> { - Ok(Box::new(Window::new( + fn get_rotation(&self) -> Rotation3D { + self.xr_rotation.get().clone() + } + + fn new_window(&self) -> Result, ()> { + let window = Rc::new(Window::new( self.inner_size.get(), Some(self), self.events_loop.clone(), - ))) + )); + app::register_window(window.clone()); + Ok(window) } } diff --git a/ports/glutin/headless_window.rs b/ports/glutin/headless_window.rs index f195f75b779..4b87915bb17 100644 --- a/ports/glutin/headless_window.rs +++ b/ports/glutin/headless_window.rs @@ -6,7 +6,7 @@ use crate::window_trait::WindowPortsMethods; use glutin; -use euclid::{default::Size2D as UntypedSize2D, Point2D, Scale, Size2D}; +use euclid::{default::Size2D as UntypedSize2D, Point2D, Rotation3D, Scale, Size2D, UnknownUnit}; use gleam::gl; use servo::compositing::windowing::{AnimationState, WindowEvent}; use servo::compositing::windowing::{EmbedderCoordinates, WindowMethods}; @@ -132,8 +132,10 @@ impl WindowPortsMethods for Window { false } - fn id(&self) -> Option { - None + fn id(&self) -> glutin::WindowId { + unsafe { + glutin::WindowId::dummy() + } } fn page_height(&self) -> f32 { @@ -217,23 +219,26 @@ impl WindowMethods for Window { } impl webxr::glwindow::GlWindow for Window { - fn make_current(&mut self) {} - fn swap_buffers(&mut self) {} + fn make_current(&self) {} + fn swap_buffers(&self) {} fn size(&self) -> UntypedSize2D { let dpr = self.servo_hidpi_factor().get(); Size2D::new((self.context.width as f32 * dpr) as gl::GLsizei, (self.context.height as f32 * dpr) as gl::GLsizei) } - fn new_window(&self) -> Result, ()> { + fn new_window(&self) -> Result, ()> { let width = self.context.width; let height = self.context.height; let share = Some(&self.context); let context = HeadlessContext::new(width, height, share); let gl = self.gl.clone(); - Ok(Box::new(Window { + Ok(Rc::new(Window { context, gl, animation_state: Cell::new(AnimationState::Idle), fullscreen: Cell::new(false), })) } + fn get_rotation(&self) -> Rotation3D { + Rotation3D::identity() + } } diff --git a/ports/glutin/window_trait.rs b/ports/glutin/window_trait.rs index eab5b86bf0f..6a1fd57f631 100644 --- a/ports/glutin/window_trait.rs +++ b/ports/glutin/window_trait.rs @@ -15,7 +15,7 @@ pub const LINE_HEIGHT: f32 = 38.0; pub trait WindowPortsMethods: WindowMethods + webxr::glwindow::GlWindow { fn get_events(&self) -> Vec; - fn id(&self) -> Option; + fn id(&self) -> glutin::WindowId; fn has_events(&self) -> bool; fn page_height(&self) -> f32; fn get_fullscreen(&self) -> bool;