diff --git a/Cargo.lock b/Cargo.lock index 5113b051cff..dd72cd26ff4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,14 +90,14 @@ dependencies = [ [[package]] name = "azure" -version = "0.23.0" -source = "git+https://github.com/servo/rust-azure#6fdedc63c9f57290a743e1c43bc037997defd9be" +version = "0.24.0" +source = "git+https://github.com/servo/rust-azure#004cd70377d07f401afe51987fe3132c0792c7f4" dependencies = [ "cmake 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-skia 0.30000008.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-skia 0.30000009.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -275,17 +275,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "canvas" version = "0.0.1" dependencies = [ - "azure 0.23.0 (git+https://github.com/servo/rust-azure)", + "azure 0.24.0 (git+https://github.com/servo/rust-azure)", "canvas_traits 0.0.1", "compositing 0.0.1", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "offscreen_gl_context 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "webrender 0.56.0 (git+https://github.com/servo/webrender)", "webrender_api 0.56.0 (git+https://github.com/servo/webrender)", @@ -296,13 +296,13 @@ name = "canvas_traits" version = "0.0.1" dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", "nonzero 0.0.1", - "offscreen_gl_context 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "webrender_api 0.56.0 (git+https://github.com/servo/webrender)", @@ -442,7 +442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "compositing" version = "0.0.1" dependencies = [ - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -475,7 +475,7 @@ dependencies = [ "compositing 0.0.1", "debugger 0.0.1", "devtools_traits 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", "gecko-media 0.1.0 (git+https://github.com/servo/gecko-media.git)", "gfx 0.0.1", @@ -519,16 +519,16 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -540,7 +540,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -550,7 +550,7 @@ name = "core-text" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -793,7 +793,7 @@ dependencies = [ "cocoa 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "compositing 0.0.1", "devtools 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -896,10 +896,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.15.5" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1061,11 +1060,11 @@ dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "fontsan 0.4.0 (git+https://github.com/servo/fontsan)", "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1160,7 +1159,7 @@ version = "0.0.1" dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "compositing 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "libservo 0.0.1", @@ -1220,14 +1219,6 @@ dependencies = [ "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "heapsize" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "heartbeats-simple" version = "0.4.0" @@ -1369,7 +1360,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (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.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1475,7 +1466,7 @@ dependencies = [ "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", @@ -1523,7 +1514,7 @@ version = "0.0.1" dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", @@ -1631,7 +1622,7 @@ dependencies = [ "devtools 0.0.1", "devtools_traits 0.0.1", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", "gfx 0.0.1", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1698,7 +1689,7 @@ version = "0.0.1" dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashglobe 0.1.0", "mozjs 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "servo_arc 0.0.1", @@ -1787,7 +1778,7 @@ dependencies = [ name = "metrics_tests" version = "0.0.1" dependencies = [ - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx 0.0.1", "gfx_traits 0.0.1", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2128,17 +2119,17 @@ dependencies = [ [[package]] name = "offscreen_gl_context" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2302,11 +2293,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "plane-split" -version = "0.6.0" +version = "0.7.0" 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.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2563,7 +2554,7 @@ dependencies = [ "dom_struct 0.0.1", "domobject_derive 0.0.1", "encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "gecko-media 0.1.0 (git+https://github.com/servo/gecko-media.git)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2588,7 +2579,7 @@ dependencies = [ "net_traits 0.0.1", "nonzero 0.0.1", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "offscreen_gl_context 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2634,7 +2625,7 @@ dependencies = [ "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2672,7 +2663,7 @@ dependencies = [ name = "script_tests" version = "0.0.1" dependencies = [ - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "script 0.0.1", "servo_url 0.0.1", @@ -2687,7 +2678,7 @@ dependencies = [ "canvas_traits 0.0.1", "cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "devtools_traits 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2849,7 +2840,7 @@ dependencies = [ "android_glue 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cocoa 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2869,12 +2860,12 @@ dependencies = [ [[package]] name = "servo-skia" -version = "0.30000008.0" +version = "0.30000009.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2935,7 +2926,7 @@ version = "0.0.1" dependencies = [ "android_injected_glue 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2960,7 +2951,7 @@ name = "servo_geometry" version = "0.0.1" dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", ] @@ -3060,11 +3051,6 @@ name = "smallbitvec" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "smallvec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "smallvec" version = "0.6.0" @@ -3123,7 +3109,7 @@ dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fallible 0.0.1", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "hashglobe 0.1.0", @@ -3181,7 +3167,7 @@ dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3203,7 +3189,7 @@ dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", "selectors 0.19.0", @@ -3220,7 +3206,7 @@ dependencies = [ "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "geckoservo 0.0.1", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3550,7 +3536,7 @@ version = "0.0.1" dependencies = [ "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3570,26 +3556,26 @@ dependencies = [ [[package]] name = "webrender" version = "0.56.0" -source = "git+https://github.com/servo/webrender#c9e967bb55e788295e0dc02b2839a7348bbe5ca2" +source = "git+https://github.com/servo/webrender#0e80c9d04f84fd02de94bb61c5a5b4b5d16d94b5" dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "plane-split 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plane-split 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.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.37 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.56.0 (git+https://github.com/servo/webrender)", @@ -3598,16 +3584,16 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.56.0" -source = "git+https://github.com/servo/webrender#c9e967bb55e788295e0dc02b2839a7348bbe5ca2" +source = "git+https://github.com/servo/webrender#0e80c9d04f84fd02de94bb61c5a5b4b5d16d94b5" dependencies = [ "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3618,7 +3604,7 @@ name = "webvr" version = "0.0.1" dependencies = [ "canvas_traits 0.0.1", - "euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)", + "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -3760,7 +3746,7 @@ dependencies = [ "checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21" "checksum atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21e50800ec991574876040fff8ee46b136a53e985286fbe6a3bdfe6421b78860" "checksum audio-video-metadata 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "71536082079f5ba92c274fba7c2dcd4e2f9d5c13ce6d7f8fe9acbbb258916d18" -"checksum azure 0.23.0 (git+https://github.com/servo/rust-azure)" = "" +"checksum azure 0.24.0 (git+https://github.com/servo/rust-azure)" = "" "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" "checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" @@ -3796,8 +3782,8 @@ dependencies = [ "checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d" "checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb" "checksum cookie 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "477eb650753e319be2ae77ec368a58c638f9f0c4d941c39bad95e950fb1d1d0d" -"checksum core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5909502e547762013619f4c4e01cc7393c20fe2d52d7fa471c1210adb2320dc7" -"checksum core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bc9fb3d6cb663e6fd7cf1c63f9b144ee2b1e4a78595a0451dd34bff85b9a3387" +"checksum core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8047f547cd6856d45b1cdd75ef8d2f21f3d0e4bf1dab0a0041b0ae9a5dda9c0e" +"checksum core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "152195421a2e6497a8179195672e9d4ee8e45ed8c465b626f1606d27a08ebcd5" "checksum core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5dc0a78ab2ac23b6ea7b3fe5fe93b227900dc0956979735b8f68032417976dd4" "checksum core-text 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcad23756dd1dc4b47bf6a914ace27aadb8fa68889db5837af2308d018d0467c" "checksum cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8a807ac3ab7a217829c2a3b65732b926b2befe6a35f33b4bf8b503692430f223" @@ -3827,7 +3813,7 @@ dependencies = [ "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" -"checksum euclid 0.15.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ed7d77e46f6600f490463ad7b6349c3ebb2d2319af56e679e279e4c66495d9" +"checksum euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "926c639bfdff1f3063f76bb66245f6d2b691aa20fdbaabecc38b2947a13a4eba" "checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1" "checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" @@ -3851,7 +3837,6 @@ dependencies = [ "checksum gvr-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92de62505f21ed0ce04f36cb0dca582a100fc4204d392e6b97bba2a15f9d24b3" "checksum half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" "checksum harfbuzz-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "52aa65c5649a0a2f1b27ab30093b3cc84681e17ddb552267e21948c5a6fa6b05" -"checksum heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c7593b1522161003928c959c20a2ca421c68e940d63d75573316a009e48a6d4" "checksum heartbeats-simple 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ad003ce233955e9d95f2c69cde84e68302ba9ba4a673d351c9bff93c738aadc" "checksum heartbeats-simple-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e1a408c0011427cc0e0049f7861c70377819aedfc006e8c901b1c70fd98fb1a4" "checksum html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e579ac8647178ab915d400d7d22938bda5cd351c6c62e1c294d56884ccfc75fe" @@ -3915,7 +3900,7 @@ dependencies = [ "checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e" "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" "checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297" -"checksum offscreen_gl_context 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b688b0c4cb779a362244ef5f6a14c87969cf94b0fde487820cac4cc75f851ff" +"checksum offscreen_gl_context 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a6999c2e60ed44c2a39b14aaa07ec4f1c8211419fca3b2c727254dc3b316fc5" "checksum ogg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7137bf02687385302f4c0aecd77cfce052b69f5b4ee937be778e125c62f67e30" "checksum ogg_metadata 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc665717454399cba557c55ad226148996e9266ee291f8a37a98bb2cded0a490" "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842" @@ -3935,7 +3920,7 @@ dependencies = [ "checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum plane-split 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e57800a97ca52c556db6b6184a3201f05366ad5e11876f7d17e234589ca2fa26" +"checksum plane-split 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb8d1523b2ddcd98275613e9bc04eef75b47a39e252e63733a3218ae3c1b7" "checksum png 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f0b0cabbbd20c2d7f06dbf015e06aad59b6ca3d9ed14848783e98af9aaf19925" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c93cdc1fb30af9ddf3debc4afbdb0f35126cbd99daa229dd76cdd5349b41d989" @@ -3973,7 +3958,7 @@ dependencies = [ "checksum servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "38b494f03009ee81914b0e7d387ad7c145cafcd69747c2ec89b0e17bb94f303a" "checksum servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" "checksum servo-glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19ddbce9573bd316e4fe59924386997c4921dfa30c41a188c63cf18319283afa" -"checksum servo-skia 0.30000008.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eac765c0ba8eb7b5e86f54c55907a35cae0c97bbf829c626c72f22f8a7e7ed" +"checksum servo-skia 0.30000009.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b47b49a24c705e80b193cb3c08ef37caef652abd844063f5bfea9b45e858576e" "checksum servo-websocket 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efde78dfcf2178d5a11e1e2268e0d8df0627dfe2724546db8585d6678e1af150" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a" @@ -3984,7 +3969,6 @@ dependencies = [ "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf" -"checksum smallvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "872c0ff227000041c520cca51e883b858d388ab0ecf646bab76f065cebaec025" "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12" diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index d92cc1f0a36..6da66760c03 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -14,13 +14,13 @@ azure = {git = "https://github.com/servo/rust-azure"} canvas_traits = {path = "../canvas_traits"} compositing = {path = "../compositing"} cssparser = "0.23.0" -euclid = "0.15" +euclid = "0.16" fnv = "1.0" gleam = "0.4" ipc-channel = "0.9" log = "0.3.5" num-traits = "0.1.32" -offscreen_gl_context = { version = "0.13", features = ["serde", "osmesa"] } +offscreen_gl_context = { version = "0.14", features = ["serde", "osmesa"] } servo_config = {path = "../config"} webrender = {git = "https://github.com/servo/webrender"} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index d484e4e84c0..ecfb25d95ec 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -11,13 +11,13 @@ path = "lib.rs" [dependencies] cssparser = "0.23.0" -euclid = "0.15" +euclid = "0.16" ipc-channel = "0.9" lazy_static = "1" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } nonzero = {path = "../nonzero"} -offscreen_gl_context = { version = "0.13", features = ["serde"] } +offscreen_gl_context = { version = "0.14", features = ["serde"] } serde = "1.0" servo_config = {path = "../config"} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 608a1dbdf91..55180f767b2 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -10,7 +10,7 @@ name = "compositing" path = "lib.rs" [dependencies] -euclid = "0.15" +euclid = "0.16" gfx_traits = {path = "../gfx_traits"} gleam = "0.4" image = "0.17" diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 49e2b58b717..8d40374c980 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -6,7 +6,7 @@ use CompositionPipeline; use SendableFrameTree; use compositor_thread::{CompositorProxy, CompositorReceiver}; use compositor_thread::{InitialCompositorState, Msg}; -use euclid::{TypedPoint2D, TypedVector2D, ScaleFactor}; +use euclid::{TypedPoint2D, TypedVector2D, TypedScale}; use gfx_traits::Epoch; use gleam::gl; use image::{DynamicImage, ImageFormat, RgbImage}; @@ -108,7 +108,7 @@ pub struct IOCompositor { pipeline_details: HashMap, /// The scene scale, to allow for zooming and high-resolution painting. - scale: ScaleFactor, + scale: TypedScale, /// The size of the rendering area. frame_size: DeviceUintSize, @@ -124,10 +124,10 @@ pub struct IOCompositor { max_viewport_zoom: Option, /// "Desktop-style" zoom that resizes the viewport to fit the window. - page_zoom: ScaleFactor, + page_zoom: TypedScale, /// The device pixel ratio for this window. - scale_factor: ScaleFactor, + scale_factor: TypedScale, /// The type of composition to perform composite_target: CompositeTarget, @@ -366,7 +366,7 @@ impl IOCompositor { pipeline_details: HashMap::new(), frame_size: frame_size, window_rect: window_rect, - scale: ScaleFactor::new(1.0), + scale: TypedScale::new(1.0), scale_factor: scale_factor, composition_request: CompositionRequest::NoCompositingNecessary, touch_handler: TouchHandler::new(), @@ -374,7 +374,7 @@ impl IOCompositor { waiting_for_results_of_scroll: false, composite_target: composite_target, shutdown_state: ShutdownState::NotShuttingDown, - page_zoom: ScaleFactor::new(1.0), + page_zoom: TypedScale::new(1.0), viewport_zoom: PinchZoomFactor::new(1.0), min_viewport_zoom: None, max_viewport_zoom: None, @@ -1016,10 +1016,10 @@ impl IOCompositor { // deltas instead of summing them. if let ScrollLocation::Delta(delta) = last_combined_event.scroll_location { let old_event_count = - ScaleFactor::new(last_combined_event.event_count as f32); + TypedScale::new(last_combined_event.event_count as f32); last_combined_event.event_count += 1; let new_event_count = - ScaleFactor::new(last_combined_event.event_count as f32); + TypedScale::new(last_combined_event.event_count as f32); last_combined_event.scroll_location = ScrollLocation::Delta( (delta * old_event_count + this_delta) / new_event_count); @@ -1110,34 +1110,34 @@ impl IOCompositor { } } - fn hidpi_factor(&self) -> ScaleFactor { + fn hidpi_factor(&self) -> TypedScale { match opts::get().device_pixels_per_px { - Some(device_pixels_per_px) => ScaleFactor::new(device_pixels_per_px), + Some(device_pixels_per_px) => TypedScale::new(device_pixels_per_px), None => match opts::get().output_file { - Some(_) => ScaleFactor::new(1.0), + Some(_) => TypedScale::new(1.0), None => self.scale_factor } } } - fn device_pixels_per_page_px(&self) -> ScaleFactor { + fn device_pixels_per_page_px(&self) -> TypedScale { self.page_zoom * self.hidpi_factor() } fn update_zoom_transform(&mut self) { let scale = self.device_pixels_per_page_px(); - self.scale = ScaleFactor::new(scale.get()); + self.scale = TypedScale::new(scale.get()); } pub fn on_zoom_reset_window_event(&mut self) { - self.page_zoom = ScaleFactor::new(1.0); + self.page_zoom = TypedScale::new(1.0); self.update_zoom_transform(); self.send_window_size(WindowSizeType::Resize); self.update_page_zoom_for_webrender(); } pub fn on_zoom_window_event(&mut self, magnification: f32) { - self.page_zoom = ScaleFactor::new((self.page_zoom.get() * magnification) + self.page_zoom = TypedScale::new((self.page_zoom.get() * magnification) .max(MIN_ZOOM).min(MAX_ZOOM)); self.update_zoom_transform(); self.send_window_size(WindowSizeType::Resize); diff --git a/components/compositing/touch.rs b/components/compositing/touch.rs index 0d6a7561a2b..020afb8a28b 100644 --- a/components/compositing/touch.rs +++ b/components/compositing/touch.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use euclid::{TypedPoint2D, TypedVector2D}; -use euclid::ScaleFactor; +use euclid::TypedScale; use script_traits::{EventResult, TouchId}; use self::TouchState::*; use style_traits::DevicePixel; @@ -124,7 +124,7 @@ impl TouchHandler { let (d1, c1) = self.pinch_distance_and_center(); let magnification = d1 / d0; - let scroll_delta = c1 - c0 * ScaleFactor::new(magnification); + let scroll_delta = c1 - c0 * TypedScale::new(magnification); TouchAction::Zoom(magnification, scroll_delta) } diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 9abae232383..5a2f0bc8237 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -6,7 +6,7 @@ use compositor_thread::EventLoopWaker; use euclid::{Point2D, Size2D}; -use euclid::{ScaleFactor, TypedPoint2D, TypedSize2D}; +use euclid::{TypedScale, TypedPoint2D, TypedSize2D}; use gleam::gl; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::{Key, KeyModifiers, KeyState, TopLevelBrowsingContextId, TraversalDirection}; @@ -162,7 +162,7 @@ pub trait WindowMethods { fn history_changed(&self, ctx: TopLevelBrowsingContextId, Vec, usize); /// Returns the scale factor of the system (device pixels / device independent pixels). - fn hidpi_factor(&self) -> ScaleFactor; + fn hidpi_factor(&self) -> TypedScale; /// Returns a thread-safe object to wake up the window's event loop. fn create_event_loop_waker(&self) -> Box; diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 90f01b8f9a5..e09c78ecbb8 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -10,7 +10,7 @@ name = "servo_config" path = "lib.rs" [dependencies] -euclid = "0.15" +euclid = "0.16" getopts = "0.2.11" lazy_static = "1" log = "0.3.5" diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index 3968d5f1170..7cadee11723 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -18,7 +18,7 @@ canvas_traits = {path = "../canvas_traits"} compositing = {path = "../compositing"} debugger = {path = "../debugger"} devtools_traits = {path = "../devtools_traits"} -euclid = "0.15" +euclid = "0.16" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} hyper = "0.10" diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 2eb19e921a5..ec023e3971b 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -106,7 +106,7 @@ use compositing::compositor_thread::{CompositorProxy, EmbedderMsg, EmbedderProxy use compositing::compositor_thread::Msg as ToCompositorMsg; use debugger; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg}; -use euclid::{Size2D, TypedSize2D, ScaleFactor}; +use euclid::{Size2D, TypedSize2D, TypedScale}; use event_loop::EventLoop; #[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))] use gecko_media::GeckoMedia; @@ -596,9 +596,9 @@ impl Constellation mem_profiler_chan: state.mem_profiler_chan, window_size: WindowSizeData { initial_viewport: opts::get().initial_window_size.to_f32() * - ScaleFactor::new(1.0), + TypedScale::new(1.0), device_pixel_ratio: - ScaleFactor::new(opts::get().device_pixels_per_px.unwrap_or(1.0)), + TypedScale::new(opts::get().device_pixels_per_px.unwrap_or(1.0)), }, phantom: PhantomData, clipboard_ctx: if state.supports_clipboard { diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs index a5d1c5c63c9..00b3088a3fc 100644 --- a/components/constellation/pipeline.rs +++ b/components/constellation/pipeline.rs @@ -8,7 +8,7 @@ use compositing::CompositionPipeline; use compositing::CompositorProxy; use compositing::compositor_thread::Msg as CompositorMsg; use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg}; -use euclid::{TypedSize2D, ScaleFactor}; +use euclid::{TypedSize2D, TypedScale}; use event_loop::EventLoop; use gfx::font_cache_thread::FontCacheThread; use ipc_channel::Error; @@ -149,7 +149,7 @@ pub struct InitialPipelineState { pub window_size: Option>, /// Information about the device pixel ratio. - pub device_pixel_ratio: ScaleFactor, + pub device_pixel_ratio: TypedScale, /// The event loop to run in, if applicable. pub event_loop: Option>, diff --git a/components/geometry/Cargo.toml b/components/geometry/Cargo.toml index bf9ef7c1853..4dcc2d89fc9 100644 --- a/components/geometry/Cargo.toml +++ b/components/geometry/Cargo.toml @@ -11,6 +11,6 @@ path = "lib.rs" [dependencies] app_units = "0.6" -euclid = "0.15" +euclid = "0.16" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 9dd6df68bd6..c9220a2c080 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -16,7 +16,7 @@ unstable = ["simd"] [dependencies] app_units = "0.6" bitflags = "1.0" -euclid = "0.15" +euclid = "0.16" fnv = "1.0" fontsan = {git = "https://github.com/servo/fontsan"} gfx_traits = {path = "../gfx_traits"} diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 615ce0ce2db..a25a6705eea 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -14,7 +14,7 @@ app_units = "0.6" atomic_refcell = "0.1" bitflags = "1.0" canvas_traits = {path = "../canvas_traits"} -euclid = "0.15" +euclid = "0.16" fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index 695148633d4..f4a2e5d9acb 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -15,7 +15,7 @@ unstable = ["parking_lot/nightly", "nonzero/unstable"] [dependencies] app_units = "0.6" atomic_refcell = "0.1" -euclid = "0.15" +euclid = "0.16" fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 982355eae51..6ed68abcb80 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -54,7 +54,7 @@ mod dom_wrapper; use app_units::Au; use dom_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode}; use dom_wrapper::drop_style_and_layout_data; -use euclid::{Point2D, Rect, Size2D, ScaleFactor, TypedSize2D}; +use euclid::{Point2D, Rect, Size2D, TypedScale, TypedSize2D}; use fnv::FnvHashMap; use gfx::display_list::{OpaqueNode, WebRenderImageInfo}; use gfx::font; @@ -455,8 +455,8 @@ impl LayoutThread { // but it will be set correctly when the initial reflow takes place. let device = Device::new( MediaType::screen(), - opts::get().initial_window_size.to_f32() * ScaleFactor::new(1.0), - ScaleFactor::new(opts::get().device_pixels_per_px.unwrap_or(1.0))); + opts::get().initial_window_size.to_f32() * TypedScale::new(1.0), + TypedScale::new(opts::get().device_pixels_per_px.unwrap_or(1.0))); let configuration = rayon::Configuration::new().num_threads(layout_threads) @@ -1784,7 +1784,7 @@ impl RegisteredSpeculativePainter for RegisteredPainterImpl { impl Painter for RegisteredPainterImpl { fn draw_a_paint_image(&self, size: TypedSize2D, - device_pixel_ratio: ScaleFactor, + device_pixel_ratio: TypedScale, properties: Vec<(Atom, String)>, arguments: Vec) -> DrawAPaintImageResult diff --git a/components/malloc_size_of/Cargo.toml b/components/malloc_size_of/Cargo.toml index 27afa08a2fe..a5c3acfb861 100644 --- a/components/malloc_size_of/Cargo.toml +++ b/components/malloc_size_of/Cargo.toml @@ -14,7 +14,7 @@ servo = ["mozjs", "string_cache", "url", "webrender_api", "xml5ever"] [dependencies] app_units = "0.6" cssparser = "0.23.0" -euclid = "0.15" +euclid = "0.16" hashglobe = { path = "../hashglobe" } mozjs = { version = "0.1.8", features = ["promises"], optional = true } servo_arc = { path = "../servo_arc" } diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs index 1fc3fe560ae..b366de512f0 100644 --- a/components/malloc_size_of/lib.rs +++ b/components/malloc_size_of/lib.rs @@ -582,7 +582,7 @@ impl MallocSizeOf for euclid::Length { } } -impl MallocSizeOf for euclid::ScaleFactor { +impl MallocSizeOf for euclid::TypedScale { fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize { self.0.size_of(ops) } diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index f2711f73797..5561cd7dd95 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -45,7 +45,7 @@ devtools_traits = {path = "../devtools_traits"} dom_struct = {path = "../dom_struct"} domobject_derive = {path = "../domobject_derive"} encoding_rs = "0.7" -euclid = "0.15" +euclid = "0.16" fnv = "1.0" gleam = "0.4" half = "1.0" @@ -69,7 +69,7 @@ msg = {path = "../msg"} net_traits = {path = "../net_traits"} nonzero = {path = "../nonzero"} num-traits = "0.1.32" -offscreen_gl_context = { version = "0.13", features = ["serde"] } +offscreen_gl_context = { version = "0.14", features = ["serde"] } open = "1.1.1" parking_lot = "0.4" phf = "0.7.18" diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 36a3cf7ee30..3d006d4a6ca 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -48,7 +48,7 @@ use dom::bindings::str::{DOMString, USVString}; use dom::bindings::utils::WindowProxyHandler; use dom::document::PendingRestyle; use encoding_rs::Encoding; -use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, ScaleFactor}; +use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, TypedScale}; use euclid::Length as EuclidLength; use html5ever::{Prefix, LocalName, Namespace, QualName}; use html5ever::buffer_queue::BufferQueue; @@ -526,7 +526,7 @@ unsafe impl JSTraceable for Point2D { } } -unsafe impl JSTraceable for ScaleFactor { +unsafe impl JSTraceable for TypedScale { #[inline] unsafe fn trace(&self, _trc: *mut JSTracer) { // Do nothing diff --git a/components/script/dom/dommatrixreadonly.rs b/components/script/dom/dommatrixreadonly.rs index 661cce9aa34..416ea48a19f 100644 --- a/components/script/dom/dommatrixreadonly.rs +++ b/components/script/dom/dommatrixreadonly.rs @@ -14,7 +14,7 @@ use dom::dommatrix::DOMMatrix; use dom::dompoint::DOMPoint; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; -use euclid::{Transform3D, Radians}; +use euclid::{Transform3D, Angle}; use std::cell::{Cell, Ref}; use std::f64; @@ -256,19 +256,19 @@ impl DOMMatrixReadOnly { } if rotZ != 0.0 { // Step 5. - let rotation = Transform3D::create_rotation(0.0, 0.0, 1.0, Radians::new(rotZ.to_radians())); + let rotation = Transform3D::create_rotation(0.0, 0.0, 1.0, Angle::radians(rotZ.to_radians())); let mut matrix = self.matrix.borrow_mut(); *matrix = rotation.post_mul(&matrix); } if rotY != 0.0 { // Step 6. - let rotation = Transform3D::create_rotation(0.0, 1.0, 0.0, Radians::new(rotY.to_radians())); + let rotation = Transform3D::create_rotation(0.0, 1.0, 0.0, Angle::radians(rotY.to_radians())); let mut matrix = self.matrix.borrow_mut(); *matrix = rotation.post_mul(&matrix); } if rotX != 0.0 { // Step 7. - let rotation = Transform3D::create_rotation(1.0, 0.0, 0.0, Radians::new(rotX.to_radians())); + let rotation = Transform3D::create_rotation(1.0, 0.0, 0.0, Angle::radians(rotX.to_radians())); let mut matrix = self.matrix.borrow_mut(); *matrix = rotation.post_mul(&matrix); } @@ -280,7 +280,7 @@ impl DOMMatrixReadOnly { // don't do anything when the rotation angle is zero or undefined if y != 0.0 || x < 0.0 { // Step 1. - let rotZ = Radians::new(f64::atan2(y, x)); + let rotZ = Angle::radians(f64::atan2(y, x)); let rotation = Transform3D::create_rotation(0.0, 0.0, 1.0, rotZ); let mut matrix = self.matrix.borrow_mut(); *matrix = rotation.post_mul(&matrix); @@ -292,7 +292,7 @@ impl DOMMatrixReadOnly { pub fn rotate_axis_angle_self(&self, x: f64, y: f64, z: f64, angle: f64) { // Step 1. let (norm_x, norm_y, norm_z) = normalize_point(x, y, z); - let rotation = Transform3D::create_rotation(norm_x, norm_y, norm_z, Radians::new(angle.to_radians())); + let rotation = Transform3D::create_rotation(norm_x, norm_y, norm_z, Angle::radians(angle.to_radians())); let mut matrix = self.matrix.borrow_mut(); *matrix = rotation.post_mul(&matrix); // Step 2. @@ -305,7 +305,7 @@ impl DOMMatrixReadOnly { // https://drafts.fxtf.org/geometry-1/#dom-dommatrix-skewxself pub fn skew_x_self(&self, sx: f64) { // Step 1. - let skew = Transform3D::create_skew(Radians::new(sx.to_radians()), Radians::new(0.0)); + let skew = Transform3D::create_skew(Angle::radians(sx.to_radians()), Angle::radians(0.0)); let mut matrix = self.matrix.borrow_mut(); *matrix = skew.post_mul(&matrix); // Step 2 in DOMMatrix.SkewXSelf @@ -314,7 +314,7 @@ impl DOMMatrixReadOnly { // https://drafts.fxtf.org/geometry-1/#dom-dommatrix-skewyself pub fn skew_y_self(&self, sy: f64) { // Step 1. - let skew = Transform3D::create_skew(Radians::new(0.0), Radians::new(sy.to_radians())); + let skew = Transform3D::create_skew(Angle::radians(0.0), Angle::radians(sy.to_radians())); let mut matrix = self.matrix.borrow_mut(); *matrix = skew.post_mul(&matrix); // Step 2 in DOMMatrix.SkewYSelf diff --git a/components/script/dom/paintrenderingcontext2d.rs b/components/script/dom/paintrenderingcontext2d.rs index 69492e2d685..85de76a3265 100644 --- a/components/script/dom/paintrenderingcontext2d.rs +++ b/components/script/dom/paintrenderingcontext2d.rs @@ -26,8 +26,8 @@ use dom::canvasrenderingcontext2d::CanvasRenderingContext2D; use dom::paintworkletglobalscope::PaintWorkletGlobalScope; use dom::workletglobalscope::WorkletGlobalScope; use dom_struct::dom_struct; -use euclid::ScaleFactor; use euclid::Size2D; +use euclid::TypedScale; use euclid::TypedSize2D; use ipc_channel::ipc::IpcSender; use servo_url::ServoUrl; @@ -38,7 +38,7 @@ use style_traits::DevicePixel; #[dom_struct] pub struct PaintRenderingContext2D { context: CanvasRenderingContext2D, - device_pixel_ratio: Cell>, + device_pixel_ratio: Cell>, } impl PaintRenderingContext2D { @@ -48,7 +48,7 @@ impl PaintRenderingContext2D { let base_url = global.upcast::().base_url(); PaintRenderingContext2D { context: CanvasRenderingContext2D::new_inherited(global.upcast(), None, image_cache, base_url, size), - device_pixel_ratio: Cell::new(ScaleFactor::new(1.0)), + device_pixel_ratio: Cell::new(TypedScale::new(1.0)), } } @@ -69,7 +69,7 @@ impl PaintRenderingContext2D { pub fn set_bitmap_dimensions(&self, size: TypedSize2D, - device_pixel_ratio: ScaleFactor) + device_pixel_ratio: TypedScale) { let size = size * device_pixel_ratio; self.device_pixel_ratio.set(device_pixel_ratio); diff --git a/components/script/dom/paintworkletglobalscope.rs b/components/script/dom/paintworkletglobalscope.rs index 61527c8dd9f..bef867b5da4 100644 --- a/components/script/dom/paintworkletglobalscope.rs +++ b/components/script/dom/paintworkletglobalscope.rs @@ -24,7 +24,7 @@ use dom::workletglobalscope::WorkletGlobalScope; use dom::workletglobalscope::WorkletGlobalScopeInit; use dom::workletglobalscope::WorkletTask; use dom_struct::dom_struct; -use euclid::ScaleFactor; +use euclid::TypedScale; use euclid::TypedSize2D; use ipc_channel::ipc; use js::jsapi::Call; @@ -79,7 +79,7 @@ pub struct PaintWorkletGlobalScope { /// The most recent size the worklet was drawn at cached_size: Cell>, /// The most recent device pixel ratio the worklet was drawn at - cached_device_pixel_ratio: Cell>, + cached_device_pixel_ratio: Cell>, /// The most recent properties the worklet was drawn at cached_properties: DomRefCell>, /// The most recent arguments the worklet was drawn at @@ -104,7 +104,7 @@ impl PaintWorkletGlobalScope { paint_class_instances: Default::default(), cached_name: DomRefCell::new(Atom::from("")), cached_size: Cell::new(TypedSize2D::zero()), - cached_device_pixel_ratio: Cell::new(ScaleFactor::new(1.0)), + cached_device_pixel_ratio: Cell::new(TypedScale::new(1.0)), cached_properties: Default::default(), cached_arguments: Default::default(), cached_result: DomRefCell::new(DrawAPaintImageResult { @@ -173,7 +173,7 @@ impl PaintWorkletGlobalScope { fn draw_a_paint_image(&self, name: &Atom, size_in_px: TypedSize2D, - device_pixel_ratio: ScaleFactor, + device_pixel_ratio: TypedScale, properties: &StylePropertyMapReadOnly, arguments: &[String]) -> DrawAPaintImageResult @@ -193,7 +193,7 @@ impl PaintWorkletGlobalScope { name: &Atom, size_in_px: TypedSize2D, size_in_dpx: TypedSize2D, - device_pixel_ratio: ScaleFactor, + device_pixel_ratio: TypedScale, properties: &StylePropertyMapReadOnly, arguments: &[String]) -> DrawAPaintImageResult @@ -340,7 +340,7 @@ impl PaintWorkletGlobalScope { impl Painter for WorkletPainter { fn draw_a_paint_image(&self, size: TypedSize2D, - device_pixel_ratio: ScaleFactor, + device_pixel_ratio: TypedScale, properties: Vec<(Atom, String)>, arguments: Vec) -> DrawAPaintImageResult { @@ -451,7 +451,7 @@ impl PaintWorkletGlobalScopeMethods for PaintWorkletGlobalScope { pub enum PaintWorkletTask { DrawAPaintImage(Atom, TypedSize2D, - ScaleFactor, + TypedScale, Vec<(Atom, String)>, Vec, Sender), diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index 805d7711ae1..6a64c2b205e 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -14,7 +14,7 @@ app_units = "0.6" atomic_refcell = "0.1" canvas_traits = {path = "../canvas_traits"} cssparser = "0.23.0" -euclid = "0.15" +euclid = "0.16" gfx_traits = {path = "../gfx_traits"} html5ever = "0.22" ipc-channel = "0.9" diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml index 642711e73aa..dbe502ae797 100644 --- a/components/script_traits/Cargo.toml +++ b/components/script_traits/Cargo.toml @@ -14,7 +14,7 @@ bluetooth_traits = {path = "../bluetooth_traits"} canvas_traits = {path = "../canvas_traits"} cookie = "0.10" devtools_traits = {path = "../devtools_traits"} -euclid = "0.15" +euclid = "0.16" gfx_traits = {path = "../gfx_traits"} hyper = "0.10" hyper_serde = "0.8" diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index f9e1f38151b..9048f689fb9 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -41,7 +41,7 @@ pub mod webdriver_msg; use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId}; -use euclid::{Size2D, Length, Point2D, Vector2D, Rect, ScaleFactor, TypedSize2D}; +use euclid::{Size2D, Length, Point2D, Vector2D, Rect, TypedScale, TypedSize2D}; use gfx_traits::Epoch; use hyper::header::Headers; use hyper::method::Method; @@ -732,7 +732,7 @@ pub struct WindowSizeData { pub initial_viewport: TypedSize2D, /// The resolution of the window in dppx, not including any "pinch zoom" factor. - pub device_pixel_ratio: ScaleFactor, + pub device_pixel_ratio: TypedScale, } /// The type of window size change. @@ -866,7 +866,7 @@ pub trait Painter: SpeculativePainter { /// fn draw_a_paint_image(&self, size: TypedSize2D, - zoom: ScaleFactor, + zoom: TypedScale, properties: Vec<(Atom, String)>, arguments: Vec) -> DrawAPaintImageResult; diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 9149a2918b1..394e26efc33 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -37,7 +37,7 @@ debugger = {path = "../debugger"} devtools = {path = "../devtools"} devtools_traits = {path = "../devtools_traits"} env_logger = "0.4" -euclid = "0.15" +euclid = "0.16" gfx = {path = "../gfx"} gleam = "0.4" ipc-channel = "0.9" diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 1ccce687a5e..37cf1dc685f 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -33,7 +33,7 @@ byteorder = "1.0" cfg-if = "0.1.0" cssparser = "0.23.0" encoding_rs = {version = "0.7", optional = true} -euclid = "0.15" +euclid = "0.16" fallible = { path = "../fallible" } fnv = "1.0" hashglobe = { path = "../hashglobe" } diff --git a/components/style/context.rs b/components/style/context.rs index 7843c424046..a40898dba1d 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -10,8 +10,8 @@ use bloom::StyleBloom; use data::{EagerPseudoStyles, ElementData}; use dom::{TElement, SendElement}; #[cfg(feature = "servo")] use dom::OpaqueNode; -use euclid::ScaleFactor; use euclid::Size2D; +use euclid::TypedScale; use fnv::FnvHashMap; use font_metrics::FontMetricsProvider; #[cfg(feature = "gecko")] use gecko_bindings::structs; @@ -171,7 +171,7 @@ impl<'a> SharedStyleContext<'a> { } /// The device pixel ratio - pub fn device_pixel_ratio(&self) -> ScaleFactor { + pub fn device_pixel_ratio(&self) -> TypedScale { self.stylist.device().device_pixel_ratio() } diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs index 7bb35b72b72..4fe5b6f29b9 100644 --- a/components/style/gecko/media_queries.rs +++ b/components/style/gecko/media_queries.rs @@ -8,8 +8,8 @@ use app_units::AU_PER_PX; use app_units::Au; use context::QuirksMode; use cssparser::{CssStringWriter, Parser, RGBA, Token, BasicParseErrorKind}; -use euclid::ScaleFactor; use euclid::Size2D; +use euclid::TypedScale; use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor}; use gecko_bindings::bindings; use gecko_bindings::structs; @@ -187,12 +187,12 @@ impl Device { } /// Returns the device pixel ratio. - pub fn device_pixel_ratio(&self) -> ScaleFactor { + pub fn device_pixel_ratio(&self) -> TypedScale { let override_dppx = self.pres_context().mOverrideDPPX; - if override_dppx > 0.0 { return ScaleFactor::new(override_dppx); } + if override_dppx > 0.0 { return TypedScale::new(override_dppx); } let au_per_dpx = self.pres_context().mCurAppUnitsPerDevPixel as f32; let au_per_px = AU_PER_PX as f32; - ScaleFactor::new(au_per_px / au_per_dpx) + TypedScale::new(au_per_px / au_per_dpx) } /// Returns whether document colors are enabled. diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs index 902e70932e2..ea71ee84ab0 100644 --- a/components/style/servo/media_queries.rs +++ b/components/style/servo/media_queries.rs @@ -7,7 +7,7 @@ use app_units::Au; use context::QuirksMode; use cssparser::{Parser, RGBA}; -use euclid::{ScaleFactor, Size2D, TypedSize2D}; +use euclid::{TypedScale, Size2D, TypedSize2D}; use media_queries::MediaType; use parser::ParserContext; use properties::ComputedValues; @@ -31,7 +31,7 @@ pub struct Device { /// The current viewport size, in CSS pixels. viewport_size: TypedSize2D, /// The current device pixel ratio, from CSS pixels to device pixels. - device_pixel_ratio: ScaleFactor, + device_pixel_ratio: TypedScale, /// The font size of the root element /// This is set when computing the style of the root @@ -57,7 +57,7 @@ impl Device { pub fn new( media_type: MediaType, viewport_size: TypedSize2D, - device_pixel_ratio: ScaleFactor + device_pixel_ratio: TypedScale ) -> Device { Device { media_type, @@ -121,7 +121,7 @@ impl Device { } /// Returns the device pixel ratio. - pub fn device_pixel_ratio(&self) -> ScaleFactor { + pub fn device_pixel_ratio(&self) -> TypedScale { self.device_pixel_ratio } diff --git a/components/style/values/generics/transform.rs b/components/style/values/generics/transform.rs index 79f6476e611..06ec91c25a5 100644 --- a/components/style/values/generics/transform.rs +++ b/components/style/values/generics/transform.rs @@ -5,7 +5,7 @@ //! Generic types for CSS values that are related to transformations. use app_units::Au; -use euclid::{Radians, Rect, Transform3D}; +use euclid::{self, Rect, Transform3D}; use num_traits::Zero; use std::fmt; use style_traits::ToCss; @@ -457,18 +457,20 @@ where let theta = TWO_PI - theta.as_ref().radians64(); let (ax, ay, az, theta) = get_normalized_vector_and_angle(ax.into(), ay.into(), az.into(), theta); - Transform3D::create_rotation(ax as f64, ay as f64, az as f64, Radians::new(theta)) + Transform3D::create_rotation( + ax as f64, ay as f64, az as f64, euclid::Angle::radians(theta) + ) }, RotateX(theta) => { - let theta = Radians::new(TWO_PI - theta.as_ref().radians64()); + let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64()); Transform3D::create_rotation(1., 0., 0., theta) }, RotateY(theta) => { - let theta = Radians::new(TWO_PI - theta.as_ref().radians64()); + let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64()); Transform3D::create_rotation(0., 1., 0., theta) }, RotateZ(theta) | Rotate(theta) => { - let theta = Radians::new(TWO_PI - theta.as_ref().radians64()); + let theta = euclid::Angle::radians(TWO_PI - theta.as_ref().radians64()); Transform3D::create_rotation(0., 0., 1., theta) }, Perspective(ref d) => { @@ -503,20 +505,20 @@ where }, Skew(theta_x, theta_y) => { Transform3D::create_skew( - Radians::new(theta_x.as_ref().radians64()), - Radians::new(theta_y.map_or(0., |a| a.as_ref().radians64())), + euclid::Angle::radians(theta_x.as_ref().radians64()), + euclid::Angle::radians(theta_y.map_or(0., |a| a.as_ref().radians64())), ) }, SkewX(theta) => { Transform3D::create_skew( - Radians::new(theta.as_ref().radians64()), - Radians::new(0.), + euclid::Angle::radians(theta.as_ref().radians64()), + euclid::Angle::radians(0.), ) }, SkewY(theta) => { Transform3D::create_skew( - Radians::new(0.), - Radians::new(theta.as_ref().radians64()), + euclid::Angle::radians(0.), + euclid::Angle::radians(theta.as_ref().radians64()), ) }, Matrix3D(m) => m.into(), diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 6c87687473d..82e1f780d5e 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -17,7 +17,7 @@ gecko = [] app_units = "0.6" cssparser = "0.23.0" bitflags = "1.0" -euclid = "0.15" +euclid = "0.16" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } selectors = { path = "../selectors" } diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index 89cda36d544..3bd5ee5b313 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] base64 = "0.6" cookie = "0.10" -euclid = "0.15" +euclid = "0.16" hyper = "0.10" image = "0.17" ipc-channel = "0.9" diff --git a/components/webvr/Cargo.toml b/components/webvr/Cargo.toml index c3a5d56b397..92a806632d7 100644 --- a/components/webvr/Cargo.toml +++ b/components/webvr/Cargo.toml @@ -15,7 +15,7 @@ oculusvr = ['rust-webvr/oculusvr'] [dependencies] canvas_traits = {path = "../canvas_traits"} -euclid = "0.15" +euclid = "0.16" ipc-channel = "0.9" log = "0.3" msg = {path = "../msg"} diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml index 7f91fc6184a..5ae0e20351c 100644 --- a/ports/cef/Cargo.toml +++ b/ports/cef/Cargo.toml @@ -23,7 +23,7 @@ unstable = ["libservo/unstable"] [dependencies] compositing = {path = "../../components/compositing"} devtools = {path = "../../components/devtools"} -euclid = "0.15" +euclid = "0.16" gleam = "0.4" glutin_app = {path = "../glutin"} libc = "0.2" diff --git a/ports/cef/window.rs b/ports/cef/window.rs index ea4b99285d6..58e7507dff3 100644 --- a/ports/cef/window.rs +++ b/ports/cef/window.rs @@ -19,7 +19,7 @@ use wrappers::CefWrap; use compositing::compositor_thread::EventLoopWaker; use compositing::windowing::{WindowEvent, WindowMethods}; -use euclid::{Point2D, TypedPoint2D, Size2D, TypedSize2D, ScaleFactor}; +use euclid::{Point2D, TypedPoint2D, Size2D, TypedSize2D, TypedScale}; use gleam::gl; use msg::constellation_msg::{Key, KeyModifiers}; use net_traits::net_error_list::NetError; @@ -276,11 +276,11 @@ impl WindowMethods for Window { } } - fn hidpi_factor(&self) -> ScaleFactor { + fn hidpi_factor(&self) -> TypedScale { if cfg!(target_os="macos") { let browser = self.cef_browser.borrow(); match *browser { - None => ScaleFactor::new(1.0), + None => TypedScale::new(1.0), Some(ref browser) => { let mut view_rect = cef_rect_t::zero(); if check_ptr_exist!(browser.get_host().get_client(), get_render_handler) && @@ -298,13 +298,13 @@ impl WindowMethods for Window { .get_render_handler() .get_backing_rect((*browser).clone(), &mut backing_rect); } - ScaleFactor::new(backing_rect.width as f32 / view_rect.width as f32) + TypedScale::new(backing_rect.width as f32 / view_rect.width as f32) } } } else { // FIXME(zmike) // need to figure out a method for actually getting the scale factor instead of this nonsense - ScaleFactor::new(1.0 as f32) + TypedScale::new(1.0 as f32) } } diff --git a/ports/geckolib/tests/Cargo.toml b/ports/geckolib/tests/Cargo.toml index 7747fff2da9..60a1c6236d1 100644 --- a/ports/geckolib/tests/Cargo.toml +++ b/ports/geckolib/tests/Cargo.toml @@ -15,7 +15,7 @@ doctest = false atomic_refcell = "0.1" cssparser = "0.23.0" env_logger = "0.4" -euclid = "0.15" +euclid = "0.16" geckoservo = {path = "../../../ports/geckolib"} libc = "0.2" log = {version = "0.3.5", features = ["release_max_level_info"]} diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index 36f72d7a8da..a7f0d36ce35 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] bitflags = "1.0" compositing = {path = "../../components/compositing"} -euclid = "0.15" +euclid = "0.16" gleam = "0.4" libservo = {path = "../../components/servo"} log = "0.3.5" diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index f2f16b06005..cea115d6f89 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -8,7 +8,7 @@ use NestedEventLoopListener; use compositing::compositor_thread::EventLoopWaker; use compositing::windowing::{AnimationState, MouseWindowEvent}; use compositing::windowing::{WebRenderDebugOption, WindowEvent, WindowMethods}; -use euclid::{Point2D, Size2D, TypedPoint2D, TypedVector2D, ScaleFactor, TypedSize2D}; +use euclid::{Point2D, Size2D, TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D}; #[cfg(target_os = "windows")] use gdi32; use gleam::gl; @@ -210,15 +210,15 @@ pub struct Window { } #[cfg(not(target_os = "windows"))] -fn window_creation_scale_factor() -> ScaleFactor { - ScaleFactor::new(1.0) +fn window_creation_scale_factor() -> TypedScale { + TypedScale::new(1.0) } #[cfg(target_os = "windows")] -fn window_creation_scale_factor() -> ScaleFactor { +fn window_creation_scale_factor() -> TypedScale { let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) }; let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) }; - ScaleFactor::new(ppi as f32 / 96.0) + TypedScale::new(ppi as f32 / 96.0) } @@ -1124,22 +1124,22 @@ impl WindowMethods for Window { } #[cfg(not(target_os = "windows"))] - fn hidpi_factor(&self) -> ScaleFactor { + fn hidpi_factor(&self) -> TypedScale { match self.kind { WindowKind::Window(ref window) => { - ScaleFactor::new(window.hidpi_factor()) + TypedScale::new(window.hidpi_factor()) } WindowKind::Headless(..) => { - ScaleFactor::new(1.0) + TypedScale::new(1.0) } } } #[cfg(target_os = "windows")] - fn hidpi_factor(&self) -> ScaleFactor { + fn hidpi_factor(&self) -> TypedScale { let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) }; let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) }; - ScaleFactor::new(ppi as f32 / 96.0) + TypedScale::new(ppi as f32 / 96.0) } fn set_page_title(&self, _: BrowserId, title: Option) { diff --git a/servo-tidy.toml b/servo-tidy.toml index 60c042c3cbd..9472c317df5 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -41,7 +41,6 @@ packages = [ "semver", "toml", "unicase", - "smallvec", ] # Files that are ignored for all tidy and lint checks. files = [ diff --git a/tests/unit/metrics/Cargo.toml b/tests/unit/metrics/Cargo.toml index 37d7d5520f0..a1d17986385 100644 --- a/tests/unit/metrics/Cargo.toml +++ b/tests/unit/metrics/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -euclid = "0.15" +euclid = "0.16" gfx = {path = "../../../components/gfx"} gfx_traits = {path = "../../../components/gfx_traits"} ipc-channel = "0.9" diff --git a/tests/unit/script/Cargo.toml b/tests/unit/script/Cargo.toml index 7983d119f38..54204f3689c 100644 --- a/tests/unit/script/Cargo.toml +++ b/tests/unit/script/Cargo.toml @@ -9,7 +9,7 @@ name = "script_tests" path = "lib.rs" [dependencies] -euclid = "0.15" +euclid = "0.16" msg = {path = "../../../components/msg"} script = {path = "../../../components/script"} servo_url = {path = "../../../components/url"} diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index b887c767ab2..24bd83d144c 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -13,7 +13,7 @@ doctest = false byteorder = "1.0" app_units = "0.6" cssparser = "0.23.0" -euclid = "0.15" +euclid = "0.16" html5ever = "0.22" parking_lot = "0.4" rayon = "0.8" diff --git a/tests/unit/style/media_queries.rs b/tests/unit/style/media_queries.rs index d3539fab9d1..2cddcff5def 100644 --- a/tests/unit/style/media_queries.rs +++ b/tests/unit/style/media_queries.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use cssparser::SourceLocation; -use euclid::ScaleFactor; +use euclid::TypedScale; use euclid::TypedSize2D; use servo_arc::Arc; use servo_url::ServoUrl; @@ -38,7 +38,7 @@ fn test_media_rule(css: &str, callback: F) let stylesheet = Stylesheet::from_str( css, url, Origin::Author, media_list, lock, None, &CSSErrorReporterTest, QuirksMode::NoQuirks, 0); - let dummy = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0)); + let dummy = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0)); let mut rule_count = 0; let guard = stylesheet.shared_lock.read(); for rule in stylesheet.iter_rules::(&dummy, &guard) { @@ -345,7 +345,7 @@ fn test_mq_malformed_expressions() { #[test] fn test_matching_simple() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0)); media_query_test(&device, "@media not all { a { color: red; } }", 0); media_query_test(&device, "@media not screen { a { color: red; } }", 0); @@ -361,7 +361,7 @@ fn test_matching_simple() { #[test] fn test_matching_width() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0)); media_query_test(&device, "@media { a { color: red; } }", 1); @@ -402,7 +402,7 @@ fn test_matching_width() { #[test] fn test_matching_invalid() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0)); media_query_test(&device, "@media fridge { a { color: red; } }", 0); media_query_test(&device, "@media screen and (height: 100px) { a { color: red; } }", 0); diff --git a/tests/unit/style/stylist.rs b/tests/unit/style/stylist.rs index 4a342b806d8..01446cddcc1 100644 --- a/tests/unit/style/stylist.rs +++ b/tests/unit/style/stylist.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use cssparser::SourceLocation; -use euclid::ScaleFactor; +use euclid::TypedScale; use euclid::TypedSize2D; use selectors::parser::{AncestorHashes, Selector}; use servo_arc::Arc; @@ -179,7 +179,7 @@ fn test_insert() { } fn mock_stylist() -> Stylist { - let device = Device::new(MediaType::screen(), TypedSize2D::new(0f32, 0f32), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(0f32, 0f32), TypedScale::new(1.0)); Stylist::new(device, QuirksMode::NoQuirks) } diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs index c84792ffb99..07e221021dc 100644 --- a/tests/unit/style/viewport.rs +++ b/tests/unit/style/viewport.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; -use euclid::ScaleFactor; +use euclid::TypedScale; use euclid::TypedSize2D; use media_queries::CSSErrorReporterTest; use servo_arc::Arc; @@ -97,7 +97,7 @@ macro_rules! viewport_length { #[test] fn empty_viewport_rule() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0)); test_viewport_rule("@viewport {}", &device, |declarations, css| { println!("{}", css); @@ -120,7 +120,7 @@ macro_rules! assert_decl_eq { #[test] fn simple_viewport_rules() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0)); test_viewport_rule("@viewport { width: auto; height: auto;\ zoom: auto; min-zoom: 0; max-zoom: 200%;\ @@ -192,7 +192,7 @@ fn simple_meta_viewport_contents() { #[test] fn cascading_within_viewport_rule() { - let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0)); // normal order of appearance test_viewport_rule("@viewport { min-width: 200px; min-width: auto; }", @@ -258,7 +258,7 @@ fn cascading_within_viewport_rule() { #[test] fn multiple_stylesheets_cascading() { PREFS.set("layout.viewport.enabled", PrefValue::Boolean(true)); - let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), TypedSize2D::new(800., 600.), TypedScale::new(1.0)); let error_reporter = CSSErrorReporterTest; let shared_lock = SharedRwLock::new(); let stylesheets = vec![ @@ -314,7 +314,7 @@ fn constrain_viewport() { } let initial_viewport = TypedSize2D::new(800., 600.); - let device = Device::new(MediaType::screen(), initial_viewport, ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), initial_viewport, TypedScale::new(1.0)); let mut input = ParserInput::new(""); assert_eq!(ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), None); @@ -363,7 +363,7 @@ fn constrain_viewport() { })); let initial_viewport = TypedSize2D::new(200., 150.); - let device = Device::new(MediaType::screen(), initial_viewport, ScaleFactor::new(1.0)); + let device = Device::new(MediaType::screen(), initial_viewport, TypedScale::new(1.0)); let mut input = ParserInput::new("width: 320px auto"); assert_eq!(ViewportConstraints::maybe_new(&device, from_css!(input), QuirksMode::NoQuirks), Some(ViewportConstraints {