mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
This commit is contained in:
parent
2ff7cb5a37
commit
3d57c22e9c
133 changed files with 686 additions and 596 deletions
179
Cargo.lock
generated
179
Cargo.lock
generated
|
@ -137,14 +137,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "azure"
|
||||
version = "0.36.0"
|
||||
source = "git+https://github.com/servo/rust-azure#ca9cc643808f6f63576c5c2cd098e973406cc7f3"
|
||||
version = "0.36.1"
|
||||
source = "git+https://github.com/servo/rust-azure#37a57b3d862bcf345d1413c7ebb534ff69daab3b"
|
||||
dependencies = [
|
||||
"cmake 0.1.40 (git+https://github.com/alexcrichton/cmake-rs)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.53 (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.30000021.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-skia 0.30000022.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -391,20 +391,20 @@ dependencies = [
|
|||
name = "canvas"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"azure 0.36.0 (git+https://github.com/servo/rust-azure)",
|
||||
"azure 0.36.1 (git+https://github.com/servo/rust-azure)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"canvas_traits 0.0.1",
|
||||
"cssparser 0.25.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.22.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pixels 0.0.1",
|
||||
"raqote 0.5.6-alpha.0 (git+https://github.com/jrmuizel/raqote)",
|
||||
"raqote 0.6.1-alpha.0 (git+https://github.com/jrmuizel/raqote)",
|
||||
"serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_config 0.0.1",
|
||||
"webrender 0.60.0 (git+https://github.com/servo/webrender)",
|
||||
|
@ -417,7 +417,7 @@ name = "canvas_traits"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"cssparser 0.25.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -596,7 +596,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -638,7 +638,7 @@ dependencies = [
|
|||
"debugger 0.0.1",
|
||||
"devtools_traits 0.0.1",
|
||||
"embedder_traits 0.0.1",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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",
|
||||
|
@ -1191,6 +1191,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"euclid_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "euclid"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1261,7 +1269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "font-kit"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1270,13 +1278,13 @@ 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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lyon_path 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lyon_path 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1399,7 +1407,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
|
@ -2277,13 +2285,14 @@ 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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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",
|
||||
"gfx_traits 0.0.1",
|
||||
"html5ever 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
|
@ -2330,7 +2339,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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",
|
||||
|
@ -2373,7 +2382,7 @@ name = "layout_thread_2020"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx 0.0.1",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layout_2020 0.0.1",
|
||||
|
@ -2394,7 +2403,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx 0.0.1",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"metrics 0.0.1",
|
||||
|
@ -2492,7 +2501,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
|
@ -2506,7 +2515,7 @@ dependencies = [
|
|||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
"offscreen_gl_context 0.22.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"profile 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"script 0.0.1",
|
||||
|
@ -2588,20 +2597,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lyon_geom"
|
||||
version = "0.12.6"
|
||||
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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lyon_path"
|
||||
version = "0.12.0"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lyon_geom 0.12.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lyon_geom 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2637,7 +2646,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.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashglobe 0.1.0",
|
||||
"hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper_serde 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2700,7 +2709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "media"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3141,12 +3150,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "offscreen_gl_context"
|
||||
version = "0.22.4"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3302,6 +3311,27 @@ dependencies = [
|
|||
"syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "peek-poke"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peek-poke-derive 0.2.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "peek-poke-derive"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "peeking_take_while"
|
||||
version = "0.1.2"
|
||||
|
@ -3360,7 +3390,7 @@ dependencies = [
|
|||
name = "pixels"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.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)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3373,11 +3403,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "plane-split"
|
||||
version = "0.13.7"
|
||||
version = "0.14.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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
]
|
||||
|
@ -3605,12 +3635,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "raqote"
|
||||
version = "0.5.6-alpha.0"
|
||||
source = "git+https://github.com/jrmuizel/raqote#40dd11e85e4800061c4f31223199949804d3f8da"
|
||||
version = "0.6.1-alpha.0"
|
||||
source = "git+https://github.com/jrmuizel/raqote#4b9ae1986e3211d788dacc0a58ce4d5734dbdb44"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"font-kit 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lyon_geom 0.12.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sw-composite 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"typed-arena 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3812,7 +3842,7 @@ dependencies = [
|
|||
"embedder_traits 0.0.1",
|
||||
"encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"enum-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
"headers 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3892,7 +3922,7 @@ dependencies = [
|
|||
"canvas_traits 0.0.1",
|
||||
"crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.25.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"html5ever 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3932,7 +3962,7 @@ dependencies = [
|
|||
name = "script_tests"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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",
|
||||
|
@ -3948,7 +3978,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -4053,7 +4083,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -4251,12 +4281,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "servo-skia"
|
||||
version = "0.30000021.1"
|
||||
version = "0.30000022.0"
|
||||
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.40 (git+https://github.com/alexcrichton/cmake-rs)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -4301,7 +4331,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
|
@ -4331,7 +4361,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.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)",
|
||||
"style_traits 0.0.1",
|
||||
|
@ -4597,7 +4627,7 @@ dependencies = [
|
|||
"cssparser 0.25.8 (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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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",
|
||||
|
@ -4663,7 +4693,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.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.21.0",
|
||||
|
@ -4685,7 +4715,7 @@ dependencies = [
|
|||
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.25.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.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",
|
||||
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5331,7 +5361,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5354,7 +5384,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender"
|
||||
version = "0.60.0"
|
||||
source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5366,7 +5396,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
|
@ -5376,7 +5406,7 @@ dependencies = [
|
|||
"log 0.4.6 (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)",
|
||||
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plane-split 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plane-split 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5395,18 +5425,18 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_api"
|
||||
version = "0.60.0"
|
||||
source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peek-poke 0.2.0 (git+https://github.com/servo/webrender)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5417,7 +5447,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_build"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -5426,7 +5456,7 @@ dependencies = [
|
|||
name = "webrender_traits"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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)",
|
||||
]
|
||||
|
@ -5437,7 +5467,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.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5462,9 +5492,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webxr"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webxr#b5a4b93fcfb2b03ee264a8f95bbaa1500ff0a087"
|
||||
source = "git+https://github.com/servo/webxr#43a54f4cbe0ed3037e5e2bf34769241a5bd3da60"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5474,9 +5504,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webxr-api"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webxr#b5a4b93fcfb2b03ee264a8f95bbaa1500ff0a087"
|
||||
source = "git+https://github.com/servo/webxr#43a54f4cbe0ed3037e5e2bf34769241a5bd3da60"
|
||||
dependencies = [
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (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.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -5570,10 +5600,10 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wr_malloc_size_of"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webrender#2afa0c3ba85d2f6b219a1349268d1250760ebd64"
|
||||
source = "git+https://github.com/servo/webrender#964a2eb8d9ed25cfffe6dd446cfa21a37eefe9c7"
|
||||
dependencies = [
|
||||
"app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.19.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5688,7 +5718,7 @@ dependencies = [
|
|||
"checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
|
||||
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
||||
"checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf"
|
||||
"checksum azure 0.36.0 (git+https://github.com/servo/rust-azure)" = "<none>"
|
||||
"checksum azure 0.36.1 (git+https://github.com/servo/rust-azure)" = "<none>"
|
||||
"checksum backtrace 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)" = "1a13fc43f04daf08ab4f71e3d27e1fc27fc437d3e95ac0063a796d92fb40f39b"
|
||||
"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"
|
||||
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
|
||||
|
@ -5776,6 +5806,7 @@ dependencies = [
|
|||
"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.19.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7a4719a544a67ed3fc33784c2bd2c6581663dfe83b719a6ae05c6dabc3b51c73"
|
||||
"checksum euclid 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4786521fec183792e755bf32cd0188e4e7628c6d0fcfd51426435b9081a106"
|
||||
"checksum euclid_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcb84c18ea5037a1c5a23039b4ff29403abce2e0d6b1daa11cf0bde2b30be15"
|
||||
"checksum expat-sys 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
|
||||
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
|
||||
|
@ -5784,7 +5815,7 @@ dependencies = [
|
|||
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
|
||||
"checksum float-ord 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e"
|
||||
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
||||
"checksum font-kit 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da53acd00b0af3dbb578bdfa92d0acee09c7e4e4f4dfb4b9cb7d7bc57f135270"
|
||||
"checksum font-kit 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b7ff8d2a0a660875d01689807925a45c5843bf90a1ef97ec52ef86ab0cafba"
|
||||
"checksum fontsan 0.4.0 (git+https://github.com/servo/fontsan)" = "<none>"
|
||||
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
||||
"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
|
@ -5886,8 +5917,8 @@ dependencies = [
|
|||
"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
|
||||
"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff"
|
||||
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
|
||||
"checksum lyon_geom 0.12.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0638070e85f0e8b5da3909d8c5c0a66785b18da96a1e8dc30acb0aea9770529a"
|
||||
"checksum lyon_path 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e9dc8e0746b7cca11960b602f7fe037bb067746a01eab4aa502fed1494544843"
|
||||
"checksum lyon_geom 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "69589b8844c0b3745cc031a35b62bc33b0fb9e5ba7613756d802c52861dcdb4c"
|
||||
"checksum lyon_path 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bcb57ac24a5428539e2c7c0592766d5933c937d703f430990c669c00de96862"
|
||||
"checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084"
|
||||
"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1"
|
||||
|
@ -5928,7 +5959,7 @@ dependencies = [
|
|||
"checksum objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "31d20fd2b37e07cf5125be68357b588672e8cefe9a96f8c17a9d46053b3e590d"
|
||||
"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.22.4 (registry+https://github.com/rust-lang/crates.io-index)" = "154c923c8bf54299672a5121836a929395d763778525ce752c00b61249fe9cab"
|
||||
"checksum offscreen_gl_context 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b6b1df447af7a71721bfc33697b364831d59c0c8668dae0e570a7993ca84bc8"
|
||||
"checksum opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51ecbcb821e1bd256d456fe858aaa7f380b63863eab2eb86eee1bd9f33dd6682"
|
||||
"checksum openssl 0.10.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6c24d3508b4fb6da175c10baac54c578b33f09c89ae90c6fe9788b3b4768efdc"
|
||||
"checksum openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)" = "912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129"
|
||||
|
@ -5945,6 +5976,8 @@ dependencies = [
|
|||
"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c"
|
||||
"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79"
|
||||
"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6"
|
||||
"checksum peek-poke 0.2.0 (git+https://github.com/servo/webrender)" = "<none>"
|
||||
"checksum peek-poke-derive 0.2.0 (git+https://github.com/servo/webrender)" = "<none>"
|
||||
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||
"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
|
||||
"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
|
||||
|
@ -5953,7 +5986,7 @@ dependencies = [
|
|||
"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662"
|
||||
"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0"
|
||||
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
||||
"checksum plane-split 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9760bb0546502fcfae6d2d1d638fac6b9272027a3efae34060218152d0ce8387"
|
||||
"checksum plane-split 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91821c7436aefc1b912552d494232efcaf9810c0189918749532be1e9dbace59"
|
||||
"checksum png 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9adebf7fb91ccf5eac9da1a8e00e83cb8ae882c3e8d8e4ad59da73cb8c82a2c9"
|
||||
"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd"
|
||||
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
|
@ -5973,7 +6006,7 @@ dependencies = [
|
|||
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
|
||||
"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
|
||||
"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
|
||||
"checksum raqote 0.5.6-alpha.0 (git+https://github.com/jrmuizel/raqote)" = "<none>"
|
||||
"checksum raqote 0.6.1-alpha.0 (git+https://github.com/jrmuizel/raqote)" = "<none>"
|
||||
"checksum rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b0186e22767d5b9738a05eab7c6ac90b15db17e5b5f9bd87976dd7d89a10a4"
|
||||
"checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2"
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
|
||||
|
@ -6015,7 +6048,7 @@ dependencies = [
|
|||
"checksum servo-media-streams 0.1.0 (git+https://github.com/servo/media)" = "<none>"
|
||||
"checksum servo-media-traits 0.1.0 (git+https://github.com/servo/media)" = "<none>"
|
||||
"checksum servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)" = "<none>"
|
||||
"checksum servo-skia 0.30000021.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0a65022054874fc1f38dc45e19192accbae775784c3ff05c3875bcc176c19"
|
||||
"checksum servo-skia 0.30000022.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2df44d1fcd25d158fc5430a588daaa4aec88df6306ddf2a079f99dfd52672102"
|
||||
"checksum servo_media_derive 0.1.0 (git+https://github.com/servo/media)" = "<none>"
|
||||
"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68"
|
||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||
|
|
|
@ -21,14 +21,14 @@ azure = {git = "https://github.com/servo/rust-azure", optional = true}
|
|||
byteorder = "1"
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = "0.25"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
gleam = "0.6.7"
|
||||
half = "1"
|
||||
ipc-channel = "0.11"
|
||||
log = "0.4"
|
||||
num-traits = "0.2"
|
||||
offscreen_gl_context = {version = "0.22", features = ["serde", "osmesa"]}
|
||||
offscreen_gl_context = {version = "0.23", features = ["serde", "osmesa"]}
|
||||
raqote = {git = "https://github.com/jrmuizel/raqote", optional = true}
|
||||
pixels = {path = "../pixels"}
|
||||
serde_bytes = "0.10"
|
||||
|
|
|
@ -16,7 +16,7 @@ use azure::azure_hl::{CapStyle, JoinStyle};
|
|||
use azure::azure_hl::{LinearGradientPattern, RadialGradientPattern};
|
||||
use canvas_traits::canvas::*;
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
|
||||
pub struct AzureBackend;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use crate::canvas_paint_thread::AntialiasMode;
|
||||
use canvas_traits::canvas::*;
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use ipc_channel::ipc::{IpcSender, IpcSharedMemory};
|
||||
use num_traits::ToPrimitive;
|
||||
#[allow(unused_imports)]
|
||||
|
@ -13,6 +13,7 @@ use std::marker::PhantomData;
|
|||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
use webrender::api::DirtyRect;
|
||||
use webrender_api::units::RectExt;
|
||||
|
||||
/// The canvas data stores a state machine for the current status of
|
||||
/// the path data and any relevant transformations that are
|
||||
|
@ -123,12 +124,12 @@ struct PathBuilderRef<'a> {
|
|||
|
||||
impl<'a> PathBuilderRef<'a> {
|
||||
fn line_to(&self, pt: &Point2D<f32>) {
|
||||
let pt = self.transform.transform_point(pt);
|
||||
let pt = self.transform.transform_point(*pt);
|
||||
self.builder.line_to(pt);
|
||||
}
|
||||
|
||||
fn move_to(&self, pt: &Point2D<f32>) {
|
||||
let pt = self.transform.transform_point(pt);
|
||||
let pt = self.transform.transform_point(*pt);
|
||||
self.builder.move_to(pt);
|
||||
}
|
||||
|
||||
|
@ -142,32 +143,30 @@ impl<'a> PathBuilderRef<'a> {
|
|||
),
|
||||
Point2D::new(rect.origin.x, rect.origin.y + rect.size.height),
|
||||
);
|
||||
self.builder.move_to(self.transform.transform_point(&first));
|
||||
self.builder
|
||||
.line_to(self.transform.transform_point(&second));
|
||||
self.builder.line_to(self.transform.transform_point(&third));
|
||||
self.builder
|
||||
.line_to(self.transform.transform_point(&fourth));
|
||||
self.builder.move_to(self.transform.transform_point(first));
|
||||
self.builder.line_to(self.transform.transform_point(second));
|
||||
self.builder.line_to(self.transform.transform_point(third));
|
||||
self.builder.line_to(self.transform.transform_point(fourth));
|
||||
self.builder.close();
|
||||
}
|
||||
|
||||
fn quadratic_curve_to(&self, cp: &Point2D<f32>, endpoint: &Point2D<f32>) {
|
||||
self.builder.quadratic_curve_to(
|
||||
&self.transform.transform_point(cp),
|
||||
&self.transform.transform_point(endpoint),
|
||||
&self.transform.transform_point(*cp),
|
||||
&self.transform.transform_point(*endpoint),
|
||||
)
|
||||
}
|
||||
|
||||
fn bezier_curve_to(&self, cp1: &Point2D<f32>, cp2: &Point2D<f32>, endpoint: &Point2D<f32>) {
|
||||
self.builder.bezier_curve_to(
|
||||
&self.transform.transform_point(cp1),
|
||||
&self.transform.transform_point(cp2),
|
||||
&self.transform.transform_point(endpoint),
|
||||
&self.transform.transform_point(*cp1),
|
||||
&self.transform.transform_point(*cp2),
|
||||
&self.transform.transform_point(*endpoint),
|
||||
)
|
||||
}
|
||||
|
||||
fn arc(&self, center: &Point2D<f32>, radius: f32, start_angle: f32, end_angle: f32, ccw: bool) {
|
||||
let center = self.transform.transform_point(center);
|
||||
let center = self.transform.transform_point(*center);
|
||||
self.builder
|
||||
.arc(center, radius, start_angle, end_angle, ccw);
|
||||
}
|
||||
|
@ -182,7 +181,7 @@ impl<'a> PathBuilderRef<'a> {
|
|||
end_angle: f32,
|
||||
ccw: bool,
|
||||
) {
|
||||
let center = self.transform.transform_point(center);
|
||||
let center = self.transform.transform_point(*center);
|
||||
self.builder.ellipse(
|
||||
center,
|
||||
radius_x,
|
||||
|
@ -200,7 +199,7 @@ impl<'a> PathBuilderRef<'a> {
|
|||
None => return None,
|
||||
};
|
||||
let current_point = self.builder.get_current_point();
|
||||
Some(inverse.transform_point(&Point2D::new(current_point.x, current_point.y)))
|
||||
Some(inverse.transform_point(Point2D::new(current_point.x, current_point.y)))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1033,7 +1032,7 @@ impl<'a> CanvasData<'a> {
|
|||
);
|
||||
let matrix = Transform2D::identity()
|
||||
.pre_translate(-source_rect.origin.to_vector().cast())
|
||||
.pre_mul(&self.state.transform);
|
||||
.pre_transform(&self.state.transform);
|
||||
draw_target.set_transform(&matrix);
|
||||
draw_target
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::canvas_data::*;
|
||||
use canvas_traits::canvas::*;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -6,7 +6,7 @@ use super::webgl_thread::{GLState, WebGLImpl};
|
|||
use canvas_traits::webgl::{
|
||||
GLContextAttributes, GLLimits, WebGLCommand, WebGLCommandBacktrace, WebGLVersion,
|
||||
};
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use gleam::gl;
|
||||
use offscreen_gl_context::{
|
||||
ColorAttachmentType, DrawBuffer, GLContext, GLContextAttributes as RawGLContextAttributes,
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::canvas_data::{
|
|||
use crate::canvas_paint_thread::AntialiasMode;
|
||||
use canvas_traits::canvas::*;
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D, Vector2D};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub struct RaqoteBackend;
|
||||
|
|
|
@ -8,7 +8,7 @@ use canvas_traits::webgl::webgl_channel;
|
|||
use canvas_traits::webgl::DOMToTextureCommand;
|
||||
use canvas_traits::webgl::{WebGLChan, WebGLContextId, WebGLMsg, WebGLPipeline, WebGLReceiver};
|
||||
use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler};
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use fnv::FnvHashMap;
|
||||
use gleam::gl;
|
||||
use servo_config::pref;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use super::gl_context::{map_attrs_to_script_attrs, GLContextFactory, GLContextWrapper};
|
||||
use byteorder::{ByteOrder, NativeEndian, WriteBytesExt};
|
||||
use canvas_traits::webgl::*;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use fnv::FnvHashMap;
|
||||
use gleam::gl;
|
||||
use half::f16;
|
||||
|
|
|
@ -15,7 +15,7 @@ webgl_backtrace = []
|
|||
|
||||
[dependencies]
|
||||
cssparser = "0.25"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
ipc-channel = "0.11"
|
||||
gleam = "0.6.7"
|
||||
lazy_static = "1"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::RGBA;
|
||||
use euclid::{Point2D, Rect, Size2D, Transform2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Transform2D};
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSender, IpcSharedMemory};
|
||||
use serde_bytes::ByteBuf;
|
||||
use std::default::Default;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{Rect, Size2D};
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use gleam::gl;
|
||||
use gleam::gl::GLsync;
|
||||
use gleam::gl::GLuint;
|
||||
|
|
|
@ -18,7 +18,7 @@ gl = ["gleam", "pixels"]
|
|||
[dependencies]
|
||||
crossbeam-channel = "0.3"
|
||||
embedder_traits = {path = "../embedder_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
gleam = {version = "0.6", optional = true}
|
||||
image = "0.21"
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::CompositionPipeline;
|
|||
use crate::SendableFrameTree;
|
||||
use crossbeam_channel::Sender;
|
||||
use embedder_traits::Cursor;
|
||||
use euclid::{TypedPoint2D, TypedScale, TypedVector2D};
|
||||
use euclid::{Point2D, Scale, Vector2D};
|
||||
use gfx_traits::Epoch;
|
||||
#[cfg(feature = "gl")]
|
||||
use image::{DynamicImage, ImageFormat};
|
||||
|
@ -115,7 +115,7 @@ pub struct IOCompositor<Window: WindowMethods + ?Sized> {
|
|||
pipeline_details: HashMap<PipelineId, PipelineDetails>,
|
||||
|
||||
/// The scene scale, to allow for zooming and high-resolution painting.
|
||||
scale: TypedScale<f32, LayerPixel, DevicePixel>,
|
||||
scale: Scale<f32, LayerPixel, DevicePixel>,
|
||||
|
||||
/// "Mobile-style" zoom that does not reflow the page.
|
||||
viewport_zoom: PinchZoomFactor,
|
||||
|
@ -125,7 +125,7 @@ pub struct IOCompositor<Window: WindowMethods + ?Sized> {
|
|||
max_viewport_zoom: Option<PinchZoomFactor>,
|
||||
|
||||
/// "Desktop-style" zoom that resizes the viewport to fit the window.
|
||||
page_zoom: TypedScale<f32, CSSPixel, DeviceIndependentPixel>,
|
||||
page_zoom: Scale<f32, CSSPixel, DeviceIndependentPixel>,
|
||||
|
||||
/// The type of composition to perform
|
||||
composite_target: CompositeTarget,
|
||||
|
@ -296,14 +296,14 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
port: state.receiver,
|
||||
root_pipeline: None,
|
||||
pipeline_details: HashMap::new(),
|
||||
scale: TypedScale::new(1.0),
|
||||
scale: Scale::new(1.0),
|
||||
composition_request: CompositionRequest::NoCompositingNecessary,
|
||||
touch_handler: TouchHandler::new(),
|
||||
pending_scroll_zoom_events: Vec::new(),
|
||||
waiting_for_results_of_scroll: false,
|
||||
composite_target,
|
||||
shutdown_state: ShutdownState::NotShuttingDown,
|
||||
page_zoom: TypedScale::new(1.0),
|
||||
page_zoom: Scale::new(1.0),
|
||||
viewport_zoom: PinchZoomFactor::new(1.0),
|
||||
min_viewport_zoom: None,
|
||||
max_viewport_zoom: None,
|
||||
|
@ -741,7 +741,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
let dppx = self.page_zoom * self.hidpi_factor();
|
||||
let scaled_point = (point / dppx).to_untyped();
|
||||
|
||||
let world_cursor = webrender_api::units::WorldPoint::from_untyped(&scaled_point);
|
||||
let world_cursor = webrender_api::units::WorldPoint::from_untyped(scaled_point);
|
||||
self.webrender_api.hit_test(
|
||||
self.webrender_document,
|
||||
None,
|
||||
|
@ -845,15 +845,15 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
fn on_touch_move(&mut self, identifier: TouchId, point: DevicePoint) {
|
||||
match self.touch_handler.on_touch_move(identifier, point) {
|
||||
TouchAction::Scroll(delta) => self.on_scroll_window_event(
|
||||
ScrollLocation::Delta(LayoutVector2D::from_untyped(&delta.to_untyped())),
|
||||
ScrollLocation::Delta(LayoutVector2D::from_untyped(delta.to_untyped())),
|
||||
point.cast(),
|
||||
),
|
||||
TouchAction::Zoom(magnification, scroll_delta) => {
|
||||
let cursor = TypedPoint2D::new(-1, -1); // Make sure this hits the base layer.
|
||||
let cursor = Point2D::new(-1, -1); // Make sure this hits the base layer.
|
||||
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
|
||||
magnification: magnification,
|
||||
scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped(
|
||||
&scroll_delta.to_untyped(),
|
||||
scroll_delta.to_untyped(),
|
||||
)),
|
||||
cursor: cursor,
|
||||
event_count: 1,
|
||||
|
@ -942,7 +942,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
*last_combined_event = Some(ScrollZoomEvent {
|
||||
magnification: scroll_event.magnification,
|
||||
scroll_location: ScrollLocation::Delta(LayoutVector2D::from_untyped(
|
||||
&this_delta.to_untyped(),
|
||||
this_delta.to_untyped(),
|
||||
)),
|
||||
cursor: this_cursor,
|
||||
event_count: 1,
|
||||
|
@ -954,11 +954,9 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
// nasty-looking "pops". To mitigate this, during a fling we average
|
||||
// deltas instead of summing them.
|
||||
if let ScrollLocation::Delta(delta) = last_combined_event.scroll_location {
|
||||
let old_event_count =
|
||||
TypedScale::new(last_combined_event.event_count as f32);
|
||||
let old_event_count = Scale::new(last_combined_event.event_count as f32);
|
||||
last_combined_event.event_count += 1;
|
||||
let new_event_count =
|
||||
TypedScale::new(last_combined_event.event_count as f32);
|
||||
let new_event_count = Scale::new(last_combined_event.event_count as f32);
|
||||
last_combined_event.scroll_location = ScrollLocation::Delta(
|
||||
(delta * old_event_count + this_delta) / new_event_count,
|
||||
);
|
||||
|
@ -971,17 +969,16 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
if let Some(combined_event) = last_combined_event {
|
||||
let scroll_location = match combined_event.scroll_location {
|
||||
ScrollLocation::Delta(delta) => {
|
||||
let scaled_delta = (TypedVector2D::from_untyped(&delta.to_untyped()) /
|
||||
self.scale)
|
||||
.to_untyped();
|
||||
let calculated_delta = LayoutVector2D::from_untyped(&scaled_delta);
|
||||
let scaled_delta =
|
||||
(Vector2D::from_untyped(delta.to_untyped()) / self.scale).to_untyped();
|
||||
let calculated_delta = LayoutVector2D::from_untyped(scaled_delta);
|
||||
ScrollLocation::Delta(calculated_delta)
|
||||
},
|
||||
// Leave ScrollLocation unchanged if it is Start or End location.
|
||||
sl @ ScrollLocation::Start | sl @ ScrollLocation::End => sl,
|
||||
};
|
||||
let cursor = (combined_event.cursor.to_f32() / self.scale).to_untyped();
|
||||
let cursor = webrender_api::units::WorldPoint::from_untyped(&cursor);
|
||||
let cursor = webrender_api::units::WorldPoint::from_untyped(cursor);
|
||||
let mut txn = webrender_api::Transaction::new();
|
||||
txn.scroll(scroll_location, cursor);
|
||||
if combined_event.magnification != 1.0 {
|
||||
|
@ -1063,34 +1060,34 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
}
|
||||
}
|
||||
|
||||
fn hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> {
|
||||
fn hidpi_factor(&self) -> Scale<f32, DeviceIndependentPixel, DevicePixel> {
|
||||
match self.device_pixels_per_px {
|
||||
Some(device_pixels_per_px) => TypedScale::new(device_pixels_per_px),
|
||||
Some(device_pixels_per_px) => Scale::new(device_pixels_per_px),
|
||||
None => match self.output_file {
|
||||
Some(_) => TypedScale::new(1.0),
|
||||
Some(_) => Scale::new(1.0),
|
||||
None => self.embedder_coordinates.hidpi_factor,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn device_pixels_per_page_px(&self) -> TypedScale<f32, CSSPixel, DevicePixel> {
|
||||
fn device_pixels_per_page_px(&self) -> Scale<f32, CSSPixel, DevicePixel> {
|
||||
self.page_zoom * self.hidpi_factor()
|
||||
}
|
||||
|
||||
fn update_zoom_transform(&mut self) {
|
||||
let scale = self.device_pixels_per_page_px();
|
||||
self.scale = TypedScale::new(scale.get());
|
||||
self.scale = Scale::new(scale.get());
|
||||
}
|
||||
|
||||
pub fn on_zoom_reset_window_event(&mut self) {
|
||||
self.page_zoom = TypedScale::new(1.0);
|
||||
self.page_zoom = Scale::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 = TypedScale::new(
|
||||
self.page_zoom = Scale::new(
|
||||
(self.page_zoom.get() * magnification)
|
||||
.max(MIN_ZOOM)
|
||||
.min(MAX_ZOOM),
|
||||
|
@ -1113,8 +1110,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
pub fn on_pinch_zoom_window_event(&mut self, magnification: f32) {
|
||||
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
|
||||
magnification: magnification,
|
||||
scroll_location: ScrollLocation::Delta(TypedVector2D::zero()), // TODO: Scroll to keep the center in view?
|
||||
cursor: TypedPoint2D::new(-1, -1), // Make sure this hits the base layer.
|
||||
scroll_location: ScrollLocation::Delta(Vector2D::zero()), // TODO: Scroll to keep the center in view?
|
||||
cursor: Point2D::new(-1, -1), // Make sure this hits the base layer.
|
||||
event_count: 1,
|
||||
});
|
||||
}
|
||||
|
@ -1127,7 +1124,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
{
|
||||
let scroll_state = ScrollState {
|
||||
scroll_id: scroll_layer_state.id,
|
||||
scroll_offset: scroll_layer_state.scroll_offset.to_untyped(),
|
||||
scroll_offset: scroll_layer_state.scroll_offset,
|
||||
};
|
||||
|
||||
scroll_states_per_pipeline
|
||||
|
@ -1243,12 +1240,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
&mut self,
|
||||
target: CompositeTarget,
|
||||
) -> Result<Option<Image>, UnableToComposite> {
|
||||
let width = self.embedder_coordinates.framebuffer.to_u32().width_typed();
|
||||
let height = self
|
||||
.embedder_coordinates
|
||||
.framebuffer
|
||||
.to_u32()
|
||||
.height_typed();
|
||||
let size = self.embedder_coordinates.framebuffer.to_u32();
|
||||
|
||||
self.window.prepare_for_composite();
|
||||
self.webrender.update();
|
||||
|
@ -1279,8 +1271,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
#[cfg(feature = "gl")]
|
||||
CompositeTarget::WindowAndPng | CompositeTarget::PngFile => gl::initialize_png(
|
||||
&*self.window.gl(),
|
||||
FramebufferUintLength::new(width.get()),
|
||||
FramebufferUintLength::new(height.get()),
|
||||
FramebufferUintLength::new(size.width),
|
||||
FramebufferUintLength::new(size.height),
|
||||
),
|
||||
#[cfg(not(feature = "gl"))]
|
||||
_ => (),
|
||||
|
@ -1293,9 +1285,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
|| {
|
||||
debug!("compositor: compositing");
|
||||
|
||||
let size = DeviceIntSize::from_untyped(
|
||||
&self.embedder_coordinates.framebuffer.to_untyped(),
|
||||
);
|
||||
let size =
|
||||
DeviceIntSize::from_untyped(self.embedder_coordinates.framebuffer.to_untyped());
|
||||
|
||||
// Paint the scene.
|
||||
// TODO(gw): Take notice of any errors the renderer returns!
|
||||
|
@ -1346,8 +1337,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
let img = gl::draw_img(
|
||||
&*self.window.gl(),
|
||||
rt_info,
|
||||
FramebufferUintLength::new(width.get()),
|
||||
FramebufferUintLength::new(height.get()),
|
||||
FramebufferUintLength::new(size.width),
|
||||
FramebufferUintLength::new(size.height),
|
||||
);
|
||||
Some(Image {
|
||||
width: img.width(),
|
||||
|
@ -1370,8 +1361,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
let img = gl::draw_img(
|
||||
gl,
|
||||
rt_info,
|
||||
FramebufferUintLength::new(width.get()),
|
||||
FramebufferUintLength::new(height.get()),
|
||||
FramebufferUintLength::new(size.width),
|
||||
FramebufferUintLength::new(size.height),
|
||||
);
|
||||
let dynamic_image = DynamicImage::ImageRgb8(img);
|
||||
if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG)
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use self::TouchState::*;
|
||||
use euclid::TypedScale;
|
||||
use euclid::{TypedPoint2D, TypedVector2D};
|
||||
use euclid::{Point2D, Scale, Vector2D};
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use style_traits::DevicePixel;
|
||||
|
||||
|
@ -19,11 +18,11 @@ pub struct TouchHandler {
|
|||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct TouchPoint {
|
||||
pub id: TouchId,
|
||||
pub point: TypedPoint2D<f32, DevicePixel>,
|
||||
pub point: Point2D<f32, DevicePixel>,
|
||||
}
|
||||
|
||||
impl TouchPoint {
|
||||
pub fn new(id: TouchId, point: TypedPoint2D<f32, DevicePixel>) -> Self {
|
||||
pub fn new(id: TouchId, point: Point2D<f32, DevicePixel>) -> Self {
|
||||
TouchPoint {
|
||||
id: id,
|
||||
point: point,
|
||||
|
@ -60,9 +59,9 @@ pub enum TouchAction {
|
|||
/// Simulate a mouse click.
|
||||
Click,
|
||||
/// Scroll by the provided offset.
|
||||
Scroll(TypedVector2D<f32, DevicePixel>),
|
||||
Scroll(Vector2D<f32, DevicePixel>),
|
||||
/// Zoom by a magnification factor and scroll by the provided offset.
|
||||
Zoom(f32, TypedVector2D<f32, DevicePixel>),
|
||||
Zoom(f32, Vector2D<f32, DevicePixel>),
|
||||
/// Send a JavaScript event to content.
|
||||
DispatchEvent,
|
||||
/// Don't do anything.
|
||||
|
@ -77,7 +76,7 @@ impl TouchHandler {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn on_touch_down(&mut self, id: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
|
||||
pub fn on_touch_down(&mut self, id: TouchId, point: Point2D<f32, DevicePixel>) {
|
||||
let point = TouchPoint::new(id, point);
|
||||
self.active_touch_points.push(point);
|
||||
|
||||
|
@ -90,11 +89,7 @@ impl TouchHandler {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn on_touch_move(
|
||||
&mut self,
|
||||
id: TouchId,
|
||||
point: TypedPoint2D<f32, DevicePixel>,
|
||||
) -> TouchAction {
|
||||
pub fn on_touch_move(&mut self, id: TouchId, point: Point2D<f32, DevicePixel>) -> TouchAction {
|
||||
let idx = match self.active_touch_points.iter_mut().position(|t| t.id == id) {
|
||||
Some(i) => i,
|
||||
None => {
|
||||
|
@ -128,7 +123,7 @@ impl TouchHandler {
|
|||
let (d1, c1) = self.pinch_distance_and_center();
|
||||
|
||||
let magnification = d1 / d0;
|
||||
let scroll_delta = c1 - c0 * TypedScale::new(magnification);
|
||||
let scroll_delta = c1 - c0 * Scale::new(magnification);
|
||||
|
||||
TouchAction::Zoom(magnification, scroll_delta)
|
||||
},
|
||||
|
@ -145,11 +140,7 @@ impl TouchHandler {
|
|||
action
|
||||
}
|
||||
|
||||
pub fn on_touch_up(
|
||||
&mut self,
|
||||
id: TouchId,
|
||||
_point: TypedPoint2D<f32, DevicePixel>,
|
||||
) -> TouchAction {
|
||||
pub fn on_touch_up(&mut self, id: TouchId, _point: Point2D<f32, DevicePixel>) -> TouchAction {
|
||||
match self.active_touch_points.iter().position(|t| t.id == id) {
|
||||
Some(i) => {
|
||||
self.active_touch_points.swap_remove(i);
|
||||
|
@ -182,7 +173,7 @@ impl TouchHandler {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn on_touch_cancel(&mut self, id: TouchId, _point: TypedPoint2D<f32, DevicePixel>) {
|
||||
pub fn on_touch_cancel(&mut self, id: TouchId, _point: Point2D<f32, DevicePixel>) {
|
||||
match self.active_touch_points.iter().position(|t| t.id == id) {
|
||||
Some(i) => {
|
||||
self.active_touch_points.swap_remove(i);
|
||||
|
@ -225,7 +216,7 @@ impl TouchHandler {
|
|||
self.active_touch_points.len()
|
||||
}
|
||||
|
||||
fn pinch_distance_and_center(&self) -> (f32, TypedPoint2D<f32, DevicePixel>) {
|
||||
fn pinch_distance_and_center(&self) -> (f32, Point2D<f32, DevicePixel>) {
|
||||
debug_assert_eq!(self.touch_count(), 2);
|
||||
let p0 = self.active_touch_points[0].point;
|
||||
let p1 = self.active_touch_points[1].point;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! Abstract windowing methods. The concrete implementations of these can be found in `platform/`.
|
||||
|
||||
use embedder_traits::EventLoopWaker;
|
||||
use euclid::TypedScale;
|
||||
use euclid::Scale;
|
||||
#[cfg(feature = "gl")]
|
||||
use gleam::gl;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
|
@ -183,7 +183,7 @@ pub trait EmbedderMethods {
|
|||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct EmbedderCoordinates {
|
||||
/// The pixel density of the display.
|
||||
pub hidpi_factor: TypedScale<f32, DeviceIndependentPixel, DevicePixel>,
|
||||
pub hidpi_factor: Scale<f32, DeviceIndependentPixel, DevicePixel>,
|
||||
/// Size of the screen.
|
||||
pub screen: DeviceIntSize,
|
||||
/// Size of the available screen space (screen without toolbars and docks).
|
||||
|
|
|
@ -14,7 +14,7 @@ name = "servo_config"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
embedder_traits = { path = "../embedder_traits" }
|
||||
getopts = "0.2.11"
|
||||
lazy_static = "1"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//! from command line arguments.
|
||||
|
||||
use crate::prefs::{self, PrefValue};
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use getopts::Options;
|
||||
use servo_geometry::DeviceIndependentPixel;
|
||||
use servo_url::ServoUrl;
|
||||
|
@ -135,7 +135,7 @@ pub struct Opts {
|
|||
pub webdriver_port: Option<u16>,
|
||||
|
||||
/// The initial requested size of the window.
|
||||
pub initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
pub initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
|
||||
/// An optional string allowing the user agent to be set for testing.
|
||||
pub user_agent: Cow<'static, str>,
|
||||
|
@ -576,7 +576,7 @@ pub fn default_opts() -> Opts {
|
|||
debugger_port: None,
|
||||
devtools_port: None,
|
||||
webdriver_port: None,
|
||||
initial_window_size: TypedSize2D::new(1024, 740),
|
||||
initial_window_size: Size2D::new(1024, 740),
|
||||
user_agent: default_user_agent_string(DEFAULT_USER_AGENT).into(),
|
||||
multiprocess: false,
|
||||
random_pipeline_closure_probability: None,
|
||||
|
@ -954,9 +954,9 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
})
|
||||
})
|
||||
.collect();
|
||||
TypedSize2D::new(res[0], res[1])
|
||||
Size2D::new(res[0], res[1])
|
||||
},
|
||||
None => TypedSize2D::new(1024, 740),
|
||||
None => Size2D::new(1024, 740),
|
||||
};
|
||||
|
||||
if opt_match.opt_present("M") {
|
||||
|
|
|
@ -26,7 +26,7 @@ compositing = {path = "../compositing"}
|
|||
crossbeam-channel = "0.3"
|
||||
debugger = {path = "../debugger"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
embedder_traits = { path = "../embedder_traits" }
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::pipeline::Pipeline;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use msg::constellation_msg::{
|
||||
BrowsingContextGroupId, BrowsingContextId, PipelineId, TopLevelBrowsingContextId,
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ pub struct BrowsingContext {
|
|||
pub top_level_id: TopLevelBrowsingContextId,
|
||||
|
||||
/// The size of the frame.
|
||||
pub size: TypedSize2D<f32, CSSPixel>,
|
||||
pub size: Size2D<f32, CSSPixel>,
|
||||
|
||||
/// Whether this browsing context is in private browsing mode.
|
||||
pub is_private: bool,
|
||||
|
@ -76,7 +76,7 @@ impl BrowsingContext {
|
|||
top_level_id: TopLevelBrowsingContextId,
|
||||
pipeline_id: PipelineId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
is_private: bool,
|
||||
is_visible: bool,
|
||||
) -> BrowsingContext {
|
||||
|
|
|
@ -113,7 +113,7 @@ use compositing::SendableFrameTree;
|
|||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||
use embedder_traits::{Cursor, EmbedderMsg, EmbedderProxy};
|
||||
use euclid::{Size2D, TypedScale, TypedSize2D};
|
||||
use euclid::{default::Size2D as UntypedSize2D, Scale, Size2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
|
@ -644,7 +644,7 @@ where
|
|||
/// Create a new constellation thread.
|
||||
pub fn start(
|
||||
state: InitialConstellationState,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
random_pipeline_closure_probability: Option<f32>,
|
||||
random_pipeline_closure_seed: Option<usize>,
|
||||
|
@ -738,8 +738,8 @@ where
|
|||
time_profiler_chan: state.time_profiler_chan,
|
||||
mem_profiler_chan: state.mem_profiler_chan,
|
||||
window_size: WindowSizeData {
|
||||
initial_viewport: initial_window_size.to_f32() * TypedScale::new(1.0),
|
||||
device_pixel_ratio: TypedScale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
initial_viewport: initial_window_size.to_f32() * Scale::new(1.0),
|
||||
device_pixel_ratio: Scale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
},
|
||||
phantom: PhantomData,
|
||||
webdriver: WebDriverData::new(),
|
||||
|
@ -903,7 +903,7 @@ where
|
|||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
opener: Option<BrowsingContextId>,
|
||||
initial_window_size: TypedSize2D<f32, CSSPixel>,
|
||||
initial_window_size: Size2D<f32, CSSPixel>,
|
||||
// TODO: we have to provide ownership of the LoadData
|
||||
// here, because it will be send on an ipc channel,
|
||||
// and ipc channels take onership of their data.
|
||||
|
@ -1078,7 +1078,7 @@ where
|
|||
top_level_id: TopLevelBrowsingContextId,
|
||||
pipeline_id: PipelineId,
|
||||
parent_pipeline_id: Option<PipelineId>,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
is_private: bool,
|
||||
is_visible: bool,
|
||||
) {
|
||||
|
@ -3341,7 +3341,7 @@ where
|
|||
|
||||
fn handle_create_canvas_paint_thread_msg(
|
||||
&mut self,
|
||||
size: Size2D<u64>,
|
||||
size: UntypedSize2D<u64>,
|
||||
response_sender: IpcSender<(IpcSender<CanvasMsg>, CanvasId)>,
|
||||
) {
|
||||
let webrender_api = self.webrender_api_sender.clone();
|
||||
|
@ -4015,7 +4015,7 @@ where
|
|||
// If the rectangle for this pipeline is zero sized, it will
|
||||
// never be painted. In this case, don't query the layout
|
||||
// thread as it won't contribute to the final output image.
|
||||
if browsing_context.size == TypedSize2D::zero() {
|
||||
if browsing_context.size == Size2D::zero() {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use compositing::CompositionPipeline;
|
|||
use compositing::CompositorProxy;
|
||||
use crossbeam_channel::Sender;
|
||||
use devtools_traits::{DevtoolsControlMsg, ScriptToDevtoolsControlMsg};
|
||||
use euclid::{TypedScale, TypedSize2D};
|
||||
use euclid::{Scale, Size2D};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -158,10 +158,10 @@ pub struct InitialPipelineState {
|
|||
pub mem_profiler_chan: profile_mem::ProfilerChan,
|
||||
|
||||
/// Information about the initial window size.
|
||||
pub window_size: TypedSize2D<f32, CSSPixel>,
|
||||
pub window_size: Size2D<f32, CSSPixel>,
|
||||
|
||||
/// Information about the device pixel ratio.
|
||||
pub device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
pub device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
|
||||
/// The event loop to run in, if applicable.
|
||||
pub event_loop: Option<Rc<EventLoop>>,
|
||||
|
|
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
app_units = "0.7"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
malloc_size_of = { path = "../malloc_size_of" }
|
||||
malloc_size_of_derive = "0.1"
|
||||
style_traits = { path = "../style_traits" }
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
extern crate malloc_size_of_derive;
|
||||
|
||||
use app_units::{Au, MAX_AU, MIN_AU};
|
||||
use euclid::{Length, Point2D, Rect, Size2D};
|
||||
use euclid::{
|
||||
default::{Point2D, Rect, Size2D},
|
||||
Length,
|
||||
};
|
||||
use std::f32;
|
||||
use webrender_api::units::{FramebufferPixel, LayoutPoint, LayoutRect, LayoutSize};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ doctest = false
|
|||
[dependencies]
|
||||
app_units = "0.7"
|
||||
bitflags = "1.0"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
fontsan = {git = "https://github.com/servo/fontsan"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
|||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::Shaper;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use ordered_float::NotNan;
|
||||
use servo_atoms::Atom;
|
||||
use smallvec::SmallVec;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
#[cfg(any(target_feature = "sse2", target_feature = "neon"))]
|
||||
use packed_simd::u32x4;
|
||||
use range::{self, EachIndex, Range, RangeIndex};
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
|||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
|
||||
// shapers. For now, however, HarfBuzz is a hard dependency.
|
||||
use harfbuzz_sys::hb_blob_t;
|
||||
|
|
|
@ -19,13 +19,14 @@ bitflags = "1.0"
|
|||
canvas_traits = {path = "../canvas_traits"}
|
||||
crossbeam-channel = "0.3"
|
||||
embedder_traits = {path = "../embedder_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
fxhash = "0.2"
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
html5ever = "0.23"
|
||||
ipc-channel = "0.11"
|
||||
lazy_static = "1"
|
||||
libc = "0.2"
|
||||
log = "0.4"
|
||||
malloc_size_of = { path = "../malloc_size_of" }
|
||||
|
|
|
@ -50,7 +50,7 @@ use crate::model::{
|
|||
use crate::sequential;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use app_units::{Au, MAX_AU};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use servo_geometry::MaxRect;
|
||||
|
@ -2610,7 +2610,7 @@ impl Flow for BlockFlow {
|
|||
.relative_containing_block_mode,
|
||||
CoordinateSystem::Own,
|
||||
)
|
||||
.translate(&stacking_context_position.to_vector()),
|
||||
.translate(stacking_context_position.to_vector()),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::display_list::border;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use style::computed_values::background_attachment::single_value::T as BackgroundAttachment;
|
||||
use style::computed_values::background_clip::single_value::T as BackgroundClip;
|
||||
use style::computed_values::background_origin::single_value::T as BackgroundOrigin;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
use crate::display_list::ToLayout;
|
||||
use app_units::Au;
|
||||
use euclid::{Rect, SideOffsets2D, Size2D};
|
||||
use euclid::default::{Rect, SideOffsets2D as UntypedSideOffsets2D, Size2D as UntypedSize2D};
|
||||
use euclid::{SideOffsets2D, Size2D};
|
||||
use style::computed_values::border_image_outset::T as BorderImageOutset;
|
||||
use style::properties::style_structs::Border;
|
||||
use style::values::computed::NumberOrPercentage;
|
||||
|
@ -23,7 +24,10 @@ use webrender_api::{BorderRadius, BorderSide, BorderStyle, ColorF, NormalBorder}
|
|||
/// > Percentages: Refer to corresponding dimension of the border box.
|
||||
///
|
||||
/// [1]: https://drafts.csswg.org/css-backgrounds-3/#border-radius
|
||||
fn corner_radius(radius: BorderCornerRadius, containing_size: Size2D<Au>) -> Size2D<Au> {
|
||||
fn corner_radius(
|
||||
radius: BorderCornerRadius,
|
||||
containing_size: UntypedSize2D<Au>,
|
||||
) -> UntypedSize2D<Au> {
|
||||
let w = radius.0.width().to_used_value(containing_size.width);
|
||||
let h = radius.0.height().to_used_value(containing_size.height);
|
||||
Size2D::new(w, h)
|
||||
|
@ -105,7 +109,7 @@ pub fn radii(abs_bounds: Rect<Au>, border_style: &Border) -> BorderRadius {
|
|||
/// the inner radii need to be smaller depending on the line width.
|
||||
///
|
||||
/// This is used to determine clipping areas.
|
||||
pub fn inner_radii(mut radii: BorderRadius, offsets: SideOffsets2D<Au>) -> BorderRadius {
|
||||
pub fn inner_radii(mut radii: BorderRadius, offsets: UntypedSideOffsets2D<Au>) -> BorderRadius {
|
||||
fn inner_length(x: f32, offset: Au) -> f32 {
|
||||
0.0_f32.max(x - offset.to_f32_px())
|
||||
}
|
||||
|
@ -144,7 +148,10 @@ fn side_image_outset(outset: NonNegativeLengthOrNumber, border_width: Au) -> Au
|
|||
}
|
||||
|
||||
/// Compute the additional border-image area.
|
||||
pub fn image_outset(outset: BorderImageOutset, border: SideOffsets2D<Au>) -> SideOffsets2D<Au> {
|
||||
pub fn image_outset(
|
||||
outset: BorderImageOutset,
|
||||
border: UntypedSideOffsets2D<Au>,
|
||||
) -> UntypedSideOffsets2D<Au> {
|
||||
SideOffsets2D::new(
|
||||
side_image_outset(outset.0, border.top),
|
||||
side_image_outset(outset.1, border.right),
|
||||
|
@ -168,7 +175,7 @@ fn side_image_width(
|
|||
pub fn image_width(
|
||||
width: &BorderImageWidth,
|
||||
border: LayoutSideOffsets,
|
||||
border_area: Size2D<Au>,
|
||||
border_area: UntypedSize2D<Au>,
|
||||
) -> LayoutSideOffsets {
|
||||
LayoutSideOffsets::new(
|
||||
side_image_width(width.0, border.top, border_area.height),
|
||||
|
@ -185,15 +192,14 @@ fn resolve_percentage(value: NonNegative<NumberOrPercentage>, length: i32) -> i3
|
|||
}
|
||||
}
|
||||
|
||||
pub fn image_slice(
|
||||
pub fn image_slice<U>(
|
||||
border_image_slice: &StyleRect<NonNegative<NumberOrPercentage>>,
|
||||
width: i32,
|
||||
height: i32,
|
||||
) -> SideOffsets2D<i32> {
|
||||
size: Size2D<i32, U>,
|
||||
) -> SideOffsets2D<i32, U> {
|
||||
SideOffsets2D::new(
|
||||
resolve_percentage(border_image_slice.0, height),
|
||||
resolve_percentage(border_image_slice.1, width),
|
||||
resolve_percentage(border_image_slice.2, height),
|
||||
resolve_percentage(border_image_slice.3, width),
|
||||
resolve_percentage(border_image_slice.0, size.height),
|
||||
resolve_percentage(border_image_slice.1, size.width),
|
||||
resolve_percentage(border_image_slice.2, size.height),
|
||||
resolve_percentage(border_image_slice.3, size.width),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -32,7 +32,10 @@ use crate::table_cell::CollapsedBordersForCell;
|
|||
use app_units::{Au, AU_PER_PX};
|
||||
use canvas_traits::canvas::{CanvasMsg, FromLayoutMsg};
|
||||
use embedder_traits::Cursor;
|
||||
use euclid::{rect, Point2D, Rect, SideOffsets2D, Size2D, TypedRect, TypedSize2D};
|
||||
use euclid::{
|
||||
default::{Point2D, Rect, SideOffsets2D as UntypedSideOffsets2D, Size2D},
|
||||
rect, SideOffsets2D,
|
||||
};
|
||||
use fnv::FnvHashMap;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::TextRun;
|
||||
|
@ -874,7 +877,7 @@ impl Fragment {
|
|||
) -> Option<WebRenderImageInfo> {
|
||||
let device_pixel_ratio = state.layout_context.style_context.device_pixel_ratio();
|
||||
let size_in_px =
|
||||
TypedSize2D::new(size_in_au.width.to_f32_px(), size_in_au.height.to_f32_px());
|
||||
euclid::Size2D::new(size_in_au.width.to_f32_px(), size_in_au.height.to_f32_px());
|
||||
|
||||
// TODO: less copying.
|
||||
let name = paint_worklet.name.clone();
|
||||
|
@ -1169,7 +1172,7 @@ impl Fragment {
|
|||
base: BaseDisplayItem,
|
||||
bounds: Rect<Au>,
|
||||
image: &Image,
|
||||
border_width: SideOffsets2D<Au>,
|
||||
border_width: UntypedSideOffsets2D<Au>,
|
||||
) -> Option<()> {
|
||||
let border_style_struct = style.get_border();
|
||||
let border_image_outset =
|
||||
|
@ -1238,11 +1241,13 @@ impl Fragment {
|
|||
_ => return None,
|
||||
};
|
||||
|
||||
// FIXME(emilio): WR expects device pixels here... somehow?
|
||||
let size = euclid::Size2D::new(width as i32, height as i32);
|
||||
let details = BorderDetails::NinePatch(NinePatchBorder {
|
||||
source,
|
||||
width: width as i32,
|
||||
height: height as i32,
|
||||
slice: border::image_slice(border_image_slice, width as i32, height as i32),
|
||||
slice: border::image_slice(border_image_slice, size),
|
||||
fill: border_image_fill,
|
||||
repeat_horizontal: border_image_repeat.0.to_layout(),
|
||||
repeat_vertical: border_image_repeat.1.to_layout(),
|
||||
|
@ -1660,7 +1665,7 @@ impl Fragment {
|
|||
// of this fragment's background but behind its content. This ensures that any
|
||||
// hit tests inside the content box but not on actual content target the current
|
||||
// scrollable ancestor.
|
||||
let content_size = TypedRect::new(stacking_relative_border_box.origin, content_size);
|
||||
let content_size = Rect::new(stacking_relative_border_box.origin, content_size);
|
||||
let base = state.create_base_display_item_with_clipping_and_scrolling(
|
||||
content_size,
|
||||
self.node,
|
||||
|
@ -1810,10 +1815,9 @@ impl Fragment {
|
|||
|
||||
// XXXjdm: This sleight-of-hand to convert LayoutRect -> Size2D<CSSPixel>
|
||||
// looks bogus.
|
||||
let size = Size2D::new(bounds.size.width, bounds.size.height);
|
||||
state.iframe_sizes.push(IFrameSize {
|
||||
id: browsing_context_id,
|
||||
size: TypedSize2D::from_untyped(&size),
|
||||
size: euclid::Size2D::new(bounds.size.width, bounds.size.height),
|
||||
});
|
||||
|
||||
state.add_display_item(item);
|
||||
|
@ -1926,13 +1930,13 @@ impl Fragment {
|
|||
// First, compute the offset of our border box (including relative positioning)
|
||||
// from our flow origin, since that is what `BaseFlow::overflow` is relative to.
|
||||
let border_box_offset = border_box
|
||||
.translate(&-base_flow.stacking_relative_position)
|
||||
.translate(-base_flow.stacking_relative_position)
|
||||
.origin;
|
||||
// Then, using that, compute our overflow region relative to our border box.
|
||||
let overflow = base_flow
|
||||
.overflow
|
||||
.paint
|
||||
.translate(&-border_box_offset.to_vector());
|
||||
.translate(-border_box_offset.to_vector());
|
||||
|
||||
// Create the filter pipeline.
|
||||
let effects = self.style().get_effects();
|
||||
|
@ -2269,7 +2273,7 @@ impl BlockFlow {
|
|||
.fragment
|
||||
.perspective_matrix(&border_box)
|
||||
.unwrap_or(LayoutTransform::identity());
|
||||
let transform = transform.pre_mul(&perspective).inverse();
|
||||
let transform = transform.pre_transform(&perspective).inverse();
|
||||
|
||||
let origin = border_box.origin;
|
||||
let transform_clip = |clip: Rect<Au>| {
|
||||
|
@ -3016,7 +3020,7 @@ trait ToF32Px {
|
|||
fn to_f32_px(&self) -> Self::Output;
|
||||
}
|
||||
|
||||
impl ToF32Px for TypedRect<Au> {
|
||||
impl ToF32Px for Rect<Au> {
|
||||
type Output = LayoutRect;
|
||||
fn to_f32_px(&self) -> LayoutRect {
|
||||
LayoutRect::from_untyped(&servo_geometry::au_rect_to_f32_rect(*self))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D, Vector2D};
|
||||
use style::computed_values::image_rendering::T as ImageRendering;
|
||||
use style::computed_values::mix_blend_mode::T as MixBlendMode;
|
||||
use style::computed_values::transform_style::T as TransformStyle;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::display_list::ToLayout;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Size2D, Vector2D};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::image::{EndingShape, LineDirection};
|
||||
use style::values::computed::{Angle, GradientItem, LengthPercentage, Percentage, Position};
|
||||
|
|
|
@ -24,7 +24,7 @@ use std::f32;
|
|||
use std::fmt;
|
||||
use style::computed_values::_servo_top_layer::T as InTopLayer;
|
||||
use webrender_api as wr;
|
||||
use webrender_api::units::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
|
||||
use webrender_api::units::{LayoutPixel, LayoutPoint, LayoutRect, LayoutSize, LayoutTransform};
|
||||
use webrender_api::{BorderRadius, ClipId, ClipMode, CommonItemProperties, ComplexClipRegion};
|
||||
use webrender_api::{ExternalScrollId, FilterOp, GlyphInstance, GradientStop, ImageKey};
|
||||
use webrender_api::{MixBlendMode, ScrollSensitivity, Shadow, SpatialId};
|
||||
|
@ -343,7 +343,7 @@ impl fmt::Debug for StackingContext {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
pub struct StickyFrameData {
|
||||
pub margins: SideOffsets2D<Option<f32>>,
|
||||
pub margins: SideOffsets2D<Option<f32>, LayoutPixel>,
|
||||
pub vertical_offset_bounds: StickyOffsetBounds,
|
||||
pub horizontal_offset_bounds: StickyOffsetBounds,
|
||||
}
|
||||
|
@ -792,4 +792,4 @@ impl WebRenderImageInfo {
|
|||
}
|
||||
|
||||
/// The type of the scroll offset list. This is only populated if WebRender is in use.
|
||||
pub type ScrollOffsetMap = HashMap<ExternalScrollId, Vector2D<f32>>;
|
||||
pub type ScrollOffsetMap = HashMap<ExternalScrollId, Vector2D<f32, LayoutPixel>>;
|
||||
|
|
|
@ -189,7 +189,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
),
|
||||
(Some(t), None) => (t, ReferenceFrameKind::Transform),
|
||||
(Some(t), Some(p)) => (
|
||||
t.pre_mul(&p),
|
||||
t.pre_transform(&p),
|
||||
ReferenceFrameKind::Perspective {
|
||||
scrolling_relative_to: None,
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::model::{self, AdjoiningMargins, CollapsibleMargins};
|
|||
use crate::model::{IntrinsicISizes, MaybeAuto, SizeConstraint};
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use app_units::{Au, MAX_AU};
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use std::cmp::{max, min};
|
||||
use std::ops::Range;
|
||||
use style::computed_values::align_content::T as AlignContent;
|
||||
|
|
|
@ -44,7 +44,7 @@ use crate::table_row::TableRowFlow;
|
|||
use crate::table_rowgroup::TableRowGroupFlow;
|
||||
use crate::table_wrapper::TableWrapperFlow;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use gfx_traits::StackingContextId;
|
||||
use num_traits::cast::FromPrimitive;
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::wrapper::ThreadSafeLayoutNodeHelpers;
|
|||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use canvas_traits::canvas::{CanvasId, CanvasMsg};
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use gfx::text::text_run::{TextRun, TextRunSlice};
|
||||
use gfx_traits::StackingContextId;
|
||||
|
@ -2671,8 +2671,12 @@ impl Fragment {
|
|||
// this.
|
||||
let relative_position = self.relative_position(relative_containing_block_size);
|
||||
border_box
|
||||
.translate_by_size(&relative_position.to_physical(self.style.writing_mode))
|
||||
.translate(&stacking_relative_flow_origin)
|
||||
.translate(
|
||||
relative_position
|
||||
.to_physical(self.style.writing_mode)
|
||||
.to_vector(),
|
||||
)
|
||||
.translate(*stacking_relative_flow_origin)
|
||||
}
|
||||
|
||||
/// Given the stacking-context-relative border box, returns the stacking-context-relative
|
||||
|
@ -2789,8 +2793,11 @@ impl Fragment {
|
|||
// FIXME(pcwalton): I'm not a fan of the way this makes us crawl though so many styles all
|
||||
// the time. Can't we handle relative positioning by just adjusting `border_box`?
|
||||
let relative_position = self.relative_position(relative_containing_block_size);
|
||||
border_box =
|
||||
border_box.translate_by_size(&relative_position.to_physical(self.style.writing_mode));
|
||||
border_box = border_box.translate(
|
||||
relative_position
|
||||
.to_physical(self.style.writing_mode)
|
||||
.to_vector(),
|
||||
);
|
||||
let mut overflow = Overflow::from_rect(&border_box);
|
||||
|
||||
// Box shadows cause us to draw outside our border box.
|
||||
|
@ -2803,7 +2810,7 @@ impl Fragment {
|
|||
Au::from(box_shadow.base.blur) * BLUR_INFLATION_FACTOR;
|
||||
overflow.paint = overflow
|
||||
.paint
|
||||
.union(&border_box.translate(&offset).inflate(inflation, inflation))
|
||||
.union(&border_box.translate(offset).inflate(inflation, inflation))
|
||||
}
|
||||
|
||||
// Outlines cause us to draw outside our border box.
|
||||
|
@ -3172,7 +3179,11 @@ impl Fragment {
|
|||
-transform_origin_z,
|
||||
);
|
||||
|
||||
Some(pre_transform.pre_mul(&transform).pre_mul(&post_transform))
|
||||
Some(
|
||||
pre_transform
|
||||
.pre_transform(&transform)
|
||||
.pre_transform(&post_transform),
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns the 4D matrix representing this fragment's perspective.
|
||||
|
@ -3210,8 +3221,8 @@ impl Fragment {
|
|||
|
||||
Some(
|
||||
pre_transform
|
||||
.pre_mul(&perspective_matrix)
|
||||
.pre_mul(&post_transform),
|
||||
.pre_transform(&perspective_matrix)
|
||||
.pre_transform(&post_transform),
|
||||
)
|
||||
},
|
||||
Perspective::None => None,
|
||||
|
@ -3378,8 +3389,8 @@ impl Overflow {
|
|||
}
|
||||
|
||||
pub fn translate(&mut self, by: &Vector2D<Au>) {
|
||||
self.scroll = self.scroll.translate(by);
|
||||
self.paint = self.paint.translate(by);
|
||||
self.scroll = self.scroll.translate(*by);
|
||||
self.paint = self.paint.translate(*by);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,23 @@ use style::properties::ComputedValues;
|
|||
use style::selector_parser::RestyleDamage;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use style::values::specified::list::{QuotePair, Quotes};
|
||||
|
||||
lazy_static! {
|
||||
static ref INITIAL_QUOTES: style::ArcSlice<QuotePair> = style::ArcSlice::from_iter_leaked(
|
||||
vec![
|
||||
QuotePair {
|
||||
opening: "\u{201c}".to_owned().into(),
|
||||
closing: "\u{201d}".to_owned().into(),
|
||||
},
|
||||
QuotePair {
|
||||
opening: "\u{2018}".to_owned().into(),
|
||||
closing: "\u{2019}".to_owned().into(),
|
||||
},
|
||||
]
|
||||
.into_iter()
|
||||
);
|
||||
}
|
||||
|
||||
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
|
||||
static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
|
@ -326,14 +343,17 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
|
|||
}
|
||||
|
||||
fn quote(&self, style: &ComputedValues, close: bool) -> String {
|
||||
let quotes = &style.get_list().quotes;
|
||||
if quotes.0.is_empty() {
|
||||
let quotes = match style.get_list().quotes {
|
||||
Quotes::Auto => &*INITIAL_QUOTES,
|
||||
Quotes::QuoteList(ref list) => &list.0,
|
||||
};
|
||||
if quotes.is_empty() {
|
||||
return String::new();
|
||||
}
|
||||
let pair = if self.traversal.quote as usize >= quotes.0.len() {
|
||||
quotes.0.last().unwrap()
|
||||
let pair = if self.traversal.quote as usize >= quotes.len() {
|
||||
quotes.last().unwrap()
|
||||
} else {
|
||||
"es.0[self.traversal.quote as usize]
|
||||
"es[self.traversal.quote as usize]
|
||||
};
|
||||
if close {
|
||||
pair.closing.to_string()
|
||||
|
|
|
@ -21,7 +21,7 @@ use crate::text;
|
|||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::ServoArc;
|
||||
use app_units::{Au, MIN_AU};
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use range::{Range, RangeIndex};
|
||||
|
@ -1977,7 +1977,7 @@ impl Flow for InlineFlow {
|
|||
relative_containing_block_mode,
|
||||
CoordinateSystem::Own,
|
||||
)
|
||||
.translate(&stacking_context_position.to_vector()),
|
||||
.translate(stacking_context_position.to_vector()),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ extern crate bitflags;
|
|||
#[macro_use]
|
||||
extern crate html5ever;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate range;
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::fragment::{
|
|||
use crate::generated_content;
|
||||
use crate::inline::InlineFlow;
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use style::computed_values::list_style_type::T as ListStyleType;
|
||||
use style::computed_values::position::T as Position;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
|
@ -280,7 +280,7 @@ impl Flow for ListItemFlow {
|
|||
.relative_containing_block_mode,
|
||||
CoordinateSystem::Own,
|
||||
)
|
||||
.translate(&stacking_context_position.to_vector()),
|
||||
.translate(stacking_context_position.to_vector()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::flow::{Flow, FlowClass, FragmentationContext, GetBaseFlow, OpaqueFlow
|
|||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::ServoArc;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Vector2D};
|
||||
use euclid::default::{Point2D, Vector2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::opaque_node::OpaqueNodeMethods;
|
|||
use crate::sequential;
|
||||
use crate::wrapper::LayoutNodeLayoutData;
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_layout_interface::rpc::TextIndexResponse;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::incremental::RelayoutMode;
|
|||
use crate::traversal::{AssignBSizes, AssignISizes, BubbleISizes, BuildDisplayList};
|
||||
use crate::traversal::{InorderFlowTraversal, PostorderFlowTraversal, PreorderFlowTraversal};
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use servo_config::opts;
|
||||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use webrender_api::units::LayoutPoint;
|
||||
|
@ -125,7 +125,7 @@ pub fn iterate_through_flow_tree_fragment_border_boxes(
|
|||
.as_block()
|
||||
.stacking_relative_border_box(CoordinateSystem::Own);
|
||||
if let Some(matrix) = kid.as_block().fragment.transform_matrix(&relative_position) {
|
||||
let transform_matrix = matrix.transform_point2d(&LayoutPoint::zero()).unwrap();
|
||||
let transform_matrix = matrix.transform_point2d(LayoutPoint::zero()).unwrap();
|
||||
stacking_context_position = stacking_context_position +
|
||||
Vector2D::new(
|
||||
Au::from_f32_px(transform_matrix.x),
|
||||
|
|
|
@ -24,7 +24,7 @@ use crate::table_row::{self, CellIntrinsicInlineSize, CollapsedBorder, Collapsed
|
|||
use crate::table_row::{TableRowFlow, TableRowSizeData};
|
||||
use crate::table_wrapper::TableLayout;
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::{cmp, fmt};
|
||||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::display_list::{
|
|||
use crate::flow::{Flow, FlowClass, OpaqueFlow};
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::layout_debug;
|
|||
use crate::table::InternalTable;
|
||||
use crate::table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use euclid::default::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
||||
use std::fmt;
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::flow::{BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, OpaqueFlow};
|
|||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use std::fmt;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::layout_debug;
|
|||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::cmp::max;
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
|||
use crate::layout_debug;
|
||||
use crate::table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use serde::{Serialize, Serializer};
|
||||
use std::fmt;
|
||||
|
|
|
@ -24,7 +24,7 @@ use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
|||
use crate::model::MaybeAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use std::cmp::{max, min};
|
||||
use std::fmt;
|
||||
|
|
|
@ -15,7 +15,7 @@ app_units = "0.7"
|
|||
atomic_refcell = "0.1"
|
||||
crossbeam-channel = "0.3"
|
||||
embedder_traits = {path = "../embedder_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
fxhash = "0.2"
|
||||
gfx = {path = "../gfx"}
|
||||
|
|
|
@ -28,7 +28,7 @@ use crate::dom_wrapper::{ServoLayoutDocument, ServoLayoutElement, ServoLayoutNod
|
|||
use app_units::Au;
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use euclid::{Point2D, Rect, Size2D, TypedScale, TypedSize2D};
|
||||
use euclid::{default::Size2D as UntypedSize2D, Point2D, Rect, Scale, Size2D};
|
||||
use fnv::FnvHashMap;
|
||||
use fxhash::{FxHashMap, FxHashSet};
|
||||
use gfx::font;
|
||||
|
@ -216,7 +216,7 @@ pub struct LayoutThread {
|
|||
|
||||
/// The size of the viewport. This may be different from the size of the screen due to viewport
|
||||
/// constraints.
|
||||
viewport_size: Size2D<Au>,
|
||||
viewport_size: UntypedSize2D<Au>,
|
||||
|
||||
/// A mutex to allow for fast, read-only RPC of layout's internal data
|
||||
/// structures, while still letting the LayoutThread modify them.
|
||||
|
@ -246,7 +246,7 @@ pub struct LayoutThread {
|
|||
layout_query_waiting_time: Histogram,
|
||||
|
||||
/// The sizes of all iframes encountered during the last layout operation.
|
||||
last_iframe_sizes: RefCell<HashMap<BrowsingContextId, TypedSize2D<f32, CSSPixel>>>,
|
||||
last_iframe_sizes: RefCell<HashMap<BrowsingContextId, Size2D<f32, CSSPixel>>>,
|
||||
|
||||
/// Flag that indicates if LayoutThread is busy handling a request.
|
||||
busy: Arc<AtomicBool>,
|
||||
|
@ -255,7 +255,7 @@ pub struct LayoutThread {
|
|||
load_webfonts_synchronously: bool,
|
||||
|
||||
/// The initial request size of the window
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
|
||||
/// The ratio of device pixels per px at the default scale.
|
||||
/// If unspecified, will use the platform default setting.
|
||||
|
@ -312,7 +312,7 @@ impl LayoutThreadFactory for LayoutThread {
|
|||
paint_time_metrics: PaintTimeMetrics,
|
||||
busy: Arc<AtomicBool>,
|
||||
load_webfonts_synchronously: bool,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
dump_display_list: bool,
|
||||
dump_display_list_json: bool,
|
||||
|
@ -535,7 +535,7 @@ impl LayoutThread {
|
|||
paint_time_metrics: PaintTimeMetrics,
|
||||
busy: Arc<AtomicBool>,
|
||||
load_webfonts_synchronously: bool,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
dump_display_list: bool,
|
||||
dump_display_list_json: bool,
|
||||
|
@ -550,8 +550,8 @@ impl LayoutThread {
|
|||
// but it will be set correctly when the initial reflow takes place.
|
||||
let device = Device::new(
|
||||
MediaType::screen(),
|
||||
initial_window_size.to_f32() * TypedScale::new(1.0),
|
||||
TypedScale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
initial_window_size.to_f32() * Scale::new(1.0),
|
||||
Scale::new(device_pixels_per_px.unwrap_or(1.0)),
|
||||
);
|
||||
|
||||
// Create the channel on which new animations can be sent.
|
||||
|
@ -833,7 +833,7 @@ impl LayoutThread {
|
|||
let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y);
|
||||
let mut txn = webrender_api::Transaction::new();
|
||||
txn.scroll_node_with_id(
|
||||
webrender_api::units::LayoutPoint::from_untyped(&point),
|
||||
webrender_api::units::LayoutPoint::from_untyped(point),
|
||||
state.scroll_id,
|
||||
webrender_api::ScrollClamping::ToContentBounds,
|
||||
);
|
||||
|
@ -1249,7 +1249,7 @@ impl LayoutThread {
|
|||
epoch.next();
|
||||
self.epoch.set(epoch);
|
||||
|
||||
let viewport_size = webrender_api::units::LayoutSize::from_untyped(&viewport_size);
|
||||
let viewport_size = webrender_api::units::LayoutSize::from_untyped(viewport_size);
|
||||
|
||||
// Observe notifications about rendered frames if needed right before
|
||||
// sending the display list to WebRender in order to set time related
|
||||
|
@ -1671,8 +1671,7 @@ impl LayoutThread {
|
|||
// particular pipeline, so we need to tell WebRender about that.
|
||||
flags.insert(webrender_api::HitTestFlags::POINT_RELATIVE_TO_PIPELINE_VIEWPORT);
|
||||
|
||||
let client_point =
|
||||
webrender_api::units::WorldPoint::from_untyped(&client_point);
|
||||
let client_point = webrender_api::units::WorldPoint::from_untyped(client_point);
|
||||
let results = self.webrender_api.hit_test(
|
||||
self.webrender_document,
|
||||
Some(self.id.to_webrender()),
|
||||
|
@ -2134,8 +2133,8 @@ impl RegisteredSpeculativePainter for RegisteredPainterImpl {
|
|||
impl Painter for RegisteredPainterImpl {
|
||||
fn draw_a_paint_image(
|
||||
&self,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: Vec<(Atom, String)>,
|
||||
arguments: Vec<String>,
|
||||
) -> Result<DrawAPaintImageResult, PaintWorkletError> {
|
||||
|
|
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
crossbeam-channel = "0.3"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
gfx = {path = "../gfx"}
|
||||
ipc-channel = "0.11"
|
||||
layout = {path = "../layout_2020", package = "layout_2020"}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use metrics::PaintTimeMetrics;
|
||||
|
@ -44,7 +44,7 @@ impl layout_traits::LayoutThreadFactory for LayoutThread {
|
|||
paint_time_metrics: PaintTimeMetrics,
|
||||
busy: Arc<AtomicBool>,
|
||||
load_webfonts_synchronously: bool,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
dump_display_list: bool,
|
||||
dump_display_list_json: bool,
|
||||
|
|
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
crossbeam-channel = "0.3"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
gfx = {path = "../gfx"}
|
||||
ipc-channel = "0.11"
|
||||
metrics = {path = "../metrics"}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// that these modules won't have to depend on layout.
|
||||
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use metrics::PaintTimeMetrics;
|
||||
|
@ -49,7 +49,7 @@ pub trait LayoutThreadFactory {
|
|||
paint_time_metrics: PaintTimeMetrics,
|
||||
busy: Arc<AtomicBool>,
|
||||
load_webfonts_synchronously: bool,
|
||||
initial_window_size: TypedSize2D<u32, DeviceIndependentPixel>,
|
||||
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
|
||||
device_pixels_per_px: Option<f32>,
|
||||
dump_display_list: bool,
|
||||
dump_display_list_json: bool,
|
||||
|
|
|
@ -11,7 +11,7 @@ name = "media"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
ipc-channel = "0.11"
|
||||
lazy_static = "1"
|
||||
|
|
|
@ -17,7 +17,7 @@ mod media_thread;
|
|||
pub use crate::media_channel::glplayer_channel;
|
||||
use crate::media_channel::{GLPlayerChan, GLPlayerPipeline, GLPlayerReceiver, GLPlayerSender};
|
||||
use crate::media_thread::GLPlayerThread;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use servo_media::player::context::{GlApi, GlContext, NativeDisplay, PlayerGLContext};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use webrender_traits::{WebrenderExternalImageApi, WebrenderExternalImageRegistry};
|
||||
|
|
|
@ -11,7 +11,7 @@ name = "pixels"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
malloc_size_of = {path = "../malloc_size_of"}
|
||||
malloc_size_of_derive = "0.1"
|
||||
serde = {version = "1", features = ["derive"]}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ domobject_derive = {path = "../domobject_derive"}
|
|||
embedder_traits = {path = "../embedder_traits"}
|
||||
encoding_rs = "0.8"
|
||||
enum-iterator = "0.2.0"
|
||||
euclid = "0.19.7"
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
gleam = "0.6"
|
||||
headers = "0.2"
|
||||
|
|
|
@ -55,11 +55,8 @@ use crossbeam_channel::{Receiver, Sender};
|
|||
use cssparser::RGBA;
|
||||
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
|
||||
use encoding_rs::{Decoder, Encoding};
|
||||
use euclid::default::{Point2D, Rect, Rotation3D, Transform2D, Transform3D};
|
||||
use euclid::Length as EuclidLength;
|
||||
use euclid::{
|
||||
Point2D, Rect, RigidTransform3D, Rotation3D, Transform2D, Transform3D, TypedRect,
|
||||
TypedRigidTransform3D, TypedScale, TypedSize2D, Vector2D,
|
||||
};
|
||||
use html5ever::buffer_queue::BufferQueue;
|
||||
use html5ever::{LocalName, Namespace, Prefix, QualName};
|
||||
use http::header::HeaderMap;
|
||||
|
@ -510,8 +507,8 @@ unsafe_no_jsmanaged_fields!(ResourceFetchTiming);
|
|||
unsafe_no_jsmanaged_fields!(Timespec);
|
||||
unsafe_no_jsmanaged_fields!(HTMLMediaElementFetchContext);
|
||||
unsafe_no_jsmanaged_fields!(Rotation3D<f64>, Transform2D<f32>, Transform3D<f64>);
|
||||
unsafe_no_jsmanaged_fields!(Point2D<f32>, Vector2D<f32>, Rect<Au>);
|
||||
unsafe_no_jsmanaged_fields!(Rect<f32>, RigidTransform3D<f64>);
|
||||
unsafe_no_jsmanaged_fields!(Point2D<f32>, Rect<Au>);
|
||||
unsafe_no_jsmanaged_fields!(Rect<f32>);
|
||||
unsafe_no_jsmanaged_fields!(CascadeData);
|
||||
unsafe_no_jsmanaged_fields!(WindowGLContext);
|
||||
|
||||
|
@ -605,14 +602,28 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<T, U> JSTraceable for TypedScale<f32, T, U> {
|
||||
unsafe impl<U> JSTraceable for euclid::Vector2D<f32, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T, U> JSTraceable for TypedRigidTransform3D<f32, T, U> {
|
||||
unsafe impl<T, U> JSTraceable for euclid::Scale<f32, T, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T, U> JSTraceable for euclid::RigidTransform3D<f32, T, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T, U> JSTraceable for euclid::RigidTransform3D<f64, T, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
|
@ -626,28 +637,28 @@ unsafe impl<T> JSTraceable for EuclidLength<u64, T> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<U> JSTraceable for TypedSize2D<i32, U> {
|
||||
unsafe impl<U> JSTraceable for euclid::Size2D<i32, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<U> JSTraceable for TypedSize2D<f32, U> {
|
||||
unsafe impl<U> JSTraceable for euclid::Size2D<f32, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<U> JSTraceable for TypedSize2D<u32, U> {
|
||||
unsafe impl<U> JSTraceable for euclid::Size2D<u32, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<U> JSTraceable for TypedRect<i32, U> {
|
||||
unsafe impl<U> JSTraceable for euclid::Rect<i32, U> {
|
||||
#[inline]
|
||||
unsafe fn trace(&self, _trc: *mut JSTracer) {
|
||||
// Do nothing
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::dom::canvasgradient::ToFillOrStrokeStyle;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use canvas_traits::canvas::{FillOrStrokeStyle, RepetitionStyle, SurfaceStyle};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#canvaspattern
|
||||
#[dom_struct]
|
||||
|
|
|
@ -32,7 +32,10 @@ use canvas_traits::canvas::{RadialGradientStyle, RepetitionStyle};
|
|||
use cssparser::Color as CSSColor;
|
||||
use cssparser::{Parser, ParserInput, RGBA};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{vec2, Point2D, Rect, Size2D, Transform2D};
|
||||
use euclid::{
|
||||
default::{Point2D, Rect, Size2D, Transform2D},
|
||||
vec2,
|
||||
};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use net_traits::image_cache::CanRequestImages;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
|
@ -1223,7 +1226,7 @@ impl CanvasState {
|
|||
|
||||
let (sin, cos) = (angle.sin(), angle.cos());
|
||||
let transform = self.state.borrow().transform;
|
||||
self.state.borrow_mut().transform = transform.pre_mul(&Transform2D::row_major(
|
||||
self.state.borrow_mut().transform = transform.pre_transform(&Transform2D::row_major(
|
||||
cos as f32,
|
||||
sin as f32,
|
||||
-sin as f32,
|
||||
|
@ -1258,7 +1261,7 @@ impl CanvasState {
|
|||
}
|
||||
|
||||
let transform = self.state.borrow().transform;
|
||||
self.state.borrow_mut().transform = transform.pre_mul(&Transform2D::row_major(
|
||||
self.state.borrow_mut().transform = transform.pre_transform(&Transform2D::row_major(
|
||||
a as f32, b as f32, c as f32, d as f32, e as f32, f as f32,
|
||||
));
|
||||
self.update_transform()
|
||||
|
|
|
@ -113,7 +113,7 @@ use devtools_traits::ScriptToDevtoolsControlMsg;
|
|||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use encoding_rs::{Encoding, UTF_8};
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use html5ever::{LocalName, Namespace, QualName};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::htmlmetaelement::HTMLMetaElement;
|
|||
use crate::dom::node::{self, Node, VecPreOrderInsertionHelper};
|
||||
use crate::dom::window::Window;
|
||||
use crate::stylesheet_set::StylesheetSetRef;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use js::jsapi::JS_GetRuntime;
|
||||
use script_layout_interface::message::{NodesFromPointQueryType, QueryMsg};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::dommatrixreadonly::{
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Transform3D;
|
||||
use euclid::default::Transform3D;
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
use js::typedarray::{Float32Array, Float64Array};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::window::Window;
|
||||
use cssparser::{Parser, ParserInput};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Angle, Transform3D};
|
||||
use euclid::{default::Transform3D, Angle};
|
||||
use js::jsapi::{JSContext, JSObject};
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
use js::typedarray::CreateWith;
|
||||
|
@ -180,7 +180,7 @@ impl DOMMatrixReadOnly {
|
|||
dommatrixinit_to_matrix(&other).map(|(is2D, other_matrix)| {
|
||||
// Step 2.
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = other_matrix.post_mul(&matrix);
|
||||
*matrix = other_matrix.post_transform(&matrix);
|
||||
// Step 3.
|
||||
if !is2D {
|
||||
self.is2D.set(false);
|
||||
|
@ -195,7 +195,7 @@ impl DOMMatrixReadOnly {
|
|||
dommatrixinit_to_matrix(&other).map(|(is2D, other_matrix)| {
|
||||
// Step 2.
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = other_matrix.pre_mul(&matrix);
|
||||
*matrix = other_matrix.pre_transform(&matrix);
|
||||
// Step 3.
|
||||
if !is2D {
|
||||
self.is2D.set(false);
|
||||
|
@ -209,7 +209,7 @@ impl DOMMatrixReadOnly {
|
|||
// Step 1.
|
||||
let translation = Transform3D::create_translation(tx, ty, tz);
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = translation.post_mul(&matrix);
|
||||
*matrix = translation.post_transform(&matrix);
|
||||
// Step 2.
|
||||
if tz != 0.0 {
|
||||
self.is2D.set(false);
|
||||
|
@ -235,7 +235,7 @@ impl DOMMatrixReadOnly {
|
|||
{
|
||||
let scale3D = Transform3D::create_scale(scaleX, scaleY, scaleZ);
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = scale3D.post_mul(&matrix);
|
||||
*matrix = scale3D.post_transform(&matrix);
|
||||
}
|
||||
// Step 4.
|
||||
originX = -originX;
|
||||
|
@ -258,7 +258,7 @@ impl DOMMatrixReadOnly {
|
|||
{
|
||||
let scale3D = Transform3D::create_scale(scale, scale, scale);
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = scale3D.post_mul(&matrix);
|
||||
*matrix = scale3D.post_transform(&matrix);
|
||||
}
|
||||
// Step 3.
|
||||
self.translate_self(-originX, -originY, -originZ);
|
||||
|
@ -291,7 +291,7 @@ impl DOMMatrixReadOnly {
|
|||
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);
|
||||
*matrix = rotation.post_transform(&matrix);
|
||||
}
|
||||
if rotY != 0.0 {
|
||||
// Step 6.
|
||||
|
@ -299,7 +299,7 @@ impl DOMMatrixReadOnly {
|
|||
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);
|
||||
*matrix = rotation.post_transform(&matrix);
|
||||
}
|
||||
if rotX != 0.0 {
|
||||
// Step 7.
|
||||
|
@ -307,7 +307,7 @@ impl DOMMatrixReadOnly {
|
|||
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);
|
||||
*matrix = rotation.post_transform(&matrix);
|
||||
}
|
||||
// Step 8 in DOMMatrix.RotateSelf
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ impl DOMMatrixReadOnly {
|
|||
// Beware: pass negated value until https://github.com/servo/euclid/issues/354
|
||||
let rotation = Transform3D::create_rotation(0.0, 0.0, -1.0, rotZ);
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = rotation.post_mul(&matrix);
|
||||
*matrix = rotation.post_transform(&matrix);
|
||||
}
|
||||
// Step 2 in DOMMatrix.RotateFromVectorSelf
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ impl DOMMatrixReadOnly {
|
|||
Angle::radians(angle.to_radians()),
|
||||
);
|
||||
let mut matrix = self.matrix.borrow_mut();
|
||||
*matrix = rotation.post_mul(&matrix);
|
||||
*matrix = rotation.post_transform(&matrix);
|
||||
// Step 2.
|
||||
if x != 0.0 || y != 0.0 {
|
||||
self.is2D.set(false);
|
||||
|
@ -351,7 +351,7 @@ impl DOMMatrixReadOnly {
|
|||
// Step 1.
|
||||
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);
|
||||
*matrix = skew.post_transform(&matrix);
|
||||
// Step 2 in DOMMatrix.SkewXSelf
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ impl DOMMatrixReadOnly {
|
|||
// Step 1.
|
||||
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);
|
||||
*matrix = skew.post_transform(&matrix);
|
||||
// Step 2 in DOMMatrix.SkewYSelf
|
||||
}
|
||||
|
||||
|
@ -629,7 +629,7 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
|
|||
let flip = Transform3D::row_major(
|
||||
-1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
|
||||
);
|
||||
let matrix = flip.post_mul(&self.matrix.borrow());
|
||||
let matrix = flip.post_transform(&self.matrix.borrow());
|
||||
DOMMatrix::new(&self.global(), is2D, matrix)
|
||||
}
|
||||
|
||||
|
@ -639,7 +639,7 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
|
|||
let flip = Transform3D::row_major(
|
||||
1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
|
||||
);
|
||||
let matrix = flip.post_mul(&self.matrix.borrow());
|
||||
let matrix = flip.post_transform(&self.matrix.borrow());
|
||||
DOMMatrix::new(&self.global(), is2D, matrix)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{TypedPoint2D, TypedRect, TypedSize2D};
|
||||
use euclid::{TypedRigidTransform3D, TypedRotation3D, TypedTransform3D, TypedVector3D};
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::{RigidTransform3D, Rotation3D, Transform3D, Vector3D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use webxr_api::{MockDeviceMsg, View, Views};
|
||||
|
||||
|
@ -67,23 +67,23 @@ pub fn get_views(views: &[FakeXRViewInit]) -> Fallible<Views> {
|
|||
let mut proj_r = [0.; 16];
|
||||
let v: Vec<_> = left.projectionMatrix.iter().map(|x| **x).collect();
|
||||
proj_l.copy_from_slice(&v);
|
||||
let proj_l = TypedTransform3D::from_array(proj_l);
|
||||
let proj_l = Transform3D::from_array(proj_l);
|
||||
let v: Vec<_> = right.projectionMatrix.iter().map(|x| **x).collect();
|
||||
proj_r.copy_from_slice(&v);
|
||||
let proj_r = TypedTransform3D::from_array(proj_r);
|
||||
let proj_r = Transform3D::from_array(proj_r);
|
||||
|
||||
// spec defines offsets as origins, but mock API expects the inverse transform
|
||||
let offset_l = get_origin(&left.viewOffset)?.inverse();
|
||||
let offset_r = get_origin(&right.viewOffset)?.inverse();
|
||||
|
||||
let size_l = TypedSize2D::new(views[0].resolution.width, views[0].resolution.height);
|
||||
let size_r = TypedSize2D::new(views[1].resolution.width, views[1].resolution.height);
|
||||
let size_l = Size2D::new(views[0].resolution.width, views[0].resolution.height);
|
||||
let size_r = Size2D::new(views[1].resolution.width, views[1].resolution.height);
|
||||
|
||||
let origin_l = TypedPoint2D::new(0, 0);
|
||||
let origin_r = TypedPoint2D::new(size_l.width, 0);
|
||||
let origin_l = Point2D::new(0, 0);
|
||||
let origin_r = Point2D::new(size_l.width, 0);
|
||||
|
||||
let viewport_l = TypedRect::new(origin_l, size_l);
|
||||
let viewport_r = TypedRect::new(origin_r, size_r);
|
||||
let viewport_l = Rect::new(origin_l, size_l);
|
||||
let viewport_r = Rect::new(origin_r, size_r);
|
||||
|
||||
let left = View {
|
||||
projection: proj_l,
|
||||
|
@ -100,23 +100,23 @@ pub fn get_views(views: &[FakeXRViewInit]) -> Fallible<Views> {
|
|||
|
||||
pub fn get_origin<T, U>(
|
||||
origin: &FakeXRRigidTransformInit,
|
||||
) -> Fallible<TypedRigidTransform3D<f32, T, U>> {
|
||||
) -> Fallible<RigidTransform3D<f32, T, U>> {
|
||||
if origin.position.len() != 3 || origin.orientation.len() != 4 {
|
||||
return Err(Error::Type("Incorrectly sized array".into()));
|
||||
}
|
||||
let p = TypedVector3D::new(
|
||||
let p = Vector3D::new(
|
||||
*origin.position[0],
|
||||
*origin.position[1],
|
||||
*origin.position[2],
|
||||
);
|
||||
let o = TypedRotation3D::unit_quaternion(
|
||||
let o = Rotation3D::unit_quaternion(
|
||||
*origin.orientation[0],
|
||||
*origin.orientation[1],
|
||||
*origin.orientation[2],
|
||||
*origin.orientation[3],
|
||||
);
|
||||
|
||||
Ok(TypedRigidTransform3D::new(o, p))
|
||||
Ok(RigidTransform3D::new(o, p))
|
||||
}
|
||||
|
||||
impl FakeXRDeviceMethods for FakeXRDevice {
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::htmlelement::HTMLElement;
|
|||
use crate::dom::node::Node;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use std::default::Default;
|
||||
use std::f32;
|
||||
|
|
|
@ -32,7 +32,7 @@ use base64;
|
|||
use canvas_traits::canvas::{CanvasId, CanvasMsg, FromScriptMsg};
|
||||
use canvas_traits::webgl::{GLContextAttributes, WebGLVersion};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Rect, Size2D};
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use image::png::PNGEncoder;
|
||||
use image::ColorType;
|
||||
|
|
|
@ -28,7 +28,7 @@ use crate::dom::windowproxy::WindowProxy;
|
|||
use crate::script_thread::ScriptThread;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
|
@ -202,10 +202,7 @@ impl HTMLIFrameElement {
|
|||
window_size: WindowSizeData {
|
||||
initial_viewport: {
|
||||
let rect = self.upcast::<Node>().bounding_content_box_or_zero();
|
||||
TypedSize2D::new(
|
||||
rect.size.width.to_f32_px(),
|
||||
rect.size.height.to_f32_px(),
|
||||
)
|
||||
Size2D::new(rect.size.width.to_f32_px(), rect.size.height.to_f32_px())
|
||||
},
|
||||
device_pixel_ratio: window.device_pixel_ratio(),
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ use crate::script_thread::ScriptThread;
|
|||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::resources::{self, Resource as EmbedderResource};
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use headers::{ContentLength, ContentRange, HeaderMapExt};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use http::header::{self, HeaderMap, HeaderValue};
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Rect, Size2D};
|
||||
use euclid::default::{Rect, Size2D};
|
||||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use js::jsapi::{Heap, JSContext, JSObject};
|
||||
use js::rust::Runtime;
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::dom::eventtarget::EventTarget;
|
|||
use crate::dom::uievent::UIEvent;
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Point2D;
|
||||
use euclid::default::Point2D;
|
||||
use servo_config::pref;
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
|
|
|
@ -64,7 +64,7 @@ use crate::script_thread::ScriptThread;
|
|||
use app_units::Au;
|
||||
use devtools_traits::NodeInfo;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Point2D, Rect, Size2D, Vector2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use html5ever::{Namespace, Prefix, QualName};
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use libc::{self, c_void, uintptr_t};
|
||||
|
@ -778,7 +778,7 @@ impl Node {
|
|||
pub fn scroll_offset(&self) -> Vector2D<f32> {
|
||||
let document = self.owner_doc();
|
||||
let window = document.window();
|
||||
window.scroll_offset_query(self)
|
||||
window.scroll_offset_query(self).to_untyped()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
|
||||
use crate::dom::offscreencanvasrenderingcontext2d::OffscreenCanvasRenderingContext2D;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use js::jsapi::JSContext;
|
||||
use js::rust::HandleValue;
|
||||
use ref_filter_map;
|
||||
|
|
|
@ -24,7 +24,7 @@ use crate::dom::htmlcanvaselement::HTMLCanvasElement;
|
|||
use crate::dom::imagedata::ImageData;
|
||||
use crate::dom::offscreencanvas::OffscreenCanvas;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct OffscreenCanvasRenderingContext2D {
|
||||
|
|
|
@ -25,9 +25,7 @@ use canvas_traits::canvas::CanvasImageData;
|
|||
use canvas_traits::canvas::CanvasMsg;
|
||||
use canvas_traits::canvas::FromLayoutMsg;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Size2D;
|
||||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::{Scale, Size2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
|
@ -37,7 +35,7 @@ use style_traits::DevicePixel;
|
|||
#[dom_struct]
|
||||
pub struct PaintRenderingContext2D {
|
||||
context: CanvasRenderingContext2D,
|
||||
device_pixel_ratio: Cell<TypedScale<f32, CSSPixel, DevicePixel>>,
|
||||
device_pixel_ratio: Cell<Scale<f32, CSSPixel, DevicePixel>>,
|
||||
}
|
||||
|
||||
impl PaintRenderingContext2D {
|
||||
|
@ -45,7 +43,7 @@ impl PaintRenderingContext2D {
|
|||
let size = Size2D::zero();
|
||||
PaintRenderingContext2D {
|
||||
context: CanvasRenderingContext2D::new_inherited(global.upcast(), None, size),
|
||||
device_pixel_ratio: Cell::new(TypedScale::new(1.0)),
|
||||
device_pixel_ratio: Cell::new(Scale::new(1.0)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,8 +69,8 @@ impl PaintRenderingContext2D {
|
|||
|
||||
pub fn set_bitmap_dimensions(
|
||||
&self,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
) {
|
||||
let size = size * device_pixel_ratio;
|
||||
self.device_pixel_ratio.set(device_pixel_ratio);
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::dom::bindings::reflector::Reflector;
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use style_traits::CSSPixel;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -21,7 +21,7 @@ pub struct PaintSize {
|
|||
}
|
||||
|
||||
impl PaintSize {
|
||||
fn new_inherited(size: TypedSize2D<f32, CSSPixel>) -> PaintSize {
|
||||
fn new_inherited(size: Size2D<f32, CSSPixel>) -> PaintSize {
|
||||
PaintSize {
|
||||
reflector: Reflector::new(),
|
||||
width: Finite::wrap(size.width as f64),
|
||||
|
@ -31,7 +31,7 @@ impl PaintSize {
|
|||
|
||||
pub fn new(
|
||||
global: &PaintWorkletGlobalScope,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
) -> DomRoot<PaintSize> {
|
||||
reflect_dom_object(
|
||||
Box::new(PaintSize::new_inherited(size)),
|
||||
|
|
|
@ -25,8 +25,8 @@ use crate::dom::workletglobalscope::WorkletGlobalScopeInit;
|
|||
use crate::dom::workletglobalscope::WorkletTask;
|
||||
use crossbeam_channel::{unbounded, Sender};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedScale;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Scale;
|
||||
use euclid::Size2D;
|
||||
use js::jsapi::HandleValueArray;
|
||||
use js::jsapi::Heap;
|
||||
use js::jsapi::IsCallable;
|
||||
|
@ -81,9 +81,9 @@ pub struct PaintWorkletGlobalScope {
|
|||
/// The most recent name the worklet was called with
|
||||
cached_name: DomRefCell<Atom>,
|
||||
/// The most recent size the worklet was drawn at
|
||||
cached_size: Cell<TypedSize2D<f32, CSSPixel>>,
|
||||
cached_size: Cell<Size2D<f32, CSSPixel>>,
|
||||
/// The most recent device pixel ratio the worklet was drawn at
|
||||
cached_device_pixel_ratio: Cell<TypedScale<f32, CSSPixel, DevicePixel>>,
|
||||
cached_device_pixel_ratio: Cell<Scale<f32, CSSPixel, DevicePixel>>,
|
||||
/// The most recent properties the worklet was drawn at
|
||||
cached_properties: DomRefCell<Vec<(Atom, String)>>,
|
||||
/// The most recent arguments the worklet was drawn at
|
||||
|
@ -116,8 +116,8 @@ impl PaintWorkletGlobalScope {
|
|||
paint_definitions: Default::default(),
|
||||
paint_class_instances: Default::default(),
|
||||
cached_name: DomRefCell::new(Atom::from("")),
|
||||
cached_size: Cell::new(TypedSize2D::zero()),
|
||||
cached_device_pixel_ratio: Cell::new(TypedScale::new(1.0)),
|
||||
cached_size: Cell::new(Size2D::zero()),
|
||||
cached_device_pixel_ratio: Cell::new(Scale::new(1.0)),
|
||||
cached_properties: Default::default(),
|
||||
cached_arguments: Default::default(),
|
||||
cached_result: DomRefCell::new(DrawAPaintImageResult {
|
||||
|
@ -211,13 +211,13 @@ impl PaintWorkletGlobalScope {
|
|||
fn draw_a_paint_image(
|
||||
&self,
|
||||
name: &Atom,
|
||||
size_in_px: TypedSize2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size_in_px: Size2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: &StylePropertyMapReadOnly,
|
||||
arguments: &[String],
|
||||
) -> DrawAPaintImageResult {
|
||||
let size_in_dpx = size_in_px * device_pixel_ratio;
|
||||
let size_in_dpx = TypedSize2D::new(
|
||||
let size_in_dpx = Size2D::new(
|
||||
size_in_dpx.width.abs() as u32,
|
||||
size_in_dpx.height.abs() as u32,
|
||||
);
|
||||
|
@ -240,9 +240,9 @@ impl PaintWorkletGlobalScope {
|
|||
fn invoke_a_paint_callback(
|
||||
&self,
|
||||
name: &Atom,
|
||||
size_in_px: TypedSize2D<f32, CSSPixel>,
|
||||
size_in_dpx: TypedSize2D<u32, DevicePixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size_in_px: Size2D<f32, CSSPixel>,
|
||||
size_in_dpx: Size2D<u32, DevicePixel>,
|
||||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: &StylePropertyMapReadOnly,
|
||||
arguments: &[String],
|
||||
) -> DrawAPaintImageResult {
|
||||
|
@ -383,7 +383,7 @@ impl PaintWorkletGlobalScope {
|
|||
// https://drafts.csswg.org/css-images-4/#invalid-image
|
||||
fn invalid_image(
|
||||
&self,
|
||||
size: TypedSize2D<u32, DevicePixel>,
|
||||
size: Size2D<u32, DevicePixel>,
|
||||
missing_image_urls: Vec<ServoUrl>,
|
||||
) -> DrawAPaintImageResult {
|
||||
debug!("Returning an invalid image.");
|
||||
|
@ -420,8 +420,8 @@ impl PaintWorkletGlobalScope {
|
|||
impl Painter for WorkletPainter {
|
||||
fn draw_a_paint_image(
|
||||
&self,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: Vec<(Atom, String)>,
|
||||
arguments: Vec<String>,
|
||||
) -> Result<DrawAPaintImageResult, PaintWorkletError> {
|
||||
|
@ -458,8 +458,8 @@ impl PaintWorkletGlobalScope {
|
|||
pub enum PaintWorkletTask {
|
||||
DrawAPaintImage(
|
||||
Atom,
|
||||
TypedSize2D<f32, CSSPixel>,
|
||||
TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
Size2D<f32, CSSPixel>,
|
||||
Scale<f32, CSSPixel, DevicePixel>,
|
||||
Vec<(Atom, String)>,
|
||||
Vec<String>,
|
||||
Sender<DrawAPaintImageResult>,
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::dom::bindings::root::{Dom, DomRoot};
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use profile_traits::ipc;
|
||||
use script_traits::ScriptMsg;
|
||||
use style_traits::CSSPixel;
|
||||
|
@ -40,7 +40,7 @@ impl Screen {
|
|||
)
|
||||
}
|
||||
|
||||
fn screen_size(&self) -> TypedSize2D<u32, CSSPixel> {
|
||||
fn screen_size(&self) -> Size2D<u32, CSSPixel> {
|
||||
let (send, recv) =
|
||||
ipc::channel::<DeviceIntSize>(self.global().time_profiler_chan().clone()).unwrap();
|
||||
self.window
|
||||
|
@ -49,11 +49,11 @@ impl Screen {
|
|||
.send(ScriptMsg::GetScreenSize(send))
|
||||
.unwrap();
|
||||
let dpr = self.window.device_pixel_ratio();
|
||||
let screen = recv.recv().unwrap_or(TypedSize2D::zero());
|
||||
let screen = recv.recv().unwrap_or(Size2D::zero());
|
||||
(screen.to_f32() / dpr).to_u32()
|
||||
}
|
||||
|
||||
fn screen_avail_size(&self) -> TypedSize2D<u32, CSSPixel> {
|
||||
fn screen_avail_size(&self) -> Size2D<u32, CSSPixel> {
|
||||
let (send, recv) =
|
||||
ipc::channel::<DeviceIntSize>(self.global().time_profiler_chan().clone()).unwrap();
|
||||
self.window
|
||||
|
@ -62,7 +62,7 @@ impl Screen {
|
|||
.send(ScriptMsg::GetScreenAvailSize(send))
|
||||
.unwrap();
|
||||
let dpr = self.window.device_pixel_ratio();
|
||||
let screen = recv.recv().unwrap_or(TypedSize2D::zero());
|
||||
let screen = recv.recv().unwrap_or(Size2D::zero());
|
||||
(screen.to_f32() / dpr).to_u32()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ use crate::dom::window::Window;
|
|||
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/webgl.idl
|
||||
use canvas_traits::webgl::{GLContextAttributes, WebGLVersion};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::Size2D;
|
||||
use euclid::default::Size2D;
|
||||
use js::jsapi::{JSContext, JSObject};
|
||||
use js::jsval::JSVal;
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
|
|
|
@ -59,7 +59,7 @@ use canvas_traits::webgl::{
|
|||
YAxisTreatment,
|
||||
};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use ipc_channel::ipc::{self, IpcSharedMemory};
|
||||
use js::jsapi::{JSContext, JSObject, Type};
|
||||
use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, UInt32Value};
|
||||
|
|
|
@ -74,7 +74,8 @@ use cssparser::{Parser, ParserInput, SourceLocation};
|
|||
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use euclid::{Point2D, Rect, Size2D, TypedPoint2D, TypedScale, TypedSize2D, Vector2D};
|
||||
use euclid::default::{Point2D as UntypedPoint2D, Rect as UntypedRect};
|
||||
use euclid::{Point2D, Rect, Scale, Size2D, Vector2D};
|
||||
use ipc_channel::ipc::{channel, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::JSAutoRealm;
|
||||
|
@ -131,7 +132,7 @@ use style::str::HTML_SPACE_CHARACTERS;
|
|||
use style::stylesheets::CssRuleType;
|
||||
use style_traits::{CSSPixel, DevicePixel, ParsingMode};
|
||||
use url::Position;
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntSize};
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntSize, LayoutPixel};
|
||||
use webrender_api::{DocumentId, ExternalScrollId, RenderApiSender};
|
||||
use webvr_traits::WebVRMsg;
|
||||
|
||||
|
@ -229,7 +230,7 @@ pub struct Window {
|
|||
|
||||
/// An enlarged rectangle around the page contents visible in the viewport, used
|
||||
/// to prevent creating display list items for content that is far away from the viewport.
|
||||
page_clip_rect: Cell<Rect<Au>>,
|
||||
page_clip_rect: Cell<UntypedRect<Au>>,
|
||||
|
||||
/// Flag to suppress reflows. The first reflow will come either with
|
||||
/// RefreshTick or with FirstLoad. Until those first reflows, we want to
|
||||
|
@ -246,12 +247,12 @@ pub struct Window {
|
|||
/// The current state of the window object
|
||||
current_state: Cell<WindowState>,
|
||||
|
||||
current_viewport: Cell<Rect<Au>>,
|
||||
current_viewport: Cell<UntypedRect<Au>>,
|
||||
|
||||
error_reporter: CSSErrorReporter,
|
||||
|
||||
/// A list of scroll offsets for each scrollable element.
|
||||
scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32>>>,
|
||||
scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>>,
|
||||
|
||||
/// All the MediaQueryLists we need to update
|
||||
media_query_lists: DOMTracker<MediaQueryList>,
|
||||
|
@ -423,11 +424,11 @@ impl Window {
|
|||
/// Sets a new list of scroll offsets.
|
||||
///
|
||||
/// This is called when layout gives us new ones and WebRender is in use.
|
||||
pub fn set_scroll_offsets(&self, offsets: HashMap<OpaqueNode, Vector2D<f32>>) {
|
||||
pub fn set_scroll_offsets(&self, offsets: HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>) {
|
||||
*self.scroll_offsets.borrow_mut() = offsets
|
||||
}
|
||||
|
||||
pub fn current_viewport(&self) -> Rect<Au> {
|
||||
pub fn current_viewport(&self) -> UntypedRect<Au> {
|
||||
self.current_viewport.clone().get()
|
||||
}
|
||||
|
||||
|
@ -1093,7 +1094,7 @@ impl WindowMethods for Window {
|
|||
// Step 1
|
||||
//TODO determine if this operation is allowed
|
||||
let dpr = self.device_pixel_ratio();
|
||||
let size = TypedSize2D::new(width, height).to_f32() * dpr;
|
||||
let size = Size2D::new(width, height).to_f32() * dpr;
|
||||
self.send_to_embedder(EmbedderMsg::ResizeTo(size.to_i32()));
|
||||
}
|
||||
|
||||
|
@ -1112,7 +1113,7 @@ impl WindowMethods for Window {
|
|||
// Step 1
|
||||
//TODO determine if this operation is allowed
|
||||
let dpr = self.device_pixel_ratio();
|
||||
let point = TypedPoint2D::new(x, y).to_f32() * dpr;
|
||||
let point = Point2D::new(x, y).to_f32() * dpr;
|
||||
let msg = EmbedderMsg::MoveTo(point.to_i32());
|
||||
self.send_to_embedder(msg);
|
||||
}
|
||||
|
@ -1377,18 +1378,16 @@ impl Window {
|
|||
self.current_viewport.set(new_viewport)
|
||||
}
|
||||
|
||||
pub fn device_pixel_ratio(&self) -> TypedScale<f32, CSSPixel, DevicePixel> {
|
||||
pub fn device_pixel_ratio(&self) -> Scale<f32, CSSPixel, DevicePixel> {
|
||||
self.window_size.get().device_pixel_ratio
|
||||
}
|
||||
|
||||
fn client_window(&self) -> (TypedSize2D<u32, CSSPixel>, TypedPoint2D<i32, CSSPixel>) {
|
||||
fn client_window(&self) -> (Size2D<u32, CSSPixel>, Point2D<i32, CSSPixel>) {
|
||||
let timer_profile_chan = self.global().time_profiler_chan().clone();
|
||||
let (send, recv) =
|
||||
ProfiledIpc::channel::<(DeviceIntSize, DeviceIntPoint)>(timer_profile_chan).unwrap();
|
||||
self.send_to_constellation(ScriptMsg::GetClientWindow(send));
|
||||
let (size, point) = recv
|
||||
.recv()
|
||||
.unwrap_or((TypedSize2D::zero(), TypedPoint2D::zero()));
|
||||
let (size, point) = recv.recv().unwrap_or((Size2D::zero(), Point2D::zero()));
|
||||
let dpr = self.device_pixel_ratio();
|
||||
(
|
||||
(size.to_f32() / dpr).to_u32(),
|
||||
|
@ -1626,7 +1625,7 @@ impl Window {
|
|||
&*self.layout_rpc
|
||||
}
|
||||
|
||||
pub fn content_box_query(&self, node: &Node) -> Option<Rect<Au>> {
|
||||
pub fn content_box_query(&self, node: &Node) -> Option<UntypedRect<Au>> {
|
||||
if !self.layout_reflow(QueryMsg::ContentBoxQuery(node.to_opaque())) {
|
||||
return None;
|
||||
}
|
||||
|
@ -1634,7 +1633,7 @@ impl Window {
|
|||
rect
|
||||
}
|
||||
|
||||
pub fn content_boxes_query(&self, node: &Node) -> Vec<Rect<Au>> {
|
||||
pub fn content_boxes_query(&self, node: &Node) -> Vec<UntypedRect<Au>> {
|
||||
if !self.layout_reflow(QueryMsg::ContentBoxesQuery(node.to_opaque())) {
|
||||
return vec![];
|
||||
}
|
||||
|
@ -1642,21 +1641,21 @@ impl Window {
|
|||
rects
|
||||
}
|
||||
|
||||
pub fn client_rect_query(&self, node: &Node) -> Rect<i32> {
|
||||
pub fn client_rect_query(&self, node: &Node) -> UntypedRect<i32> {
|
||||
if !self.layout_reflow(QueryMsg::NodeGeometryQuery(node.to_opaque())) {
|
||||
return Rect::zero();
|
||||
}
|
||||
self.layout_rpc.node_geometry().client_rect
|
||||
}
|
||||
|
||||
pub fn scroll_area_query(&self, node: &Node) -> Rect<i32> {
|
||||
pub fn scroll_area_query(&self, node: &Node) -> UntypedRect<i32> {
|
||||
if !self.layout_reflow(QueryMsg::NodeScrollGeometryQuery(node.to_opaque())) {
|
||||
return Rect::zero();
|
||||
}
|
||||
self.layout_rpc.node_scroll_area().client_rect
|
||||
}
|
||||
|
||||
pub fn scroll_offset_query(&self, node: &Node) -> Vector2D<f32> {
|
||||
pub fn scroll_offset_query(&self, node: &Node) -> Vector2D<f32, LayoutPixel> {
|
||||
if let Some(scroll_offset) = self.scroll_offsets.borrow().get(&node.to_opaque()) {
|
||||
return *scroll_offset;
|
||||
}
|
||||
|
@ -1702,7 +1701,7 @@ impl Window {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn offset_parent_query(&self, node: &Node) -> (Option<DomRoot<Element>>, Rect<Au>) {
|
||||
pub fn offset_parent_query(&self, node: &Node) -> (Option<DomRoot<Element>>, UntypedRect<Au>) {
|
||||
if !self.layout_reflow(QueryMsg::OffsetParentQuery(node.to_opaque())) {
|
||||
return (None, Rect::zero());
|
||||
}
|
||||
|
@ -1726,7 +1725,11 @@ impl Window {
|
|||
self.layout_rpc.style().0
|
||||
}
|
||||
|
||||
pub fn text_index_query(&self, node: &Node, point_in_node: Point2D<f32>) -> TextIndexResponse {
|
||||
pub fn text_index_query(
|
||||
&self,
|
||||
node: &Node,
|
||||
point_in_node: UntypedPoint2D<f32>,
|
||||
) -> TextIndexResponse {
|
||||
if !self.layout_reflow(QueryMsg::TextIndexQuery(node.to_opaque(), point_in_node)) {
|
||||
return TextIndexResponse(None);
|
||||
}
|
||||
|
@ -1891,7 +1894,7 @@ impl Window {
|
|||
event
|
||||
}
|
||||
|
||||
pub fn set_page_clip_rect_with_new_viewport(&self, viewport: Rect<f32>) -> bool {
|
||||
pub fn set_page_clip_rect_with_new_viewport(&self, viewport: UntypedRect<f32>) -> bool {
|
||||
let rect = f32_rect_to_au_rect(viewport.clone());
|
||||
self.current_viewport.set(rect);
|
||||
// We use a clipping rectangle that is five times the size of the of the viewport,
|
||||
|
@ -2184,8 +2187,8 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn should_move_clip_rect(clip_rect: Rect<Au>, new_viewport: Rect<f32>) -> bool {
|
||||
let clip_rect = Rect::new(
|
||||
fn should_move_clip_rect(clip_rect: UntypedRect<Au>, new_viewport: UntypedRect<f32>) -> bool {
|
||||
let clip_rect = UntypedRect::new(
|
||||
Point2D::new(
|
||||
clip_rect.origin.x.to_f32_px(),
|
||||
clip_rect.origin.y.to_f32_px(),
|
||||
|
|
|
@ -95,7 +95,7 @@ impl XRFrameMethods for XRFrame {
|
|||
}
|
||||
let space = space.get_pose(&self.data);
|
||||
let relative_to = relative_to.get_pose(&self.data);
|
||||
let pose = relative_to.inverse().pre_mul(&space);
|
||||
let pose = relative_to.inverse().pre_transform(&space);
|
||||
Ok(Some(XRPose::new(&self.global(), pose)))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::dom::xrrigidtransform::XRRigidTransform;
|
|||
use crate::dom::xrsession::{cast_transform, ApiPose, ApiRigidTransform, ApiViewerPose, XRSession};
|
||||
use crate::dom::xrspace::XRSpace;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{TypedRigidTransform3D, TypedVector3D};
|
||||
use euclid::{RigidTransform3D, Vector3D};
|
||||
use webxr_api::Frame;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -64,7 +64,7 @@ impl XRReferenceSpace {
|
|||
impl XRReferenceSpaceMethods for XRReferenceSpace {
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrreferencespace-getoffsetreferencespace
|
||||
fn GetOffsetReferenceSpace(&self, new: &XRRigidTransform) -> DomRoot<Self> {
|
||||
let offset = new.transform().pre_mul(&self.offset.transform());
|
||||
let offset = new.transform().pre_transform(&self.offset.transform());
|
||||
let offset = XRRigidTransform::new(&self.global(), offset);
|
||||
Self::new_offset(
|
||||
&self.global(),
|
||||
|
@ -92,7 +92,7 @@ impl XRReferenceSpace {
|
|||
// = offset.inverse() * get_unoffset_viewer_pose(space)
|
||||
let offset = self.offset.transform();
|
||||
let inverse = offset.inverse();
|
||||
inverse.pre_mul(&pose)
|
||||
inverse.pre_transform(&pose)
|
||||
}
|
||||
|
||||
/// Gets pose of the viewer with respect to this space
|
||||
|
@ -120,13 +120,13 @@ impl XRReferenceSpace {
|
|||
// = Translate(2) * viewer_pose
|
||||
|
||||
// assume approximate user height of 2 meters
|
||||
let floor_to_eye: ApiRigidTransform = TypedVector3D::new(0., 2., 0.).into();
|
||||
floor_to_eye.pre_mul(&viewer_pose)
|
||||
let floor_to_eye: ApiRigidTransform = Vector3D::new(0., 2., 0.).into();
|
||||
floor_to_eye.pre_transform(&viewer_pose)
|
||||
},
|
||||
XRReferenceSpaceType::Viewer => {
|
||||
// This reference space follows the viewer around, so the viewer is
|
||||
// always at an identity transform with respect to it
|
||||
TypedRigidTransform3D::identity()
|
||||
RigidTransform3D::identity()
|
||||
},
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ impl XRReferenceSpace {
|
|||
|
||||
// This may change, see https://github.com/immersive-web/webxr/issues/567
|
||||
let offset = self.offset.transform();
|
||||
offset.post_mul(&pose)
|
||||
offset.post_transform(&pose)
|
||||
}
|
||||
|
||||
/// Gets pose represented by this space
|
||||
|
@ -153,14 +153,14 @@ impl XRReferenceSpace {
|
|||
XRReferenceSpaceType::Local => {
|
||||
// The eye-level pose is basically whatever the headset pose was at t=0, which
|
||||
// for most devices is (0, 0, 0)
|
||||
TypedRigidTransform3D::identity()
|
||||
RigidTransform3D::identity()
|
||||
},
|
||||
XRReferenceSpaceType::Local_floor => {
|
||||
// XXXManishearth support getting floor info from stage parameters
|
||||
|
||||
// Assume approximate height of 2m
|
||||
// the floor-level space is 2m below the eye-level space, which is (0, 0, 0)
|
||||
TypedVector3D::new(0., -2., 0.).into()
|
||||
Vector3D::new(0., -2., 0.).into()
|
||||
},
|
||||
XRReferenceSpaceType::Viewer => cast_transform(base_pose.transform),
|
||||
_ => unimplemented!(),
|
||||
|
|
|
@ -16,7 +16,7 @@ use crate::dom::vrframedata::create_typed_array;
|
|||
use crate::dom::window::Window;
|
||||
use crate::dom::xrsession::ApiRigidTransform;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::{TypedRigidTransform3D, TypedRotation3D, TypedVector3D};
|
||||
use euclid::{RigidTransform3D, Rotation3D, Vector3D};
|
||||
use js::jsapi::{Heap, JSContext, JSObject};
|
||||
use std::ptr::NonNull;
|
||||
|
||||
|
@ -53,7 +53,7 @@ impl XRRigidTransform {
|
|||
}
|
||||
|
||||
pub fn identity(window: &GlobalScope) -> DomRoot<XRRigidTransform> {
|
||||
let transform = TypedRigidTransform3D::identity();
|
||||
let transform = RigidTransform3D::identity();
|
||||
XRRigidTransform::new(window, transform)
|
||||
}
|
||||
|
||||
|
@ -70,8 +70,8 @@ impl XRRigidTransform {
|
|||
)));
|
||||
}
|
||||
|
||||
let translate = TypedVector3D::new(position.x as f32, position.y as f32, position.z as f32);
|
||||
let rotate = TypedRotation3D::unit_quaternion(
|
||||
let translate = Vector3D::new(position.x as f32, position.y as f32, position.z as f32);
|
||||
let rotate = Rotation3D::unit_quaternion(
|
||||
orientation.x as f32,
|
||||
orientation.y as f32,
|
||||
orientation.z as f32,
|
||||
|
@ -83,7 +83,7 @@ impl XRRigidTransform {
|
|||
// value for each element. This is preferable to checking for zero.
|
||||
return Err(Error::InvalidState);
|
||||
}
|
||||
let transform = TypedRigidTransform3D::new(rotate, translate);
|
||||
let transform = RigidTransform3D::new(rotate, translate);
|
||||
Ok(XRRigidTransform::new(&window.global(), transform))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ use crate::dom::xrspace::XRSpace;
|
|||
use crate::dom::xrwebgllayer::XRWebGLLayer;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedRigidTransform3D;
|
||||
use euclid::RigidTransform3D;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use profile_traits::ipc;
|
||||
|
@ -403,15 +403,15 @@ impl XRSessionMethods for XRSession {
|
|||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct ApiSpace;
|
||||
// The pose of an object in native-space. Should never be exposed.
|
||||
pub type ApiPose = TypedRigidTransform3D<f32, ApiSpace, webxr_api::Native>;
|
||||
pub type ApiPose = RigidTransform3D<f32, ApiSpace, webxr_api::Native>;
|
||||
// The pose of the viewer in some api-space.
|
||||
pub type ApiViewerPose = TypedRigidTransform3D<f32, webxr_api::Viewer, ApiSpace>;
|
||||
pub type ApiViewerPose = RigidTransform3D<f32, webxr_api::Viewer, ApiSpace>;
|
||||
// A transform between objects in some API-space
|
||||
pub type ApiRigidTransform = TypedRigidTransform3D<f32, ApiSpace, ApiSpace>;
|
||||
pub type ApiRigidTransform = RigidTransform3D<f32, ApiSpace, ApiSpace>;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn cast_transform<T, U, V, W>(
|
||||
transform: TypedRigidTransform3D<f32, T, U>,
|
||||
) -> TypedRigidTransform3D<f32, V, W> {
|
||||
transform: RigidTransform3D<f32, T, U>,
|
||||
) -> RigidTransform3D<f32, V, W> {
|
||||
unsafe { mem::transmute(transform) }
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::promise::Promise;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedRigidTransform3D;
|
||||
use euclid::RigidTransform3D;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use profile_traits::ipc;
|
||||
|
@ -103,7 +103,7 @@ impl XRTestMethods for XRTest {
|
|||
},
|
||||
}
|
||||
} else {
|
||||
TypedRigidTransform3D::identity()
|
||||
RigidTransform3D::identity()
|
||||
};
|
||||
|
||||
let floor_origin = if let Some(ref o) = init.floorOrigin {
|
||||
|
@ -115,7 +115,7 @@ impl XRTestMethods for XRTest {
|
|||
},
|
||||
}
|
||||
} else {
|
||||
TypedRigidTransform3D::identity()
|
||||
RigidTransform3D::identity()
|
||||
};
|
||||
|
||||
let views = match get_views(&init.views) {
|
||||
|
|
|
@ -53,7 +53,7 @@ impl XRView {
|
|||
// from the viewer space to the eye space. We invert it to get the pose of the eye in the viewer space.
|
||||
let offset = view.transform.inverse();
|
||||
|
||||
let transform = pose.pre_mul(&offset);
|
||||
let transform = pose.pre_transform(&offset);
|
||||
let transform = XRRigidTransform::new(global, cast_transform(transform));
|
||||
|
||||
let ret = reflect_dom_object(
|
||||
|
|
|
@ -8,24 +8,24 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedRect;
|
||||
use euclid::Rect;
|
||||
use webxr_api::Viewport;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRViewport {
|
||||
reflector_: Reflector,
|
||||
viewport: TypedRect<i32, Viewport>,
|
||||
viewport: Rect<i32, Viewport>,
|
||||
}
|
||||
|
||||
impl XRViewport {
|
||||
fn new_inherited(viewport: TypedRect<i32, Viewport>) -> XRViewport {
|
||||
fn new_inherited(viewport: Rect<i32, Viewport>) -> XRViewport {
|
||||
XRViewport {
|
||||
reflector_: Reflector::new(),
|
||||
viewport,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, viewport: TypedRect<i32, Viewport>) -> DomRoot<XRViewport> {
|
||||
pub fn new(global: &GlobalScope, viewport: Rect<i32, Viewport>) -> DomRoot<XRViewport> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRViewport::new_inherited(viewport)),
|
||||
global,
|
||||
|
|
|
@ -94,7 +94,8 @@ use devtools_traits::CSSError;
|
|||
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo};
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use euclid::{Point2D, Rect, Vector2D};
|
||||
use euclid::default::{Point2D, Rect};
|
||||
use euclid::Vector2D;
|
||||
use headers::ReferrerPolicy as ReferrerPolicyHeader;
|
||||
use headers::{HeaderMapExt, LastModified};
|
||||
use hyper_serde::Serde;
|
||||
|
@ -161,6 +162,7 @@ use style::thread_state::{self, ThreadState};
|
|||
use time::{at_utc, get_time, precise_time_ns, Timespec};
|
||||
use url::percent_encoding::percent_decode;
|
||||
use url::Position;
|
||||
use webrender_api::units::LayoutPixel;
|
||||
use webrender_api::{DocumentId, RenderApiSender};
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
||||
|
@ -2230,7 +2232,7 @@ impl ScriptThread {
|
|||
fn handle_set_scroll_state(
|
||||
&self,
|
||||
id: PipelineId,
|
||||
scroll_states: &[(UntrustedNodeAddress, Vector2D<f32>)],
|
||||
scroll_states: &[(UntrustedNodeAddress, Vector2D<f32, LayoutPixel>)],
|
||||
) {
|
||||
let window = match { self.documents.borrow().find_window(id) } {
|
||||
Some(window) => window,
|
||||
|
|
|
@ -29,7 +29,7 @@ use crate::dom::window::Window;
|
|||
use crate::dom::xmlserializer::XMLSerializer;
|
||||
use crate::script_thread::Documents;
|
||||
use cookie::Cookie;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::JSContext;
|
||||
|
|
|
@ -16,7 +16,7 @@ atomic_refcell = "0.1"
|
|||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = "0.25"
|
||||
crossbeam-channel = "0.3"
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
html5ever = "0.23"
|
||||
ipc-channel = "0.11"
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::rpc::LayoutRPC;
|
|||
use crate::{OpaqueStyleAndLayoutData, PendingImage, TrustedNodeAddress};
|
||||
use app_units::Au;
|
||||
use crossbeam_channel::{Receiver, Sender};
|
||||
use euclid::{Point2D, Rect};
|
||||
use euclid::default::{Point2D, Rect};
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use metrics::PaintTimeMetrics;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue