diff options
1097 files changed, 30024 insertions, 15639 deletions
diff --git a/.gitignore b/.gitignore index 9dde417c9c9..35b7815ab7e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ Servo.app .config.mk.last /glfw +capture_webrender/ # Editors diff --git a/.travis.yml b/.travis.yml index 56f688adaa3..0f19ada7e32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ matrix: script: - ./mach test-tidy --no-progress --all - ./mach test-tidy --no-progress --self-test + - python ./etc/memory_reports_over_time.py --test - bash etc/ci/check_no_panic.sh - bash etc/ci/manifest_changed.sh cache: false diff --git a/Cargo.lock b/Cargo.lock index cbf5c1a7973..6b147b84be4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,15 +27,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "angle" -version = "0.5.0" -source = "git+https://github.com/servo/angle?branch=servo#1599c1d067b4ccbe502f660181d08d49d69e26eb" -dependencies = [ - "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "ansi_term" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -73,7 +64,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -95,7 +86,7 @@ source = "git+https://github.com/servo/rust-azure#29f0c063ad366b5364e06af26d3e9d dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "servo-skia 0.30000013.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -105,22 +96,22 @@ name = "backtrace" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.11" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -139,7 +130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bincode" -version = "0.9.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -148,12 +139,12 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.33.1" +version = "0.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -189,18 +180,18 @@ dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "bluetooth_traits 0.0.1", "device 0.0.1 (git+https://github.com/servo/devices)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "servo_rand 0.0.1", - "tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bluetooth_traits" version = "0.0.1" dependencies = [ - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", @@ -261,8 +252,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.3.0" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "canvas" @@ -274,11 +269,11 @@ dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "webrender 0.57.0 (git+https://github.com/servo/webrender)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", @@ -290,12 +285,12 @@ version = "0.0.1" dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", "nonzero 0.0.1", - "offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", @@ -312,7 +307,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -333,8 +328,8 @@ name = "cgl" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -348,12 +343,12 @@ dependencies = [ [[package]] name = "clang-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -379,7 +374,7 @@ dependencies = [ "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-clipboard 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -395,7 +390,7 @@ name = "cmake" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -406,7 +401,7 @@ dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -421,10 +416,10 @@ version = "0.0.1" dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", @@ -457,7 +452,7 @@ dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "layout_traits 0.0.1", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -491,7 +486,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -499,7 +494,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -510,7 +505,7 @@ dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -521,7 +516,7 @@ dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -644,7 +639,7 @@ name = "dbus" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -661,7 +656,7 @@ name = "debugger" version = "0.0.1" dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ws 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -706,7 +701,7 @@ dependencies = [ "devtools_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -721,7 +716,7 @@ dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", "msg 0.0.1", @@ -732,10 +727,10 @@ dependencies = [ [[package]] name = "dlib" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -771,7 +766,7 @@ dependencies = [ "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -802,7 +797,7 @@ source = "git+https://github.com/energymon/energymon-rust.git#89daf8f37858eab96a dependencies = [ "energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "energymon-default-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -821,7 +816,7 @@ source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0f dependencies = [ "energymon-builder 0.3.0 (git+https://github.com/energymon/energymon-sys.git)", "energymon-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -829,7 +824,7 @@ name = "energymon-sys" version = "0.3.0" source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0fd358aa9d300a46dc3e97c" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -851,7 +846,7 @@ dependencies = [ [[package]] name = "error-chain" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -888,8 +883,8 @@ name = "flate2" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -903,8 +898,8 @@ version = "0.4.0" source = "git+https://github.com/servo/fontsan#29e879c870348c4b3fd51086e42dbb6365171479" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -925,11 +920,25 @@ name = "freetype" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "futf" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -951,17 +960,12 @@ name = "gaol" version = "0.0.1" source = "git+https://github.com/servo/gaol#227ff0bae1eb1b44a273c6c5610debfe214991ee" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "gcc" -version = "0.3.47" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "gdi32-sys" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -978,11 +982,11 @@ dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "cstr 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "nsstring 0.1.0", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.19.0", "servo_arc 0.1.1", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1012,9 +1016,9 @@ dependencies = [ "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "harfbuzz-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", @@ -1072,7 +1076,7 @@ dependencies = [ [[package]] name = "gleam" -version = "0.4.23" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1095,7 +1099,7 @@ dependencies = [ "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1111,7 +1115,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1131,7 +1135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1139,8 +1143,8 @@ dependencies = [ name = "hashglobe" version = "0.1.0" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1149,7 +1153,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heartbeats-simple-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1158,7 +1162,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1285,33 +1289,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "iovec" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ipc-channel" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1332,8 +1336,8 @@ name = "jemalloc-sys" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1342,7 +1346,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1395,14 +1399,14 @@ dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "msg 0.0.1", "net_traits 0.0.1", "ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", "range 0.0.1", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1437,17 +1441,17 @@ dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "layout 0.0.1", "layout_traits 0.0.1", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "metrics 0.0.1", "msg 0.0.1", "net_traits 0.0.1", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", "range 0.0.1", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1472,7 +1476,7 @@ name = "layout_traits" version = "0.0.1" dependencies = [ "gfx 0.0.1", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "metrics 0.0.1", "msg 0.0.1", "net_traits 0.0.1", @@ -1494,7 +1498,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1512,7 +1516,7 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.33" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1525,12 +1529,11 @@ dependencies = [ [[package]] name = "libloading" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1550,8 +1553,8 @@ dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", "gfx 0.0.1", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "layout_thread 0.0.1", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1579,8 +1582,8 @@ name = "libz-sys" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1616,7 +1619,7 @@ name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1627,7 +1630,7 @@ dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "hashglobe 0.1.0", - "mozjs 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mozjs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.19.0", "servo_arc 0.1.1", "smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1681,7 +1684,7 @@ name = "memchr" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1689,7 +1692,7 @@ name = "memmap" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1703,7 +1706,7 @@ name = "metrics" version = "0.0.1" dependencies = [ "gfx_traits 0.0.1", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", @@ -1721,7 +1724,7 @@ version = "0.0.1" dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "metrics 0.0.1", "msg 0.0.1", "net_traits 0.0.1", @@ -1752,22 +1755,24 @@ dependencies = [ [[package]] name = "miniz-sys" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.9" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1792,14 +1797,23 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "mozangle" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "mozjs" -version = "0.1.11" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.50.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1809,7 +1823,7 @@ name = "mozjs_sys" version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1854,7 +1868,7 @@ dependencies = [ "hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "immeta 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1866,15 +1880,15 @@ dependencies = [ "profile_traits 0.0.1", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-websocket 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-websocket 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "servo_url 0.0.1", "threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", ] @@ -1885,7 +1899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1898,7 +1912,7 @@ dependencies = [ "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", @@ -1909,7 +1923,7 @@ dependencies = [ "servo_config 0.0.1", "servo_url 0.0.1", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", ] @@ -1983,7 +1997,7 @@ name = "num_cpus" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2014,16 +2028,16 @@ dependencies = [ [[package]] name = "offscreen_gl_context" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2057,7 +2071,7 @@ dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2066,8 +2080,8 @@ name = "openssl-sys" version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2109,23 +2123,22 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.4.8" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.2.7" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2161,7 +2174,7 @@ version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2224,9 +2237,9 @@ version = "0.0.1" dependencies = [ "heartbeats-simple 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "influent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "profile_traits 0.0.1", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2241,19 +2254,21 @@ dependencies = [ name = "profile_tests" version = "0.0.1" dependencies = [ - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "profile 0.0.1", "profile_traits 0.0.1", "servo_allocator 0.0.1", + "servo_config 0.0.1", ] [[package]] name = "profile_traits" version = "0.0.1" dependencies = [ + "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "energymon 0.3.0 (git+https://github.com/energymon/energymon-rust.git)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", @@ -2276,10 +2291,22 @@ dependencies = [ [[package]] name = "rand" -version = "0.3.15" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2308,9 +2335,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2354,13 +2381,21 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "ron" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "rust-webvr" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "ovr-mobile-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rust-webvr-api 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2423,7 +2458,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "script" version = "0.0.1" dependencies = [ - "angle 0.5.0 (git+https://github.com/servo/angle?branch=servo)", "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "audio-video-metadata 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2443,16 +2477,16 @@ dependencies = [ "encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "jstraceable_derive 0.0.1", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", @@ -2460,12 +2494,13 @@ dependencies = [ "mime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mozjs 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mozangle 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mozjs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2491,11 +2526,11 @@ dependencies = [ "style_traits 0.0.1", "swapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", "xml5ever 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2512,8 +2547,8 @@ dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", @@ -2565,8 +2600,8 @@ dependencies = [ "gfx_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", "msg 0.0.1", @@ -2660,25 +2695,25 @@ dependencies = [ "compositing 0.0.1", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "libservo 0.0.1", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", - "net_traits 0.0.1", "osmesa-src 17.3.1-devel (git+https://github.com/servo/osmesa-src)", "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo_config 0.0.1", "servo_geometry 0.0.1", - "servo_url 0.0.1", "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "style_traits 0.0.1", - "tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winres 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2687,7 +2722,7 @@ name = "servo-egl" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2695,7 +2730,7 @@ name = "servo-fontconfig" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2727,11 +2762,11 @@ dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2740,16 +2775,15 @@ dependencies = [ [[package]] name = "servo-websocket" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2760,7 +2794,7 @@ version = "0.0.1" dependencies = [ "jemallocator 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2807,6 +2841,7 @@ dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "malloc_size_of_derive 0.0.1", + "style_traits 0.0.1", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", ] @@ -2816,7 +2851,8 @@ version = "0.0.1" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2838,7 +2874,7 @@ dependencies = [ "servo_rand 0.0.1", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2852,7 +2888,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2941,7 +2977,7 @@ dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2967,7 +3003,7 @@ dependencies = [ "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2983,7 +3019,7 @@ dependencies = [ "style_derive 0.0.1", "style_traits 0.0.1", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3010,7 +3046,7 @@ dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.19.0", "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3050,7 +3086,7 @@ dependencies = [ "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "geckoservo 0.0.1", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "malloc_size_of 0.0.1", "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3109,7 +3145,7 @@ dependencies = [ name = "task_info" version = "0.0.1" dependencies = [ - "gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3118,8 +3154,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3139,7 +3175,7 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3158,7 +3194,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3186,18 +3222,18 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tinyfiledialogs" -version = "3.0.4" +version = "3.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3207,8 +3243,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "toml" -version = "0.2.1" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "traitobject" @@ -3335,10 +3374,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uuid" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3373,7 +3413,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "token_store 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-scanner 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-sys 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3385,7 +3425,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3415,7 +3455,7 @@ name = "wayland-sys" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3453,7 +3493,7 @@ dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net_traits 0.0.1", @@ -3463,17 +3503,18 @@ dependencies = [ "servo_config 0.0.1", "servo_url 0.0.1", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webdriver 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webrender" version = "0.57.0" -source = "git+https://github.com/servo/webrender#6611df9fdf930db4fb93a00ce2c2d3163c0bb1a1" +source = "git+https://github.com/servo/webrender#9c994b0cca8c1abc24fdf487df950954bebb62a7" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.6.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.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3483,32 +3524,37 @@ dependencies = [ "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "plane-split 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thread_profiler 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.57.0 (git+https://github.com/servo/webrender)", + "ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webrender_api" version = "0.57.0" -source = "git+https://github.com/servo/webrender#6611df9fdf930db4fb93a00ce2c2d3163c0bb1a1" +source = "git+https://github.com/servo/webrender#9c994b0cca8c1abc24fdf487df950954bebb62a7" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 0.9.2 (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.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3520,10 +3566,10 @@ version = "0.0.1" dependencies = [ "canvas_traits 0.0.1", "euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", - "rust-webvr 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-webvr 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "servo_config 0.0.1", "webvr_traits 0.0.1", @@ -3533,7 +3579,7 @@ dependencies = [ name = "webvr_traits" version = "0.0.1" dependencies = [ - "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "rust-webvr-api 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3544,7 +3590,7 @@ name = "which" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3586,7 +3632,7 @@ dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3598,15 +3644,24 @@ dependencies = [ ] [[package]] +name = "winres" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "ws" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3626,17 +3681,17 @@ name = "x11" version = "2.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "x11-clipboard" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "xcb 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3645,17 +3700,17 @@ version = "2.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "xcb" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3693,7 +3748,6 @@ dependencies = [ "checksum alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b21f6ad9c9957eb5d70c3dee16d31c092b3cab339628f821766b05e6833d72b8" "checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" "checksum android_injected_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80b9e34fcbf29c0563547cb2ecce9b49504597cad6166769b1e4efb45c6c2951" -"checksum angle 0.5.0 (git+https://github.com/servo/angle?branch=servo)" = "<none>" "checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" "checksum app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c4720c83543de184d9f6add2fdb8e8031543497b8506620884c16e125b493c09" @@ -3703,11 +3757,11 @@ dependencies = [ "checksum audio-video-metadata 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "71536082079f5ba92c274fba7c2dcd4e2f9d5c13ce6d7f8fe9acbbb258916d18" "checksum azure 0.28.0 (git+https://github.com/servo/rust-azure)" = "<none>" "checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" -"checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff" +"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff" -"checksum bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9a6301db0b49fb63551bc15b5ae348147101cdf323242b93ec7546d5002ff1af" -"checksum bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1657d607dd7a8e10b3181149f60f3b27ea0eac81058c09a1c791b8f6ead91f19" +"checksum bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0" +"checksum bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)" = "603ed8d8392ace9581e834e26bd09799bf1e989a79bd1aedbb893e72962bdc6e" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989" "checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707" @@ -3719,14 +3773,14 @@ dependencies = [ "checksum brotli 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fe87b40996b84fdc56e57c165d93079f4b50cb806598118e692ddfaa3d3c57c0" "checksum brotli-decompressor 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "313f4b6cc0b365d6b88eda5aa40175ee34ac6efa9a79e0b3b8202eca90247ba8" "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" -"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" +"checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" "checksum caseless 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3261638034d9db4f94a666ebb16494846341ae5a8456c05c1616d66980cf39a" -"checksum cc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c674f0870e3dbd4105184ea035acb1c32c8ae69939c9e228d2b11bbfe29efad" +"checksum cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9be26b24e988625409b19736d130f0c7d224f01d06454b5f81d8d23d6c1a618f" "checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" -"checksum clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07" +"checksum clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "939a1a34310b120d26eba35c29475933128b0ec58e24b43327f8dbe6036fc538" "checksum clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc34bf7d5d66268b466b9852bca925ec1d2650654dab4da081e63fd230145c2e" "checksum clipboard 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b9b4623b47d8637fc9d47564583d4cc01eb8c8e34e26b2bf348bf4b036acb657" "checksum clipboard-win 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14cc3e6c075926b96490d5f90d4a5af7be8012a4d8a8698e619655085a7641a3" @@ -3753,7 +3807,7 @@ dependencies = [ "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" "checksum deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebb02aaf4b775afc96684b8402510a338086974e38570a1f65bea8c202eb77a7" "checksum device 0.0.1 (git+https://github.com/servo/devices)" = "<none>" -"checksum dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95518d8f88d556e62c9b3014629f21bdad97a9fdfee85c68a185e3980af29e7c" +"checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a" "checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" "checksum dtoa-short 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe6f727b406462fd57c95fed84d1b0dbfb5f0136fcac005adba9ea0367c05cc8" "checksum dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b26e30aaa6bf31ec830db15fec14ed04f0f2ecfcc486ecfce88c55d3389b237f" @@ -3766,7 +3820,7 @@ dependencies = [ "checksum energymon-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "<none>" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" +"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "adfe67a9343519c1449d208da5998c6de582de698f7a39c4ac82ffba23d131a5" "checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1" "checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" @@ -3775,15 +3829,16 @@ dependencies = [ "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" "checksum freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "398b8a11884898184d55aca9806f002b3cf68f0e860e0cbb4586f834ee39b0e7" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" "checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum gaol 0.0.1 (git+https://github.com/servo/gaol)" = "<none>" -"checksum gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)" = "5773372df827453bc38d4fd8efe425c7f28b1f54468816183fc8716cfb90bd30" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" "checksum gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a80d6fe9e52f637df9afd4779449a7be17c39cc9c35b01589bb833f956ba596" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" -"checksum gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a7f5351837630a7dd0cd6d7976de547929f9fabd381b9d5ac35f82e90be2" +"checksum gleam 0.4.28 (registry+https://github.com/rust-lang/crates.io-index)" = "0afb2d0a8283b336c9569b1dead35415f550dcf1d4f3b970b507f7373d0be626" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90de8e0391e57098acfbfe693b23065e9186255d370ebae12c933b7d77df8424" "checksum glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "63a6e7c2846e12626455f45ebaff9d92161436dd0fa703d9d198012e528ca7b9" @@ -3804,8 +3859,8 @@ dependencies = [ "checksum inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10ec05638adf7c5c788bc0cfa608cd479a13572beda20feb4898fe1d85d2c64b" "checksum influent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a22b311b83431be3ab9af96ca9ea41554bb4a8551ea871ae44c3ce0c57e55f2c" "checksum io-surface 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "623ace1e5f7de3512ec45302572a72349fdadcbef650c3dfc5d8244209be7653" -"checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be" -"checksum ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c10ed089b1921b01ef342c736a37ee0788eeb9a5f373bb2df1ba88d01125064f" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9daf099728ac5390c73f54e6e3708f0c514d2b51f24373830f568702eadfca" "checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394" "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" "checksum jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "479294d130502fada93c7a957e8d059b632b03d6204aca37af557dee947f30a9" @@ -3816,12 +3871,12 @@ dependencies = [ "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" +"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum leak 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73" "checksum leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc" -"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2" +"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" "checksum libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8720f9274907052cb50313f91201597868da9d625f8dd125f2aca5bddb7e83a1" -"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194" +"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" @@ -3835,11 +3890,12 @@ dependencies = [ "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8" "checksum mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76da6df85047af8c0edfa53f48eb1073012ce1cc95c8fedc0a374f659a89dd65" -"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" -"checksum mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9e965267d4d58496fc4f740e9861118367f13570cadf66316ed2c3f2f14d87c7" +"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" +"checksum mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "75f72a93f046f1517e3cfddc0a096eb756a2ba727d36edc8227dee769a50a9b0" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f" -"checksum mozjs 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "199f707066bf05b559ef6e46741c20e4f7bca8ae3a9c9d953d728dbb840f4eaa" +"checksum mozangle 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1f0583e6792917f498bb3a7440f777a59353102063445ab7f5e9d1dc4ed593aa" +"checksum mozjs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "896b93aaf26a4cbdcd878b6a9e3b4b90ac018dccebaaac1fe67d2d0724f6a711" "checksum mozjs_sys 0.50.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e61a792a125b1364c5ec50255ed8343ce02dc56098f8868dd209d472c8de006a" "checksum mp3-metadata 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ab5f1d2693586420208d1200ce5a51cd44726f055b635176188137aff42c7de" "checksum mp4parse 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f821e3799bc0fd16d9b861fb02fa7ee1b5fba29f45ad591dade105c48ca9a1a0" @@ -3855,7 +3911,7 @@ dependencies = [ "checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e" "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" "checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297" -"checksum offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7698545d3c6db6a9f748cfd399880893d8876c3b980fa57c52b5a99b105abce" +"checksum offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b0daacb4e8c5760ab0addb80938f6bde4cd23b71b39a84d90080ae0c7215716a" "checksum ogg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7137bf02687385302f4c0aecd77cfce052b69f5b4ee937be778e125c62f67e30" "checksum ogg_metadata 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc665717454399cba557c55ad226148996e9266ee291f8a37a98bb2cded0a490" "checksum openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "419ef26bb651d72b6c5a603bcc4e4856a362460e62352dfffa53de91d2e81181" @@ -3865,8 +3921,8 @@ dependencies = [ "checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" "checksum ovr-mobile-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a69b517feac6fc640f0679625defa0998bbcb32871a6901e63063c2abf9c4cbe" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" -"checksum parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "149d8f5b97f3c1133e3cfcd8886449959e856b557ff281e292b733d7c69e005e" -"checksum parking_lot_core 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6c677d78851950b3aec390e681a411f78cc250cba277d4f578758a377f727970" +"checksum parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd9d732f2de194336fb02fe11f9eed13d9e76f13f4315b4d88a14ca411750cd" +"checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79" "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 phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" @@ -3881,7 +3937,8 @@ dependencies = [ "checksum procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c93cdc1fb30af9ddf3debc4afbdb0f35126cbd99daa229dd76cdd5349b41d989" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" -"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" +"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d" "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" @@ -3890,7 +3947,8 @@ dependencies = [ "checksum ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "825740057197b7d43025e7faf6477eaabc03434e153233da02d1f44602f71527" "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" -"checksum rust-webvr 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "68867bd48d6ce112476beaf5f5aa63b1182f53bb95928462442a9e9601dc116e" +"checksum ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "da06feaa07f69125ab9ddc769b11de29090122170b402547f64b86fe16ebc399" +"checksum rust-webvr 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "9629ce5b5c3cda05259d225e639851daf39c55c170358d3056205dd205deaab2" "checksum rust-webvr-api 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "712e22ba3c03a7075b40842ae91029a0ab96a81f95e97c0cf623800ec0cbac07" "checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" @@ -3910,7 +3968,7 @@ dependencies = [ "checksum servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "38b494f03009ee81914b0e7d387ad7c145cafcd69747c2ec89b0e17bb94f303a" "checksum servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" "checksum servo-skia 0.30000013.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3fb707c7dc3d8a053b8c9d48ed9eb7f2a0c0751616dfbe3598f526948408bc33" -"checksum servo-websocket 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efde78dfcf2178d5a11e1e2268e0d8df0627dfe2724546db8585d6678e1af150" +"checksum servo-websocket 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6bac1e2295e72f0525147d993c626761811acf0441dac1cee8707f12dc7f3363" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a" "checksum sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6649e43c1a1e68d29ed56d0dc3b5b6cf3b901da77cf107c4066b9e3da036df5" @@ -3939,9 +3997,9 @@ dependencies = [ "checksum thread_profiler 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5920e77802b177479ab5795767fa48e68f61b2f516c2ac0041e2978dd8efe483" "checksum threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59f6d3eff89920113dac9db44dde461d71d01e88a5b57b258a0466c32b5d7fe1" "checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d92a5f7395a9e2895a2361c3121d4a0be0f8dac3be7d91841a5c1c5291b1c6dc" +"checksum tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d79833ca2c493c726ea6a7b651ba0ff8a790add5156cd11bf3743f346005c0c8" "checksum token_store 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a686838375fc11103b9c1529c6508320b7bd5e2401cd62831ca51b3e82e61849" -"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" +"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum truetype 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec30350633d6dac9dc1a625786b6cbe9150664be941aac2c35ad7199eab877" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" @@ -3960,7 +4018,7 @@ dependencies = [ "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d0f5103675a280a926ec2f9b7bcc2ef49367df54e8c570c3311fec919f9a8b" +"checksum uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4670e1e935f7edd193a413f802e2ee52274aed62a09ccaab1656515c9c53a66" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" @@ -3981,12 +4039,13 @@ dependencies = [ "checksum winapi-i686-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6667f60c23eca65c561e63a13d81b44234c2e38a6b6c959025ee907ec614cc" "checksum winapi-x86_64-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98f12c52b2630cd05d2c3ffd8e008f7f48252c042b4871c72aed9dc733b96668" "checksum winit 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "396f0350e661940359e3c8c7d58ff847f67997943e2c80ecac374c5aa8287f63" -"checksum ws 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04614a58714f3fd4a8b1da4bcae9f031c532d35988c3d39627619248113f8be8" +"checksum winres 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "27d9192d6356d7efe8405dec6c5506b67543cf64b6049968f39f4c4623b4f25d" +"checksum ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89c48c53bf9dee34411a08993c10b879c36e105d609b46e25673befe3a5c1320" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5c4ac579b5d324dc4add02312b5d0e3e0218521e2d5779d526ac39ee4bb171" -"checksum x11-clipboard 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78a35cd979d17b95e0706ab1f3425ecc98565d3873902bd5944b9f5f388327d1" +"checksum x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e7374c7699210cca7084ca61d57e09640fc744d1391808cb9ae2fe4ca9bd1df" "checksum x11-dl 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "29e78a65a3239e5511ffe2c832edb9224982ebf67bcaabc218ef1b07d8494b3e" -"checksum xcb 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "400cebeaedeca931825f11606874080f18aa51370dd3d7e11bc08d5aac8b3142" +"checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" "checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" "checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" "checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" diff --git a/components/bluetooth/Cargo.toml b/components/bluetooth/Cargo.toml index 3fd11443d8c..53784d13e9c 100644 --- a/components/bluetooth/Cargo.toml +++ b/components/bluetooth/Cargo.toml @@ -13,10 +13,10 @@ path = "lib.rs" bitflags = "1.0" bluetooth_traits = {path = "../bluetooth_traits"} device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]} -ipc-channel = "0.9" +ipc-channel = "0.10" servo_config = {path = "../config"} servo_rand = {path = "../rand"} -uuid = {version = "0.5", features = ["v4"]} +uuid = {version = "0.6", features = ["v4"]} [target.'cfg(target_os = "linux")'.dependencies] tinyfiledialogs = "3.0" diff --git a/components/bluetooth_traits/Cargo.toml b/components/bluetooth_traits/Cargo.toml index cb4009644cc..52b01c33c67 100644 --- a/components/bluetooth_traits/Cargo.toml +++ b/components/bluetooth_traits/Cargo.toml @@ -10,7 +10,7 @@ name = "bluetooth_traits" path = "lib.rs" [dependencies] -ipc-channel = "0.9" +ipc-channel = "0.10" regex = "0.2" serde = "1.0" servo_config = {path = "../config"} diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 0c30044010a..604fb4e16aa 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -17,7 +17,7 @@ cssparser = "0.23.0" euclid = "0.17" fnv = "1.0" gleam = "0.4" -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3.5" num-traits = "0.1.32" offscreen_gl_context = { version = "0.15", features = ["serde", "osmesa"] } diff --git a/components/canvas/gl_context.rs b/components/canvas/gl_context.rs index e0d686f622a..7720f8f678a 100644 --- a/components/canvas/gl_context.rs +++ b/components/canvas/gl_context.rs @@ -24,6 +24,9 @@ pub enum GLContextFactory { impl GLContextFactory { /// Creates a new GLContextFactory that uses the currently bound GL context to create shared contexts. pub fn current_native_handle(proxy: &CompositorProxy) -> Option<GLContextFactory> { + // FIXME(emilio): This assumes a single GL backend per platform which is + // not true on Linux, we probably need a third `Egl` variant or abstract + // it a bit more... NativeGLContext::current_handle().map(|handle| { if cfg!(target_os = "windows") { // Used to dispatch functions from the GLContext thread to the main thread's event loop. diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index bfb6c7ab5cb..529d697d17e 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -750,6 +750,8 @@ impl WebGLImpl { Self::active_uniform(ctx.gl(), program_id, index, chan), WebGLCommand::GetAttribLocation(program_id, name, chan) => Self::attrib_location(ctx.gl(), program_id, name, chan), + WebGLCommand::GetFramebufferAttachmentParameter(target, attachment, pname, chan) => + Self::get_framebuffer_attachment_parameter(ctx.gl(), target, attachment, pname, chan), WebGLCommand::GetVertexAttrib(index, pname, chan) => Self::vertex_attrib(ctx.gl(), index, pname, chan), WebGLCommand::GetVertexAttribOffset(index, pname, chan) => @@ -858,8 +860,12 @@ impl WebGLImpl { ctx.gl().vertex_attrib_pointer_f32(attrib_id, size, normalized, stride, offset), WebGLCommand::VertexAttribPointer(attrib_id, size, data_type, normalized, stride, offset) => ctx.gl().vertex_attrib_pointer(attrib_id, size, data_type, normalized, stride, offset), - WebGLCommand::Viewport(x, y, width, height) => - ctx.gl().viewport(x, y, width, height), + WebGLCommand::GetViewport(sender) => { + sender.send(ctx.gl().get_viewport()).unwrap(); + } + WebGLCommand::SetViewport(x, y, width, height) => { + ctx.gl().viewport(x, y, width, height); + } WebGLCommand::TexImage2D(target, level, internal, width, height, format, data_type, data) => ctx.gl().tex_image_2d(target, level, internal, width, height, /*border*/0, format, data_type, Some(&data)), @@ -1053,8 +1059,7 @@ impl WebGLImpl { // Int32Array gl::MAX_VIEWPORT_DIMS | - gl::SCISSOR_BOX | - gl::VIEWPORT => Err(WebGLError::InvalidEnum), + gl::SCISSOR_BOX => Err(WebGLError::InvalidEnum), // Invalid parameters _ => Err(WebGLError::InvalidEnum) @@ -1066,21 +1071,8 @@ impl WebGLImpl { fn get_tex_parameter(gl: &gl::Gl, target: u32, pname: u32, - chan: WebGLSender<WebGLResult<WebGLParameter>> ) { - let result = match pname { - gl::TEXTURE_MAG_FILTER | - gl::TEXTURE_MIN_FILTER | - gl::TEXTURE_WRAP_S | - gl::TEXTURE_WRAP_T => { - let parameter = gl.get_tex_parameter_iv(target, pname); - if parameter == 0 { - Ok(WebGLParameter::Invalid) - } else { - Ok(WebGLParameter::Int(parameter)) - } - } - _ => Err(WebGLError::InvalidEnum) - }; + chan: WebGLSender<i32> ) { + let result = gl.get_tex_parameter_iv(target, pname); chan.send(result).unwrap(); } @@ -1117,25 +1109,16 @@ impl WebGLImpl { fn vertex_attrib_offset(gl: &gl::Gl, index: u32, pname: u32, - chan: WebGLSender<WebGLResult<isize>>) { - let result = match pname { - gl::VERTEX_ATTRIB_ARRAY_POINTER => Ok(gl.get_vertex_attrib_pointer_v(index, pname)), - _ => Err(WebGLError::InvalidEnum), - }; - + chan: WebGLSender<isize>) { + let result = gl.get_vertex_attrib_pointer_v(index, pname); chan.send(result).unwrap(); } fn buffer_parameter(gl: &gl::Gl, target: u32, param_id: u32, - chan: WebGLSender<WebGLResult<WebGLParameter>>) { - let result = match param_id { - gl::BUFFER_SIZE | - gl::BUFFER_USAGE => - Ok(WebGLParameter::Int(gl.get_buffer_parameter_iv(target, param_id))), - _ => Err(WebGLError::InvalidEnum), - }; + chan: WebGLSender<i32>) { + let result = gl.get_buffer_parameter_iv(target, param_id); chan.send(result).unwrap(); } @@ -1178,21 +1161,8 @@ impl WebGLImpl { fn shader_precision_format(gl: &gl::Gl, shader_type: u32, precision_type: u32, - chan: WebGLSender<WebGLResult<(i32, i32, i32)>>) { - let result = match precision_type { - gl::LOW_FLOAT | - gl::MEDIUM_FLOAT | - gl::HIGH_FLOAT | - gl::LOW_INT | - gl::MEDIUM_INT | - gl::HIGH_INT => { - Ok(gl.get_shader_precision_format(shader_type, precision_type)) - }, - _=> { - Err(WebGLError::InvalidEnum) - } - }; - + chan: WebGLSender<(i32, i32, i32)>) { + let result = gl.get_shader_precision_format(shader_type, precision_type); chan.send(result).unwrap(); } @@ -1200,6 +1170,18 @@ impl WebGLImpl { chan.send(gl.get_string(gl::EXTENSIONS)).unwrap(); } + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6 + fn get_framebuffer_attachment_parameter( + gl: &gl::Gl, + target: u32, + attachment: u32, + pname: u32, + chan: WebGLSender<i32> + ) { + let parameter = gl.get_framebuffer_attachment_parameter_iv(target, attachment, pname); + chan.send(parameter).unwrap(); + } + fn uniform_location(gl: &gl::Gl, program_id: WebGLProgramId, name: String, diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml index 5780f340b5e..103b51841a0 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/canvas_traits/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] cssparser = "0.23.0" euclid = "0.17" -ipc-channel = "0.9" +ipc-channel = "0.10" lazy_static = "1" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs index 70aeb40ab06..208a728f293 100644 --- a/components/canvas_traits/webgl.rs +++ b/components/canvas_traits/webgl.rs @@ -204,21 +204,22 @@ pub enum WebGLCommand { EnableVertexAttribArray(u32), FramebufferRenderbuffer(u32, u32, u32, Option<WebGLRenderbufferId>), FramebufferTexture2D(u32, u32, u32, Option<WebGLTextureId>, i32), - GetBufferParameter(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>), + GetBufferParameter(u32, u32, WebGLSender<i32>), GetExtensions(WebGLSender<String>), GetParameter(u32, WebGLSender<WebGLResult<WebGLParameter>>), - GetTexParameter(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>), + GetTexParameter(u32, u32, WebGLSender<i32>), GetProgramParameter(WebGLProgramId, u32, WebGLSender<WebGLResult<WebGLParameter>>), GetShaderParameter(WebGLShaderId, u32, WebGLSender<WebGLResult<WebGLParameter>>), - GetShaderPrecisionFormat(u32, u32, WebGLSender<WebGLResult<(i32, i32, i32)>>), + GetShaderPrecisionFormat(u32, u32, WebGLSender<(i32, i32, i32)>), GetActiveAttrib(WebGLProgramId, u32, WebGLSender<WebGLResult<(i32, u32, String)>>), GetActiveUniform(WebGLProgramId, u32, WebGLSender<WebGLResult<(i32, u32, String)>>), GetAttribLocation(WebGLProgramId, String, WebGLSender<Option<i32>>), GetUniformLocation(WebGLProgramId, String, WebGLSender<Option<i32>>), GetVertexAttrib(u32, u32, WebGLSender<WebGLResult<WebGLParameter>>), - GetVertexAttribOffset(u32, u32, WebGLSender<WebGLResult<isize>>), + GetVertexAttribOffset(u32, u32, WebGLSender<isize>), GetShaderInfoLog(WebGLShaderId, WebGLSender<String>), GetProgramInfoLog(WebGLProgramId, WebGLSender<String>), + GetFramebufferAttachmentParameter(u32, u32, u32, WebGLSender<i32>), PolygonOffset(f32, f32), RenderbufferStorage(u32, u32, i32, i32), ReadPixels(i32, i32, i32, i32, u32, u32, WebGLSender<Vec<u8>>), @@ -259,7 +260,8 @@ pub enum WebGLCommand { VertexAttrib(u32, f32, f32, f32, f32), VertexAttribPointer(u32, i32, u32, bool, i32, u32), VertexAttribPointer2f(u32, i32, bool, i32, u32), - Viewport(i32, i32, i32, i32), + GetViewport(WebGLSender<(i32, i32, i32, i32)>), + SetViewport(i32, i32, i32, i32), TexImage2D(u32, i32, i32, i32, i32, u32, u32, Vec<u8>), TexParameteri(u32, u32, i32), TexParameterf(u32, u32, f32), @@ -490,6 +492,7 @@ impl fmt::Debug for WebGLCommand { GetProgramInfoLog(..) => "GetProgramInfoLog", GetVertexAttrib(..) => "GetVertexAttrib", GetVertexAttribOffset(..) => "GetVertexAttribOffset", + GetFramebufferAttachmentParameter(..) => "GetFramebufferAttachmentParameter", PolygonOffset(..) => "PolygonOffset", ReadPixels(..) => "ReadPixels", RenderbufferStorage(..) => "RenderbufferStorage", @@ -530,7 +533,8 @@ impl fmt::Debug for WebGLCommand { VertexAttrib(..) => "VertexAttrib", VertexAttribPointer2f(..) => "VertexAttribPointer2f", VertexAttribPointer(..) => "VertexAttribPointer", - Viewport(..) => "Viewport", + GetViewport(..) => "GetViewport", + SetViewport(..) => "SetViewport", TexImage2D(..) => "TexImage2D", TexParameteri(..) => "TexParameteri", TexParameterf(..) => "TexParameterf", diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 88cd1c47977..72851fbb867 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -14,7 +14,7 @@ euclid = "0.17" gfx_traits = {path = "../gfx_traits"} gleam = "0.4" image = "0.18" -ipc-channel = "0.9" +ipc-channel = "0.10" libc = "0.2" log = "0.3.5" msg = {path = "../msg"} @@ -27,5 +27,5 @@ servo_geometry = {path = "../geometry"} servo_url = {path = "../url"} style_traits = {path = "../style_traits"} time = "0.1.17" -webrender = {git = "https://github.com/servo/webrender"} +webrender = {git = "https://github.com/servo/webrender", features = ["capture"]} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 027151af9b4..ba31138d5aa 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -21,8 +21,9 @@ use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, To use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType}; use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent}; use servo_config::opts; -use servo_geometry::DeviceIndependentPixel; +use servo_geometry::{DeviceIndependentPixel, DeviceUintLength}; use std::collections::HashMap; +use std::env; use std::fs::File; use std::rc::Rc; use std::sync::mpsc::Sender; @@ -30,12 +31,12 @@ use std::time::{Duration, Instant}; use style_traits::{CSSPixel, DevicePixel, PinchZoomFactor}; use style_traits::cursor::CursorKind; use style_traits::viewport::ViewportConstraints; -use time::{precise_time_ns, precise_time_s}; +use time::{now, precise_time_ns, precise_time_s}; use touch::{TouchHandler, TouchAction}; use webrender; -use webrender_api::{self, DeviceUintRect, DeviceUintSize, HitTestFlags, HitTestResult}; +use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResult}; use webrender_api::{LayoutVector2D, ScrollEventPhase, ScrollLocation}; -use windowing::{self, MouseWindowEvent, WebRenderDebugOption, WindowMethods}; +use windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods}; #[derive(Debug, PartialEq)] enum UnableToComposite { @@ -109,12 +110,6 @@ pub struct IOCompositor<Window: WindowMethods> { /// The scene scale, to allow for zooming and high-resolution painting. scale: TypedScale<f32, LayerPixel, DevicePixel>, - /// The size of the rendering area. - frame_size: DeviceUintSize, - - /// The position and size of the window within the rendering area. - window_rect: DeviceUintRect, - /// "Mobile-style" zoom that does not reflow the page. viewport_zoom: PinchZoomFactor, @@ -125,9 +120,6 @@ pub struct IOCompositor<Window: WindowMethods> { /// "Desktop-style" zoom that resizes the viewport to fit the window. page_zoom: TypedScale<f32, CSSPixel, DeviceIndependentPixel>, - /// The device pixel ratio for this window. - scale_factor: TypedScale<f32, DeviceIndependentPixel, DevicePixel>, - /// The type of composition to perform composite_target: CompositeTarget, @@ -192,6 +184,9 @@ pub struct IOCompositor<Window: WindowMethods> { /// these frames, it records the paint time for each of them and sends the /// metric to the corresponding layout thread. pending_paint_metrics: HashMap<PipelineId, Epoch>, + + /// The coordinates of the native window, its view and the screen. + embedder_coordinates: EmbedderCoordinates, } #[derive(Clone, Copy)] @@ -201,7 +196,7 @@ struct ScrollZoomEvent { /// Scroll by this offset, or to Start or End scroll_location: ScrollLocation, /// Apply changes to the frame at this location - cursor: TypedPoint2D<i32, DevicePixel>, + cursor: DeviceIntPoint, /// The scroll event phase. phase: ScrollEventPhase, /// The number of OS events that have been coalesced together into this one event. @@ -274,15 +269,15 @@ impl RenderTargetInfo { } } -fn initialize_png(gl: &gl::Gl, width: usize, height: usize) -> RenderTargetInfo { +fn initialize_png(gl: &gl::Gl, width: DeviceUintLength, height: DeviceUintLength) -> RenderTargetInfo { let framebuffer_ids = gl.gen_framebuffers(1); gl.bind_framebuffer(gl::FRAMEBUFFER, framebuffer_ids[0]); let texture_ids = gl.gen_textures(1); gl.bind_texture(gl::TEXTURE_2D, texture_ids[0]); - gl.tex_image_2d(gl::TEXTURE_2D, 0, gl::RGB as gl::GLint, width as gl::GLsizei, - height as gl::GLsizei, 0, gl::RGB, gl::UNSIGNED_BYTE, None); + gl.tex_image_2d(gl::TEXTURE_2D, 0, gl::RGB as gl::GLint, width.get() as gl::GLsizei, + height.get() as gl::GLsizei, 0, gl::RGB, gl::UNSIGNED_BYTE, None); gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as gl::GLint); gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as gl::GLint); @@ -296,8 +291,8 @@ fn initialize_png(gl: &gl::Gl, width: usize, height: usize) -> RenderTargetInfo gl.bind_renderbuffer(gl::RENDERBUFFER, depth_rb); gl.renderbuffer_storage(gl::RENDERBUFFER, gl::DEPTH_COMPONENT24, - width as gl::GLsizei, - height as gl::GLsizei); + width.get() as gl::GLsizei, + height.get() as gl::GLsizei); gl.framebuffer_renderbuffer(gl::FRAMEBUFFER, gl::DEPTH_ATTACHMENT, gl::RENDERBUFFER, @@ -349,9 +344,6 @@ impl webrender_api::RenderNotifier for RenderNotifier { impl<Window: WindowMethods> IOCompositor<Window> { fn new(window: Rc<Window>, state: InitialCompositorState) -> IOCompositor<Window> { - let frame_size = window.framebuffer_size(); - let window_rect = window.window_rect(); - let scale_factor = window.hidpi_factor(); let composite_target = match opts::get().output_file { Some(_) => CompositeTarget::PngFile, None => CompositeTarget::Window @@ -359,14 +351,12 @@ impl<Window: WindowMethods> IOCompositor<Window> { IOCompositor { gl: window.gl(), + embedder_coordinates: window.get_coordinates(), window: window, port: state.receiver, root_pipeline: None, pipeline_details: HashMap::new(), - frame_size: frame_size, - window_rect: window_rect, scale: TypedScale::new(1.0), - scale_factor: scale_factor, composition_request: CompositionRequest::NoCompositingNecessary, touch_handler: TouchHandler::new(), pending_scroll_zoom_events: Vec::new(), @@ -547,6 +537,24 @@ impl<Window: WindowMethods> IOCompositor<Window> { self.pending_paint_metrics.insert(pipeline_id, epoch); } + (Msg::GetClientWindow(req), ShutdownState::NotShuttingDown) => { + if let Err(e) = req.send(self.embedder_coordinates.window) { + warn!("Sending response to get client window failed ({}).", e); + } + } + + (Msg::GetScreenSize(req), ShutdownState::NotShuttingDown) => { + if let Err(e) = req.send(self.embedder_coordinates.screen) { + warn!("Sending response to get screen size failed ({}).", e); + } + } + + (Msg::GetScreenAvailSize(req), ShutdownState::NotShuttingDown) => { + if let Err(e) = req.send(self.embedder_coordinates.screen_avail) { + warn!("Sending response to get screen avail size failed ({}).", e); + } + } + // When we are shutting_down, we need to avoid performing operations // such as Paint that may crash because we have begun tearing down // the rest of our resources. @@ -633,22 +641,24 @@ impl<Window: WindowMethods> IOCompositor<Window> { } fn send_window_size(&self, size_type: WindowSizeType) { - let dppx = self.page_zoom * self.hidpi_factor(); + let dppx = self.page_zoom * self.embedder_coordinates.hidpi_factor; self.webrender_api.set_window_parameters(self.webrender_document, - self.frame_size, - self.window_rect, - self.hidpi_factor().get()); + self.embedder_coordinates.framebuffer, + self.embedder_coordinates.viewport, + self.embedder_coordinates.hidpi_factor.get()); - let initial_viewport = self.window_rect.size.to_f32() / dppx; + let initial_viewport = self.embedder_coordinates.viewport.size.to_f32() / dppx; let data = WindowSizeData { device_pixel_ratio: dppx, initial_viewport: initial_viewport, }; + let top_level_browsing_context_id = self.root_pipeline.as_ref().map(|pipeline| { pipeline.top_level_browsing_context_id }); + let msg = ConstellationMsg::WindowSize(top_level_browsing_context_id, data, size_type); if let Err(e) = self.constellation_chan.send(msg) { @@ -659,24 +669,19 @@ impl<Window: WindowMethods> IOCompositor<Window> { pub fn on_resize_window_event(&mut self) { debug!("compositor resize requested"); + let old_coords = self.embedder_coordinates; + self.embedder_coordinates = self.window.get_coordinates(); + // A size change could also mean a resolution change. - let new_scale_factor = self.window.hidpi_factor(); - if self.scale_factor != new_scale_factor { - self.scale_factor = new_scale_factor; + if self.embedder_coordinates.hidpi_factor != old_coords.hidpi_factor { self.update_zoom_transform(); } - let new_window_rect = self.window.window_rect(); - let new_frame_size = self.window.framebuffer_size(); - - if self.window_rect == new_window_rect && - self.frame_size == new_frame_size { + if self.embedder_coordinates.viewport == old_coords.viewport && + self.embedder_coordinates.framebuffer == old_coords.framebuffer { return; } - self.frame_size = new_frame_size; - self.window_rect = new_window_rect; - self.send_window_size(WindowSizeType::Resize); } @@ -727,7 +732,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { } } - fn hit_test_at_point(&self, point: TypedPoint2D<f32, DevicePixel>) -> HitTestResult { + fn hit_test_at_point(&self, point: DevicePoint) -> HitTestResult { let dppx = self.page_zoom * self.hidpi_factor(); let scaled_point = (point / dppx).to_untyped(); @@ -741,7 +746,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { } - pub fn on_mouse_window_move_event_class(&mut self, cursor: TypedPoint2D<f32, DevicePixel>) { + pub fn on_mouse_window_move_event_class(&mut self, cursor: DevicePoint) { if opts::get().convert_mouse_to_touch { self.on_touch_move(TouchId(0), cursor); return @@ -750,7 +755,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { self.dispatch_mouse_window_move_event_class(cursor); } - fn dispatch_mouse_window_move_event_class(&mut self, cursor: TypedPoint2D<f32, DevicePixel>) { + fn dispatch_mouse_window_move_event_class(&mut self, cursor: DevicePoint) { let root_pipeline_id = match self.get_root_pipeline_id() { Some(root_pipeline_id) => root_pipeline_id, None => return, @@ -782,7 +787,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { &self, event_type: TouchEventType, identifier: TouchId, - point: TypedPoint2D<f32, DevicePixel>) + point: DevicePoint) { let results = self.hit_test_at_point(point); if let Some(item) = results.items.first() { @@ -803,7 +808,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { pub fn on_touch_event(&mut self, event_type: TouchEventType, identifier: TouchId, - location: TypedPoint2D<f32, DevicePixel>) { + location: DevicePoint) { match event_type { TouchEventType::Down => self.on_touch_down(identifier, location), TouchEventType::Move => self.on_touch_move(identifier, location), @@ -812,12 +817,12 @@ impl<Window: WindowMethods> IOCompositor<Window> { } } - fn on_touch_down(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) { + fn on_touch_down(&mut self, identifier: TouchId, point: DevicePoint) { self.touch_handler.on_touch_down(identifier, point); self.send_touch_event(TouchEventType::Down, identifier, point); } - fn on_touch_move(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) { + fn on_touch_move(&mut self, identifier: TouchId, point: DevicePoint) { match self.touch_handler.on_touch_move(identifier, point) { TouchAction::Scroll(delta) => { match point.cast() { @@ -848,7 +853,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { } } - fn on_touch_up(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) { + fn on_touch_up(&mut self, identifier: TouchId, point: DevicePoint) { self.send_touch_event(TouchEventType::Up, identifier, point); if let TouchAction::Click = self.touch_handler.on_touch_up(identifier, point) { @@ -856,14 +861,14 @@ impl<Window: WindowMethods> IOCompositor<Window> { } } - fn on_touch_cancel(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) { + fn on_touch_cancel(&mut self, identifier: TouchId, point: DevicePoint) { // Send the event to script. self.touch_handler.on_touch_cancel(identifier, point); self.send_touch_event(TouchEventType::Cancel, identifier, point); } /// <http://w3c.github.io/touch-events/#mouse-events> - fn simulate_mouse_click(&mut self, p: TypedPoint2D<f32, DevicePixel>) { + fn simulate_mouse_click(&mut self, p: DevicePoint) { let button = MouseButton::Left; self.dispatch_mouse_window_move_event_class(p); self.dispatch_mouse_window_event_class(MouseWindowEvent::MouseDown(button, p)); @@ -873,7 +878,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { pub fn on_scroll_event(&mut self, delta: ScrollLocation, - cursor: TypedPoint2D<i32, DevicePixel>, + cursor: DeviceIntPoint, phase: TouchEventType) { match phase { TouchEventType::Move => self.on_scroll_window_event(delta, cursor), @@ -888,7 +893,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { fn on_scroll_window_event(&mut self, scroll_location: ScrollLocation, - cursor: TypedPoint2D<i32, DevicePixel>) { + cursor: DeviceIntPoint) { let event_phase = match (self.scroll_in_progress, self.in_scroll_transaction) { (false, None) => ScrollEventPhase::Start, (false, Some(last_scroll)) if last_scroll.elapsed() > Duration::from_millis(80) => @@ -907,7 +912,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { fn on_scroll_start_window_event(&mut self, scroll_location: ScrollLocation, - cursor: TypedPoint2D<i32, DevicePixel>) { + cursor: DeviceIntPoint) { self.scroll_in_progress = true; self.pending_scroll_zoom_events.push(ScrollZoomEvent { magnification: 1.0, @@ -920,7 +925,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { fn on_scroll_end_window_event(&mut self, scroll_location: ScrollLocation, - cursor: TypedPoint2D<i32, DevicePixel>) { + cursor: DeviceIntPoint) { self.scroll_in_progress = false; self.pending_scroll_zoom_events.push(ScrollZoomEvent { magnification: 1.0, @@ -1093,7 +1098,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { Some(device_pixels_per_px) => TypedScale::new(device_pixels_per_px), None => match opts::get().output_file { Some(_) => TypedScale::new(1.0), - None => self.scale_factor + None => self.embedder_coordinates.hidpi_factor, } } } @@ -1253,8 +1258,8 @@ impl<Window: WindowMethods> IOCompositor<Window> { fn composite_specific_target(&mut self, target: CompositeTarget) -> Result<Option<Image>, UnableToComposite> { - let (width, height) = - (self.frame_size.width as usize, self.frame_size.height as usize); + let width = self.embedder_coordinates.framebuffer.width_typed(); + let height = self.embedder_coordinates.framebuffer.height_typed(); if !self.window.prepare_for_composite(width, height) { return Err(UnableToComposite::WindowUnprepared) } @@ -1289,7 +1294,7 @@ impl<Window: WindowMethods> IOCompositor<Window> { // Paint the scene. // TODO(gw): Take notice of any errors the renderer returns! - self.webrender.render(self.frame_size).ok(); + self.webrender.render(self.embedder_coordinates.framebuffer).ok(); }); // If there are pending paint metrics, we check if any of the painted epochs is @@ -1374,9 +1379,11 @@ impl<Window: WindowMethods> IOCompositor<Window> { fn draw_img(&self, render_target_info: RenderTargetInfo, - width: usize, - height: usize) + width: DeviceUintLength, + height: DeviceUintLength) -> RgbImage { + let width = width.get() as usize; + let height = height.get() as usize; // For some reason, OSMesa fails to render on the 3rd // attempt in headless mode, under some conditions. // I think this can only be some kind of synchronization @@ -1530,6 +1537,17 @@ impl<Window: WindowMethods> IOCompositor<Window> { txn.generate_frame(); self.webrender_api.send_transaction(self.webrender_document, txn); } + + pub fn capture_webrender(&mut self) { + match env::current_dir() { + Ok(current_dir) => { + let capture_id = now().to_timespec().sec.to_string(); + let capture_path = current_dir.join("capture_webrender").join(capture_id); + self.webrender_api.save_capture(capture_path, webrender_api::CaptureBits::all()); + }, + Err(err) => println!("could not locate path to save captures: {:?}", err) + } + } } /// Why we performed a composite. This is used for debugging. diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index 2695970e320..3f43c2ba2bb 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -6,7 +6,6 @@ use SendableFrameTree; use compositor::CompositingReason; -use euclid::{Point2D, Size2D}; use gfx_traits::Epoch; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::{Key, KeyModifiers, KeyState, PipelineId, TopLevelBrowsingContextId}; @@ -20,7 +19,7 @@ use std::sync::mpsc::{Receiver, Sender}; use style_traits::cursor::CursorKind; use style_traits::viewport::ViewportConstraints; use webrender; -use webrender_api; +use webrender_api::{self, DeviceIntPoint, DeviceUintSize}; /// Used to wake up the event loop, provided by the servo port/embedder. @@ -119,15 +118,9 @@ pub enum EmbedderMsg { /// Alerts the embedder that the current page has changed its title. ChangePageTitle(TopLevelBrowsingContextId, Option<String>), /// Move the window to a point - MoveTo(TopLevelBrowsingContextId, Point2D<i32>), + MoveTo(TopLevelBrowsingContextId, DeviceIntPoint), /// Resize the window to size - ResizeTo(TopLevelBrowsingContextId, Size2D<u32>), - /// Get Window Informations size and position - GetClientWindow(TopLevelBrowsingContextId, IpcSender<(Size2D<u32>, Point2D<i32>)>), - /// Get screen size (pixel) - GetScreenSize(TopLevelBrowsingContextId, IpcSender<(Size2D<u32>)>), - /// Get screen available size (pixel) - GetScreenAvailSize(TopLevelBrowsingContextId, IpcSender<(Size2D<u32>)>), + ResizeTo(TopLevelBrowsingContextId, DeviceUintSize), /// Wether or not to follow a link AllowNavigation(TopLevelBrowsingContextId, ServoUrl, IpcSender<bool>), /// Sends an unconsumed key event back to the embedder. @@ -148,6 +141,8 @@ pub enum EmbedderMsg { LoadComplete(TopLevelBrowsingContextId), /// A pipeline panicked. First string is the reason, second one is the backtrace. Panic(TopLevelBrowsingContextId, String, Option<String>), + /// Servo has shut down + Shutdown, } /// Messages from the painting thread and the constellation thread to the compositor thread. @@ -196,6 +191,12 @@ pub enum Msg { /// The load of a page has completed LoadComplete(TopLevelBrowsingContextId), + /// Get Window Informations size and position. + GetClientWindow(IpcSender<(DeviceUintSize, DeviceIntPoint)>), + /// Get screen size. + GetScreenSize(IpcSender<DeviceUintSize>), + /// Get screen available size. + GetScreenAvailSize(IpcSender<DeviceUintSize>), } impl Debug for Msg { @@ -216,6 +217,9 @@ impl Debug for Msg { Msg::Dispatch(..) => write!(f, "Dispatch"), Msg::PendingPaintMetric(..) => write!(f, "PendingPaintMetric"), Msg::LoadComplete(..) => write!(f, "LoadComplete"), + Msg::GetClientWindow(..) => write!(f, "GetClientWindow"), + Msg::GetScreenSize(..) => write!(f, "GetScreenSize"), + Msg::GetScreenAvailSize(..) => write!(f, "GetScreenAvailSize"), } } } @@ -227,9 +231,6 @@ impl Debug for EmbedderMsg { EmbedderMsg::ChangePageTitle(..) => write!(f, "ChangePageTitle"), EmbedderMsg::MoveTo(..) => write!(f, "MoveTo"), EmbedderMsg::ResizeTo(..) => write!(f, "ResizeTo"), - EmbedderMsg::GetClientWindow(..) => write!(f, "GetClientWindow"), - EmbedderMsg::GetScreenSize(..) => write!(f, "GetScreenSize"), - EmbedderMsg::GetScreenAvailSize(..) => write!(f, "GetScreenAvailSize"), EmbedderMsg::AllowNavigation(..) => write!(f, "AllowNavigation"), EmbedderMsg::KeyEvent(..) => write!(f, "KeyEvent"), EmbedderMsg::SetCursor(..) => write!(f, "SetCursor"), @@ -240,6 +241,7 @@ impl Debug for EmbedderMsg { EmbedderMsg::LoadStart(..) => write!(f, "LoadStart"), EmbedderMsg::LoadComplete(..) => write!(f, "LoadComplete"), EmbedderMsg::Panic(..) => write!(f, "Panic"), + EmbedderMsg::Shutdown => write!(f, "Shutdown"), } } } diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 473e85fcb07..4bfe455ab5b 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -5,26 +5,23 @@ //! Abstract windowing methods. The concrete implementations of these can be found in `platform/`. use compositor_thread::EventLoopWaker; -use euclid::{Point2D, Size2D}; -use euclid::{TypedScale, TypedPoint2D, TypedSize2D}; +use euclid::TypedScale; use gleam::gl; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::{Key, KeyModifiers, KeyState, TopLevelBrowsingContextId, TraversalDirection}; -use net_traits::net_error_list::NetError; -use script_traits::{LoadData, MouseButton, TouchEventType, TouchId}; -use servo_geometry::DeviceIndependentPixel; +use script_traits::{MouseButton, TouchEventType, TouchId}; +use servo_geometry::{DeviceIndependentPixel, DeviceUintLength}; use servo_url::ServoUrl; use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use style_traits::DevicePixel; -use style_traits::cursor::CursorKind; -use webrender_api::{DeviceUintSize, DeviceUintRect, ScrollLocation}; +use webrender_api::{DeviceIntPoint, DevicePoint, DeviceUintSize, DeviceUintRect, ScrollLocation}; #[derive(Clone)] pub enum MouseWindowEvent { - Click(MouseButton, TypedPoint2D<f32, DevicePixel>), - MouseDown(MouseButton, TypedPoint2D<f32, DevicePixel>), - MouseUp(MouseButton, TypedPoint2D<f32, DevicePixel>), + Click(MouseButton, DevicePoint), + MouseDown(MouseButton, DevicePoint), + MouseUp(MouseButton, DevicePoint), } /// Various debug and profiling flags that WebRender supports. @@ -55,12 +52,12 @@ pub enum WindowEvent { /// Sent when a mouse hit test is to be performed. MouseWindowEventClass(MouseWindowEvent), /// Sent when a mouse move. - MouseWindowMoveEventClass(TypedPoint2D<f32, DevicePixel>), + MouseWindowMoveEventClass(DevicePoint), /// Touch event: type, identifier, point - Touch(TouchEventType, TouchId, TypedPoint2D<f32, DevicePixel>), + Touch(TouchEventType, TouchId, DevicePoint), /// Sent when the user scrolls. The first point is the delta and the second point is the /// origin. - Scroll(ScrollLocation, TypedPoint2D<i32, DevicePixel>, TouchEventType), + Scroll(ScrollLocation, DeviceIntPoint, TouchEventType), /// Sent when the user zooms. Zoom(f32), /// Simulated "pinch zoom" gesture for non-touch platforms (e.g. ctrl-scrollwheel). @@ -84,6 +81,8 @@ pub enum WindowEvent { SelectBrowser(TopLevelBrowsingContextId), /// Toggles a debug flag in WebRender ToggleWebRenderDebug(WebRenderDebugOption), + /// Capture current WebRender + CaptureWebRender, } impl Debug for WindowEvent { @@ -108,6 +107,7 @@ impl Debug for WindowEvent { WindowEvent::CloseBrowser(..) => write!(f, "CloseBrowser"), WindowEvent::SelectBrowser(..) => write!(f, "SelectBrowser"), WindowEvent::ToggleWebRenderDebug(..) => write!(f, "ToggleWebRenderDebug"), + WindowEvent::CaptureWebRender => write!(f, "CaptureWebRender"), } } } @@ -119,77 +119,39 @@ pub enum AnimationState { } pub trait WindowMethods { - /// Returns the rendering area size in hardware pixels. - fn framebuffer_size(&self) -> DeviceUintSize; - /// Returns the position and size of the window within the rendering area. - fn window_rect(&self) -> DeviceUintRect; - /// Returns the size of the window in density-independent "px" units. - fn size(&self) -> TypedSize2D<f32, DeviceIndependentPixel>; /// Presents the window to the screen (perhaps by page flipping). fn present(&self); - - /// Return the size of the window with head and borders and position of the window values - fn client_window(&self, ctx: TopLevelBrowsingContextId) -> (Size2D<u32>, Point2D<i32>); - /// Return the size of the screen (pixel) - fn screen_size(&self, ctx: TopLevelBrowsingContextId) -> Size2D<u32>; - /// Return the available size of the screen (pixel) - fn screen_avail_size(&self, ctx: TopLevelBrowsingContextId) -> Size2D<u32>; - /// Set the size inside of borders and head - fn set_inner_size(&self, ctx: TopLevelBrowsingContextId, size: Size2D<u32>); - /// Set the window position - fn set_position(&self, ctx: TopLevelBrowsingContextId, point: Point2D<i32>); - /// Set fullscreen state - fn set_fullscreen_state(&self, ctx: TopLevelBrowsingContextId, state: bool); - - /// Sets the page title for the current page. - fn set_page_title(&self, ctx: TopLevelBrowsingContextId, title: Option<String>); - /// Called when the browser chrome should display a status message. - fn status(&self, ctx: TopLevelBrowsingContextId, Option<String>); - /// Called when the browser has started loading a frame. - fn load_start(&self, ctx: TopLevelBrowsingContextId); - /// Called when the browser is done loading a frame. - fn load_end(&self, ctx: TopLevelBrowsingContextId); - /// Called when the browser encounters an error while loading a URL - fn load_error(&self, ctx: TopLevelBrowsingContextId, code: NetError, url: String); - /// Wether or not to follow a link - fn allow_navigation(&self, ctx: TopLevelBrowsingContextId, url: ServoUrl, IpcSender<bool>); - /// Called when the <head> tag has finished parsing - fn head_parsed(&self, ctx: TopLevelBrowsingContextId); - /// Called when the history state has changed. - fn history_changed(&self, ctx: TopLevelBrowsingContextId, Vec<LoadData>, usize); - - /// Returns the scale factor of the system (device pixels / device independent pixels). - fn hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel>; - - /// Returns a thread-safe object to wake up the window's event loop. - fn create_event_loop_waker(&self) -> Box<EventLoopWaker>; - /// Requests that the window system prepare a composite. Typically this will involve making /// some type of platform-specific graphics context current. Returns true if the composite may /// proceed and false if it should not. - fn prepare_for_composite(&self, width: usize, height: usize) -> bool; - - /// Sets the cursor to be used in the window. - fn set_cursor(&self, cursor: CursorKind); - - /// Process a key event. - fn handle_key(&self, ctx: Option<TopLevelBrowsingContextId>, ch: Option<char>, key: Key, mods: KeyModifiers); - - /// Does this window support a clipboard - fn supports_clipboard(&self) -> bool; - - /// Add a favicon - fn set_favicon(&self, ctx: TopLevelBrowsingContextId, url: ServoUrl); - + fn prepare_for_composite(&self, width: DeviceUintLength, height: DeviceUintLength) -> bool; /// Return the GL function pointer trait. fn gl(&self) -> Rc<gl::Gl>; - + /// Returns a thread-safe object to wake up the window's event loop. + fn create_event_loop_waker(&self) -> Box<EventLoopWaker>; + /// Get the coordinates of the native window, the screen and the framebuffer. + fn get_coordinates(&self) -> EmbedderCoordinates; + /// Does this window support a clipboard + fn supports_clipboard(&self) -> bool; /// Set whether the application is currently animating. /// Typically, when animations are active, the window /// will want to avoid blocking on UI events, and just /// run the event loop at the vsync interval. - fn set_animation_state(&self, _state: AnimationState) {} + fn set_animation_state(&self, _state: AnimationState); +} - /// Called when a pipeline panics. - fn handle_panic(&self, browser_id: TopLevelBrowsingContextId, reason: String, backtrace: Option<String>); +#[derive(Clone, Copy, Debug)] +pub struct EmbedderCoordinates { + /// The pixel density of the display. + pub hidpi_factor: TypedScale<f32, DeviceIndependentPixel, DevicePixel>, + /// Size of the screen. + pub screen: DeviceUintSize, + /// Size of the available screen space (screen without toolbars and docks). + pub screen_avail: DeviceUintSize, + /// Size of the native window. + pub window: (DeviceUintSize, DeviceIntPoint), + /// Size of the GL buffer in the window. + pub framebuffer: DeviceUintSize, + /// Coordinates of the document within the framebuffer. + pub viewport: DeviceUintRect, } diff --git a/components/config/opts.rs b/components/config/opts.rs index fbca63417ae..c9b70b5a131 100644 --- a/components/config/opts.rs +++ b/components/config/opts.rs @@ -911,6 +911,9 @@ lazy_static! { } pub fn set_defaults(opts: Opts) { + // Set the static to the new default value. + MULTIPROCESS.store(opts.multiprocess, Ordering::SeqCst); + unsafe { assert!(DEFAULT_OPTIONS.is_null()); assert_ne!(DEFAULT_OPTIONS, INVALID_OPTIONS); diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index e821fabdc2d..e7e82ea8e07 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -22,7 +22,7 @@ euclid = "0.17" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} hyper = "0.10" -ipc-channel = "0.9" +ipc-channel = "0.10" itertools = "0.7" layout_traits = {path = "../layout_traits"} log = "0.3.5" diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index f6a47ba14b1..738d992b840 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -325,7 +325,7 @@ pub struct Constellation<Message, LTF, STF> { phantom: PhantomData<(Message, LTF, STF)>, /// Entry point to create and get channels to a WebGLThread. - webgl_threads: WebGLThreads, + webgl_threads: Option<WebGLThreads>, /// A channel through which messages can be sent to the webvr thread. webvr_chan: Option<IpcSender<WebVRMsg>>, @@ -370,7 +370,7 @@ pub struct InitialConstellationState { pub webrender_api_sender: webrender_api::RenderApiSender, /// Entry point to create and get channels to a WebGLThread. - pub webgl_threads: WebGLThreads, + pub webgl_threads: Option<WebGLThreads>, /// A channel to the webgl thread. pub webvr_chan: Option<IpcSender<WebVRMsg>>, @@ -740,7 +740,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> webrender_api_sender: self.webrender_api_sender.clone(), webrender_document: self.webrender_document, is_private, - webgl_chan: self.webgl_threads.pipeline(), + webgl_chan: self.webgl_threads.as_ref().map(|threads| threads.pipeline()), webvr_chan: self.webvr_chan.clone() }); @@ -1229,9 +1229,6 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> debug!("constellation got Alert message"); self.handle_alert(source_top_ctx_id, message, sender); } - FromScriptMsg::GetClientWindow(send) => { - self.embedder_proxy.send(EmbedderMsg::GetClientWindow(source_top_ctx_id, send)); - } FromScriptMsg::MoveTo(point) => { self.embedder_proxy.send(EmbedderMsg::MoveTo(source_top_ctx_id, point)); @@ -1241,12 +1238,14 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> self.embedder_proxy.send(EmbedderMsg::ResizeTo(source_top_ctx_id, size)); } + FromScriptMsg::GetClientWindow(send) => { + self.compositor_proxy.send(ToCompositorMsg::GetClientWindow(send)); + } FromScriptMsg::GetScreenSize(send) => { - self.embedder_proxy.send(EmbedderMsg::GetScreenSize(source_top_ctx_id, send)); + self.compositor_proxy.send(ToCompositorMsg::GetScreenSize(send)); } - FromScriptMsg::GetScreenAvailSize(send) => { - self.embedder_proxy.send(EmbedderMsg::GetScreenAvailSize(source_top_ctx_id, send)); + self.compositor_proxy.send(ToCompositorMsg::GetScreenAvailSize(send)); } FromScriptMsg::Exit => { @@ -1431,9 +1430,11 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF> } } - debug!("Exiting WebGL thread."); - if let Err(e) = self.webgl_threads.exit() { - warn!("Exit WebGL Thread failed ({})", e); + if let Some(webgl_threads) = self.webgl_threads.as_ref() { + debug!("Exiting WebGL thread."); + if let Err(e) = webgl_threads.exit() { + warn!("Exit WebGL Thread failed ({})", e); + } } if let Some(chan) = self.webvr_chan.as_ref() { diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs index 4753f0ba3eb..99603cad805 100644 --- a/components/constellation/pipeline.rs +++ b/components/constellation/pipeline.rs @@ -170,8 +170,8 @@ pub struct InitialPipelineState { /// Whether this pipeline is considered private. pub is_private: bool, - /// A channel to the webgl thread. - pub webgl_chan: WebGLPipeline, + /// A channel to the WebGL thread. + pub webgl_chan: Option<WebGLPipeline>, /// A channel to the webvr thread. pub webvr_chan: Option<IpcSender<WebVRMsg>>, @@ -457,7 +457,7 @@ pub struct UnprivilegedPipelineContent { script_content_process_shutdown_port: IpcReceiver<()>, webrender_api_sender: webrender_api::RenderApiSender, webrender_document: webrender_api::DocumentId, - webgl_chan: WebGLPipeline, + webgl_chan: Option<WebGLPipeline>, webvr_chan: Option<IpcSender<WebVRMsg>>, } diff --git a/components/debugger/Cargo.toml b/components/debugger/Cargo.toml index d098148528c..a5f2f4b4eab 100644 --- a/components/debugger/Cargo.toml +++ b/components/debugger/Cargo.toml @@ -12,4 +12,4 @@ crate_type = ["rlib"] [dependencies] log = "0.3.5" -ws = "0.6" +ws = "0.7.3" diff --git a/components/devtools/Cargo.toml b/components/devtools/Cargo.toml index 91a05ef3181..c32d26e05ab 100644 --- a/components/devtools/Cargo.toml +++ b/components/devtools/Cargo.toml @@ -13,7 +13,7 @@ path = "lib.rs" devtools_traits = {path = "../devtools_traits"} hyper = "0.10" hyper_serde = "0.8" -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3.5" msg = {path = "../msg"} serde = "1.0" diff --git a/components/devtools_traits/Cargo.toml b/components/devtools_traits/Cargo.toml index ebd6bee4967..49c7f7ac332 100644 --- a/components/devtools_traits/Cargo.toml +++ b/components/devtools_traits/Cargo.toml @@ -13,7 +13,7 @@ path = "lib.rs" bitflags = "1.0" hyper = "0.10" hyper_serde = "0.8" -ipc-channel = "0.9" +ipc-channel = "0.10" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } msg = {path = "../msg"} diff --git a/components/geometry/Cargo.toml b/components/geometry/Cargo.toml index 8ca688bd64c..d37b8b9e64d 100644 --- a/components/geometry/Cargo.toml +++ b/components/geometry/Cargo.toml @@ -14,4 +14,5 @@ app_units = "0.6" euclid = "0.17" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } +style_traits = { path = "../style_traits" } webrender_api = { git = "https://github.com/servo/webrender" } diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs index c22c9d16055..c4bb9721bf6 100644 --- a/components/geometry/lib.rs +++ b/components/geometry/lib.rs @@ -5,16 +5,20 @@ extern crate app_units; extern crate euclid; extern crate malloc_size_of; +extern crate style_traits; #[macro_use] extern crate malloc_size_of_derive; extern crate webrender_api; use app_units::{Au, MAX_AU, MIN_AU}; -use euclid::{Point2D, Rect, Size2D}; +use euclid::{Length, Point2D, Rect, Size2D}; use std::f32; +use style_traits::DevicePixel; use webrender_api::{LayoutPoint, LayoutRect, LayoutSize}; // Units for use with euclid::length and euclid::scale_factor. +pub type DeviceUintLength = Length<u32, DevicePixel>; + /// A normalized "pixel" at the default resolution for the display. /// /// Like the CSS "px" unit, the exact physical size of this unit may vary between devices, but it diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 91e47419364..d99fa2100d9 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -23,7 +23,7 @@ fnv = "1.0" fontsan = {git = "https://github.com/servo/fontsan"} gfx_traits = {path = "../gfx_traits"} harfbuzz-sys = "0.1" -ipc-channel = "0.9" +ipc-channel = "0.10" lazy_static = "1" libc = "0.2" log = "0.3.5" diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 23efeaf9445..aa081c1e280 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -28,8 +28,8 @@ use std::fmt; use webrender_api::{BorderRadius, BorderWidths, BoxShadowClipMode, ClipMode, ColorF}; use webrender_api::{ComplexClipRegion, ExtendMode, ExternalScrollId, FilterOp, FontInstanceKey}; use webrender_api::{GlyphInstance, GradientStop, ImageBorder, ImageKey, ImageRendering}; -use webrender_api::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D, LineStyle}; -use webrender_api::{LocalClip, MixBlendMode, NormalBorder, ScrollPolicy, ScrollSensitivity}; +use webrender_api::{LayoutPoint, LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D}; +use webrender_api::{LineStyle, MixBlendMode, NormalBorder, ScrollPolicy, ScrollSensitivity}; use webrender_api::{StickyOffsetBounds, TransformStyle}; pub use style::dom::OpaqueNode; @@ -375,8 +375,8 @@ pub struct BaseDisplayItem { /// Metadata attached to this display item. pub metadata: DisplayItemMetadata, - /// The local clip for this item. - pub local_clip: LocalClip, + /// The clip rectangle to use for this item. + pub clip_rect: LayoutRect, /// The section of the display list that this item belongs to. pub section: DisplayListSection, @@ -392,7 +392,7 @@ impl BaseDisplayItem { #[inline(always)] pub fn new(bounds: LayoutRect, metadata: DisplayItemMetadata, - local_clip: LocalClip, + clip_rect: LayoutRect, section: DisplayListSection, stacking_context_id: StackingContextId, clipping_and_scrolling: ClippingAndScrolling) @@ -400,7 +400,7 @@ impl BaseDisplayItem { BaseDisplayItem { bounds, metadata, - local_clip, + clip_rect, section, stacking_context_id, clipping_and_scrolling, @@ -416,7 +416,7 @@ impl BaseDisplayItem { pointing: None, }, // Create a rectangle of maximal size. - local_clip: LocalClip::from(LayoutRect::max_rect()), + clip_rect: LayoutRect::max_rect(), section: DisplayListSection::Content, stacking_context_id: StackingContextId::root(), clipping_and_scrolling: ClippingAndScrolling::simple(ClipScrollNodeIndex(0)), @@ -958,7 +958,7 @@ impl fmt::Debug for DisplayItem { DisplayItem::DefineClipScrollNode(_) => "".to_owned(), }, self.bounds(), - self.base().local_clip + self.base().clip_rect ) } } diff --git a/components/hashglobe/Cargo.toml b/components/hashglobe/Cargo.toml index 6deb04a7531..4bde6d19f99 100644 --- a/components/hashglobe/Cargo.toml +++ b/components/hashglobe/Cargo.toml @@ -13,4 +13,4 @@ readme = "README.md" libc = "0.2" [dev-dependencies] -rand = "0.3" +rand = "0.4" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 9f8685324e3..e1d210be001 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -21,14 +21,14 @@ fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} html5ever = "0.22" -ipc-channel = "0.9" +ipc-channel = "0.10" libc = "0.2" log = "0.3.5" malloc_size_of = { path = "../malloc_size_of" } msg = {path = "../msg"} net_traits = {path = "../net_traits"} ordered-float = "0.4" -parking_lot = "0.4" +parking_lot = "0.5" profile_traits = {path = "../profile_traits"} range = {path = "../range"} rayon = "1" diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 32a5ae19d3a..36e6cd6c58f 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -75,8 +75,8 @@ use style_traits::cursor::CursorKind; use table_cell::CollapsedBordersForCell; use webrender_api::{self, BorderRadius, BorderSide, BoxShadowClipMode, ColorF, ExternalScrollId}; use webrender_api::{FilterOp, GlyphInstance, ImageRendering, LayoutRect, LayoutSize}; -use webrender_api::{LayoutTransform, LayoutVector2D, LineStyle, LocalClip, NormalBorder}; -use webrender_api::{ScrollPolicy, ScrollSensitivity, StickyOffsetBounds}; +use webrender_api::{LayoutTransform, LayoutVector2D, LineStyle, NormalBorder, ScrollPolicy}; +use webrender_api::{ScrollSensitivity, StickyOffsetBounds}; fn establishes_containing_block_for_absolute( flags: StackingContextCollectionFlags, @@ -384,7 +384,7 @@ impl<'a> DisplayListBuildState<'a> { fn create_base_display_item( &self, bounds: &Rect<Au>, - clip: LocalClip, + clip_rect: &Rect<Au>, node: OpaqueNode, cursor: Option<CursorKind>, section: DisplayListSection, @@ -404,7 +404,7 @@ impl<'a> DisplayListBuildState<'a> { // Store cursor id in display list. pointing: cursor.map(|x| x as u16), }, - clip, + clip_rect.to_layout(), section, self.current_stacking_context_id, clipping_and_scrolling, @@ -856,7 +856,7 @@ impl FragmentDisplayListBuilding for Fragment { let base = state.create_base_display_item( &bounds, - LocalClip::Rect(bounds.to_layout()), + &bounds, self.node, style.get_cursor(CursorKind::Default), display_list_section, @@ -973,7 +973,7 @@ impl FragmentDisplayListBuilding for Fragment { // Create the image display item. let base = state.create_base_display_item( &placement.bounds, - LocalClip::Rect(placement.css_clip.to_layout()), + &placement.css_clip, self.node, style.get_cursor(CursorKind::Default), display_list_section, @@ -1071,7 +1071,7 @@ impl FragmentDisplayListBuilding for Fragment { let base = state.create_base_display_item( &placement.bounds, - LocalClip::Rect(placement.css_clip.to_layout()), + &placement.css_clip, self.node, style.get_cursor(CursorKind::Default), display_list_section, @@ -1132,7 +1132,7 @@ impl FragmentDisplayListBuilding for Fragment { let base = state.create_base_display_item( &bounds, - LocalClip::from(clip.to_layout()), + clip, self.node, style.get_cursor(CursorKind::Default), display_list_section, @@ -1221,7 +1221,7 @@ impl FragmentDisplayListBuilding for Fragment { // Append the border to the display list. let base = state.create_base_display_item( &bounds, - LocalClip::from(clip.to_layout()), + clip, self.node, style.get_cursor(CursorKind::Default), display_list_section, @@ -1344,7 +1344,7 @@ impl FragmentDisplayListBuilding for Fragment { .to_layout(); let base = state.create_base_display_item( &bounds, - LocalClip::from(clip.to_layout()), + clip, self.node, style.get_cursor(CursorKind::Default), DisplayListSection::Outlines, @@ -1371,7 +1371,7 @@ impl FragmentDisplayListBuilding for Fragment { // Compute the text fragment bounds and draw a border surrounding them. let base = state.create_base_display_item( stacking_relative_border_box, - LocalClip::from(clip.to_layout()), + clip, self.node, style.get_cursor(CursorKind::Default), DisplayListSection::Content, @@ -1397,7 +1397,7 @@ impl FragmentDisplayListBuilding for Fragment { let base = state.create_base_display_item( &baseline, - LocalClip::from(clip.to_layout()), + clip, self.node, style.get_cursor(CursorKind::Default), DisplayListSection::Content, @@ -1418,7 +1418,7 @@ impl FragmentDisplayListBuilding for Fragment { // This prints a debug border around the border of this fragment. let base = state.create_base_display_item( stacking_relative_border_box, - LocalClip::from(clip.to_layout()), + clip, self.node, self.style.get_cursor(CursorKind::Default), DisplayListSection::Content, @@ -1455,7 +1455,7 @@ impl FragmentDisplayListBuilding for Fragment { let background_color = style.resolve_color(style.get_background().background_color); let base = state.create_base_display_item( stacking_relative_border_box, - LocalClip::from(clip.to_layout()), + clip, self.node, self.style.get_cursor(CursorKind::Default), display_list_section, @@ -1499,7 +1499,7 @@ impl FragmentDisplayListBuilding for Fragment { let base = state.create_base_display_item( &insertion_point_bounds, - LocalClip::from(clip.to_layout()), + clip, self.node, self.style.get_cursor(cursor), display_list_section, @@ -1661,20 +1661,23 @@ impl FragmentDisplayListBuilding for Fragment { self.stacking_relative_content_box(stacking_relative_border_box); let create_base_display_item = |state: &mut DisplayListBuildState| { - let layout_rect = stacking_relative_border_box.to_layout(); - // Adjust the clipping region as necessary to account for `border-radius`. - let radii = - build_border_radius_for_inner_rect(&stacking_relative_border_box, &self.style); + let radii = build_border_radius_for_inner_rect( + &stacking_relative_border_box, + &self.style + ); if !radii.is_zero() { - let clip_id = state.add_late_clip_node(layout_rect, radii); + let clip_id = state.add_late_clip_node( + stacking_relative_border_box.to_layout(), + radii + ); state.current_clipping_and_scrolling = ClippingAndScrolling::simple(clip_id); } state.create_base_display_item( &stacking_relative_content_box, - LocalClip::Rect(layout_rect), + &stacking_relative_border_box, self.node, self.style.get_cursor(CursorKind::Default), DisplayListSection::Content, @@ -1925,7 +1928,7 @@ impl FragmentDisplayListBuilding for Fragment { // Base item for all text/shadows let base = state.create_base_display_item( &stacking_relative_content_box, - LocalClip::from(clip.to_layout()), + clip, self.node, self.style().get_cursor(cursor), DisplayListSection::Content, @@ -2046,7 +2049,7 @@ impl FragmentDisplayListBuilding for Fragment { stacking_relative_box.to_physical(self.style.writing_mode, container_size); let base = state.create_base_display_item( &stacking_relative_box, - LocalClip::from(clip.to_layout()), + clip, self.node, self.style.get_cursor(CursorKind::Default), DisplayListSection::Content, @@ -2920,7 +2923,7 @@ impl BaseFlowDisplayListBuilding for BaseFlow { color.a = 1.0; let base = state.create_base_display_item( &stacking_context_relative_bounds.inflate(Au::from_px(2), Au::from_px(2)), - LocalClip::from(self.clip.to_layout()), + &self.clip, node, None, DisplayListSection::Content, diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index f657a628e45..7d0a66e9346 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -63,7 +63,7 @@ impl WebRenderDisplayItemConverter for DisplayItem { }; webrender_api::LayoutPrimitiveInfo { rect: self.base().bounds, - local_clip: self.base().local_clip, + clip_rect: self.base().clip_rect, // TODO(gw): Make use of the WR backface visibility functionality. is_backface_visible: true, tag, diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index 1c43b48e409..f7cffec344e 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -20,7 +20,7 @@ fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} html5ever = "0.22" -ipc-channel = "0.9" +ipc-channel = "0.10" layout = {path = "../layout"} layout_traits = {path = "../layout_traits"} lazy_static = "1" @@ -30,7 +30,7 @@ malloc_size_of = { path = "../malloc_size_of" } metrics = {path = "../metrics"} msg = {path = "../msg"} net_traits = {path = "../net_traits"} -parking_lot = "0.4" +parking_lot = "0.5" profile_traits = {path = "../profile_traits"} range = {path = "../range"} rayon = "1" diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs index 5cf29e8e159..55bacd037cb 100644 --- a/components/layout_thread/dom_wrapper.rs +++ b/components/layout_thread/dom_wrapper.rs @@ -151,10 +151,10 @@ impl<'ln> NodeInfo for ServoLayoutNode<'ln> { } } -#[derive(Clone, Copy)] +#[derive(Clone, Copy, PartialEq)] enum Impossible { } -#[derive(Clone, Copy)] +#[derive(Clone, Copy, PartialEq)] pub struct ShadowRoot<'lr>(Impossible, PhantomData<&'lr ()>); impl<'lr> TShadowRoot for ShadowRoot<'lr> { @@ -659,6 +659,14 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> { } } + fn parent_node_is_shadow_root(&self) -> bool { + false + } + + fn containing_shadow_host(&self) -> Option<Self> { + None + } + fn first_child_element(&self) -> Option<ServoLayoutElement<'le>> { self.as_node().dom_children().filter_map(|n| n.as_element()).next() } @@ -1199,6 +1207,14 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> { None } + fn parent_node_is_shadow_root(&self) -> bool { + false + } + + fn containing_shadow_host(&self) -> Option<Self> { + None + } + fn first_child_element(&self) -> Option<Self> { warn!("ServoThreadSafeLayoutElement::first_child_element called"); None diff --git a/components/layout_traits/Cargo.toml b/components/layout_traits/Cargo.toml index 872125c0d1b..38c53836bd9 100644 --- a/components/layout_traits/Cargo.toml +++ b/components/layout_traits/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] gfx = {path = "../gfx"} -ipc-channel = "0.9" +ipc-channel = "0.10" metrics = {path = "../metrics"} msg = {path = "../msg"} net_traits = {path = "../net_traits"} diff --git a/components/malloc_size_of/Cargo.toml b/components/malloc_size_of/Cargo.toml index f9721ca99b3..b9cb45d4126 100644 --- a/components/malloc_size_of/Cargo.toml +++ b/components/malloc_size_of/Cargo.toml @@ -16,7 +16,7 @@ app_units = "0.6" cssparser = "0.23.0" euclid = "0.17" hashglobe = { path = "../hashglobe" } -mozjs = { version = "0.1.8", features = ["promises"], optional = true } +mozjs = { version = "0.3", features = ["promises"], optional = true } selectors = { path = "../selectors" } servo_arc = { path = "../servo_arc" } smallbitvec = "1.0.3" diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs index 1b351144179..9ed45a772e4 100644 --- a/components/malloc_size_of/lib.rs +++ b/components/malloc_size_of/lib.rs @@ -758,8 +758,6 @@ malloc_size_of_is_0!(webrender_api::ImageRendering); #[cfg(feature = "webrender_api")] malloc_size_of_is_0!(webrender_api::LineStyle); #[cfg(feature = "webrender_api")] -malloc_size_of_is_0!(webrender_api::LocalClip); -#[cfg(feature = "webrender_api")] malloc_size_of_is_0!(webrender_api::MixBlendMode); #[cfg(feature = "webrender_api")] malloc_size_of_is_0!(webrender_api::NormalBorder); diff --git a/components/metrics/Cargo.toml b/components/metrics/Cargo.toml index af186366721..5acdf4a0f32 100644 --- a/components/metrics/Cargo.toml +++ b/components/metrics/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] gfx_traits = {path = "../gfx_traits"} -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3.5" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index 27807663744..b24ad31fa52 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -21,7 +21,7 @@ hyper = "0.10" hyper_serde = "0.8" hyper-openssl = "0.2.2" immeta = "0.3.6" -ipc-channel = "0.9" +ipc-channel = "0.10" lazy_static = "1" log = "0.3.5" matches = "0.1" @@ -35,12 +35,12 @@ serde = "1.0" serde_json = "1.0" servo_config = {path = "../config"} servo_url = {path = "../url"} -servo-websocket = "0.20" +servo-websocket = { version = "0.21", default-features = false, features = ["sync"] } threadpool = "1.0" time = "0.1.17" unicase = "1.4.0" url = "1.2" -uuid = {version = "0.5", features = ["v4"]} +uuid = {version = "0.6", features = ["v4"]} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} [target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies] diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs index d369300ecd2..77140631e7a 100644 --- a/components/net/websocket_loader.rs +++ b/components/net/websocket_loader.rs @@ -26,11 +26,12 @@ use std::sync::{Arc, Mutex}; use std::sync::atomic::{AtomicBool, Ordering}; use std::thread; use url::Position; -use websocket::{Message, Receiver as WSReceiver, Sender as WSSender}; +use websocket::Message; use websocket::header::{Origin, WebSocketAccept, WebSocketKey, WebSocketProtocol, WebSocketVersion}; -use websocket::message::Type as MessageType; -use websocket::receiver::Receiver; -use websocket::sender::Sender; +use websocket::message::OwnedMessage; +use websocket::receiver::{Reader as WsReader, Receiver as WsReceiver}; +use websocket::sender::{Sender as WsSender, Writer as WsWriter}; +use websocket::ws::dataframe::DataFrame; pub fn init( req_init: RequestInit, @@ -60,7 +61,7 @@ pub fn init( let ws_sender_incoming = ws_sender.clone(); thread::spawn(move || { for message in receiver.incoming_messages() { - let message: Message = match message { + let message = match message { Ok(m) => m, Err(e) => { debug!("Error receiving incoming WebSocket message: {:?}", e); @@ -68,21 +69,25 @@ pub fn init( break; } }; - let message = match message.opcode { - MessageType::Text => MessageData::Text(String::from_utf8_lossy(&message.payload).into_owned()), - MessageType::Binary => MessageData::Binary(message.payload.into_owned()), - MessageType::Ping => { - let pong = Message::pong(message.payload); + let message = match message { + OwnedMessage::Text(_) => { + MessageData::Text(String::from_utf8_lossy(&message.take_payload()).into_owned()) + }, + OwnedMessage::Binary(_) => MessageData::Binary(message.take_payload()), + OwnedMessage::Ping(_) => { + let pong = Message::pong(message.take_payload()); ws_sender_incoming.lock().unwrap().send_message(&pong).unwrap(); continue; }, - MessageType::Pong => continue, - MessageType::Close => { + OwnedMessage::Pong(_) => continue, + OwnedMessage::Close(ref msg) => { if !initiated_close_incoming.fetch_or(true, Ordering::SeqCst) { ws_sender_incoming.lock().unwrap().send_message(&message).unwrap(); } - let code = message.cd_status_code; - let reason = String::from_utf8_lossy(&message.payload).into_owned(); + let (code, reason) = match *msg { + None => (None, "".into()), + Some(ref data) => (Some(data.status_code), data.reason.clone()) + }; let _ = resource_event_sender.send(WebSocketNetworkEvent::Close(code, reason)); break; }, @@ -148,7 +153,7 @@ fn obtain_a_websocket_connection(url: &ServoUrl) -> Result<Stream, NetworkError> fn establish_a_websocket_connection( req_init: RequestInit, http_state: &HttpState -) -> Result<(Option<String>, Sender<Stream>, Receiver<Stream>), NetworkError> +) -> Result<(Option<String>, WsWriter<HttpStream>, WsReader<HttpStream>), NetworkError> { let protocols = match req_init.mode { RequestMode::WebSocket { protocols } => protocols.clone(), @@ -255,9 +260,19 @@ fn establish_a_websocket_connection( None }; - let sender = Sender::new(response.writer, true); - let receiver = Receiver::new(response.reader, false); - Ok((protocol_in_use, sender, receiver)) + let sender = WsSender::new(true); + let writer = WsWriter { + stream: response.writer, + sender + }; + + let receiver = WsReceiver::new(false); + let reader = WsReader { + stream: response.reader, + receiver, + }; + + Ok((protocol_in_use, writer, reader)) } struct Response { diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml index 6dc3271058a..1cdda589835 100644 --- a/components/net_traits/Cargo.toml +++ b/components/net_traits/Cargo.toml @@ -16,7 +16,7 @@ cookie = "0.10" hyper = "0.10" hyper_serde = "0.8" image = "0.18" -ipc-channel = "0.9" +ipc-channel = "0.10" lazy_static = "1" log = "0.3.5" malloc_size_of = { path = "../malloc_size_of" } @@ -27,5 +27,5 @@ serde = "1.0" servo_config = {path = "../config"} servo_url = {path = "../url"} url = "1.2" -uuid = {version = "0.5", features = ["v4", "serde"]} +uuid = {version = "0.6", features = ["v4", "serde"]} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml index 6923b0540cf..5ef8edbc8f7 100644 --- a/components/profile/Cargo.toml +++ b/components/profile/Cargo.toml @@ -15,7 +15,7 @@ unstable = ["jemalloc-sys"] [dependencies] profile_traits = {path = "../profile_traits"} influent = "0.4" -ipc-channel = "0.9" +ipc-channel = "0.10" heartbeats-simple = "0.4" log = "0.3.5" serde = "1.0" diff --git a/components/profile/time.rs b/components/profile/time.rs index c075272fbc0..6c1130345e0 100644 --- a/components/profile/time.rs +++ b/components/profile/time.rs @@ -10,7 +10,7 @@ use influent::create_client; use influent::measurement::{Measurement, Value}; use ipc_channel::ipc::{self, IpcReceiver}; use profile_traits::energy::{energy_interval_ms, read_energy_uj}; -use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, TimerMetadata}; +use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, ProfilerData, TimerMetadata}; use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType}; use servo_config::opts::OutputOptions; use std::{f64, thread, u32, u64}; @@ -158,6 +158,7 @@ impl Formattable for ProfilerCategory { ProfilerCategory::TimeToFirstPaint => "Time To First Paint", ProfilerCategory::TimeToFirstContentfulPaint => "Time To First Contentful Paint", ProfilerCategory::TimeToInteractive => "Time to Interactive", + ProfilerCategory::IpcReceiver => "Blocked at IPC Receive", ProfilerCategory::ApplicationHeartbeat => "Application Heartbeat", }; format!("{}{}", padding, name) @@ -316,6 +317,13 @@ impl Profiler { // only print if more data has arrived since the last printout self.print_buckets(); }, + ProfilerMsg::Get(k, sender) => { + let vec_option = self.buckets.get(&k); + match vec_option { + Some(vec_entry) => sender.send(ProfilerData::Record(vec_entry.to_vec())).unwrap(), + None => sender.send(ProfilerData::NoRecords).unwrap(), + }; + }, ProfilerMsg::Exit(chan) => { heartbeats::cleanup(); self.print_buckets(); diff --git a/components/profile_traits/Cargo.toml b/components/profile_traits/Cargo.toml index 1f668086567..3ea12bd6cfc 100644 --- a/components/profile_traits/Cargo.toml +++ b/components/profile_traits/Cargo.toml @@ -13,9 +13,10 @@ path = "lib.rs" energy-profiling = ["energymon", "energy-monitor"] [dependencies] +bincode = "1" energy-monitor = {version = "0.2.0", optional = true} energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true} -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3.5" serde = "1.0" servo_config = {path = "../config"} diff --git a/components/profile_traits/ipc.rs b/components/profile_traits/ipc.rs new file mode 100644 index 00000000000..fe64d54ef07 --- /dev/null +++ b/components/profile_traits/ipc.rs @@ -0,0 +1,45 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use bincode; +use ipc_channel::ipc; +use serde::{Deserialize, Serialize}; +use std::io::Error; +use time; +use time::ProfilerCategory; +use time::ProfilerChan; + +pub struct IpcReceiver<T> where T: for<'de> Deserialize<'de> + Serialize { + ipc_receiver: ipc::IpcReceiver<T>, + time_profile_chan: ProfilerChan, +} + +impl<T> IpcReceiver<T> where T: for<'de> Deserialize<'de> + Serialize { + pub fn recv(&self) -> Result<T, bincode::Error> { + time::profile( + ProfilerCategory::IpcReceiver, + None, + self.time_profile_chan.clone(), + move || self.ipc_receiver.recv(), + ) + } + + pub fn try_recv(&self) -> Result<T, bincode::Error> { + self.ipc_receiver.try_recv() + } + + pub fn to_opaque(self) -> ipc::OpaqueIpcReceiver { + self.ipc_receiver.to_opaque() + } +} + +pub fn channel<T>(time_profile_chan: ProfilerChan) -> Result<(ipc::IpcSender<T>, IpcReceiver<T>), Error> + where T: for<'de> Deserialize<'de> + Serialize, { + let (ipc_sender, ipc_receiver) = ipc::channel()?; + let profiled_ipc_receiver = IpcReceiver { + ipc_receiver, + time_profile_chan, + }; + Ok((ipc_sender, profiled_ipc_receiver)) +} diff --git a/components/profile_traits/lib.rs b/components/profile_traits/lib.rs index 5f2683adcdc..029e59a3241 100644 --- a/components/profile_traits/lib.rs +++ b/components/profile_traits/lib.rs @@ -8,6 +8,7 @@ #![deny(unsafe_code)] +extern crate bincode; extern crate ipc_channel; #[macro_use] extern crate log; @@ -17,5 +18,6 @@ extern crate signpost; #[allow(unsafe_code)] pub mod energy; +pub mod ipc; pub mod mem; pub mod time; diff --git a/components/profile_traits/time.rs b/components/profile_traits/time.rs index 3b9316f9478..2c297003b9e 100644 --- a/components/profile_traits/time.rs +++ b/components/profile_traits/time.rs @@ -29,9 +29,17 @@ impl ProfilerChan { } #[derive(Clone, Deserialize, Serialize)] +pub enum ProfilerData { + NoRecords, + Record(Vec<f64>), +} + +#[derive(Clone, Deserialize, Serialize)] pub enum ProfilerMsg { /// Normal message used for reporting time Time((ProfilerCategory, Option<TimerMetadata>), (u64, u64), (u64, u64)), + /// Message used to get time spend entries for a particular ProfilerBuckets (in nanoseconds) + Get((ProfilerCategory, Option<TimerMetadata>), IpcSender<ProfilerData>), /// Message used to force print the profiling metrics Print, /// Tells the profiler to shut down. @@ -94,6 +102,7 @@ pub enum ProfilerCategory { TimeToFirstPaint = 0x80, TimeToFirstContentfulPaint = 0x81, TimeToInteractive = 0x82, + IpcReceiver = 0x83, ApplicationHeartbeat = 0x90, } diff --git a/components/rand/Cargo.toml b/components/rand/Cargo.toml index 23b448f8b28..26657373172 100644 --- a/components/rand/Cargo.toml +++ b/components/rand/Cargo.toml @@ -12,4 +12,5 @@ path = "lib.rs" [dependencies] lazy_static = "1" log = "0.3" -rand = "0.3" +rand = "0.4" +uuid = "0.6.2" diff --git a/components/rand/lib.rs b/components/rand/lib.rs index c1018c3deaa..5a10bf9e3c1 100644 --- a/components/rand/lib.rs +++ b/components/rand/lib.rs @@ -17,6 +17,7 @@ extern crate lazy_static; #[macro_use] extern crate log; extern crate rand; +extern crate uuid; pub use rand::{Rand, Rng, SeedableRng}; #[cfg(target_pointer_width = "64")] @@ -30,6 +31,7 @@ use std::mem; use std::rc::Rc; use std::sync::Mutex; use std::u64; +use uuid::Uuid; // Slightly annoying having to cast between sizes. @@ -156,3 +158,11 @@ impl Rng for ServoThreadRng { pub fn random<T: Rand>() -> T { thread_rng().gen() } + +// TODO(eijebong): Replace calls to this by random once `uuid::Uuid` implements `rand::Rand` again. +#[inline] +pub fn random_uuid() -> Uuid { + let mut bytes = [0; 16]; + thread_rng().fill_bytes(&mut bytes); + Uuid::from_random_bytes(bytes) +} diff --git a/components/script/CMakeLists.txt b/components/script/CMakeLists.txt index 9bebca68268..0d892801469 100644 --- a/components/script/CMakeLists.txt +++ b/components/script/CMakeLists.txt @@ -49,7 +49,7 @@ set(bindinggen_deps ${bindings_src}/CodegenRust.py ${bindings_src}/parser/WebIDL.py ) - + add_custom_command( OUTPUT Bindings COMMAND ${CMAKE_COMMAND} -E make_directory Bindings @@ -59,9 +59,12 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E make_directory _cache ) +# Specify python 2 as required +find_package( PythonInterp 2 REQUIRED ) + add_custom_command( OUTPUT ParserResults.pkl - COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply + COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply ${bindings_src}/GlobalGen.py --cachedir=_cache --filelist=webidls.list @@ -74,7 +77,7 @@ add_custom_command( add_custom_command( OUTPUT apis.html - COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply + COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply ${bindings_src}/GlobalGen.py --cachedir=_cache --filelist=webidls.list @@ -100,7 +103,7 @@ add_custom_target(generate-bindings ALL) foreach(binding IN LISTS bindings) add_custom_command( OUTPUT Bindings/${binding}Binding.rs - COMMAND python -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply + COMMAND ${PYTHON_EXECUTABLE} -B ${bindings_src}/pythonpath.py -I ${bindings_src}/parser -I ${bindings_src}/ply ${bindings_src}/BindingGen.py ${bindings_src}/Bindings.conf . diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 3db7e697011..4730eeeb18a 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -51,7 +51,7 @@ html5ever = "0.22" hyper = "0.10" hyper_serde = "0.8" image = "0.18" -ipc-channel = "0.9" +ipc-channel = "0.10" jstraceable_derive = {path = "../jstraceable_derive"} lazy_static = "1" libc = "0.2" @@ -62,12 +62,12 @@ metrics = {path = "../metrics"} mitochondria = "1.1.2" mime = "0.2.1" mime_guess = "1.8.0" -mozjs = { version = "0.1.10", features = ["promises"]} +mozjs = { version = "0.3", features = ["promises"]} msg = {path = "../msg"} net_traits = {path = "../net_traits"} num-traits = "0.1.32" offscreen_gl_context = { version = "0.15", features = ["serde"] } -parking_lot = "0.4" +parking_lot = "0.5" phf = "0.7.18" profile_traits = {path = "../profile_traits"} ref_filter_map = "1.0.1" @@ -93,10 +93,10 @@ time = "0.1.12" unicode-segmentation = "1.1.0" url = "1.6" utf-8 = "0.7" -uuid = {version = "0.5", features = ["v4"]} +uuid = {version = "0.6", features = ["v4"]} xml5ever = {version = "0.12"} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} webvr_traits = {path = "../webvr_traits"} [target.'cfg(not(target_os = "ios"))'.dependencies] -angle = {git = "https://github.com/servo/angle", branch = "servo"} +mozangle = "0.1" diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index d2d090f8350..24054de8e95 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -870,8 +870,51 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, return handleOptional(templateBody, declType, handleDefaultNull("None")) - if type.isSpiderMonkeyInterface(): - raise TypeError("Can't handle SpiderMonkey interface arguments yet") + if is_typed_array(type): + if failureCode is None: + substitutions = { + "sourceDescription": sourceDescription, + "exceptionCode": exceptionCode, + } + unwrapFailureCode = string.Template( + 'throw_type_error(cx, "${sourceDescription} is not a typed array.");\n' + '${exceptionCode}').substitute(substitutions) + else: + unwrapFailureCode = failureCode + + typeName = type.unroll().name # unroll because it may be nullable + + if isMember == "Union": + typeName = "Heap" + typeName + + templateBody = fill( + """ + match typedarray::${ty}::from($${val}.get().to_object()) { + Ok(val) => val, + Err(()) => { + $*{failureCode} + } + } + """, + ty=typeName, + failureCode=unwrapFailureCode + "\n", + ) + + if isMember == "Union": + templateBody = "RootedTraceableBox::new(%s)" % templateBody + + declType = CGGeneric("typedarray::%s" % typeName) + if type.nullable(): + templateBody = "Some(%s)" % templateBody + declType = CGWrapper(declType, pre="Option<", post=">") + + templateBody = wrapObjectTemplate(templateBody, "None", + isDefinitelyObject, type, failureCode) + + return handleOptional(templateBody, declType, handleDefaultNull("None")) + + elif type.isSpiderMonkeyInterface(): + raise TypeError("Can't handle SpiderMonkey interface arguments other than typed arrays yet") if type.isDOMString(): nullBehavior = getConversionConfigForType(type, isEnforceRange, isClamp, treatNullAs) @@ -1041,13 +1084,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, assert isMember != "Union" if isMember == "Dictionary" or isAutoRooted: - # TODO: Need to properly root dictionaries - # https://github.com/servo/servo/issues/6381 - if isMember == "Dictionary": - declType = CGGeneric("Heap<JSVal>") - # AutoRooter can trace properly inner raw GC thing pointers - else: - declType = CGGeneric("JSVal") + templateBody = "${val}.get()" if defaultValue is None: default = None @@ -1057,7 +1094,17 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, default = "UndefinedValue()" else: raise TypeError("Can't handle non-null, non-undefined default value here") - return handleOptional("${val}.get()", declType, default) + + if isMember == "Dictionary": + templateBody = "RootedTraceableBox::from_box(Heap::boxed(%s))" % templateBody + if default is not None: + default = "RootedTraceableBox::from_box(Heap::boxed(%s))" % default + declType = CGGeneric("RootedTraceableBox<Heap<JSVal>>") + # AutoRooter can trace properly inner raw GC thing pointers + else: + declType = CGGeneric("JSVal") + + return handleOptional(templateBody, declType, default) declType = CGGeneric("HandleValue") @@ -1075,20 +1122,21 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, if type.isObject(): assert not isEnforceRange and not isClamp - # TODO: Need to root somehow - # https://github.com/servo/servo/issues/6382 + templateBody = "${val}.get().to_object()" default = "ptr::null_mut()" - templateBody = wrapObjectTemplate("${val}.get().to_object()", - default, - isDefinitelyObject, type, failureCode) if isMember in ("Dictionary", "Union"): - declType = CGGeneric("Heap<*mut JSObject>") + templateBody = "RootedTraceableBox::from_box(Heap::boxed(%s))" % templateBody + default = "RootedTraceableBox::new(Heap::default())" + declType = CGGeneric("RootedTraceableBox<Heap<*mut JSObject>>") else: # TODO: Need to root somehow # https://github.com/servo/servo/issues/6382 declType = CGGeneric("*mut JSObject") + templateBody = wrapObjectTemplate(templateBody, default, + isDefinitelyObject, type, failureCode) + return handleOptional(templateBody, declType, handleDefaultNull(default)) @@ -2283,6 +2331,7 @@ def UnionTypes(descriptors, dictionaries, callbacks, typedefs, config): 'js::jsapi::JSObject', 'js::jsapi::MutableHandleValue', 'js::jsval::JSVal', + 'js::typedarray' ] # Now find all the things we'll need as arguments and return values because @@ -4134,6 +4183,9 @@ def getUnionTypeTemplateVars(type, descriptorProvider): elif type.isObject(): name = type.name typeName = "Heap<*mut JSObject>" + elif is_typed_array(type): + name = type.name + typeName = "typedarray::Heap" + name else: raise TypeError("Can't handle %s in unions yet" % type) @@ -4291,11 +4343,13 @@ class CGUnionConversionStruct(CGThing): else: mozMapObject = None - hasObjectTypes = interfaceObject or arrayObject or dateObject or object or mozMapObject + hasObjectTypes = object or interfaceObject or arrayObject or dateObject or mozMapObject if hasObjectTypes: # "object" is not distinguishable from other types assert not object or not (interfaceObject or arrayObject or dateObject or callbackObject or mozMapObject) templateBody = CGList([], "\n") + if object: + templateBody.append(object) if interfaceObject: templateBody.append(interfaceObject) if arrayObject: @@ -4363,11 +4417,6 @@ class CGUnionConversionStruct(CGThing): returnType = "Result<Option<%s>, ()>" % actualType jsConversion = templateVars["jsConversion"] - # Any code to convert to Object is unused, since we're already converting - # from an Object value. - if t.name == 'Object': - return CGGeneric('') - return CGWrapper( CGIndenter(jsConversion, 4), pre="unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n" @@ -5687,6 +5736,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries 'js::jsapi::MutableHandleValue', 'js::jsapi::ObjectOpResult', 'js::jsapi::PropertyDescriptor', + 'js::jsapi::Rooted', 'js::jsapi::RootedId', 'js::jsapi::RootedObject', 'js::jsapi::RootedString', @@ -5718,6 +5768,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries 'js::rust::define_methods', 'js::rust::define_properties', 'js::rust::get_object_class', + 'js::typedarray', 'dom', 'dom::bindings', 'dom::bindings::codegen::InterfaceObjectMap', @@ -6118,8 +6169,6 @@ class CGDictionary(CGThing): conversion = self.getMemberConversion(memberInfo, member.type) if isInitial: return CGGeneric("%s: %s,\n" % (name, conversion.define())) - if member.type.isAny() or member.type.isObject(): - return CGGeneric("dictionary.%s.set(%s);\n" % (name, conversion.define())) return CGGeneric("dictionary.%s = %s;\n" % (name, conversion.define())) def varInsert(varName, dictionaryName): @@ -6418,6 +6467,9 @@ def type_needs_tracing(t): if t.isUnion(): return any(type_needs_tracing(member) for member in t.flatMemberTypes) + if is_typed_array(t): + return True + return False if t.isDictionary(): @@ -6438,6 +6490,12 @@ def type_needs_tracing(t): assert False, (t, type(t)) +def is_typed_array(t): + assert isinstance(t, IDLObject), (t, type(t)) + + return t.isTypedArray() or t.isArrayBuffer() or t.isArrayBufferView() or t.isSharedArrayBuffer() + + def type_needs_auto_root(t): """ Certain IDL types, such as `sequence<any>` or `sequence<object>` need to be @@ -6448,6 +6506,9 @@ def type_needs_auto_root(t): if t.isType(): if t.isSequence() and (t.inner.isAny() or t.inner.isObject()): return True + # SpiderMonkey interfaces, we currently don't support any other except typed arrays + if is_typed_array(t): + return True return False diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index e40a1d7092b..3824ed33183 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -48,7 +48,7 @@ use js::error::throw_type_error; use js::glue::{GetProxyPrivate, IsWrapper}; use js::glue::{RUST_JSID_IS_INT, RUST_JSID_TO_INT}; use js::glue::{RUST_JSID_IS_STRING, RUST_JSID_TO_STRING, UnwrapObject}; -use js::jsapi::{HandleId, HandleObject, HandleValue, JSContext, JSObject, JSString}; +use js::jsapi::{HandleId, HandleObject, HandleValue, Heap, JSContext, JSObject, JSString}; use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetProperty, JS_GetReservedSlot}; use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_IsArrayObject, JS_IsExceptionPending}; use js::jsapi::{JS_NewStringCopyN, JS_StringHasLatin1Chars, MutableHandleValue}; @@ -125,6 +125,25 @@ impl<T: ToJSValConvertible + JSTraceable> ToJSValConvertible for RootedTraceable } } +impl<T> FromJSValConvertible for RootedTraceableBox<Heap<T>> + where + T: FromJSValConvertible + js::rust::GCMethods + Copy, + Heap<T>: JSTraceable + Default +{ + type Config = T::Config; + + unsafe fn from_jsval(cx: *mut JSContext, + value: HandleValue, + config: Self::Config) + -> Result<ConversionResult<Self>, ()> { + T::from_jsval(cx, value, config).map(|result| match result { + ConversionResult::Success(inner) => + ConversionResult::Success(RootedTraceableBox::from_box(Heap::boxed(inner))), + ConversionResult::Failure(msg) => ConversionResult::Failure(msg), + }) + } +} + /// Convert `id` to a `DOMString`. Returns `None` if `id` is not a string or /// integer. /// diff --git a/components/script/dom/bindings/iterable.rs b/components/script/dom/bindings/iterable.rs index 15fbe7175cb..60331f6608e 100644 --- a/components/script/dom/bindings/iterable.rs +++ b/components/script/dom/bindings/iterable.rs @@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValu use dom::bindings::error::Fallible; use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot}; -use dom::bindings::trace::JSTraceable; +use dom::bindings::trace::{JSTraceable, RootedTraceableBox}; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; use js::conversions::ToJSValConvertible; @@ -131,10 +131,10 @@ fn key_and_value_return(cx: *mut JSContext, value: HandleValue) -> Fallible<()> { let mut dict = unsafe { IterableKeyAndValueResult::empty(cx) }; dict.done = false; - let values = vec![Heap::default(), Heap::default()]; - values[0].set(key.get()); - values[1].set(value.get()); - dict.value = Some(values); + dict.value = Some(vec![key, value] + .into_iter() + .map(|handle| RootedTraceableBox::from_box(Heap::boxed(handle.get()))) + .collect()); rooted!(in(cx) let mut dict_value = UndefinedValue()); unsafe { dict.to_jsval(cx, dict_value.handle_mut()); diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 5153b70e72f..423b053cbbf 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -62,6 +62,8 @@ use js::glue::{CallObjectTracer, CallValueTracer}; use js::jsapi::{GCTraceKindToAscii, Heap, JSObject, JSTracer, TraceKind}; use js::jsval::JSVal; use js::rust::Runtime; +use js::typedarray::TypedArray; +use js::typedarray::TypedArrayElement; use metrics::{InteractiveMetrics, InteractiveWindow}; use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId}; use net_traits::{Metadata, NetworkError, ReferrerPolicy, ResourceThreads}; @@ -658,6 +660,12 @@ unsafe impl JSTraceable for StyleLocked<MediaList> { } } +unsafe impl<T> JSTraceable for TypedArray<T, Box<Heap<*mut JSObject>>> where T: TypedArrayElement { + unsafe fn trace(&self, trc: *mut JSTracer) { + self.underlying_object().trace(trc); + } +} + unsafe impl<S> JSTraceable for DocumentStylesheetSet<S> where S: JSTraceable + ::style::stylesheets::StylesheetInDocument + PartialEq + 'static, @@ -765,7 +773,12 @@ unsafe impl<T: JSTraceable + 'static> JSTraceable for RootedTraceableBox<T> { impl<T: JSTraceable + 'static> RootedTraceableBox<T> { /// DomRoot a JSTraceable thing for the life of this RootedTraceable pub fn new(traceable: T) -> RootedTraceableBox<T> { - let traceable = Box::into_raw(Box::new(traceable)); + Self::from_box(Box::new(traceable)) + } + + /// Consumes a boxed JSTraceable and roots it for the life of this RootedTraceable. + pub fn from_box(boxed_traceable: Box<T>) -> RootedTraceableBox<T> { + let traceable = Box::into_raw(boxed_traceable); unsafe { RootedTraceableSet::add(traceable); } diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index 32d923c7bc3..d8017f23ffa 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -5,17 +5,17 @@ use dom::bindings::cell::DomRefCell; use dom::bindings::codegen::Bindings::BlobBinding; use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; -use dom::bindings::codegen::UnionTypes::BlobOrString; +use dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString; use dom::bindings::error::{Error, Fallible}; use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot}; use dom::bindings::str::DOMString; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; -use ipc_channel::ipc; use net_traits::{CoreResourceMsg, IpcSend}; use net_traits::blob_url_store::{BlobBuf, get_blob_origin}; use net_traits::filemanager_thread::{FileManagerThreadMsg, ReadFileProgress, RelativePos}; +use profile_traits::ipc; use std::mem; use std::ops::Index; use std::path::PathBuf; @@ -43,7 +43,7 @@ pub enum BlobImpl { /// relative positions of current slicing range, /// IMPORTANT: The depth of tree is only two, i.e. the parent Blob must be /// either File-based or Memory-based - Sliced(Dom<Blob>, RelativePos), + Sliced(Dom<Blob>, RelativePos) } impl BlobImpl { @@ -117,7 +117,7 @@ impl Blob { // https://w3c.github.io/FileAPI/#constructorBlob pub fn Constructor(global: &GlobalScope, - blobParts: Option<Vec<BlobOrString>>, + blobParts: Option<Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>>, blobPropertyBag: &BlobBinding::BlobPropertyBag) -> Fallible<DomRoot<Blob>> { // TODO: accept other blobParts types - ArrayBuffer or ArrayBufferView @@ -200,7 +200,7 @@ impl Blob { BlobImpl::File(ref f) => { if set_valid { let origin = get_blob_origin(&global_url); - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = FileManagerThreadMsg::ActivateBlobURL(f.id.clone(), tx, origin.clone()); self.send_to_file_manager(msg); @@ -227,7 +227,7 @@ impl Blob { bytes: bytes.to_vec(), }; - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = FileManagerThreadMsg::PromoteMemory(blob_buf, set_valid, tx, origin.clone()); self.send_to_file_manager(msg); @@ -251,7 +251,7 @@ impl Blob { rel_pos: &RelativePos, parent_len: u64) -> Uuid { let origin = get_blob_origin(&self.global().get_url()); - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = FileManagerThreadMsg::AddSlicedURLEntry(parent_id.clone(), rel_pos.clone(), tx, origin.clone()); @@ -280,7 +280,7 @@ impl Blob { if let BlobImpl::File(ref f) = *self.blob_impl.borrow() { let origin = get_blob_origin(&self.global().get_url()); - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = FileManagerThreadMsg::DecRef(f.id.clone(), origin, tx); self.send_to_file_manager(msg); @@ -303,7 +303,7 @@ impl Drop for Blob { fn read_file(global: &GlobalScope, id: Uuid) -> Result<Vec<u8>, ()> { let resource_threads = global.resource_threads(); - let (chan, recv) = ipc::channel().map_err(|_|())?; + let (chan, recv) = ipc::channel(global.time_profiler_chan().clone()).map_err(|_|())?; let origin = get_blob_origin(&global.get_url()); let check_url_validity = false; let msg = FileManagerThreadMsg::ReadFile(chan, id, check_url_validity, origin); @@ -329,18 +329,26 @@ fn read_file(global: &GlobalScope, id: Uuid) -> Result<Vec<u8>, ()> { /// Extract bytes from BlobParts, used by Blob and File constructor /// <https://w3c.github.io/FileAPI/#constructorBlob> -pub fn blob_parts_to_bytes(blobparts: Vec<BlobOrString>) -> Result<Vec<u8>, ()> { +#[allow(unsafe_code)] +pub fn blob_parts_to_bytes(mut blobparts: Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>) -> Result<Vec<u8>, ()> { let mut ret = vec![]; - - for blobpart in &blobparts { + for blobpart in &mut blobparts { match blobpart { - &BlobOrString::String(ref s) => { + &mut ArrayBufferOrArrayBufferViewOrBlobOrString::String(ref s) => { ret.extend(s.as_bytes()); }, - &BlobOrString::Blob(ref b) => { + &mut ArrayBufferOrArrayBufferViewOrBlobOrString::Blob(ref b) => { let bytes = b.get_bytes().unwrap_or(vec![]); ret.extend(bytes); }, + &mut ArrayBufferOrArrayBufferViewOrBlobOrString::ArrayBuffer(ref mut a) => unsafe { + let bytes = a.as_slice(); + ret.extend(bytes); + }, + &mut ArrayBufferOrArrayBufferViewOrBlobOrString::ArrayBufferView(ref mut a) => unsafe { + let bytes = a.as_slice(); + ret.extend(bytes); + } } } diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs index 44cf83df5d8..e0dd0f00e10 100644 --- a/components/script/dom/bluetooth.rs +++ b/components/script/dom/bluetooth.rs @@ -34,6 +34,7 @@ use ipc_channel::router::ROUTER; use js::conversions::ConversionResult; use js::jsapi::{JSContext, JSObject}; use js::jsval::{ObjectValue, UndefinedValue}; +use profile_traits::ipc as ProfiledIpc; use std::cell::Ref; use std::collections::HashMap; use std::rc::Rc; @@ -613,7 +614,7 @@ impl PermissionAlgorithm for Bluetooth { // Step 6.2.2. // Instead of creating an internal slot we send an ipc message to the Bluetooth thread // to check if one of the filters matches. - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ProfiledIpc::channel(global.time_profiler_chan().clone()).unwrap(); status.get_bluetooth_thread() .send(BluetoothRequest::MatchesFilter(device_id.clone(), BluetoothScanfilterSequence::new(scan_filters), diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs index 6fcdf40f3ff..b8e08618960 100644 --- a/components/script/dom/bluetoothdevice.rs +++ b/components/script/dom/bluetoothdevice.rs @@ -24,7 +24,8 @@ use dom::eventtarget::EventTarget; use dom::globalscope::GlobalScope; use dom::promise::Promise; use dom_struct::dom_struct; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; +use profile_traits::ipc; use std::cell::Cell; use std::collections::HashMap; use std::rc::Rc; @@ -129,7 +130,7 @@ impl BluetoothDevice { } pub fn is_represented_device_null(&self) -> bool { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_bluetooth_thread().send( BluetoothRequest::IsRepresentedDeviceNull(self.Id().to_string(), sender)).unwrap(); receiver.recv().unwrap() @@ -204,7 +205,7 @@ impl BluetoothDevice { } // Step 3. - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_bluetooth_thread().send( BluetoothRequest::GATTServerDisconnect(String::from(self.Id()), sender)).unwrap(); receiver.recv().unwrap().map_err(Error::from) diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs index 1e2278e81ca..a837fc02fd7 100644 --- a/components/script/dom/canvasrenderingcontext2d.rs +++ b/components/script/dom/canvasrenderingcontext2d.rs @@ -32,7 +32,7 @@ use dom::imagedata::ImageData; use dom::node::{Node, NodeDamage, window_from_node}; use dom_struct::dom_struct; use euclid::{Transform2D, Point2D, Vector2D, Rect, Size2D, vec2}; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; use net_traits::image::base::PixelFormat; use net_traits::image_cache::CanRequestImages; use net_traits::image_cache::ImageCache; @@ -41,6 +41,7 @@ use net_traits::image_cache::ImageResponse; use net_traits::image_cache::ImageState; use net_traits::image_cache::UsePlaceholder; use num_traits::ToPrimitive; +use profile_traits::ipc; use script_traits::ScriptMsg; use servo_url::ServoUrl; use std::{cmp, fmt, mem}; @@ -128,7 +129,7 @@ impl CanvasRenderingContext2D { size: Size2D<i32>) -> CanvasRenderingContext2D { debug!("Creating new canvas rendering context."); - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(global.time_profiler_chan().clone()).unwrap(); let script_to_constellation_chan = global.script_to_constellation_chan(); debug!("Asking constellation to create new canvas thread."); script_to_constellation_chan.send(ScriptMsg::CreateCanvasPaintThread(size, sender)).unwrap(); @@ -371,7 +372,7 @@ impl CanvasRenderingContext2D { None => return Err(Error::InvalidState), }; - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = CanvasMsg::Canvas2d(Canvas2dMsg::DrawImageInOther( self.ipc_renderer.clone(), image_size, @@ -782,7 +783,7 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D { CanvasFillRule::Nonzero => FillRule::Nonzero, CanvasFillRule::Evenodd => FillRule::Evenodd, }; - let (sender, receiver) = ipc::channel::<bool>().unwrap(); + let (sender, receiver) = ipc::channel::<bool>(self.global().time_profiler_chan().clone()).unwrap(); self.ipc_renderer .send(CanvasMsg::Canvas2d(Canvas2dMsg::IsPointInPath(x, y, fill_rule, sender))) .unwrap(); @@ -1126,7 +1127,7 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D { let sh = cmp::max(1, sh.to_u32().unwrap()); let sw = cmp::max(1, sw.to_u32().unwrap()); - let (sender, receiver) = ipc::channel::<Vec<u8>>().unwrap(); + let (sender, receiver) = ipc::channel::<Vec<u8>>(self.global().time_profiler_chan().clone()).unwrap(); let dest_rect = Rect::new(Point2D::new(sx.to_i32().unwrap(), sy.to_i32().unwrap()), Size2D::new(sw as i32, sh as i32)); let canvas_size = self.canvas.as_ref().map(|c| c.get_size()).unwrap_or(Size2D::zero()); diff --git a/components/script/dom/crypto.rs b/components/script/dom/crypto.rs index 71e67e46b9a..2ee87a1719b 100644 --- a/components/script/dom/crypto.rs +++ b/components/script/dom/crypto.rs @@ -12,6 +12,8 @@ use dom::globalscope::GlobalScope; use dom_struct::dom_struct; use js::jsapi::{JSContext, JSObject}; use js::jsapi::Type; +use js::rust::CustomAutoRooterGuard; +use js::typedarray::ArrayBufferView; use servo_rand::{ServoRng, Rng}; use std::ptr::NonNull; @@ -43,29 +45,21 @@ impl CryptoMethods for Crypto { // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#Crypto-method-getRandomValues unsafe fn GetRandomValues(&self, _cx: *mut JSContext, - input: *mut JSObject) + mut input: CustomAutoRooterGuard<ArrayBufferView>) -> Fallible<NonNull<JSObject>> { - assert!(!input.is_null()); - typedarray!(in(_cx) let mut array_buffer_view: ArrayBufferView = input); - let (array_type, mut data) = match array_buffer_view.as_mut() { - Ok(x) => (x.get_array_type(), x.as_mut_slice()), - Err(_) => { - return Err(Error::Type("Argument to Crypto.getRandomValues is not an ArrayBufferView" - .to_owned())); - } - }; + let array_type = input.get_array_type(); if !is_integer_buffer(array_type) { return Err(Error::TypeMismatch); + } else { + let mut data = input.as_mut_slice(); + if data.len() > 65536 { + return Err(Error::QuotaExceeded); + } + self.rng.borrow_mut().fill_bytes(&mut data); } - if data.len() > 65536 { - return Err(Error::QuotaExceeded); - } - - self.rng.borrow_mut().fill_bytes(&mut data); - - Ok(NonNull::new_unchecked(input)) + Ok(NonNull::new_unchecked(*input.underlying_object())) } } diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 49bc45b27c1..b1cee370bfe 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -93,7 +93,7 @@ use fetch::FetchCanceller; use html5ever::{LocalName, Namespace, QualName}; use hyper::header::{Header, SetCookie}; use hyper_serde::Serde; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; use js::jsapi::{JSContext, JSObject, JSRuntime}; use js::jsapi::JS_GetRuntime; use metrics::{InteractiveFlag, InteractiveMetrics, InteractiveWindow, ProfilerMetadataFactory, ProgressiveWebMetric}; @@ -106,6 +106,7 @@ use net_traits::pub_domains::is_pub_domain; use net_traits::request::RequestInit; use net_traits::response::HttpsState; use num_traits::ToPrimitive; +use profile_traits::ipc; use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType}; use ref_slice::ref_slice; use script_layout_interface::message::{Msg, NodesFromPointQueryType, ReflowGoal}; @@ -132,7 +133,7 @@ use style::invalidation::element::restyle_hints::RestyleHint; use style::media_queries::{Device, MediaList, MediaType}; use style::selector_parser::{RestyleDamage, Snapshot}; use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuard}; -use style::str::{HTML_SPACE_CHARACTERS, split_html_space_chars, str_join}; +use style::str::{split_html_space_chars, str_join}; use style::stylesheet_set::DocumentStylesheetSet; use style::stylesheets::{Stylesheet, StylesheetContents, Origin, OriginSet}; use task_source::TaskSource; @@ -3448,7 +3449,7 @@ impl DocumentMethods for Document { } let url = self.url(); - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let _ = self.window .upcast::<GlobalScope>() .resource_threads() @@ -3675,7 +3676,7 @@ impl DocumentMethods for Document { } // https://html.spec.whatwg.org/multipage/#dom-document-open - fn Open(&self, type_: DOMString, replace: DOMString) -> Fallible<DomRoot<Document>> { + fn Open(&self, _type: Option<DOMString>, replace: DOMString) -> Fallible<DomRoot<Document>> { if !self.is_html_document() { // Step 1. return Err(Error::InvalidState); @@ -3709,9 +3710,7 @@ impl DocumentMethods for Document { // Step 6. // TODO: ignore-opens-during-unload counter check. - // Step 7: first argument already bound to `type_`. - - // Step 8. + // Step 7, 8. // TODO: check session history's state. let replace = replace.eq_ignore_ascii_case("replace"); @@ -3740,11 +3739,11 @@ impl DocumentMethods for Document { // Step 15. Node::replace_all(None, self.upcast::<Node>()); - // Steps 16-18. + // Steps 16, 17. // Let's not? // TODO: https://github.com/whatwg/html/issues/1698 - // Step 19. + // Step 18. self.implementation.set(None); self.images.set(None); self.embeds.set(None); @@ -3760,65 +3759,59 @@ impl DocumentMethods for Document { self.target_element.set(None); *self.last_click_info.borrow_mut() = None; + // Step 19. + // TODO: Set the active document of document's browsing context to document with window. + // Step 20. - self.set_encoding(UTF_8); + // TODO: Replace document's singleton objects with new instances of those objects, created in window's Realm. // Step 21. - // TODO: reload override buffer. + self.set_encoding(UTF_8); // Step 22. + // TODO: reload override buffer. + + // Step 23. // TODO: salvageable flag. let url = entry_responsible_document.url(); - // Step 23. + // Step 24. self.set_url(url.clone()); - // Step 24. + // Step 25. // TODO: mute iframe load. - // Step 27. - let type_ = if type_.eq_ignore_ascii_case("replace") { - "text/html" - } else if let Some(position) = type_.find(';') { - &type_[0..position] - } else { - &*type_ - }; - let type_ = type_.trim_matches(HTML_SPACE_CHARACTERS); - - // Step 25. + // Step 26. let resource_threads = self.window.upcast::<GlobalScope>().resource_threads().clone(); *self.loader.borrow_mut() = DocumentLoader::new_with_threads(resource_threads, Some(url.clone())); - ServoParser::parse_html_script_input(self, url, type_); + ServoParser::parse_html_script_input(self, url, "text/html"); - // Step 26. + // Step 27. self.ready_state.set(DocumentReadyState::Interactive); - // Step 28 is handled when creating the parser in step 25. + // Step 28. + // TODO: remove history traversal tasks. // Step 29. // TODO: truncate session history. // Step 30. - // TODO: remove history traversal tasks. - - // Step 31. // TODO: remove earlier entries. if !replace { - // Step 32. + // Step 31. // TODO: add history entry. } - // Step 33. + // Step 32. // TODO: clear fired unload flag. - // Step 34 is handled when creating the parser in step 25. + // Step 33 is handled when creating the parser in step 26. - // Step 35. + // Step 34. Ok(DomRoot::from_ref(self)) } @@ -3851,7 +3844,7 @@ impl DocumentMethods for Document { return Ok(()); } // Step 5. - self.Open("text/html".into(), "".into())?; + self.Open(None, "".into())?; self.get_current_parser().unwrap() } }; diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 5060492160b..a53446fd4a3 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -2570,6 +2570,14 @@ impl<'a> SelectorsElement for DomRoot<Element> { self.upcast::<Node>().GetParentElement() } + fn parent_node_is_shadow_root(&self) -> bool { + false + } + + fn containing_shadow_host(&self) -> Option<Self> { + None + } + fn match_pseudo_element( &self, _pseudo: &PseudoElement, @@ -2578,7 +2586,6 @@ impl<'a> SelectorsElement for DomRoot<Element> { false } - fn first_child_element(&self) -> Option<DomRoot<Element>> { self.node.child_elements().next() } diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index e80c92cf83b..942fbb1a055 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::FileBinding; use dom::bindings::codegen::Bindings::FileBinding::FileMethods; -use dom::bindings::codegen::UnionTypes::BlobOrString; +use dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString; use dom::bindings::error::{Error, Fallible}; use dom::bindings::inheritance::Castable; use dom::bindings::reflector::reflect_dom_object; @@ -60,7 +60,7 @@ impl File { // https://w3c.github.io/FileAPI/#file-constructor pub fn Constructor(global: &GlobalScope, - fileBits: Vec<BlobOrString>, + fileBits: Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>, filename: DOMString, filePropertyBag: &FileBinding::FilePropertyBag) -> Fallible<DomRoot<File>> { diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index 17ee0d29cb6..d70c58963b5 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -8,17 +8,17 @@ use dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::Location use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::inheritance::Castable; -use dom::bindings::reflector::{Reflector, reflect_dom_object}; +use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot}; use dom::bindings::str::{DOMString, USVString}; use dom::bindings::structuredclone::StructuredCloneData; use dom::globalscope::GlobalScope; use dom::window::Window; use dom_struct::dom_struct; -use ipc_channel::ipc; use js::jsapi::{HandleValue, Heap, JSContext}; use js::jsval::{JSVal, NullValue, UndefinedValue}; use msg::constellation_msg::TraversalDirection; +use profile_traits::ipc::channel; use script_traits::ScriptMsg; enum PushOrReplace { @@ -128,7 +128,8 @@ impl HistoryMethods for History { if !self.window.Document().is_fully_active() { return Err(Error::Security); } - let (sender, recv) = ipc::channel().expect("Failed to create channel to send jsh length."); + let (sender, recv) = + channel(self.global().time_profiler_chan().clone()).expect("Failed to create channel to send jsh length."); let msg = ScriptMsg::JointSessionHistoryLength(sender); let _ = self.window.upcast::<GlobalScope>().script_to_constellation_chan().send(msg); Ok(recv.recv().unwrap()) diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index 9496670238b..c866664cbcf 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -15,6 +15,7 @@ use dom::bindings::conversions::ConversionResult; use dom::bindings::error::{Error, Fallible}; use dom::bindings::inheritance::Castable; use dom::bindings::num::Finite; +use dom::bindings::reflector::DomObject; use dom::bindings::root::{Dom, DomRoot, LayoutDom}; use dom::bindings::str::DOMString; use dom::canvasrenderingcontext2d::{CanvasRenderingContext2D, LayoutCanvasRenderingContext2DHelpers}; @@ -31,10 +32,10 @@ use euclid::Size2D; use html5ever::{LocalName, Prefix}; use image::ColorType; use image::png::PNGEncoder; -use ipc_channel::ipc; use js::error::throw_type_error; use js::jsapi::{HandleValue, JSContext}; use offscreen_gl_context::GLContextAttributes; +use profile_traits::ipc; use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource}; use servo_config::prefs::PREFS; use std::iter::repeat; @@ -258,7 +259,7 @@ impl HTMLCanvasElement { let data = match self.context.borrow().as_ref() { Some(&CanvasContext::Context2d(ref context)) => { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let msg = CanvasMsg::FromScript(FromScriptMsg::SendPixels(sender)); context.get_ipc_renderer().send(msg).unwrap(); diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 41bb2a23e6a..4fcd21c6cf1 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -27,6 +27,7 @@ use dom_struct::dom_struct; use html5ever::{LocalName, Prefix}; use ipc_channel::ipc; use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId}; +use profile_traits::ipc as ProfiledIpc; use script_layout_interface::message::ReflowGoal; use script_thread::ScriptThread; use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, UpdatePipelineIdReason}; @@ -559,7 +560,7 @@ impl VirtualMethods for HTMLIFrameElement { // https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded let window = window_from_node(self); - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ProfiledIpc::channel(self.global().time_profiler_chan().clone()).unwrap(); // Ask the constellation to remove the iframe, and tell us the // pipeline ids of the closed pipelines. diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 030d6278e0e..5618b366702 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -14,6 +14,7 @@ use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementM use dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEventMethods; use dom::bindings::error::{Error, ErrorResult}; use dom::bindings::inheritance::Castable; +use dom::bindings::reflector::DomObject; use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference}; use dom::bindings::str::DOMString; use dom::document::Document; @@ -38,11 +39,11 @@ use dom::validitystate::ValidationFlags; use dom::virtualmethods::VirtualMethods; use dom_struct::dom_struct; use html5ever::{LocalName, Prefix}; -use ipc_channel::ipc::channel; use mime_guess; use net_traits::{CoreResourceMsg, IpcSend}; use net_traits::blob_url_store::get_blob_origin; use net_traits::filemanager_thread::{FileManagerThreadMsg, FilterPattern}; +use profile_traits::ipc; use script_layout_interface::rpc::TextIndexResponse; use script_traits::ScriptToConstellationChan; use servo_atoms::Atom; @@ -974,7 +975,8 @@ impl HTMLInputElement { if self.Multiple() { let opt_test_paths = opt_test_paths.map(|paths| paths.iter().map(|p| p.to_string()).collect()); - let (chan, recv) = channel().expect("Error initializing channel"); + let (chan, recv) = + ipc::channel(self.global().time_profiler_chan().clone()).expect("Error initializing channel"); let msg = FileManagerThreadMsg::SelectFiles(filter, chan, origin, opt_test_paths); let _ = resource_threads.send(CoreResourceMsg::ToFileManager(msg)).unwrap(); @@ -998,7 +1000,8 @@ impl HTMLInputElement { None => None, }; - let (chan, recv) = channel().expect("Error initializing channel"); + let (chan, recv) = + ipc::channel(self.global().time_profiler_chan().clone()).expect("Error initializing channel"); let msg = FileManagerThreadMsg::SelectFile(filter, chan, origin, opt_test_path); let _ = resource_threads.send(CoreResourceMsg::ToFileManager(msg)).unwrap(); diff --git a/components/script/dom/paintworkletglobalscope.rs b/components/script/dom/paintworkletglobalscope.rs index eda9021e64c..3665b4af089 100644 --- a/components/script/dom/paintworkletglobalscope.rs +++ b/components/script/dom/paintworkletglobalscope.rs @@ -26,7 +26,6 @@ use dom::workletglobalscope::WorkletTask; use dom_struct::dom_struct; use euclid::TypedScale; use euclid::TypedSize2D; -use ipc_channel::ipc; use js::jsapi::Call; use js::jsapi::Construct1; use js::jsapi::HandleValue; @@ -46,6 +45,7 @@ use js::rust::Runtime; use msg::constellation_msg::PipelineId; use net_traits::image::base::PixelFormat; use net_traits::image_cache::ImageCache; +use profile_traits::ipc; use script_traits::{DrawAPaintImageResult, PaintWorkletError}; use script_traits::Painter; use servo_atoms::Atom; @@ -296,7 +296,8 @@ impl PaintWorkletGlobalScope { return self.invalid_image(size_in_dpx, missing_image_urls); } - let (sender, receiver) = ipc::channel().expect("IPC channel creation."); + let (sender, receiver) = + ipc::channel(self.global().time_profiler_chan().clone()).expect("IPC channel creation."); rendering_context.send_data(sender); let image_key = match receiver.recv() { Ok(data) => Some(data.image_key), diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs index 20485618c18..ef5eb1906d5 100644 --- a/components/script/dom/promise.rs +++ b/components/script/dom/promise.rs @@ -19,13 +19,13 @@ use dom::globalscope::GlobalScope; use dom::promisenativehandler::PromiseNativeHandler; use dom_struct::dom_struct; use js::conversions::ToJSValConvertible; -use js::jsapi::{CallOriginalPromiseResolve, CallOriginalPromiseReject}; -use js::jsapi::{JSAutoCompartment, CallArgs, JS_GetFunctionObject, JS_NewFunction}; -use js::jsapi::{JSContext, HandleValue, HandleObject, IsPromiseObject, GetFunctionNativeReserved}; -use js::jsapi::{JS_ClearPendingException, JSObject, AddRawValueRoot, RemoveRawValueRoot, PromiseState}; -use js::jsapi::{MutableHandleObject, NewPromiseObject, ResolvePromise, RejectPromise, GetPromiseState}; -use js::jsapi::{SetFunctionNativeReserved, NewFunctionWithReserved, AddPromiseReactions}; -use js::jsapi::Heap; +use js::jsapi::{AddPromiseReactions, AddRawValueRoot, CallArgs, CallOriginalPromiseReject}; +use js::jsapi::{CallOriginalPromiseResolve, GetFunctionNativeReserved, GetPromiseState}; +use js::jsapi::{HandleObject, HandleValue, Heap, IsPromiseObject, JS_ClearPendingException}; +use js::jsapi::{JSAutoCompartment, JSContext, JSObject, JS_GetContext, JS_GetFunctionObject}; +use js::jsapi::{JS_GetObjectRuntime, JS_NewFunction, MutableHandleObject}; +use js::jsapi::{NewFunctionWithReserved, NewPromiseObject, PromiseState, RejectPromise}; +use js::jsapi::{RemoveRawValueRoot, ResolvePromise, SetFunctionNativeReserved}; use js::jsval::{JSVal, UndefinedValue, ObjectValue, Int32Value}; use std::ptr; use std::rc::Rc; @@ -61,8 +61,13 @@ impl PromiseHelper for Rc<Promise> { impl Drop for Promise { #[allow(unsafe_code)] fn drop(&mut self) { - let cx = self.global().get_cx(); unsafe { + let object = self.permanent_js_root.get().to_object(); + assert!(!object.is_null()); + let runtime = JS_GetObjectRuntime(object); + assert!(!runtime.is_null()); + let cx = JS_GetContext(runtime); + assert!(!cx.is_null()); RemoveRawValueRoot(cx, self.permanent_js_root.get_unsafe()); } } diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs index 3cd54034994..193b7705a42 100644 --- a/components/script/dom/screen.rs +++ b/components/script/dom/screen.rs @@ -7,13 +7,16 @@ use dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods; use dom::bindings::inheritance::Castable; use dom::bindings::num::Finite; use dom::bindings::reflector::{Reflector, reflect_dom_object}; +use dom::bindings::reflector::DomObject; use dom::bindings::root::{Dom, DomRoot}; use dom::globalscope::GlobalScope; use dom::window::Window; use dom_struct::dom_struct; -use euclid::Size2D; -use ipc_channel::ipc; +use euclid::TypedSize2D; +use profile_traits::ipc; use script_traits::ScriptMsg; +use style_traits::CSSPixel; +use webrender_api::DeviceUintSize; #[dom_struct] pub struct Screen { @@ -35,18 +38,22 @@ impl Screen { ScreenBinding::Wrap) } - fn screen_size(&self) -> Size2D<u32> { - let (send, recv) = ipc::channel::<(Size2D<u32>)>().unwrap(); + fn screen_size(&self) -> TypedSize2D<u32, CSSPixel> { + let (send, recv) = ipc::channel::<DeviceUintSize>(self.global().time_profiler_chan().clone()).unwrap(); self.window.upcast::<GlobalScope>() .script_to_constellation_chan().send(ScriptMsg::GetScreenSize(send)).unwrap(); - recv.recv().unwrap_or(Size2D::zero()) + let dpr = self.window.device_pixel_ratio(); + let screen = recv.recv().unwrap_or(TypedSize2D::zero()); + (screen.to_f32() / dpr).to_u32() } - fn screen_avail_size(&self) -> Size2D<u32> { - let (send, recv) = ipc::channel::<(Size2D<u32>)>().unwrap(); + fn screen_avail_size(&self) -> TypedSize2D<u32, CSSPixel> { + let (send, recv) = ipc::channel::<DeviceUintSize>(self.global().time_profiler_chan().clone()).unwrap(); self.window.upcast::<GlobalScope>() .script_to_constellation_chan().send(ScriptMsg::GetScreenAvailSize(send)).unwrap(); - recv.recv().unwrap_or(Size2D::zero()) + let dpr = self.window.device_pixel_ratio(); + let screen = recv.recv().unwrap_or(TypedSize2D::zero()); + (screen.to_f32() / dpr).to_u32() } } diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs index 37ff6a69fe3..b2c3783c010 100644 --- a/components/script/dom/storage.rs +++ b/components/script/dom/storage.rs @@ -14,9 +14,10 @@ use dom::event::{Event, EventBubbles, EventCancelable}; use dom::storageevent::StorageEvent; use dom::window::Window; use dom_struct::dom_struct; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; use net_traits::IpcSend; use net_traits::storage_thread::{StorageThreadMsg, StorageType}; +use profile_traits::ipc; use script_traits::ScriptMsg; use servo_url::ServoUrl; use task_source::TaskSource; @@ -52,7 +53,7 @@ impl Storage { impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-length fn Length(&self) -> u32 { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_storage_thread().send(StorageThreadMsg::Length(sender, self.get_url(), self.storage_type)).unwrap(); receiver.recv().unwrap() as u32 @@ -60,7 +61,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-key fn Key(&self, index: u32) -> Option<DOMString> { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_storage_thread() .send(StorageThreadMsg::Key(sender, self.get_url(), self.storage_type, index)) @@ -70,7 +71,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-getitem fn GetItem(&self, name: DOMString) -> Option<DOMString> { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let name = String::from(name); let msg = StorageThreadMsg::GetItem(sender, self.get_url(), self.storage_type, name); @@ -80,7 +81,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-setitem fn SetItem(&self, name: DOMString, value: DOMString) -> ErrorResult { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let name = String::from(name); let value = String::from(value); @@ -99,7 +100,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-removeitem fn RemoveItem(&self, name: DOMString) { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let name = String::from(name); let msg = StorageThreadMsg::RemoveItem(sender, self.get_url(), self.storage_type, name.clone()); @@ -111,7 +112,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#dom-storage-clear fn Clear(&self) { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_storage_thread().send(StorageThreadMsg::Clear(sender, self.get_url(), self.storage_type)).unwrap(); if receiver.recv().unwrap() { @@ -121,7 +122,7 @@ impl StorageMethods for Storage { // https://html.spec.whatwg.org/multipage/#the-storage-interface:supported-property-names fn SupportedPropertyNames(&self) -> Vec<DOMString> { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_storage_thread().send(StorageThreadMsg::Keys(sender, self.get_url(), self.storage_type)).unwrap(); receiver.recv() diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 2dd77427590..a5bb29a7e76 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -38,6 +38,7 @@ use js::jsapi::{HandleObject, HandleValue, Heap, JSContext, JSObject}; use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray}; use js::jsval::{JSVal, NullValue}; use js::rust::CustomAutoRooterGuard; +use js::typedarray; use script_traits::MsDuration; use servo_config::prefs::PREFS; use std::borrow::ToOwned; @@ -293,6 +294,14 @@ impl TestBindingMethods for TestBinding { fn ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>> { vec![Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned())] } + #[allow(unsafe_code)] + unsafe fn ReceiveUnionIdentity( + &self, + _: *mut JSContext, + arg: UnionTypes::StringOrObject, + ) -> UnionTypes::StringOrObject { + arg + } fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) } fn ReceiveNullableByte(&self) -> Option<i8> { Some(0) } @@ -339,12 +348,12 @@ impl TestBindingMethods for TestBinding { fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) } fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary> { RootedTraceableBox::new(TestDictionary { - anyValue: Heap::default(), + anyValue: RootedTraceableBox::new(Heap::default()), booleanValue: None, byteValue: None, dict: RootedTraceableBox::new(TestDictionaryDefaults { UnrestrictedDoubleValue: 0.0, - anyValue: Heap::default(), + anyValue: RootedTraceableBox::new(Heap::default()), booleanValue: false, bytestringValue: ByteString::new(vec![]), byteValue: 0, @@ -360,7 +369,7 @@ impl TestBindingMethods for TestBinding { nullableFloatValue: None, nullableLongLongValue: None, nullableLongValue: None, - nullableObjectValue: Heap::default(), + nullableObjectValue: RootedTraceableBox::new(Heap::default()), nullableOctetValue: None, nullableShortValue: None, nullableStringValue: None, @@ -428,6 +437,9 @@ impl TestBindingMethods for TestBinding { fn PassByteString(&self, _: ByteString) {} fn PassEnum(&self, _: TestEnum) {} fn PassInterface(&self, _: &Blob) {} + fn PassTypedArray(&self, _: CustomAutoRooterGuard<typedarray::Int8Array>) {} + fn PassTypedArray2(&self, _: CustomAutoRooterGuard<typedarray::ArrayBuffer>) {} + fn PassTypedArray3(&self, _: CustomAutoRooterGuard<typedarray::ArrayBufferView>) {} fn PassUnion(&self, _: HTMLElementOrLong) {} fn PassUnion2(&self, _: EventOrString) {} fn PassUnion3(&self, _: BlobOrString) {} @@ -439,6 +451,7 @@ impl TestBindingMethods for TestBinding { fn PassUnion9(&self, _: UnionTypes::TestDictionaryOrLong) {} #[allow(unsafe_code)] unsafe fn PassUnion10(&self, _: *mut JSContext, _: UnionTypes::StringOrObject) {} + fn PassUnion11(&self, _: UnionTypes::ArrayBufferOrArrayBufferView) {} fn PassUnionWithTypedef(&self, _: DocumentOrTestTypedef) {} fn PassUnionWithTypedef2(&self, _: LongSequenceOrTestTypedef) {} #[allow(unsafe_code)] @@ -479,6 +492,7 @@ impl TestBindingMethods for TestBinding { fn PassNullableInterface(&self, _: Option<&Blob>) {} #[allow(unsafe_code)] unsafe fn PassNullableObject(&self, _: *mut JSContext, _: *mut JSObject) {} + fn PassNullableTypedArray(&self, _: CustomAutoRooterGuard<Option<typedarray::Int8Array>>) { } fn PassNullableUnion(&self, _: Option<HTMLElementOrLong>) {} fn PassNullableUnion2(&self, _: Option<EventOrString>) {} fn PassNullableUnion3(&self, _: Option<StringOrLongSequence>) {} diff --git a/components/script/dom/testrunner.rs b/components/script/dom/testrunner.rs index 84a533786b8..c29b5c477d7 100644 --- a/components/script/dom/testrunner.rs +++ b/components/script/dom/testrunner.rs @@ -11,7 +11,8 @@ use dom::bindings::root::DomRoot; use dom::bindings::str::DOMString; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; +use profile_traits::ipc; // https://webbluetoothcg.github.io/web-bluetooth/tests#test-runner #[dom_struct] @@ -40,7 +41,7 @@ impl TestRunner { impl TestRunnerMethods for TestRunner { // https://webbluetoothcg.github.io/web-bluetooth/tests#setBluetoothMockDataSet fn SetBluetoothMockDataSet(&self, dataSetName: DOMString) -> ErrorResult { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.get_bluetooth_thread().send(BluetoothRequest::Test(String::from(dataSetName), sender)).unwrap(); match receiver.recv().unwrap().into() { Ok(()) => { diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs index f605e717bf8..0fef2e5bb5f 100644 --- a/components/script/dom/url.rs +++ b/components/script/dom/url.rs @@ -13,10 +13,10 @@ use dom::globalscope::GlobalScope; use dom::urlhelper::UrlHelper; use dom::urlsearchparams::URLSearchParams; use dom_struct::dom_struct; -use ipc_channel::ipc; use net_traits::{CoreResourceMsg, IpcSend}; use net_traits::blob_url_store::{get_blob_origin, parse_blob_url}; use net_traits::filemanager_thread::FileManagerThreadMsg; +use profile_traits::ipc; use servo_url::ServoUrl; use std::default::Default; use uuid::Uuid; @@ -118,7 +118,7 @@ impl URL { if let Ok(url) = ServoUrl::parse(&url) { if let Ok((id, _)) = parse_blob_url(&url) { let resource_threads = global.resource_threads(); - let (tx, rx) = ipc::channel().unwrap(); + let (tx, rx) = ipc::channel(global.time_profiler_chan().clone()).unwrap(); let msg = FileManagerThreadMsg::RevokeBlobURL(id, origin, tx); let _ = resource_threads.send(CoreResourceMsg::ToFileManager(msg)); diff --git a/components/script/dom/vr.rs b/components/script/dom/vr.rs index fc3bc1c05b3..3283015dd14 100644 --- a/components/script/dom/vr.rs +++ b/components/script/dom/vr.rs @@ -19,8 +19,8 @@ use dom::promise::Promise; use dom::vrdisplay::VRDisplay; use dom::vrdisplayevent::VRDisplayEvent; use dom_struct::dom_struct; -use ipc_channel::ipc; use ipc_channel::ipc::IpcSender; +use profile_traits::ipc; use std::rc::Rc; use webvr_traits::{WebVRDisplayData, WebVRDisplayEvent, WebVREvent, WebVRMsg}; use webvr_traits::{WebVRGamepadData, WebVRGamepadEvent, WebVRGamepadState}; @@ -61,7 +61,7 @@ impl VRMethods for VR { let promise = Promise::new(&self.global()); if let Some(webvr_thread) = self.webvr_thread() { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); webvr_thread.send(WebVRMsg::GetDisplays(sender)).unwrap(); match receiver.recv().unwrap() { Ok(displays) => { @@ -234,7 +234,7 @@ impl VR { // motion capture or drawing applications. pub fn get_gamepads(&self) -> Vec<DomRoot<Gamepad>> { if let Some(wevbr_sender) = self.webvr_thread() { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); let synced_ids = self.gamepads.borrow().iter().map(|g| g.gamepad_id()).collect(); wevbr_sender.send(WebVRMsg::GetGamepads(synced_ids, sender)).unwrap(); match receiver.recv().unwrap() { diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs index 72b8e29a15c..481f10c30b5 100644 --- a/components/script/dom/vrdisplay.rs +++ b/components/script/dom/vrdisplay.rs @@ -31,7 +31,8 @@ use dom::vrpose::VRPose; use dom::vrstageparameters::VRStageParameters; use dom::webglrenderingcontext::WebGLRenderingContext; use dom_struct::dom_struct; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; +use profile_traits::ipc; use script_runtime::CommonScriptMsg; use script_runtime::ScriptThreadEventCategory::WebVREvent; use std::cell::Cell; @@ -191,7 +192,7 @@ impl VRDisplayMethods for VRDisplay { } // If not presenting we fetch inmediante VRFrameData - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.webvr_thread().send(WebVRMsg::GetFrameData(self.global().pipeline_id(), self.DisplayId(), self.depth_near.get(), @@ -216,7 +217,7 @@ impl VRDisplayMethods for VRDisplay { // https://w3c.github.io/webvr/#dom-vrdisplay-resetpose fn ResetPose(&self) { - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.webvr_thread().send(WebVRMsg::ResetPose(self.global().pipeline_id(), self.DisplayId(), sender)).unwrap(); @@ -324,7 +325,7 @@ impl VRDisplayMethods for VRDisplay { } // Request Present - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.webvr_thread().send(WebVRMsg::RequestPresent(self.global().pipeline_id(), self.display.borrow().display_id, sender)) @@ -357,7 +358,7 @@ impl VRDisplayMethods for VRDisplay { } // Exit present - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.webvr_thread().send(WebVRMsg::ExitPresent(self.global().pipeline_id(), self.display.borrow().display_id, Some(sender))) diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index 2a25c450b08..21d917d4992 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2Rende use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods; use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement; -use dom::bindings::error::Fallible; +use dom::bindings::error::{ErrorResult, Fallible}; use dom::bindings::reflector::{reflect_dom_object, Reflector}; use dom::bindings::root::{Dom, DomRoot, LayoutDom}; use dom::bindings::str::DOMString; @@ -142,6 +142,18 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { self.base.GetExtension(cx, name) } + #[allow(unsafe_code)] + /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4 + unsafe fn GetFramebufferAttachmentParameter( + &self, + cx: *mut JSContext, + target: u32, + attachment: u32, + pname: u32 + ) -> JSVal { + self.base.GetFramebufferAttachmentParameter(cx, target, attachment, pname) + } + /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3 fn ActiveTexture(&self, texture: u32) { self.base.ActiveTexture(texture) @@ -317,7 +329,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn CompileShader(&self, shader: Option<&WebGLShader>) { + fn CompileShader(&self, shader: &WebGLShader) { self.base.CompileShader(shader) } @@ -402,39 +414,39 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetActiveUniform(&self, program: Option<&WebGLProgram>, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { + fn GetActiveUniform(&self, program: &WebGLProgram, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { self.base.GetActiveUniform(program, index) } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetActiveAttrib(&self, program: Option<&WebGLProgram>, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { + fn GetActiveAttrib(&self, program: &WebGLProgram, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { self.base.GetActiveAttrib(program, index) } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetAttribLocation(&self, program: Option<&WebGLProgram>, name: DOMString) -> i32 { + fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32 { self.base.GetAttribLocation(program, name) } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetProgramInfoLog(&self, program: Option<&WebGLProgram>) -> Option<DOMString> { + fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString> { self.base.GetProgramInfoLog(program) } #[allow(unsafe_code)] /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - unsafe fn GetProgramParameter(&self, cx: *mut JSContext, program: Option<&WebGLProgram>, param_id: u32) -> JSVal { + unsafe fn GetProgramParameter(&self, cx: *mut JSContext, program: &WebGLProgram, param_id: u32) -> JSVal { self.base.GetProgramParameter(cx, program, param_id) } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetShaderInfoLog(&self, shader: Option<&WebGLShader>) -> Option<DOMString> { + fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString> { self.base.GetShaderInfoLog(shader) } #[allow(unsafe_code)] /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - unsafe fn GetShaderParameter(&self, cx: *mut JSContext, shader: Option<&WebGLShader>, param_id: u32) -> JSVal { + unsafe fn GetShaderParameter(&self, cx: *mut JSContext, shader: &WebGLShader, param_id: u32) -> JSVal { self.base.GetShaderParameter(cx, shader, param_id) } @@ -447,9 +459,11 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetUniformLocation(&self, - program: Option<&WebGLProgram>, - name: DOMString) -> Option<DomRoot<WebGLUniformLocation>> { + fn GetUniformLocation( + &self, + program: &WebGLProgram, + name: DOMString, + ) -> Option<DomRoot<WebGLUniformLocation>> { self.base.GetUniformLocation(program, name) } @@ -573,12 +587,12 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn ShaderSource(&self, shader: Option<&WebGLShader>, source: DOMString) { + fn ShaderSource(&self, shader: &WebGLShader, source: DOMString) { self.base.ShaderSource(shader, source) } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetShaderSource(&self, shader: Option<&WebGLShader>) -> Option<DOMString> { + fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString> { self.base.GetShaderSource(shader) } @@ -747,7 +761,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn ValidateProgram(&self, program: Option<&WebGLProgram>) { + fn ValidateProgram(&self, program: &WebGLProgram) { self.base.ValidateProgram(program) } @@ -823,13 +837,15 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 - fn TexImage2D_(&self, - target: u32, - level: i32, - internal_format: u32, - format: u32, - data_type: u32, - source: Option<ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement>) -> Fallible<()> { + fn TexImage2D_( + &self, + target: u32, + level: i32, + internal_format: u32, + format: u32, + data_type: u32, + source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, + ) -> ErrorResult { self.base.TexImage2D_(target, level, internal_format, format, data_type, source) } @@ -863,15 +879,16 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { } /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 - fn TexSubImage2D_(&self, - target: u32, - level: i32, - xoffset: i32, - yoffset: i32, - format: u32, - data_type: u32, - source: Option<ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement>) - -> Fallible<()> { + fn TexSubImage2D_( + &self, + target: u32, + level: i32, + xoffset: i32, + yoffset: i32, + format: u32, + data_type: u32, + source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, + ) -> ErrorResult { self.base.TexSubImage2D_(target, level, xoffset, yoffset, format, data_type, source) } diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index c9165609cdb..ccea1efec7b 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -25,6 +25,12 @@ enum WebGLFramebufferAttachment { Texture { texture: Dom<WebGLTexture>, level: i32 }, } +#[derive(Clone, JSTraceable, MallocSizeOf)] +pub enum WebGLFramebufferAttachmentRoot { + Renderbuffer(DomRoot<WebGLRenderbuffer>), + Texture(DomRoot<WebGLTexture>), +} + #[dom_struct] pub struct WebGLFramebuffer { webgl_object: WebGLObject, @@ -213,6 +219,25 @@ impl WebGLFramebuffer { Ok(()) } + pub fn attachment(&self, attachment: u32) -> Option<WebGLFramebufferAttachmentRoot> { + let binding = match attachment { + constants::COLOR_ATTACHMENT0 => &self.color, + constants::DEPTH_ATTACHMENT => &self.depth, + constants::STENCIL_ATTACHMENT => &self.stencil, + constants::DEPTH_STENCIL_ATTACHMENT => &self.depthstencil, + _ => return None, + }; + + binding.borrow().as_ref().map(|bin| { + match bin { + &WebGLFramebufferAttachment::Renderbuffer(ref rb) => + WebGLFramebufferAttachmentRoot::Renderbuffer(DomRoot::from_ref(&rb)), + &WebGLFramebufferAttachment::Texture { ref texture, .. } => + WebGLFramebufferAttachmentRoot::Texture(DomRoot::from_ref(&texture)), + } + }) + } + pub fn texture2d(&self, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>, level: i32) -> WebGLResult<()> { let binding = match attachment { diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs index 98b788fc2ae..f08c40f5500 100644 --- a/components/script/dom/webglprogram.rs +++ b/components/script/dom/webglprogram.rs @@ -31,6 +31,46 @@ pub struct WebGLProgram { renderer: WebGLMsgSender, } +/// ANGLE adds a `_u` prefix to variable names: +/// +/// https://chromium.googlesource.com/angle/angle/+/855d964bd0d05f6b2cb303f625506cf53d37e94f +/// +/// To avoid hard-coding this we would need to use the `sh::GetAttributes` and `sh::GetUniforms` +/// API to look up the `x.name` and `x.mappedName` members, +/// then build a data structure for bi-directional lookup (so either linear scan or two hashmaps). +/// Even then, this would probably only support plain variable names like "foo". +/// Strings passed to e.g. `GetUniformLocation` can be expressions like "foo[0].bar", +/// with the mapping for that "bar" name in yet another part of ANGLE’s API. +const ANGLE_NAME_PREFIX: &'static str = "_u"; + +fn to_name_in_compiled_shader(s: &str) -> String { + map_dot_separated(s, |s, mapped| { + mapped.push_str(ANGLE_NAME_PREFIX); + mapped.push_str(s); + }) +} + +fn from_name_in_compiled_shader(s: &str) -> String { + map_dot_separated(s, |s, mapped| { + mapped.push_str(if s.starts_with(ANGLE_NAME_PREFIX) { + &s[ANGLE_NAME_PREFIX.len()..] + } else { + s + }) + }) +} + +fn map_dot_separated<F: Fn(&str, &mut String)>(s: &str, f: F) -> String { + let mut iter = s.split('.'); + let mut mapped = String::new(); + f(iter.next().unwrap(), &mut mapped); + for s in iter { + mapped.push('.'); + f(s, &mut mapped); + } + mapped +} + impl WebGLProgram { fn new_inherited(renderer: WebGLMsgSender, id: WebGLProgramId) @@ -213,8 +253,10 @@ impl WebGLProgram { return Err(WebGLError::InvalidOperation); } + let name = to_name_in_compiled_shader(&name); + self.renderer - .send(WebGLCommand::BindAttribLocation(self.id, index, String::from(name))) + .send(WebGLCommand::BindAttribLocation(self.id, index, name)) .unwrap(); Ok(()) } @@ -228,8 +270,10 @@ impl WebGLProgram { .send(WebGLCommand::GetActiveUniform(self.id, index, sender)) .unwrap(); - receiver.recv().unwrap().map(|(size, ty, name)| - WebGLActiveInfo::new(self.global().as_window(), size, ty, DOMString::from(name))) + receiver.recv().unwrap().map(|(size, ty, name)| { + let name = DOMString::from(from_name_in_compiled_shader(&name)); + WebGLActiveInfo::new(self.global().as_window(), size, ty, name) + }) } /// glGetActiveAttrib @@ -242,8 +286,10 @@ impl WebGLProgram { .send(WebGLCommand::GetActiveAttrib(self.id, index, sender)) .unwrap(); - receiver.recv().unwrap().map(|(size, ty, name)| - WebGLActiveInfo::new(self.global().as_window(), size, ty, DOMString::from(name))) + receiver.recv().unwrap().map(|(size, ty, name)| { + let name = DOMString::from(from_name_in_compiled_shader(&name)); + WebGLActiveInfo::new(self.global().as_window(), size, ty, name) + }) } /// glGetAttribLocation @@ -264,9 +310,11 @@ impl WebGLProgram { return Ok(None); } + let name = to_name_in_compiled_shader(&name); + let (sender, receiver) = webgl_channel().unwrap(); self.renderer - .send(WebGLCommand::GetAttribLocation(self.id, String::from(name), sender)) + .send(WebGLCommand::GetAttribLocation(self.id, name, sender)) .unwrap(); Ok(receiver.recv().unwrap()) } @@ -285,9 +333,11 @@ impl WebGLProgram { return Ok(None); } + let name = to_name_in_compiled_shader(&name); + let (sender, receiver) = webgl_channel().unwrap(); self.renderer - .send(WebGLCommand::GetUniformLocation(self.id, String::from(name), sender)) + .send(WebGLCommand::GetUniformLocation(self.id, name, sender)) .unwrap(); Ok(receiver.recv().unwrap()) } diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index fa1015582cf..30c60feea35 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -10,12 +10,13 @@ use canvas_traits::webgl::DOMToTextureCommand; use canvas_traits::webgl::WebGLError::*; use canvas_traits::webgl::webgl_channel; use dom::bindings::cell::DomRefCell; +use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as WebGL2Constants; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes}; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods; use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement; use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible}; -use dom::bindings::error::{Error, Fallible}; +use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::inheritance::Castable; use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom}; @@ -33,7 +34,7 @@ use dom::webgl_validations::types::{TexDataType, TexFormat, TexImageTarget}; use dom::webglactiveinfo::WebGLActiveInfo; use dom::webglbuffer::WebGLBuffer; use dom::webglcontextevent::WebGLContextEvent; -use dom::webglframebuffer::WebGLFramebuffer; +use dom::webglframebuffer::{WebGLFramebuffer, WebGLFramebufferAttachmentRoot}; use dom::webglprogram::WebGLProgram; use dom::webglrenderbuffer::WebGLRenderbuffer; use dom::webglshader::WebGLShader; @@ -46,7 +47,7 @@ use euclid::Size2D; use fnv::FnvHashMap; use half::f16; use js::conversions::ConversionBehavior; -use js::jsapi::{JSContext, JSObject, Type, Rooted}; +use js::jsapi::{JSContext, JSObject, Type}; use js::jsval::{BooleanValue, DoubleValue, Int32Value, JSVal, NullValue, UndefinedValue}; use js::typedarray::{TypedArray, TypedArrayElement, Float32, Int32}; use net_traits::image::base::PixelFormat; @@ -224,8 +225,12 @@ impl WebGLRenderingContext { return Err("WebGL context creation error forced by pref `webgl.testing.context_creation_error`".into()); } + let webgl_chan = match window.webgl_chan() { + Some(chan) => chan, + None => return Err("WebGL initialization failed early on".into()), + }; + let (sender, receiver) = webgl_channel().unwrap(); - let webgl_chan = window.webgl_chan(); webgl_chan.send(WebGLMsg::CreateContext(webgl_version, size, attrs, sender)) .unwrap(); let result = receiver.recv().unwrap(); @@ -466,7 +471,7 @@ impl WebGLRenderingContext { } fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) { - if indx > self.limits.max_vertex_attribs { + if indx >= self.limits.max_vertex_attribs { return self.webgl_error(InvalidValue); } @@ -758,14 +763,10 @@ impl WebGLRenderingContext { } } - fn get_image_pixels(&self, - source: Option<ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement>) - -> ImagePixelResult { - let source = match source { - Some(s) => s, - None => return Err(()), - }; - + fn get_image_pixels( + &self, + source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, + ) -> ImagePixelResult { // NOTE: Getting the pixels probably can be short-circuited if some // parameter is invalid. // @@ -1178,9 +1179,8 @@ unsafe fn typed_array_or_sequence_to_vec<T>(cx: *mut JSContext, <T::Element as FromJSValConvertible>::Config: Clone, { // TODO(servo/rust-mozjs#330): replace this with a macro that supports generic types. - let mut typed_array_root = Rooted::new_unrooted(); - let typed_array: Option<TypedArray<T>> = - TypedArray::from(cx, &mut typed_array_root, sequence_or_abv).ok(); + let typed_array: Option<TypedArray<T, *mut JSObject>> = + TypedArray::from(sequence_or_abv).ok(); if let Some(mut typed_array) = typed_array { return Ok(typed_array.as_slice().to_vec()); } @@ -1243,17 +1243,21 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { #[allow(unsafe_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5 unsafe fn GetBufferParameter(&self, _cx: *mut JSContext, target: u32, parameter: u32) -> JSVal { + let parameter_matches = match parameter { + constants::BUFFER_SIZE | + constants::BUFFER_USAGE => true, + _ => false, + }; + + if !parameter_matches { + self.webgl_error(InvalidEnum); + return NullValue(); + } + let (sender, receiver) = webgl_channel().unwrap(); self.send_command(WebGLCommand::GetBufferParameter(target, parameter, sender)); - match handle_potential_webgl_error!(self, receiver.recv().unwrap(), WebGLParameter::Invalid) { - WebGLParameter::Int(val) => Int32Value(val), - WebGLParameter::Bool(_) => panic!("Buffer parameter should not be bool"), - WebGLParameter::Float(_) => panic!("Buffer parameter should not be float"), - WebGLParameter::FloatArray(_) => panic!("Buffer parameter should not be float array"), - WebGLParameter::String(_) => panic!("Buffer parameter should not be string"), - WebGLParameter::Invalid => NullValue(), - } + Int32Value(receiver.recv().unwrap()) } #[allow(unsafe_code)] @@ -1265,6 +1269,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { match parameter { constants::ARRAY_BUFFER_BINDING => return object_binding_to_js_or_null!(cx, &self.bound_buffer_array), + constants::CURRENT_PROGRAM => { + return object_binding_to_js_or_null!(cx, &self.current_program); + } constants::ELEMENT_ARRAY_BUFFER_BINDING => return object_binding_to_js_or_null!(cx, &self.bound_buffer_element_array), constants::FRAMEBUFFER_BINDING => @@ -1298,6 +1305,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { return Int32Value(constants::UNSIGNED_BYTE as i32); } } + constants::VIEWPORT => { + let (sender, receiver) = webgl_channel().unwrap(); + self.send_command(WebGLCommand::GetViewport(sender)); + let (x, y, width, height) = receiver.recv().unwrap(); + rooted!(in(cx) let mut rval = UndefinedValue()); + [x, y, width, height].to_jsval(cx, rval.handle_mut()); + return rval.get(); + } _ => { if !self.extension_manager.is_get_parameter_name_enabled(parameter) { self.webgl_error(WebGLError::InvalidEnum); @@ -1339,31 +1354,39 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { #[allow(unsafe_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 unsafe fn GetTexParameter(&self, _cx: *mut JSContext, target: u32, pname: u32) -> JSVal { - let texture = match target { + let target_matches = match target { constants::TEXTURE_2D | - constants::TEXTURE_CUBE_MAP => self.bound_texture(target), + constants::TEXTURE_CUBE_MAP => true, + _ => false, + }; + + let pname_matches = match pname { + constants::TEXTURE_MAG_FILTER | + constants::TEXTURE_MIN_FILTER | + constants::TEXTURE_WRAP_S | + constants::TEXTURE_WRAP_T => true, + _ => false, + }; + + if !target_matches || !pname_matches { + self.webgl_error(InvalidEnum); + return NullValue(); + } + + if self.bound_texture(target).is_none() { + self.webgl_error(InvalidOperation); + return NullValue(); + } + + let (sender, receiver) = webgl_channel().unwrap(); + self.send_command(WebGLCommand::GetTexParameter(target, pname, sender)); + + match receiver.recv().unwrap() { + value if value != 0 => Int32Value(value), _ => { self.webgl_error(InvalidEnum); - return NullValue(); + NullValue() } - }; - if texture.is_some() { - let (sender, receiver) = webgl_channel().unwrap(); - self.send_command(WebGLCommand::GetTexParameter(target, pname, sender)); - match handle_potential_webgl_error!(self, receiver.recv().unwrap(), WebGLParameter::Invalid) { - WebGLParameter::Int(val) => Int32Value(val), - WebGLParameter::Bool(_) => panic!("Texture parameter should not be bool"), - WebGLParameter::Float(_) => panic!("Texture parameter should not be float"), - WebGLParameter::FloatArray(_) => panic!("Texture parameter should not be float array"), - WebGLParameter::String(_) => panic!("Texture parameter should not be string"), - WebGLParameter::Invalid => { - self.webgl_error(InvalidEnum); - NullValue() - } - } - } else { - self.webgl_error(InvalidOperation); - NullValue() } } @@ -1539,6 +1562,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6 fn BindFramebuffer(&self, target: u32, framebuffer: Option<&WebGLFramebuffer>) { + if target == WebGL2Constants::READ_FRAMEBUFFER { + return self.webgl_error(InvalidEnum); + } + if target != constants::FRAMEBUFFER { return self.webgl_error(InvalidOperation); } @@ -1945,10 +1972,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn CompileShader(&self, shader: Option<&WebGLShader>) { - if let Some(shader) = shader { - shader.compile(self.webgl_version, self.glsl_version, &self.extension_manager) - } + fn CompileShader(&self, shader: &WebGLShader) { + shader.compile(self.webgl_version, self.glsl_version, &self.extension_manager) } // TODO(emilio): Probably in the future we should keep track of the @@ -2117,24 +2142,28 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { constants::POINTS | constants::LINE_STRIP | constants::LINE_LOOP | constants::LINES | constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN | - constants::TRIANGLES => { - if self.current_program.get().is_none() { - return self.webgl_error(InvalidOperation); - } - - if first < 0 || count < 0 { - return self.webgl_error(InvalidValue); - } - - if !self.validate_framebuffer_complete() { - return; - } - - self.send_command(WebGLCommand::DrawArrays(mode, first, count)); - self.mark_as_dirty(); - }, - _ => self.webgl_error(InvalidEnum), + constants::TRIANGLES => {}, + _ => { + return self.webgl_error(InvalidEnum); + } } + if first < 0 || count < 0 { + return self.webgl_error(InvalidValue); + } + if self.current_program.get().is_none() { + return self.webgl_error(InvalidOperation); + } + if let Some(array_buffer) = self.bound_buffer_array.get() { + if count > 0 && (first as u64 + count as u64 > array_buffer.capacity() as u64) { + return self.webgl_error(InvalidOperation); + } + } + if !self.validate_framebuffer_complete() { + return; + } + + self.send_command(WebGLCommand::DrawArrays(mode, first, count)); + self.mark_as_dirty(); } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11 @@ -2203,7 +2232,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn EnableVertexAttribArray(&self, attrib_id: u32) { - if attrib_id > self.limits.max_vertex_attribs { + if attrib_id >= self.limits.max_vertex_attribs { return self.webgl_error(InvalidValue); } @@ -2212,7 +2241,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn DisableVertexAttribArray(&self, attrib_id: u32) { - if attrib_id > self.limits.max_vertex_attribs { + if attrib_id >= self.limits.max_vertex_attribs { return self.webgl_error(InvalidValue); } @@ -2220,23 +2249,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetActiveUniform(&self, program: Option<&WebGLProgram>, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { - let program = match program { - Some(program) => program, - None => { - // Reasons to generate InvalidValue error - // From the GLES 2.0 spec - // - // "INVALID_VALUE is generated if index is greater than or equal - // to the number of active uniform variables in program" - // - // A null program has no uniforms so any index is always greater than the active uniforms - // WebGl conformance expects error with null programs. Check tests in get-active-test.html - self.webgl_error(InvalidValue); - return None; - } - }; - + fn GetActiveUniform(&self, program: &WebGLProgram, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { match program.get_active_uniform(index) { Ok(ret) => Some(ret), Err(e) => { @@ -2247,23 +2260,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetActiveAttrib(&self, program: Option<&WebGLProgram>, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { - let program = match program { - Some(program) => program, - None => { - // Reasons to generate InvalidValue error - // From the GLES 2.0 spec - // - // "INVALID_VALUE is generated if index is greater than or equal - // to the number of active attribute variables in program" - // - // A null program has no attributes so any index is always greater than the active uniforms - // WebGl conformance expects error with null programs. Check tests in get-active-test.html - self.webgl_error(InvalidValue); - return None; - } - }; - + fn GetActiveAttrib(&self, program: &WebGLProgram, index: u32) -> Option<DomRoot<WebGLActiveInfo>> { match program.get_active_attrib(index) { Ok(ret) => Some(ret), Err(e) => { @@ -2274,101 +2271,179 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetAttribLocation(&self, program: Option<&WebGLProgram>, name: DOMString) -> i32 { - if let Some(program) = program { - handle_potential_webgl_error!(self, program.get_attrib_location(name), None).unwrap_or(-1) - } else { - -1 + fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32 { + handle_potential_webgl_error!(self, program.get_attrib_location(name), None).unwrap_or(-1) + } + + #[allow(unsafe_code)] + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6 + unsafe fn GetFramebufferAttachmentParameter( + &self, + cx: *mut JSContext, + target: u32, + attachment: u32, + pname: u32 + ) -> JSVal { + // Check if currently bound framebuffer is non-zero as per spec. + if self.bound_framebuffer.get().is_none() { + self.webgl_error(InvalidOperation); + return NullValue(); + } + + // Note: commented out stuff is for the WebGL2 standard. + let target_matches = match target { + // constants::READ_FRAMEBUFFER | + // constants::DRAW_FRAMEBUFFER => true, + constants::FRAMEBUFFER => true, + _ => false + }; + let attachment_matches = match attachment { + // constants::MAX_COLOR_ATTACHMENTS ... gl::COLOR_ATTACHMENT0 | + // constants::BACK | + constants::COLOR_ATTACHMENT0 | + constants::DEPTH_STENCIL_ATTACHMENT | + constants::DEPTH_ATTACHMENT | + constants::STENCIL_ATTACHMENT => true, + _ => false, + }; + let pname_matches = match pname { + // constants::FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_BLUE_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING | + // constants::FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE | + // constants::FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_GREEN_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_RED_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE | + // constants::FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER | + constants::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME | + constants::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE | + constants::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE | + constants::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL => true, + _ => false + }; + + if !target_matches || !attachment_matches || !pname_matches { + self.webgl_error(InvalidEnum); + return NullValue(); + } + + // From the GLES2 spec: + // + // If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, + // then querying any other pname will generate INVALID_ENUM. + // + // otherwise, return `WebGLRenderbuffer` or `WebGLTexture` dom object + if pname == constants::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME { + // if fb is None, an INVALID_OPERATION is returned + // at the beggining of the function, so `.unwrap()` will never panic + let fb = self.bound_framebuffer.get().unwrap(); + if let Some(webgl_attachment) = fb.attachment(attachment) { + match webgl_attachment { + WebGLFramebufferAttachmentRoot::Renderbuffer(rb) => { + rooted!(in(cx) let mut rval = NullValue()); + rb.to_jsval(cx, rval.handle_mut()); + return rval.get(); + }, + WebGLFramebufferAttachmentRoot::Texture(texture) => { + rooted!(in(cx) let mut rval = NullValue()); + texture.to_jsval(cx, rval.handle_mut()); + return rval.get(); + }, + } + } + self.webgl_error(InvalidEnum); + return NullValue(); } + + let (sender, receiver) = webgl_channel().unwrap(); + self.send_command(WebGLCommand::GetFramebufferAttachmentParameter(target, attachment, pname, sender)); + + Int32Value(receiver.recv().unwrap()) } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetProgramInfoLog(&self, program: Option<&WebGLProgram>) -> Option<DOMString> { - if let Some(program) = program { - match program.get_info_log() { - Ok(value) => Some(DOMString::from(value)), - Err(e) => { - self.webgl_error(e); - None - } + fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString> { + match program.get_info_log() { + Ok(value) => Some(DOMString::from(value)), + Err(e) => { + self.webgl_error(e); + None } - } else { - self.webgl_error(WebGLError::InvalidValue); - None } } #[allow(unsafe_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - unsafe fn GetProgramParameter(&self, _: *mut JSContext, program: Option<&WebGLProgram>, param_id: u32) -> JSVal { - if let Some(program) = program { - match handle_potential_webgl_error!(self, program.parameter(param_id), WebGLParameter::Invalid) { - WebGLParameter::Int(val) => Int32Value(val), - WebGLParameter::Bool(val) => BooleanValue(val), - WebGLParameter::String(_) => panic!("Program parameter should not be string"), - WebGLParameter::Float(_) => panic!("Program parameter should not be float"), - WebGLParameter::FloatArray(_) => { - panic!("Program paramenter should not be float array") - } - WebGLParameter::Invalid => NullValue(), + unsafe fn GetProgramParameter(&self, _: *mut JSContext, program: &WebGLProgram, param_id: u32) -> JSVal { + match handle_potential_webgl_error!(self, program.parameter(param_id), WebGLParameter::Invalid) { + WebGLParameter::Int(val) => Int32Value(val), + WebGLParameter::Bool(val) => BooleanValue(val), + WebGLParameter::String(_) => panic!("Program parameter should not be string"), + WebGLParameter::Float(_) => panic!("Program parameter should not be float"), + WebGLParameter::FloatArray(_) => { + panic!("Program paramenter should not be float array") } - } else { - NullValue() + WebGLParameter::Invalid => NullValue(), } } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetShaderInfoLog(&self, shader: Option<&WebGLShader>) -> Option<DOMString> { - shader.and_then(|s| s.info_log()).map(DOMString::from) + fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString> { + shader.info_log().map(DOMString::from) } #[allow(unsafe_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - unsafe fn GetShaderParameter(&self, _: *mut JSContext, shader: Option<&WebGLShader>, param_id: u32) -> JSVal { - if let Some(shader) = shader { - match handle_potential_webgl_error!(self, shader.parameter(param_id), WebGLParameter::Invalid) { - WebGLParameter::Int(val) => Int32Value(val), - WebGLParameter::Bool(val) => BooleanValue(val), - WebGLParameter::String(_) => panic!("Shader parameter should not be string"), - WebGLParameter::Float(_) => panic!("Shader parameter should not be float"), - WebGLParameter::FloatArray(_) => { - panic!("Shader paramenter should not be float array") - } - WebGLParameter::Invalid => NullValue(), + unsafe fn GetShaderParameter(&self, _: *mut JSContext, shader: &WebGLShader, param_id: u32) -> JSVal { + match handle_potential_webgl_error!(self, shader.parameter(param_id), WebGLParameter::Invalid) { + WebGLParameter::Int(val) => Int32Value(val), + WebGLParameter::Bool(val) => BooleanValue(val), + WebGLParameter::String(_) => panic!("Shader parameter should not be string"), + WebGLParameter::Float(_) => panic!("Shader parameter should not be float"), + WebGLParameter::FloatArray(_) => { + panic!("Shader paramenter should not be float array") } - } else { - NullValue() + WebGLParameter::Invalid => NullValue(), } } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetShaderPrecisionFormat(&self, - shader_type: u32, - precision_type: u32) - -> Option<DomRoot<WebGLShaderPrecisionFormat>> { + fn GetShaderPrecisionFormat( + &self, + shader_type: u32, + precision_type: u32 + ) -> Option<DomRoot<WebGLShaderPrecisionFormat>> { + match precision_type { + constants::LOW_FLOAT | + constants::MEDIUM_FLOAT | + constants::HIGH_FLOAT | + constants::LOW_INT | + constants::MEDIUM_INT | + constants::HIGH_INT => (), + _ => { + self.webgl_error(InvalidEnum); + return None; + }, + } + let (sender, receiver) = webgl_channel().unwrap(); self.send_command(WebGLCommand::GetShaderPrecisionFormat(shader_type, precision_type, sender)); - match receiver.recv().unwrap() { - Ok((range_min, range_max, precision)) => { - Some(WebGLShaderPrecisionFormat::new(self.global().as_window(), range_min, range_max, precision)) - }, - Err(error) => { - self.webgl_error(error); - None - } - } + let (range_min, range_max, precision) = receiver.recv().unwrap(); + Some(WebGLShaderPrecisionFormat::new(self.global().as_window(), range_min, range_max, precision)) } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 - fn GetUniformLocation(&self, - program: Option<&WebGLProgram>, - name: DOMString) -> Option<DomRoot<WebGLUniformLocation>> { - program.and_then(|p| { - handle_potential_webgl_error!(self, p.get_uniform_location(name), None) - .map(|location| WebGLUniformLocation::new(self.global().as_window(), location, p.id())) + fn GetUniformLocation( + &self, + program: &WebGLProgram, + name: DOMString, + ) -> Option<DomRoot<WebGLUniformLocation>> { + handle_potential_webgl_error!(self, program.get_uniform_location(name), None).map(|location| { + WebGLUniformLocation::new(self.global().as_window(), location, program.id()) }) } @@ -2410,10 +2485,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn GetVertexAttribOffset(&self, index: u32, pname: u32) -> i64 { + if pname != constants::VERTEX_ATTRIB_ARRAY_POINTER { + self.webgl_error(InvalidEnum); + return 0; + } let (sender, receiver) = webgl_channel().unwrap(); self.send_command(WebGLCommand::GetVertexAttribOffset(index, pname, sender)); - handle_potential_webgl_error!(self, receiver.recv().unwrap(), 0) as i64 + receiver.recv().unwrap() as i64 } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3 @@ -2741,15 +2820,13 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn ShaderSource(&self, shader: Option<&WebGLShader>, source: DOMString) { - if let Some(shader) = shader { - shader.set_source(source) - } + fn ShaderSource(&self, shader: &WebGLShader, source: DOMString) { + shader.set_source(source) } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn GetShaderSource(&self, shader: Option<&WebGLShader>) -> Option<DOMString> { - shader.and_then(|s| s.source()) + fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString> { + shader.source() } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 @@ -3040,11 +3117,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 - fn ValidateProgram(&self, program: Option<&WebGLProgram>) { - if let Some(program) = program { - if let Err(e) = program.validate() { - self.webgl_error(e); - } + fn ValidateProgram(&self, program: &WebGLProgram) { + if let Err(e) = program.validate() { + self.webgl_error(e); } } @@ -3120,7 +3195,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn VertexAttribPointer(&self, attrib_id: u32, size: i32, data_type: u32, normalized: bool, stride: i32, offset: i64) { - if attrib_id > self.limits.max_vertex_attribs { + if attrib_id >= self.limits.max_vertex_attribs { return self.webgl_error(InvalidValue); } @@ -3169,7 +3244,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { return self.webgl_error(InvalidValue) } - self.send_command(WebGLCommand::Viewport(x, y, width, height)) + self.send_command(WebGLCommand::SetViewport(x, y, width, height)) } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 @@ -3254,13 +3329,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 - fn TexImage2D_(&self, - target: u32, - level: i32, - internal_format: u32, - format: u32, - data_type: u32, - source: Option<ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement>) -> Fallible<()> { + fn TexImage2D_( + &self, + target: u32, + level: i32, + internal_format: u32, + format: u32, + data_type: u32, + source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, + ) -> ErrorResult { if !self.extension_manager.is_tex_type_enabled(data_type) { return Ok(self.webgl_error(InvalidEnum)); } @@ -3415,15 +3492,16 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 - fn TexSubImage2D_(&self, - target: u32, - level: i32, - xoffset: i32, - yoffset: i32, - format: u32, - data_type: u32, - source: Option<ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement>) - -> Fallible<()> { + fn TexSubImage2D_( + &self, + target: u32, + level: i32, + xoffset: i32, + yoffset: i32, + format: u32, + data_type: u32, + source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, + ) -> ErrorResult { let (pixels, size, premultiplied) = match self.get_image_pixels(source) { Ok((pixels, size, premultiplied)) => (pixels, size, premultiplied), Err(_) => return Ok(()), diff --git a/components/script/dom/webglshader.rs b/components/script/dom/webglshader.rs index 7d69cb5d56c..2a6504be506 100644 --- a/components/script/dom/webglshader.rs +++ b/components/script/dom/webglshader.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl -use angle::hl::{BuiltInResources, Output, ShaderValidator}; use canvas_traits::webgl::{WebGLSLVersion, WebGLVersion}; use canvas_traits::webgl::{webgl_channel, WebGLCommand, WebGLMsgSender, WebGLParameter, WebGLResult, WebGLShaderId}; use dom::bindings::cell::DomRefCell; @@ -16,6 +15,7 @@ use dom::webgl_extensions::ext::oesstandardderivatives::OESStandardDerivatives; use dom::webglobject::WebGLObject; use dom::window::Window; use dom_struct::dom_struct; +use mozangle::shaders::{BuiltInResources, Output, ShaderValidator}; use std::cell::Cell; use std::sync::{ONCE_INIT, Once}; @@ -47,7 +47,7 @@ impl WebGLShader { id: WebGLShaderId, shader_type: u32) -> WebGLShader { - GLSLANG_INITIALIZATION.call_once(|| ::angle::hl::initialize().unwrap()); + GLSLANG_INITIALIZATION.call_once(|| ::mozangle::shaders::initialize().unwrap()); WebGLShader { webgl_object: WebGLObject::new_inherited(), id: id, diff --git a/components/script/dom/webidls/Blob.webidl b/components/script/dom/webidls/Blob.webidl index 18a009d39a9..0e96a894c35 100644 --- a/components/script/dom/webidls/Blob.webidl +++ b/components/script/dom/webidls/Blob.webidl @@ -22,4 +22,4 @@ dictionary BlobPropertyBag { DOMString type = ""; }; -typedef (/*ArrayBuffer or ArrayBufferView or */Blob or DOMString) BlobPart; +typedef (ArrayBuffer or ArrayBufferView or Blob or DOMString) BlobPart; diff --git a/components/script/dom/webidls/Crypto.webidl b/components/script/dom/webidls/Crypto.webidl index 94611750e8f..2d17fd4da55 100644 --- a/components/script/dom/webidls/Crypto.webidl +++ b/components/script/dom/webidls/Crypto.webidl @@ -18,7 +18,6 @@ WorkerGlobalScope implements GlobalCrypto; [Exposed=(Window,Worker)] interface Crypto { //readonly attribute SubtleCrypto subtle; - //ArrayBufferView getRandomValues(ArrayBufferView array); [Throws] - ArrayBufferView getRandomValues(object array); + ArrayBufferView getRandomValues(ArrayBufferView array); }; diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 40df23b734c..fbb4787ab89 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -118,7 +118,7 @@ partial /*sealed*/ interface Document { // dynamic markup insertion [CEReactions, Throws] - Document open(optional DOMString type = "text/html", optional DOMString replace = ""); + Document open(optional DOMString type, optional DOMString replace = ""); // WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false); [CEReactions, Throws] void close(); diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl index 25292953d60..1a1c86293cb 100644 --- a/components/script/dom/webidls/TestBinding.webidl +++ b/components/script/dom/webidls/TestBinding.webidl @@ -228,6 +228,8 @@ interface TestBinding { TestDictionary receiveTestDictionaryWithSuccessOnKeyword(); boolean dictMatchesPassedValues(TestDictionary arg); + (DOMString or object) receiveUnionIdentity((DOMString or object) arg); + void passBoolean(boolean arg); void passByte(byte arg); void passOctet(octet arg); @@ -246,6 +248,9 @@ interface TestBinding { void passByteString(ByteString arg); void passEnum(TestEnum arg); void passInterface(Blob arg); + void passTypedArray(Int8Array arg); + void passTypedArray2(ArrayBuffer arg); + void passTypedArray3(ArrayBufferView arg); void passUnion((HTMLElement or long) arg); void passUnion2((Event or DOMString) data); void passUnion3((Blob or DOMString) data); @@ -256,6 +261,7 @@ interface TestBinding { void passUnion8((sequence<ByteString> or long) arg); void passUnion9((TestDictionary or long) arg); void passUnion10((DOMString or object) arg); + void passUnion11((ArrayBuffer or ArrayBufferView) arg); void passUnionWithTypedef((Document or TestTypedef) arg); void passUnionWithTypedef2((sequence<long> or TestTypedef) arg); void passAny(any arg); @@ -288,6 +294,7 @@ interface TestBinding { // void passNullableEnum(TestEnum? arg); void passNullableInterface(Blob? arg); void passNullableObject(object? arg); + void passNullableTypedArray(Int8Array? arg); void passNullableUnion((HTMLElement or long)? arg); void passNullableUnion2((Event or DOMString)? data); void passNullableUnion3((DOMString or sequence<long>)? data); diff --git a/components/script/dom/webidls/VR.webidl b/components/script/dom/webidls/VR.webidl index af256286523..a1092cdb734 100644 --- a/components/script/dom/webidls/VR.webidl +++ b/components/script/dom/webidls/VR.webidl @@ -5,6 +5,7 @@ // https://w3c.github.io/webvr/#interface-navigator [NoInterfaceObject] interface VR { + [Pref="dom.webvr.enabled"] Promise<sequence<VRDisplay>> getDisplays(); //readonly attribute FrozenArray<VRDisplay> activeVRDisplays; }; diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl index 3f845126701..6725b9f6933 100644 --- a/components/script/dom/webidls/WebGLRenderingContext.webidl +++ b/components/script/dom/webidls/WebGLRenderingContext.webidl @@ -510,7 +510,7 @@ interface WebGLRenderingContextBase void clearDepth(GLclampf depth); void clearStencil(GLint s); void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void compileShader(WebGLShader? shader); + void compileShader(WebGLShader shader); // FIXME(simartin) The Code generator doesn't handle ArrayBufferView so we're // using 'object' in the meantime, and marking the function as Throws to @@ -578,33 +578,33 @@ interface WebGLRenderingContextBase void generateMipmap(GLenum target); - WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index); - WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index); + WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index); + WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index); //sequence<WebGLShader>? getAttachedShaders(WebGLProgram? program); - [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name); + [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram program, DOMString name); any getBufferParameter(GLenum target, GLenum pname); any getParameter(GLenum pname); [WebGLHandlesContextLoss] GLenum getError(); - //any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, - // GLenum pname); - any getProgramParameter(WebGLProgram? program, GLenum pname); - DOMString? getProgramInfoLog(WebGLProgram? program); + any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, + GLenum pname); + any getProgramParameter(WebGLProgram program, GLenum pname); + DOMString? getProgramInfoLog(WebGLProgram program); //any getRenderbufferParameter(GLenum target, GLenum pname); - any getShaderParameter(WebGLShader? shader, GLenum pname); + any getShaderParameter(WebGLShader shader, GLenum pname); WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype); - DOMString? getShaderInfoLog(WebGLShader? shader); + DOMString? getShaderInfoLog(WebGLShader shader); - DOMString? getShaderSource(WebGLShader? shader); + DOMString? getShaderSource(WebGLShader shader); any getTexParameter(GLenum target, GLenum pname); - //any getUniform(WebGLProgram? program, WebGLUniformLocation? location); + //any getUniform(WebGLProgram program, WebGLUniformLocation location); - WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name); + WebGLUniformLocation? getUniformLocation(WebGLProgram program, DOMString name); any getVertexAttrib(GLuint index, GLenum pname); @@ -634,7 +634,7 @@ interface WebGLRenderingContextBase void sampleCoverage(GLclampf value, GLboolean invert); void scissor(GLint x, GLint y, GLsizei width, GLsizei height); - void shaderSource(WebGLShader? shader, DOMString source); + void shaderSource(WebGLShader shader, DOMString source); void stencilFunc(GLenum func, GLint ref, GLuint mask); void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); @@ -653,7 +653,7 @@ interface WebGLRenderingContextBase GLenum type, object? data); [Throws] void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, TexImageSource? source); // May throw DOMException + GLenum format, GLenum type, TexImageSource source); // May throw DOMException [Throws, Pref="dom.webgl.dom_to_texture.enabled"] void texImageDOM(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, HTMLIFrameElement source); // May throw DOMException @@ -667,7 +667,7 @@ interface WebGLRenderingContextBase GLenum format, GLenum type, object? data); [Throws] void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, TexImageSource? source); // May throw DOMException + GLenum format, GLenum type, TexImageSource source); // May throw DOMException void uniform1f(WebGLUniformLocation? location, GLfloat x); //void uniform1fv(WebGLUniformLocation? location, Float32Array v); @@ -738,7 +738,7 @@ interface WebGLRenderingContextBase object v); void useProgram(WebGLProgram? program); - void validateProgram(WebGLProgram? program); + void validateProgram(WebGLProgram program); // FIXME(dmarcos) // The code generator doesn't handle Float32Array so we're using 'object' diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index df67630119b..6acb82c863c 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -29,6 +29,7 @@ use net_traits::{CoreResourceMsg, FetchChannels}; use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; use net_traits::MessageData; use net_traits::request::{RequestInit, RequestMode}; +use profile_traits::ipc as ProfiledIpc; use script_runtime::CommonScriptMsg; use script_runtime::ScriptThreadEventCategory::WebSocketEvent; use servo_url::ServoUrl; @@ -181,7 +182,8 @@ impl WebSocket { IpcReceiver<WebSocketDomAction>) = ipc::channel().unwrap(); let (resource_event_sender, dom_event_receiver): (IpcSender<WebSocketNetworkEvent>, - IpcReceiver<WebSocketNetworkEvent>) = ipc::channel().unwrap(); + ProfiledIpc::IpcReceiver<WebSocketNetworkEvent>) = + ProfiledIpc::channel(global.time_profiler_chan().clone()).unwrap(); // Step 8. let request = RequestInit { diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 2cc1515b735..327e766e7fa 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -48,9 +48,9 @@ use dom::windowproxy::WindowProxy; use dom::worklet::Worklet; use dom::workletglobalscope::WorkletGlobalScopeType; use dom_struct::dom_struct; -use euclid::{Point2D, Vector2D, Rect, Size2D}; +use euclid::{Point2D, Vector2D, Rect, Size2D, TypedPoint2D, TypedScale, TypedSize2D}; use fetch; -use ipc_channel::ipc::{self, IpcSender}; +use ipc_channel::ipc::IpcSender; use ipc_channel::router::ROUTER; use js::jsapi::{HandleValue, JSAutoCompartment, JSContext}; use js::jsapi::{JS_GC, JS_GetRuntime}; @@ -63,6 +63,7 @@ use net_traits::image_cache::{ImageCache, ImageResponder, ImageResponse}; use net_traits::image_cache::{PendingImageId, PendingImageResponse}; use net_traits::storage_thread::StorageType; use num_traits::ToPrimitive; +use profile_traits::ipc as ProfiledIpc; use profile_traits::mem::ProfilerChan as MemProfilerChan; use profile_traits::time::ProfilerChan as TimeProfilerChan; use script_layout_interface::{TrustedNodeAddress, PendingImageState}; @@ -102,7 +103,7 @@ use style::properties::{ComputedValues, PropertyId}; use style::selector_parser::PseudoElement; use style::str::HTML_SPACE_CHARACTERS; use style::stylesheets::CssRuleType; -use style_traits::ParsingMode; +use style_traits::{CSSPixel, DevicePixel, ParsingMode}; use task::TaskCanceller; use task_source::dom_manipulation::DOMManipulationTaskSource; use task_source::file_reading::FileReadingTaskSource; @@ -116,7 +117,7 @@ use timers::{IsInterval, TimerCallback}; use tinyfiledialogs::{self, MessageBoxIcon}; use url::Position; use webdriver_handlers::jsval_to_webdriver; -use webrender_api::{ExternalScrollId, DocumentId}; +use webrender_api::{ExternalScrollId, DeviceIntPoint, DeviceUintSize, DocumentId}; use webvr_traits::WebVRMsg; /// Current state of the window object @@ -257,9 +258,9 @@ pub struct Window { test_runner: MutNullableDom<TestRunner>, - /// A handle for communicating messages to the webvr thread, if available. + /// A handle for communicating messages to the WebGL thread, if available. #[ignore_malloc_size_of = "channels are hard"] - webgl_chan: WebGLChan, + webgl_chan: Option<WebGLChan>, /// A handle for communicating messages to the webvr thread, if available. #[ignore_malloc_size_of = "channels are hard"] @@ -402,7 +403,7 @@ impl Window { self.current_viewport.clone().get() } - pub fn webgl_chan(&self) -> WebGLChan { + pub fn webgl_chan(&self) -> Option<WebGLChan> { self.webgl_chan.clone() } @@ -540,7 +541,7 @@ impl WindowMethods for Window { stderr.flush().unwrap(); } - let (sender, receiver) = ipc::channel().unwrap(); + let (sender, receiver) = ProfiledIpc::channel(self.global().time_profiler_chan().clone()).unwrap(); self.send_to_constellation(ScriptMsg::Alert(s.to_string(), sender)); let should_display_alert_dialog = receiver.recv().unwrap(); @@ -930,11 +931,12 @@ impl WindowMethods for Window { } // https://drafts.csswg.org/cssom-view/#dom-window-resizeto - fn ResizeTo(&self, x: i32, y: i32) { + fn ResizeTo(&self, width: i32, height: i32) { // Step 1 //TODO determine if this operation is allowed - let size = Size2D::new(x.to_u32().unwrap_or(1), y.to_u32().unwrap_or(1)); - self.send_to_constellation(ScriptMsg::ResizeTo(size)); + let dpr = self.device_pixel_ratio(); + let size = TypedSize2D::new(width, height).to_f32() * dpr; + self.send_to_constellation(ScriptMsg::ResizeTo(size.to_u32())); } // https://drafts.csswg.org/cssom-view/#dom-window-resizeby @@ -948,8 +950,9 @@ impl WindowMethods for Window { fn MoveTo(&self, x: i32, y: i32) { // Step 1 //TODO determine if this operation is allowed - let point = Point2D::new(x, y); - self.send_to_constellation(ScriptMsg::MoveTo(point)); + let dpr = self.device_pixel_ratio(); + let point = TypedPoint2D::new(x, y).to_f32() * dpr; + self.send_to_constellation(ScriptMsg::MoveTo(point.to_i32())); } // https://drafts.csswg.org/cssom-view/#dom-window-moveby @@ -985,8 +988,7 @@ impl WindowMethods for Window { // https://drafts.csswg.org/cssom-view/#dom-window-devicepixelratio fn DevicePixelRatio(&self) -> Finite<f64> { - let dpr = self.window_size.get().map_or(1.0f32, |data| data.device_pixel_ratio.get()); - Finite::wrap(dpr as f64) + Finite::wrap(self.device_pixel_ratio().get() as f64) } // https://html.spec.whatwg.org/multipage/#dom-window-status @@ -1174,10 +1176,18 @@ impl Window { self.current_viewport.set(new_viewport) } - pub fn client_window(&self) -> (Size2D<u32>, Point2D<i32>) { - let (send, recv) = ipc::channel::<(Size2D<u32>, Point2D<i32>)>().unwrap(); + pub fn device_pixel_ratio(&self) -> TypedScale<f32, CSSPixel, DevicePixel> { + self.window_size.get().map_or(TypedScale::new(1.0), |data| data.device_pixel_ratio) + } + + fn client_window(&self) -> (TypedSize2D<u32, CSSPixel>, TypedPoint2D<i32, CSSPixel>) { + let timer_profile_chan = self.global().time_profiler_chan().clone(); + let (send, recv) = + ProfiledIpc::channel::<(DeviceUintSize, DeviceIntPoint)>(timer_profile_chan).unwrap(); self.send_to_constellation(ScriptMsg::GetClientWindow(send)); - recv.recv().unwrap_or((Size2D::zero(), Point2D::zero())) + let (size, point) = recv.recv().unwrap_or((TypedSize2D::zero(), TypedPoint2D::zero())); + let dpr = self.device_pixel_ratio(); + ((size.to_f32() / dpr).to_u32(), (point.to_f32() / dpr).to_i32()) } /// Advances the layout animation clock by `delta` milliseconds, and then @@ -1293,7 +1303,8 @@ impl Window { let mut images = self.pending_layout_images.borrow_mut(); let nodes = images.entry(id).or_insert(vec![]); if nodes.iter().find(|n| &***n as *const _ == &*node as *const _).is_none() { - let (responder, responder_listener) = ipc::channel().unwrap(); + let (responder, responder_listener) = + ProfiledIpc::channel(self.global().time_profiler_chan().clone()).unwrap(); let pipeline = self.upcast::<GlobalScope>().pipeline_id(); let image_cache_chan = self.image_cache_chan.clone(); ROUTER.add_route(responder_listener.to_opaque(), Box::new(move |message| { @@ -1756,7 +1767,7 @@ impl Window { origin: MutableOrigin, navigation_start: u64, navigation_start_precise: u64, - webgl_chan: WebGLChan, + webgl_chan: Option<WebGLChan>, webvr_chan: Option<IpcSender<WebVRMsg>>, microtask_queue: Rc<MicrotaskQueue>, webrender_document: DocumentId, diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs index 55b99fe919b..95f639aedaa 100644 --- a/components/script/dom/worklet.rs +++ b/components/script/dom/worklet.rs @@ -154,7 +154,7 @@ malloc_size_of_is_0!(WorkletId); impl WorkletId { fn new() -> WorkletId { - WorkletId(servo_rand::random()) + WorkletId(servo_rand::random_uuid()) } } diff --git a/components/script/lib.rs b/components/script/lib.rs index e28bf016e55..bccfda96fdb 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -21,7 +21,6 @@ #![plugin(script_plugins)] #![cfg_attr(not(feature = "unrooted_must_root_lint"), allow(unknown_lints))] -extern crate angle; extern crate app_units; extern crate audio_video_metadata; extern crate base64; @@ -64,6 +63,7 @@ extern crate metrics; extern crate mime; extern crate mime_guess; extern crate mitochondria; +extern crate mozangle; #[macro_use] extern crate mozjs as js; extern crate msg; diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index f386d29487e..d949e9d0b8c 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -483,8 +483,8 @@ pub struct ScriptThread { /// The unit of related similar-origin browsing contexts' list of MutationObserver objects mutation_observers: DomRefCell<Vec<Dom<MutationObserver>>>, - /// A handle to the webgl thread - webgl_chan: WebGLPipeline, + /// A handle to the WebGL thread + webgl_chan: Option<WebGLPipeline>, /// A handle to the webvr thread, if available webvr_chan: Option<IpcSender<WebVRMsg>>, @@ -2130,7 +2130,7 @@ impl ScriptThread { origin, incomplete.navigation_start, incomplete.navigation_start_precise, - self.webgl_chan.channel(), + self.webgl_chan.as_ref().map(|chan| chan.channel()), self.webvr_chan.clone(), self.microtask_queue.clone(), self.webrender_document, diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index caddb62a1de..51afedae058 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -17,7 +17,7 @@ cssparser = "0.23.0" euclid = "0.17" gfx_traits = {path = "../gfx_traits"} html5ever = "0.22" -ipc-channel = "0.9" +ipc-channel = "0.10" libc = "0.2" log = "0.3.5" malloc_size_of = { path = "../malloc_size_of" } diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml index 82a35944092..2d3c47c14b7 100644 --- a/components/script_traits/Cargo.toml +++ b/components/script_traits/Cargo.toml @@ -18,7 +18,7 @@ euclid = "0.17" gfx_traits = {path = "../gfx_traits"} hyper = "0.10" hyper_serde = "0.8" -ipc-channel = "0.9" +ipc-channel = "0.10" libc = "0.2" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { path = "../malloc_size_of_derive" } diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index eec50faf09b..c65ad10be4b 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -41,7 +41,7 @@ pub mod webdriver_msg; use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId}; -use euclid::{Size2D, Length, Point2D, Vector2D, Rect, TypedScale, TypedSize2D}; +use euclid::{Length, Point2D, Vector2D, Rect, TypedSize2D, TypedScale}; use gfx_traits::Epoch; use hyper::header::Headers; use hyper::method::Method; @@ -69,7 +69,7 @@ use style_traits::CSSPixel; use style_traits::SpeculativePainter; use style_traits::cursor::CursorKind; use webdriver_msg::{LoadStatus, WebDriverScriptCommand}; -use webrender_api::{ExternalScrollId, DevicePixel, DocumentId, ImageKey}; +use webrender_api::{ExternalScrollId, DevicePixel, DeviceUintSize, DocumentId, ImageKey}; use webvr_traits::{WebVREvent, WebVRMsg}; pub use script_msg::{LayoutMsg, ScriptMsg, EventResult, LogEntry}; @@ -539,8 +539,8 @@ pub struct InitialScriptState { pub pipeline_namespace_id: PipelineNamespaceId, /// A ping will be sent on this channel once the script thread shuts down. pub content_process_shutdown_chan: IpcSender<()>, - /// A channel to the webgl thread used in this pipeline. - pub webgl_chan: WebGLPipeline, + /// A channel to the WebGL thread used in this pipeline. + pub webgl_chan: Option<WebGLPipeline>, /// A channel to the webvr thread, if available. pub webvr_chan: Option<IpcSender<WebVRMsg>>, /// The Webrender document ID associated with this thread. @@ -650,7 +650,7 @@ pub enum WebDriverCommandMsg { /// Act as if keys were pressed in the browsing context with the given ID. SendKeys(BrowsingContextId, Vec<(Key, KeyModifiers, KeyState)>), /// Set the window size. - SetWindowSize(TopLevelBrowsingContextId, Size2D<u32>, IpcSender<WindowSizeData>), + SetWindowSize(TopLevelBrowsingContextId, DeviceUintSize, IpcSender<WindowSizeData>), /// Take a screenshot of the window. TakeScreenshot(TopLevelBrowsingContextId, IpcSender<Option<Image>>), } diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 524a87d039a..6173f83a495 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -13,7 +13,7 @@ use WorkerGlobalScopeInit; use WorkerScriptLoadOrigin; use canvas_traits::canvas::CanvasMsg; use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId}; -use euclid::{Point2D, Size2D, TypedSize2D}; +use euclid::{Size2D, TypedSize2D}; use gfx_traits::Epoch; use ipc_channel::ipc::{IpcReceiver, IpcSender}; use msg::constellation_msg::{BrowsingContextId, PipelineId, TraversalDirection}; @@ -26,6 +26,7 @@ use servo_url::ServoUrl; use style_traits::CSSPixel; use style_traits::cursor::CursorKind; use style_traits::viewport::ViewportConstraints; +use webrender_api::{DeviceIntPoint, DeviceUintSize}; /// Messages from the layout to the constellation. #[derive(Deserialize, Serialize)] @@ -135,12 +136,10 @@ pub enum ScriptMsg { SetTitle(Option<String>), /// Send a key event SendKeyEvent(Option<char>, Key, KeyState, KeyModifiers), - /// Get Window Informations size and position - GetClientWindow(IpcSender<(Size2D<u32>, Point2D<i32>)>), /// Move the window to a point - MoveTo(Point2D<i32>), + MoveTo(DeviceIntPoint), /// Resize the window to size - ResizeTo(Size2D<u32>), + ResizeTo(DeviceUintSize), /// Script has handled a touch event, and either prevented or allowed default actions. TouchEventProcessed(EventResult), /// A log entry, with the top-level browsing context id and thread name @@ -154,10 +153,12 @@ pub enum ScriptMsg { RegisterServiceWorker(ScopeThings, ServoUrl), /// Enter or exit fullscreen SetFullscreenState(bool), + /// Get Window Informations size and position + GetClientWindow(IpcSender<(DeviceUintSize, DeviceIntPoint)>), /// Get the screen size (pixel) - GetScreenSize(IpcSender<(Size2D<u32>)>), + GetScreenSize(IpcSender<(DeviceUintSize)>), /// Get the available screen size (pixel) - GetScreenAvailSize(IpcSender<(Size2D<u32>)>), + GetScreenAvailSize(IpcSender<(DeviceUintSize)>), /// Requests that the compositor shut down. Exit, } diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index 6cb9acf59fe..7244868285b 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -6,7 +6,7 @@ use attr::{ParsedAttrSelectorOperation, AttrSelectorOperation, NamespaceConstrai use bloom::{BLOOM_HASH_MASK, BloomFilter}; use nth_index_cache::NthIndexCacheInner; use parser::{AncestorHashes, Combinator, Component, LocalName}; -use parser::{Selector, SelectorImpl, SelectorIter, SelectorList}; +use parser::{Selector, SelectorImpl, SelectorIter, SelectorList, NonTSPseudoClass}; use std::borrow::Borrow; use std::iter; use tree::Element; @@ -404,7 +404,7 @@ fn matches_hover_and_active_quirk<Impl: SelectorImpl>( Component::LastOfType | Component::OnlyOfType => false, Component::NonTSPseudoClass(ref pseudo_class) => { - Impl::is_active_or_hover(pseudo_class) + pseudo_class.is_active_or_hover() }, _ => true, } @@ -427,6 +427,7 @@ enum Rightmost { fn next_element_for_combinator<E>( element: &E, combinator: Combinator, + selector: &SelectorIter<E::Impl>, ) -> Option<E> where E: Element, @@ -442,7 +443,42 @@ where return None; } - element.parent_element() + match element.parent_element() { + Some(e) => return Some(e), + None => {} + } + + if !element.parent_node_is_shadow_root() { + return None; + } + + // https://drafts.csswg.org/css-scoping/#host-element-in-tree: + // + // For the purpose of Selectors, a shadow host also appears in + // its shadow tree, with the contents of the shadow tree treated + // as its children. (In other words, the shadow host is treated as + // replacing the shadow root node.) + // + // and also: + // + // When considered within its own shadow trees, the shadow host is + // featureless. Only the :host, :host(), and :host-context() + // pseudo-classes are allowed to match it. + // + // Since we know that the parent is a shadow root, we necessarily + // are in a shadow tree of the host. + let all_selectors_could_match = selector.clone().all(|component| { + match *component { + Component::NonTSPseudoClass(ref pc) => pc.is_host(), + _ => false, + } + }); + + if !all_selectors_could_match { + return None; + } + + element.containing_shadow_host() } Combinator::SlotAssignment => { debug_assert!(element.assigned_slot().map_or(true, |s| s.is_html_slot_element())); @@ -502,7 +538,8 @@ where } }; - let mut next_element = next_element_for_combinator(element, combinator); + let mut next_element = + next_element_for_combinator(element, combinator, &selector_iter); // Stop matching :visited as soon as we find a link, or a combinator for // something that isn't an ancestor. @@ -565,7 +602,8 @@ where visited_handling = VisitedHandlingMode::AllLinksUnvisited; } - next_element = next_element_for_combinator(&element, combinator); + next_element = + next_element_for_combinator(&element, combinator, &selector_iter); } } @@ -753,7 +791,7 @@ where Component::NonTSPseudoClass(ref pc) => { if context.matches_hover_and_active_quirk == MatchesHoverAndActiveQuirk::Yes && !context.shared.is_nested() && - E::Impl::is_active_or_hover(pc) && + pc.is_active_or_hover() && !element.is_link() { return false; diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index 91981562366..5fd73ce8d73 100644 --- a/components/selectors/parser.rs +++ b/components/selectors/parser.rs @@ -36,6 +36,18 @@ pub trait PseudoElement : Sized + ToCss { } } +/// A trait that represents a pseudo-class. +pub trait NonTSPseudoClass : Sized + ToCss { + /// The `SelectorImpl` this pseudo-element is used for. + type Impl: SelectorImpl; + + /// Whether this pseudo-class is :active or :hover. + fn is_active_or_hover(&self) -> bool; + + /// Whether this pseudo-class is :host. + fn is_host(&self) -> bool; +} + fn to_ascii_lowercase(s: &str) -> Cow<str> { if let Some(first_uppercase) = s.bytes().position(|byte| byte >= b'A' && byte <= b'Z') { let mut string = s.to_owned(); @@ -96,14 +108,10 @@ macro_rules! with_all_bounds { /// non tree-structural pseudo-classes /// (see: https://drafts.csswg.org/selectors/#structural-pseudos) - type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss; + type NonTSPseudoClass: $($CommonBounds)* + NonTSPseudoClass<Impl = Self>; /// pseudo-elements type PseudoElement: $($CommonBounds)* + PseudoElement<Impl = Self>; - - /// Returns whether the given pseudo class is :active or :hover. - #[inline] - fn is_active_or_hover(pseudo_class: &Self::NonTSPseudoClass) -> bool; } } } @@ -356,7 +364,10 @@ impl<Impl: SelectorImpl> Visit for Selector<Impl> where Impl::NonTSPseudoClass: } } -impl<Impl: SelectorImpl> Visit for Component<Impl> where Impl::NonTSPseudoClass: Visit<Impl=Impl> { +impl<Impl: SelectorImpl> Visit for Component<Impl> +where + Impl::NonTSPseudoClass: Visit<Impl=Impl> +{ type Impl = Impl; fn visit<V>(&self, visitor: &mut V) -> bool @@ -1981,6 +1992,20 @@ pub mod tests { } } + impl parser::NonTSPseudoClass for PseudoClass { + type Impl = DummySelectorImpl; + + #[inline] + fn is_active_or_hover(&self) -> bool { + matches!(*self, PseudoClass::Active | PseudoClass::Hover) + } + + #[inline] + fn is_host(&self) -> bool { + false + } + } + impl ToCss for PseudoClass { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { match *self { @@ -2045,12 +2070,6 @@ pub mod tests { type BorrowedNamespaceUrl = DummyAtom; type NonTSPseudoClass = PseudoClass; type PseudoElement = PseudoElement; - - #[inline] - fn is_active_or_hover(pseudo_class: &Self::NonTSPseudoClass) -> bool { - matches!(*pseudo_class, PseudoClass::Active | - PseudoClass::Hover) - } } #[derive(Clone, Debug, Default, Eq, Hash, PartialEq)] diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs index c9baeb1316d..00799f92edd 100644 --- a/components/selectors/tree.rs +++ b/components/selectors/tree.rs @@ -31,6 +31,12 @@ pub trait Element: Sized + Clone + Debug { fn parent_element(&self) -> Option<Self>; + /// Whether the parent node of this element is a shadow root. + fn parent_node_is_shadow_root(&self) -> bool; + + /// The host of the containing shadow root, if any. + fn containing_shadow_host(&self) -> Option<Self>; + /// The parent of a given pseudo-element, after matching a pseudo-element /// selector. /// diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index a7860f5ef13..65c32af94e8 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -17,6 +17,7 @@ webdriver = ["webdriver_server"] energy-profiling = ["profile_traits/energy-profiling"] debugmozjs = ["script/debugmozjs"] googlevr = ["webvr/googlevr"] +webrender_debugger = ["webrender/debugger"] oculusvr = ["webvr/oculusvr"] unstable = [ "euclid/unstable", @@ -40,7 +41,7 @@ env_logger = "0.4" euclid = "0.17" gfx = {path = "../gfx"} gleam = "0.4" -ipc-channel = "0.9" +ipc-channel = "0.10" layout_thread = {path = "../layout_thread"} log = "0.3" msg = {path = "../msg"} diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 8844625af19..d557cb3e591 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -74,19 +74,18 @@ use canvas::webgl_thread::WebGLThreads; use compositing::{IOCompositor, ShutdownState, RenderNotifier}; use compositing::compositor_thread::{self, CompositorProxy, CompositorReceiver, InitialCompositorState}; use compositing::compositor_thread::{EmbedderMsg, EmbedderProxy, EmbedderReceiver}; -use compositing::windowing::WindowEvent; -use compositing::windowing::WindowMethods; +use compositing::windowing::{WindowEvent, WindowMethods}; use constellation::{Constellation, InitialConstellationState, UnprivilegedPipelineContent}; use constellation::{FromCompositorLogger, FromScriptLogger}; #[cfg(all(not(target_os = "windows"), not(target_os = "ios")))] use constellation::content_process_sandbox_profile; use env_logger::Logger as EnvLogger; +use euclid::Length; #[cfg(all(not(target_os = "windows"), not(target_os = "ios")))] use gaol::sandbox::{ChildSandbox, ChildSandboxMethods}; use gfx::font_cache_thread::FontCacheThread; use ipc_channel::ipc::{self, IpcSender}; use log::{Log, LogMetadata, LogRecord}; -use msg::constellation_msg::KeyState; use net::resource_thread::new_resource_threads; use net_traits::IpcSend; use profile::mem as profile_mem; @@ -108,7 +107,7 @@ use webvr::{WebVRThread, WebVRCompositorHandler}; pub use gleam::gl; pub use servo_config as config; pub use servo_url as url; -pub use msg::constellation_msg::TopLevelBrowsingContextId as BrowserId; +pub use msg::constellation_msg::{KeyState, TopLevelBrowsingContextId as BrowserId}; /// The in-process interface to Servo. /// @@ -124,7 +123,8 @@ pub use msg::constellation_msg::TopLevelBrowsingContextId as BrowserId; pub struct Servo<Window: WindowMethods + 'static> { compositor: IOCompositor<Window>, constellation_chan: Sender<ConstellationMsg>, - embedder_receiver: EmbedderReceiver + embedder_receiver: EmbedderReceiver, + embedder_events: Vec<EmbedderMsg>, } impl<Window> Servo<Window> where Window: WindowMethods + 'static { @@ -133,7 +133,7 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { let opts = opts::get(); // Make sure the gl context is made current. - window.prepare_for_composite(0, 0); + window.prepare_for_composite(Length::new(0), Length::new(0)); // Get both endpoints of a special channel for communication between // the client window and the compositor. This channel is unique because @@ -157,17 +157,9 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { let mut resource_path = resources_dir_path().unwrap(); resource_path.push("shaders"); - let (mut webrender, webrender_api_sender) = { - // TODO(gw): Duplicates device_pixels_per_screen_px from compositor. Tidy up! - let scale_factor = window.hidpi_factor().get(); - let device_pixel_ratio = match opts.device_pixels_per_px { - Some(device_pixels_per_px) => device_pixels_per_px, - None => match opts.output_file { - Some(_) => 1.0, - None => scale_factor, - } - }; + let coordinates = window.get_coordinates(); + let (mut webrender, webrender_api_sender) = { let renderer_kind = if opts::get().should_use_osmesa() { RendererKind::OSMesa } else { @@ -188,7 +180,7 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { let render_notifier = Box::new(RenderNotifier::new(compositor_proxy.clone())); webrender::Renderer::new(window.gl(), render_notifier, webrender::RendererOptions { - device_pixel_ratio: device_pixel_ratio, + device_pixel_ratio: coordinates.hidpi_factor.get(), resource_override_path: Some(resource_path), enable_aa: opts.enable_text_antialiasing, debug_flags: debug_flags, @@ -204,7 +196,7 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { let webrender_api = webrender_api_sender.create_api(); let wr_document_layer = 0; //TODO - let webrender_document = webrender_api.add_document(window.framebuffer_size(), wr_document_layer); + let webrender_document = webrender_api.add_document(coordinates.framebuffer, wr_document_layer); // Important that this call is done in a single-threaded fashion, we // can't defer it after `create_constellation` has started. @@ -253,6 +245,7 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { compositor: compositor, constellation_chan: constellation_chan, embedder_receiver: embedder_receiver, + embedder_events: Vec::new(), } } @@ -333,6 +326,10 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { self.compositor.toggle_webrender_debug(option); } + WindowEvent::CaptureWebRender => { + self.compositor.capture_webrender(); + } + WindowEvent::NewBrowser(url, response_chan) => { let msg = ConstellationMsg::NewBrowser(url, response_chan); if let Err(e) = self.constellation_chan.send(msg) { @@ -365,108 +362,26 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { (_, ShutdownState::ShuttingDown) => {}, - (EmbedderMsg::Status(top_level_browsing_context, message), ShutdownState::NotShuttingDown) => { - self.compositor.window.status(top_level_browsing_context, message); - }, - - (EmbedderMsg::ChangePageTitle(top_level_browsing_context, title), ShutdownState::NotShuttingDown) => { - self.compositor.window.set_page_title(top_level_browsing_context, title); - }, - - (EmbedderMsg::MoveTo(top_level_browsing_context, point), - ShutdownState::NotShuttingDown) => { - self.compositor.window.set_position(top_level_browsing_context, point); - }, - - (EmbedderMsg::ResizeTo(top_level_browsing_context, size), - ShutdownState::NotShuttingDown) => { - self.compositor.window.set_inner_size(top_level_browsing_context, size); - }, - - (EmbedderMsg::GetClientWindow(top_level_browsing_context, send), - ShutdownState::NotShuttingDown) => { - let rect = self.compositor.window.client_window(top_level_browsing_context); - if let Err(e) = send.send(rect) { - warn!("Sending response to get client window failed ({}).", e); - } - }, - - (EmbedderMsg::GetScreenSize(top_level_browsing_context, send), - ShutdownState::NotShuttingDown) => { - let rect = self.compositor.window.screen_size(top_level_browsing_context); - if let Err(e) = send.send(rect) { - warn!("Sending response to get screen size failed ({}).", e); - } - }, - - (EmbedderMsg::GetScreenAvailSize(top_level_browsing_context, send), - ShutdownState::NotShuttingDown) => { - let rect = self.compositor.window.screen_avail_size(top_level_browsing_context); - if let Err(e) = send.send(rect) { - warn!("Sending response to get screen available size failed ({}).", e); - } - }, - - (EmbedderMsg::AllowNavigation(top_level_browsing_context, - url, - response_chan), - ShutdownState::NotShuttingDown) => { - self.compositor.window.allow_navigation(top_level_browsing_context, url, response_chan); - }, - - (EmbedderMsg::KeyEvent(top_level_browsing_context, - ch, - key, - state, - modified), + (EmbedderMsg::KeyEvent(top_level_browsing_context, ch, key, state, modified), ShutdownState::NotShuttingDown) => { if state == KeyState::Pressed { - self.compositor.window.handle_key(top_level_browsing_context, ch, key, modified); + let msg = EmbedderMsg::KeyEvent(top_level_browsing_context, ch, key, state, modified); + self.embedder_events.push(msg); } }, - (EmbedderMsg::SetCursor(cursor), ShutdownState::NotShuttingDown) => { - self.compositor.window.set_cursor(cursor) - }, - - (EmbedderMsg::NewFavicon(top_level_browsing_context, url), ShutdownState::NotShuttingDown) => { - self.compositor.window.set_favicon(top_level_browsing_context, url); - }, - - (EmbedderMsg::HeadParsed(top_level_browsing_context, ), ShutdownState::NotShuttingDown) => { - self.compositor.window.head_parsed(top_level_browsing_context, ); - }, - - (EmbedderMsg::HistoryChanged(top_level_browsing_context, entries, current), - ShutdownState::NotShuttingDown) => { - self.compositor.window.history_changed(top_level_browsing_context, entries, current); - }, - - (EmbedderMsg::SetFullscreenState(top_level_browsing_context, state), - ShutdownState::NotShuttingDown) => { - self.compositor.window.set_fullscreen_state(top_level_browsing_context, state); - }, - - (EmbedderMsg::LoadStart(top_level_browsing_context), ShutdownState::NotShuttingDown) => { - self.compositor.window.load_start(top_level_browsing_context); - }, - - (EmbedderMsg::LoadComplete(top_level_browsing_context), ShutdownState::NotShuttingDown) => { - // Inform the embedder that the load has finished. - // - // TODO(pcwalton): Specify which frame's load completed. - self.compositor.window.load_end(top_level_browsing_context); - }, - (EmbedderMsg::Panic(top_level_browsing_context, reason, backtrace), - ShutdownState::NotShuttingDown) => { - self.compositor.window.handle_panic(top_level_browsing_context, reason, backtrace); + (msg, ShutdownState::NotShuttingDown) => { + self.embedder_events.push(msg); }, - } } } - pub fn handle_events(&mut self, events: Vec<WindowEvent>) -> bool { + pub fn get_events(&mut self) -> Vec<EmbedderMsg> { + ::std::mem::replace(&mut self.embedder_events, Vec::new()) + } + + pub fn handle_events(&mut self, events: Vec<WindowEvent>) { if self.compositor.receive_messages() { self.receive_messages(); } @@ -475,8 +390,9 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static { } if self.compositor.shutdown_state != ShutdownState::FinishedShuttingDown { self.compositor.perform_updates(); + } else { + self.embedder_events.push(EmbedderMsg::Shutdown); } - self.compositor.shutdown_state != ShutdownState::FinishedShuttingDown } pub fn repaint_synchronously(&mut self) { @@ -566,23 +482,31 @@ fn create_constellation(user_agent: Cow<'static, str>, // GLContext factory used to create WebGL Contexts let gl_factory = if opts::get().should_use_osmesa() { - GLContextFactory::current_osmesa_handle().unwrap() + GLContextFactory::current_osmesa_handle() } else { - GLContextFactory::current_native_handle(&compositor_proxy).unwrap() + GLContextFactory::current_native_handle(&compositor_proxy) }; // Initialize WebGL Thread entry point. - let (webgl_threads, image_handler, output_handler) = WebGLThreads::new(gl_factory, - window_gl, - webrender_api_sender.clone(), - webvr_compositor.map(|c| c as Box<_>)); - // Set webrender external image handler for WebGL textures - webrender.set_external_image_handler(image_handler); - - // Set DOM to texture handler, if enabled. - if let Some(output_handler) = output_handler { - webrender.set_output_image_handler(output_handler); - } + let webgl_threads = gl_factory.map(|factory| { + let (webgl_threads, image_handler, output_handler) = + WebGLThreads::new( + factory, + window_gl, + webrender_api_sender.clone(), + webvr_compositor.map(|c| c as Box<_>), + ); + + // Set webrender external image handler for WebGL textures + webrender.set_external_image_handler(image_handler); + + // Set DOM to texture handler, if enabled. + if let Some(output_handler) = output_handler { + webrender.set_output_image_handler(output_handler); + } + + webgl_threads + }); let initial_state = InitialConstellationState { compositor_proxy, diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 88b64ca8144..d3a1d04f4d2 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -52,7 +52,7 @@ num-integer = "0.1.32" num-traits = "0.1.32" ordered-float = "0.4" owning_ref = "0.3.3" -parking_lot = "0.4" +parking_lot = "0.5" precomputed-hash = "0.1.1" rayon = "1" selectors = { path = "../selectors" } @@ -78,7 +78,7 @@ kernel32-sys = "0.2" [build-dependencies] lazy_static = "1" log = "0.3" -bindgen = { version = "0.33.1", optional = true, default-features = false } +bindgen = { version = "0.33.2", optional = true, default-features = false } regex = {version = "0.2", optional = true} walkdir = "1.0" -toml = {version = "0.2.1", optional = true, default-features = false} +toml = {version = "0.4.5", optional = true, default-features = false} diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index bf6ded11c34..0ff05604966 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -43,42 +43,32 @@ mod bindings { use super::common::*; use super::super::PYTHON; use toml; + use toml::value::Table; const STRUCTS_FILE: &'static str = "structs.rs"; const BINDINGS_FILE: &'static str = "bindings.rs"; - fn read_config(path: &PathBuf) -> toml::Table { + fn read_config(path: &PathBuf) -> Table { println!("cargo:rerun-if-changed={}", path.to_str().unwrap()); update_last_modified(&path); let mut contents = String::new(); File::open(path).expect("Failed to open config file") .read_to_string(&mut contents).expect("Failed to read config file"); - let mut parser = toml::Parser::new(&contents); - if let Some(result) = parser.parse() { - result - } else { - use std::fmt::Write; - let mut reason = String::from("Failed to parse config file:"); - for err in parser.errors.iter() { - let parsed = &contents[..err.lo]; - write!(&mut reason, "\n* line {} column {}: {}", - parsed.lines().count(), - parsed.lines().last().map_or(0, |l| l.len()), - err).unwrap(); - } - panic!(reason) + match toml::from_str::<toml::value::Table>(&contents) { + Ok(result) => result, + Err(e) => panic!("Failed to parse config file: {}", e) } } lazy_static! { - static ref CONFIG: toml::Table = { + static ref CONFIG: Table = { // Load Gecko's binding generator config from the source tree. let path = PathBuf::from(env::var_os("MOZ_SRC").unwrap()) .join("layout/style/ServoBindings.toml"); read_config(&path) }; - static ref BUILD_CONFIG: toml::Table = { + static ref BUILD_CONFIG: Table = { // Load build-specific config overrides. // FIXME: We should merge with CONFIG above instead of // forcing callers to do it. @@ -169,7 +159,7 @@ mod bindings { fn mutable_borrowed_type(self, ty: &str) -> Builder; } - fn add_clang_args(mut builder: Builder, config: &toml::Table, matched_os: &mut bool) -> Builder { + fn add_clang_args(mut builder: Builder, config: &Table, matched_os: &mut bool) -> Builder { fn add_args(mut builder: Builder, values: &[toml::Value]) -> Builder { for item in values.iter() { builder = builder.clang_arg(item.as_str().expect("Expect string in list")); @@ -178,7 +168,7 @@ mod bindings { } for (k, v) in config.iter() { if k == "args" { - builder = add_args(builder, v.as_slice().unwrap()); + builder = add_args(builder, v.as_array().unwrap().as_slice()); continue; } let equal_idx = k.find('=').expect(&format!("Invalid key: {}", k)); @@ -207,7 +197,7 @@ mod bindings { let mut builder = Builder::default() .rust_target(RustTarget::Stable_1_0); let rustfmt_path = env::var_os("MOZ_AUTOMATION").and_then(|_| { - env::var_os("TOOLTOOL_DIR") + env::var_os("TOOLTOOL_DIR").or_else(|| env::var_os("MOZ_SRC")) }).map(PathBuf::from); builder = match rustfmt_path { @@ -324,11 +314,11 @@ mod bindings { struct BuilderWithConfig<'a> { builder: Builder, - config: &'a toml::Table, + config: &'a Table, used_keys: HashSet<&'static str>, } impl<'a> BuilderWithConfig<'a> { - fn new(builder: Builder, config: &'a toml::Table) -> Self { + fn new(builder: Builder, config: &'a Table) -> Self { BuilderWithConfig { builder, config, used_keys: HashSet::new(), @@ -342,7 +332,7 @@ mod bindings { let mut used_keys = self.used_keys; if let Some(list) = config.get(key) { used_keys.insert(key); - builder = func(builder, list.as_slice().unwrap().iter()); + builder = func(builder, list.as_array().unwrap().as_slice().iter()); } BuilderWithConfig { builder, config, used_keys } } @@ -355,7 +345,9 @@ mod bindings { self.handle_items(key, |b, item| func(b, item.as_str().unwrap())) } fn handle_table_items<F>(self, key: &'static str, mut func: F) -> BuilderWithConfig<'a> - where F: FnMut(Builder, &'a toml::Table) -> Builder { + where + F: FnMut(Builder, &'a Table) -> Builder + { self.handle_items(key, |b, item| func(b, item.as_table().unwrap())) } fn handle_common(self, fixups: &mut Vec<Fixup>) -> BuilderWithConfig<'a> { @@ -419,7 +411,7 @@ mod bindings { for item in iter { let item = item.as_table().unwrap(); let name = item["enum"].as_str().unwrap(); - let variants = item["variants"].as_slice().unwrap().iter() + let variants = item["variants"].as_array().unwrap().as_slice().iter() .map(|item| item.as_str().unwrap()); map.insert(name.into(), RegexSet::new(variants).unwrap()); } diff --git a/components/style/context.rs b/components/style/context.rs index e6a7b544ab0..f9e61523e2e 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -296,7 +296,7 @@ impl ElementCascadeInputs { /// thread and then combine them after the threads join via the Add /// implementation below. #[derive(Default)] -pub struct TraversalStatistics { +pub struct PerThreadTraversalStatistics { /// The total number of elements traversed. pub elements_traversed: u32, /// The number of elements where has_styles() went from false to true. @@ -308,6 +308,28 @@ pub struct TraversalStatistics { /// The number of styles reused via rule node comparison from the /// StyleSharingCache. pub styles_reused: u32, +} + +/// Implementation of Add to aggregate statistics across different threads. +impl<'a> ops::Add for &'a PerThreadTraversalStatistics { + type Output = PerThreadTraversalStatistics; + fn add(self, other: Self) -> PerThreadTraversalStatistics { + PerThreadTraversalStatistics { + elements_traversed: self.elements_traversed + other.elements_traversed, + elements_styled: self.elements_styled + other.elements_styled, + elements_matched: self.elements_matched + other.elements_matched, + styles_shared: self.styles_shared + other.styles_shared, + styles_reused: self.styles_reused + other.styles_reused, + } + } +} + +/// Statistics gathered during the traversal plus some information from +/// other sources including stylist. +#[derive(Default)] +pub struct TraversalStatistics { + /// Aggregated statistics gathered during the traversal. + pub aggregated: PerThreadTraversalStatistics, /// The number of selectors in the stylist. pub selectors: u32, /// The number of revalidation selectors. @@ -321,38 +343,9 @@ pub struct TraversalStatistics { /// Time spent in the traversal, in milliseconds. pub traversal_time_ms: f64, /// Whether this was a parallel traversal. - pub is_parallel: Option<bool>, + pub is_parallel: bool, /// Whether this is a "large" traversal. - pub is_large: Option<bool>, -} - -/// Implementation of Add to aggregate statistics across different threads. -impl<'a> ops::Add for &'a TraversalStatistics { - type Output = TraversalStatistics; - fn add(self, other: Self) -> TraversalStatistics { - debug_assert!(self.traversal_time_ms == 0.0 && other.traversal_time_ms == 0.0, - "traversal_time_ms should be set at the end by the caller"); - debug_assert!(self.selectors == 0, "set at the end"); - debug_assert!(self.revalidation_selectors == 0, "set at the end"); - debug_assert!(self.dependency_selectors == 0, "set at the end"); - debug_assert!(self.declarations == 0, "set at the end"); - debug_assert!(self.stylist_rebuilds == 0, "set at the end"); - TraversalStatistics { - elements_traversed: self.elements_traversed + other.elements_traversed, - elements_styled: self.elements_styled + other.elements_styled, - elements_matched: self.elements_matched + other.elements_matched, - styles_shared: self.styles_shared + other.styles_shared, - styles_reused: self.styles_reused + other.styles_reused, - selectors: 0, - revalidation_selectors: 0, - dependency_selectors: 0, - declarations: 0, - stylist_rebuilds: 0, - traversal_time_ms: 0.0, - is_parallel: None, - is_large: None, - } - } + pub is_large: bool, } /// Format the statistics in a way that the performance test harness understands. @@ -361,16 +354,16 @@ impl fmt::Display for TraversalStatistics { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { debug_assert!(self.traversal_time_ms != 0.0, "should have set traversal time"); writeln!(f, "[PERF] perf block start")?; - writeln!(f, "[PERF],traversal,{}", if self.is_parallel.unwrap() { + writeln!(f, "[PERF],traversal,{}", if self.is_parallel { "parallel" } else { "sequential" })?; - writeln!(f, "[PERF],elements_traversed,{}", self.elements_traversed)?; - writeln!(f, "[PERF],elements_styled,{}", self.elements_styled)?; - writeln!(f, "[PERF],elements_matched,{}", self.elements_matched)?; - writeln!(f, "[PERF],styles_shared,{}", self.styles_shared)?; - writeln!(f, "[PERF],styles_reused,{}", self.styles_reused)?; + writeln!(f, "[PERF],elements_traversed,{}", self.aggregated.elements_traversed)?; + writeln!(f, "[PERF],elements_styled,{}", self.aggregated.elements_styled)?; + writeln!(f, "[PERF],elements_matched,{}", self.aggregated.elements_matched)?; + writeln!(f, "[PERF],styles_shared,{}", self.aggregated.styles_shared)?; + writeln!(f, "[PERF],styles_reused,{}", self.aggregated.styles_reused)?; writeln!(f, "[PERF],selectors,{}", self.selectors)?; writeln!(f, "[PERF],revalidation_selectors,{}", self.revalidation_selectors)?; writeln!(f, "[PERF],dependency_selectors,{}", self.dependency_selectors)?; @@ -382,29 +375,33 @@ impl fmt::Display for TraversalStatistics { } impl TraversalStatistics { - /// Computes the traversal time given the start time in seconds. - pub fn finish<E, D>(&mut self, traversal: &D, parallel: bool, start: f64) + /// Generate complete traversal statistics. + /// + /// The traversal time is computed given the start time in seconds. + pub fn new<E, D>( + aggregated: PerThreadTraversalStatistics, + traversal: &D, + parallel: bool, + start: f64 + ) -> TraversalStatistics where E: TElement, D: DomTraversal<E>, { let threshold = traversal.shared_context().options.style_statistics_threshold; let stylist = traversal.shared_context().stylist; - - self.is_parallel = Some(parallel); - self.is_large = Some(self.elements_traversed as usize >= threshold); - self.traversal_time_ms = (time::precise_time_s() - start) * 1000.0; - self.selectors = stylist.num_selectors() as u32; - self.revalidation_selectors = stylist.num_revalidation_selectors() as u32; - self.dependency_selectors = stylist.num_invalidations() as u32; - self.declarations = stylist.num_declarations() as u32; - self.stylist_rebuilds = stylist.num_rebuilds() as u32; - } - - /// Returns whether this traversal is 'large' in order to avoid console spam - /// from lots of tiny traversals. - pub fn is_large_traversal(&self) -> bool { - self.is_large.unwrap() + let is_large = aggregated.elements_traversed as usize >= threshold; + TraversalStatistics { + aggregated, + selectors: stylist.num_selectors() as u32, + revalidation_selectors: stylist.num_revalidation_selectors() as u32, + dependency_selectors: stylist.num_invalidations() as u32, + declarations: stylist.num_declarations() as u32, + stylist_rebuilds: stylist.num_rebuilds() as u32, + traversal_time_ms: (time::precise_time_s() - start) * 1000.0, + is_parallel: parallel, + is_large + } } } @@ -714,7 +711,7 @@ pub struct ThreadLocalStyleContext<E: TElement> { /// than the current element). pub selector_flags: SelectorFlagsMap<E>, /// Statistics about the traversal. - pub statistics: TraversalStatistics, + pub statistics: PerThreadTraversalStatistics, /// The struct used to compute and cache font metrics from style /// for evaluation of the font-relative em/ch units and font-size pub font_metrics_provider: E::FontMetricsProvider, @@ -736,7 +733,7 @@ impl<E: TElement> ThreadLocalStyleContext<E> { new_animations_sender: shared.local_context_creation_data.lock().unwrap().new_animations_sender.clone(), tasks: SequentialTaskList(Vec::new()), selector_flags: SelectorFlagsMap::new(), - statistics: TraversalStatistics::default(), + statistics: PerThreadTraversalStatistics::default(), font_metrics_provider: E::FontMetricsProvider::create_from(shared), stack_limit_checker: StackLimitChecker::new( (STYLE_THREAD_STACK_SIZE_KB - STACK_SAFETY_MARGIN_KB) * 1024), @@ -753,7 +750,7 @@ impl<E: TElement> ThreadLocalStyleContext<E> { bloom_filter: StyleBloom::new(), tasks: SequentialTaskList(Vec::new()), selector_flags: SelectorFlagsMap::new(), - statistics: TraversalStatistics::default(), + statistics: PerThreadTraversalStatistics::default(), font_metrics_provider: E::FontMetricsProvider::create_from(shared), stack_limit_checker: StackLimitChecker::new( (STYLE_THREAD_STACK_SIZE_KB - STACK_SAFETY_MARGIN_KB) * 1024), diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs index e727e004ebd..8ef206fd64e 100644 --- a/components/style/counter_style/mod.rs +++ b/components/style/counter_style/mod.rs @@ -22,6 +22,7 @@ use str::CssStringWriter; use style_traits::{Comma, CssWriter, OneOrMoreSeparated, ParseError}; use style_traits::{StyleParseErrorKind, ToCss}; use values::CustomIdent; +use values::specified::Integer; /// Parse a counter style name reference. /// @@ -298,7 +299,7 @@ counter_style_descriptors! { /// <https://drafts.csswg.org/css-counter-styles/#counter-style-pad> "pad" pad / eCSSCounterDesc_Pad: Pad = { - Pad(0, Symbol::String("".to_owned())) + Pad(Integer::new(0), Symbol::String("".to_owned())) } /// <https://drafts.csswg.org/css-counter-styles/#counter-style-fallback> @@ -335,14 +336,14 @@ pub enum System { /// 'fixed <integer>?' Fixed { /// '<integer>?' - first_symbol_value: Option<i32> + first_symbol_value: Option<Integer> }, /// 'extends <counter-style-name>' Extends(CustomIdent), } impl Parse for System { - fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { + fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { try_match_ident_ignore_ascii_case! { input, "cyclic" => Ok(System::Cyclic), "numeric" => Ok(System::Numeric), @@ -350,7 +351,7 @@ impl Parse for System { "symbolic" => Ok(System::Symbolic), "additive" => Ok(System::Additive), "fixed" => { - let first_symbol_value = input.try(|i| i.expect_integer()).ok(); + let first_symbol_value = input.try(|i| Integer::parse(context, i)).ok(); Ok(System::Fixed { first_symbol_value: first_symbol_value }) } "extends" => { @@ -450,21 +451,19 @@ pub struct Ranges(pub Vec<Range<CounterBound>>); #[derive(Clone, Copy, Debug, ToCss)] pub enum CounterBound { /// An integer bound. - /// - /// FIXME(https://github.com/servo/servo/issues/20197) - Integer(i32), + Integer(Integer), /// The infinite bound. Infinite, } impl Parse for Ranges { - fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { + fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { if input.try(|input| input.expect_ident_matching("auto")).is_ok() { Ok(Ranges(Vec::new())) } else { input.parse_comma_separated(|input| { - let opt_start = parse_bound(input)?; - let opt_end = parse_bound(input)?; + let opt_start = parse_bound(context, input)?; + let opt_end = parse_bound(context, input)?; if let (CounterBound::Integer(start), CounterBound::Integer(end)) = (opt_start, opt_end) { if start > end { return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)) @@ -477,18 +476,13 @@ impl Parse for Ranges { } fn parse_bound<'i, 't>( - input: &mut Parser<'i, 't>, + context: &ParserContext, input: &mut Parser<'i, 't>, ) -> Result<CounterBound, ParseError<'i>> { - let location = input.current_source_location(); - match *input.next()? { - Token::Number { int_value: Some(v), .. } => { - Ok(CounterBound::Integer(v)) - } - Token::Ident(ref ident) if ident.eq_ignore_ascii_case("infinite") => { - Ok(CounterBound::Infinite) - } - ref t => Err(location.new_unexpected_token_error(t.clone())), + if let Ok(integer) = input.try(|input| Integer::parse(context, input)) { + return Ok(CounterBound::Integer(integer)); } + input.expect_ident_matching("infinite")?; + Ok(CounterBound::Infinite) } impl ToCss for Ranges { @@ -521,17 +515,14 @@ where /// <https://drafts.csswg.org/css-counter-styles/#counter-style-pad> #[derive(Clone, Debug, ToCss)] -pub struct Pad(pub u32, pub Symbol); +pub struct Pad(pub Integer, pub Symbol); impl Parse for Pad { fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { let pad_with = input.try(|input| Symbol::parse(context, input)); - let min_length = input.expect_integer()?; - if min_length < 0 { - return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)) - } + let min_length = Integer::parse_non_negative(context, input)?; let pad_with = pad_with.or_else(|_| Symbol::parse(context, input))?; - Ok(Pad(min_length as u32, pad_with)) + Ok(Pad(min_length, pad_with)) } } @@ -586,7 +577,7 @@ impl Parse for AdditiveSymbols { #[derive(Clone, Debug, ToCss)] pub struct AdditiveTuple { /// <integer> - pub weight: u32, + pub weight: Integer, /// <symbol> pub symbol: Symbol, } @@ -598,13 +589,10 @@ impl OneOrMoreSeparated for AdditiveTuple { impl Parse for AdditiveTuple { fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { let symbol = input.try(|input| Symbol::parse(context, input)); - let weight = input.expect_integer()?; - if weight < 0 { - return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)) - } + let weight = Integer::parse_non_negative(context, input)?; let symbol = symbol.or_else(|_| Symbol::parse(context, input))?; Ok(AdditiveTuple { - weight: weight as u32, + weight: weight, symbol: symbol, }) } diff --git a/components/style/dom.rs b/components/style/dom.rs index 59c31572c56..93c587257a6 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -321,7 +321,7 @@ fn fmt_subtree<F, N: TNode>(f: &mut fmt::Formatter, stringify: &F, n: N, indent: } /// The ShadowRoot trait. -pub trait TShadowRoot : Sized + Copy + Clone { +pub trait TShadowRoot : Sized + Copy + Clone + PartialEq { /// The concrete node type. type ConcreteNode: TNode<ConcreteShadowRoot = Self>; @@ -390,15 +390,6 @@ pub trait TElement depth } - /// The style scope of this element is a node that represents which rules - /// apply to the element. - /// - /// In Servo, where we don't know about Shadow DOM or XBL, the style scope - /// is always the document. - fn style_scope(&self) -> Self::ConcreteNode { - self.as_node().owner_doc().as_node() - } - /// Get this node's parent element from the perspective of a restyle /// traversal. fn traversal_parent(&self) -> Option<Self> { @@ -748,6 +739,9 @@ pub trait TElement /// The shadow root which roots the subtree this element is contained in. fn containing_shadow(&self) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>; + /// XBL hack for style sharing. :( + fn has_same_xbl_proto_binding_as(&self, _other: Self) -> bool { true } + /// Return the element which we can use to look up rules in the selector /// maps. /// diff --git a/components/style/driver.rs b/components/style/driver.rs index 93983233c4f..17c9fecb3b1 100644 --- a/components/style/driver.rs +++ b/components/style/driver.rs @@ -7,7 +7,8 @@ #![deny(missing_docs)] -use context::{StyleContext, ThreadLocalStyleContext}; +use context::{StyleContext, PerThreadTraversalStatistics}; +use context::{ThreadLocalStyleContext, TraversalStatistics}; use dom::{SendNode, TElement, TNode}; use parallel; use parallel::{DispatchMode, WORK_UNIT_MAX}; @@ -18,6 +19,36 @@ use std::mem; use time; use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken}; +#[cfg(feature = "servo")] +fn should_report_statistics() -> bool { + false +} + +#[cfg(feature = "gecko")] +fn should_report_statistics() -> bool { + unsafe { ::gecko_bindings::structs::ServoTraversalStatistics_sActive } +} + +#[cfg(feature = "servo")] +fn report_statistics(_stats: &PerThreadTraversalStatistics) { + unreachable!("Servo never report stats"); +} + +#[cfg(feature = "gecko")] +fn report_statistics(stats: &PerThreadTraversalStatistics) { + // This should only be called in the main thread, or it may be racy + // to update the statistics in a global variable. + debug_assert!(unsafe { ::gecko_bindings::bindings::Gecko_IsMainThread() }); + let gecko_stats = unsafe { + &mut ::gecko_bindings::structs::ServoTraversalStatistics_sSingleton + }; + gecko_stats.mElementsTraversed += stats.elements_traversed; + gecko_stats.mElementsStyled += stats.elements_styled; + gecko_stats.mElementsMatched += stats.elements_matched; + gecko_stats.mStylesShared += stats.styles_shared; + gecko_stats.mStylesReused += stats.styles_reused; +} + /// Do a DOM traversal for top-down and (optionally) bottom-up processing, /// generic over `D`. /// @@ -41,6 +72,7 @@ where let root = token.traversal_root().expect("Should've ensured we needed to traverse"); + let report_stats = should_report_statistics(); let dump_stats = traversal.shared_context().options.dump_style_statistics; let start_time = if dump_stats { Some(time::precise_time_s()) } else { None }; @@ -113,8 +145,8 @@ where } } - // dump statistics to stdout if requested - if dump_stats { + // Collect statistics from thread-locals if requested. + if dump_stats || report_stats { let mut aggregate = mem::replace(&mut context.thread_local.statistics, Default::default()); let parallel = maybe_tls.is_some(); @@ -128,9 +160,20 @@ where }); } - aggregate.finish(traversal, parallel, start_time.unwrap()); - if aggregate.is_large_traversal() { - println!("{}", aggregate); + if report_stats { + report_statistics(&aggregate); + } + // dump statistics to stdout if requested + if dump_stats { + let stats = TraversalStatistics::new( + aggregate, + traversal, + parallel, + start_time.unwrap() + ); + if stats.is_large { + println!("{}", stats); + } } } } diff --git a/components/style/gecko/arc_types.rs b/components/style/gecko/arc_types.rs index 21afd37217c..c65dd62dee0 100644 --- a/components/style/gecko/arc_types.rs +++ b/components/style/gecko/arc_types.rs @@ -116,19 +116,19 @@ pub unsafe extern "C" fn Servo_RuleNode_Release(obj: &RawServoRuleNode) { ptr::read(ptr as *const StrongRuleNode); } -// ServoStyleContext is not an opaque type on any side of FFI. +// ComputedStyle is not an opaque type on any side of FFI. // This means that doing the HasArcFFI type trick is actually unsound, -// since it gives us a way to construct an Arc<ServoStyleContext> from -// an &ServoStyleContext, which in general is not allowed. So we +// since it gives us a way to construct an Arc<ComputedStyle> from +// an &ComputedStyle, which in general is not allowed. So we // implement the restricted set of arc type functionality we need. #[no_mangle] -pub unsafe extern "C" fn Servo_StyleContext_AddRef(obj: &ComputedValues) { +pub unsafe extern "C" fn Servo_ComputedStyle_AddRef(obj: &ComputedValues) { mem::forget(ArcBorrow::from_ref(obj).clone_arc()); } #[no_mangle] -pub unsafe extern "C" fn Servo_StyleContext_Release(obj: &ComputedValues) { +pub unsafe extern "C" fn Servo_ComputedStyle_Release(obj: &ComputedValues) { ArcBorrow::from_ref(obj).with_arc(|a: &Arc<ComputedValues>| { let _: Arc<ComputedValues> = ptr::read(a); }); diff --git a/components/style/gecko/conversions.rs b/components/style/gecko/conversions.rs index b4171abb2a8..43a4b8dc91a 100644 --- a/components/style/gecko/conversions.rs +++ b/components/style/gecko/conversions.rs @@ -413,7 +413,7 @@ impl nsStyleImage { nsStyleImageType::eStyleImageType_Element => { use gecko_string_cache::Atom; let atom = Gecko_GetImageElement(self); - Some(GenericImage::Element(Atom::from(atom))) + Some(GenericImage::Element(Atom::from_raw(atom))) }, _ => panic!("Unexpected image type") } diff --git a/components/style/gecko/generated/atom_macro.rs b/components/style/gecko/generated/atom_macro.rs index 4b9be1c074e..7584d056c8d 100644 --- a/components/style/gecko/generated/atom_macro.rs +++ b/components/style/gecko/generated/atom_macro.rs @@ -268,6 +268,8 @@ cfg_if! { pub static nsGkAtoms_autocheck: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms12autocompleteE"] pub static nsGkAtoms_autocomplete: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms24autocomplete_richlistboxE"] + pub static nsGkAtoms_autocomplete_richlistbox: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms9autofocusE"] pub static nsGkAtoms_autofocus: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8autoplayE"] @@ -358,8 +360,6 @@ cfg_if! { pub static nsGkAtoms_browser: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms10mozbrowserE"] pub static nsGkAtoms_mozbrowser: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms13bulletinboardE"] - pub static nsGkAtoms_bulletinboard: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms6buttonE"] pub static nsGkAtoms_button: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms24brighttitlebarforegroundE"] @@ -558,6 +558,12 @@ cfg_if! { pub static nsGkAtoms_data: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8datalistE"] pub static nsGkAtoms_datalist: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms10datal10nidE"] + pub static nsGkAtoms_datal10nid: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms12datal10nargsE"] + pub static nsGkAtoms_datal10nargs: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms13datal10nattrsE"] + pub static nsGkAtoms_datal10nattrs: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8dataTypeE"] pub static nsGkAtoms_dataType: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8dateTimeE"] @@ -974,8 +980,6 @@ cfg_if! { pub static nsGkAtoms_graphicsSymbol: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms4gridE"] pub static nsGkAtoms_grid: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms6grippyE"] - pub static nsGkAtoms_grippy: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms5groupE"] pub static nsGkAtoms_group: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8groupboxE"] @@ -1232,8 +1236,6 @@ cfg_if! { pub static nsGkAtoms_line: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms4linkE"] pub static nsGkAtoms_link: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms4listE"] - pub static nsGkAtoms_list: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms7listboxE"] pub static nsGkAtoms_listbox: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms11listboxbodyE"] @@ -1380,8 +1382,8 @@ cfg_if! { pub static nsGkAtoms_minusSign: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8minwidthE"] pub static nsGkAtoms_minwidth: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms6_mixedE"] - pub static nsGkAtoms__mixed: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms5mixedE"] + pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms19messagemanagergroupE"] pub static nsGkAtoms_messagemanagergroup: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms3modE"] @@ -1820,6 +1822,8 @@ cfg_if! { pub static nsGkAtoms_onmessage: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms14onmessageerrorE"] pub static nsGkAtoms_onmessageerror: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms13onmidimessageE"] + pub static nsGkAtoms_onmidimessage: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms11onmousedownE"] pub static nsGkAtoms_onmousedown: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms12onmouseenterE"] @@ -2588,8 +2592,6 @@ cfg_if! { pub static nsGkAtoms_sup: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms7summaryE"] pub static nsGkAtoms_summary: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms7_switchE"] - pub static nsGkAtoms__switch: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms14systemPropertyE"] pub static nsGkAtoms_systemProperty: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms3tabE"] @@ -2928,6 +2930,8 @@ cfg_if! { pub static nsGkAtoms_colorInterpolation: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms25colorInterpolationFiltersE"] pub static nsGkAtoms_colorInterpolationFilters: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms11colorpickerE"] + pub static nsGkAtoms_colorpicker: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms12colorProfileE"] pub static nsGkAtoms_colorProfile: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms6cursorE"] @@ -3286,6 +3290,8 @@ cfg_if! { pub static nsGkAtoms_seed: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms15shape_renderingE"] pub static nsGkAtoms_shape_rendering: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms16simpleScopeChainE"] + pub static nsGkAtoms_simpleScopeChain: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms5skewXE"] pub static nsGkAtoms_skewX: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms5skewYE"] @@ -3612,8 +3618,8 @@ cfg_if! { pub static nsGkAtoms_domainofapplication_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms5edge_E"] pub static nsGkAtoms_edge_: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms3el_E"] - pub static nsGkAtoms_el_: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms2elE"] + pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms9emptyset_E"] pub static nsGkAtoms_emptyset_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms3eq_E"] @@ -3854,8 +3860,8 @@ cfg_if! { pub static nsGkAtoms_notsubset_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms9numalign_E"] pub static nsGkAtoms_numalign_: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms6other_E"] - pub static nsGkAtoms_other_: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms5otherE"] + pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms13outerproduct_E"] pub static nsGkAtoms_outerproduct_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms12partialdiff_E"] @@ -3930,8 +3936,6 @@ cfg_if! { pub static nsGkAtoms_sep_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8setdiff_E"] pub static nsGkAtoms_setdiff_: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms4set_E"] - pub static nsGkAtoms_set_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms6share_E"] pub static nsGkAtoms_share_: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms6shift_E"] @@ -4264,6 +4268,8 @@ cfg_if! { pub static nsGkAtoms_apzCallbackTransform: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms23restylableAnonymousNodeE"] pub static nsGkAtoms_restylableAnonymousNode: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms30docLevelNativeAnonymousContentE"] + pub static nsGkAtoms_docLevelNativeAnonymousContent: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms16paintRequestTimeE"] pub static nsGkAtoms_paintRequestTime: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms14pseudoPropertyE"] @@ -4332,8 +4338,6 @@ cfg_if! { pub static nsGkAtoms_ba: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms3crhE"] pub static nsGkAtoms_crh: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms2elE"] - pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms2gaE"] pub static nsGkAtoms_ga: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms2nlE"] @@ -4358,8 +4362,6 @@ cfg_if! { pub static nsGkAtoms_monospace: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8mozfixedE"] pub static nsGkAtoms_mozfixed: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms6RemoteE"] - pub static nsGkAtoms_Remote: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms8RemoteIdE"] pub static nsGkAtoms_RemoteId: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms10RemoteTypeE"] @@ -4562,8 +4564,6 @@ cfg_if! { pub static nsGkAtoms_pages: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms10scrollbarsE"] pub static nsGkAtoms_scrollbars: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms5otherE"] - pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms3apzE"] pub static nsGkAtoms_apz: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms7restoreE"] @@ -4654,8 +4654,6 @@ cfg_if! { pub static nsGkAtoms_menuitemcheckbox: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms13menuitemradioE"] pub static nsGkAtoms_menuitemradio: *mut nsStaticAtom; - #[link_name = "_ZN9nsGkAtoms5mixedE"] - pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms9multilineE"] pub static nsGkAtoms_multiline: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms10navigationE"] @@ -4804,6 +4802,28 @@ cfg_if! { pub static nsGkAtoms_onaddsourcebuffer: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms20onremovesourcebufferE"] pub static nsGkAtoms_onremovesourcebuffer: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms5aboutE"] + pub static nsGkAtoms_about: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms2IDE"] + pub static nsGkAtoms_ID: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms6nodeIDE"] + pub static nsGkAtoms_nodeID: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms9aboutEachE"] + pub static nsGkAtoms_aboutEach: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms8resourceE"] + pub static nsGkAtoms_resource: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms3RDFE"] + pub static nsGkAtoms_RDF: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms11DescriptionE"] + pub static nsGkAtoms_Description: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms3BagE"] + pub static nsGkAtoms_Bag: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms3SeqE"] + pub static nsGkAtoms_Seq: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms3AltE"] + pub static nsGkAtoms_Alt: *mut nsStaticAtom; + #[link_name = "_ZN9nsGkAtoms9parseTypeE"] + pub static nsGkAtoms_parseType: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms5xlinkE"] pub static nsGkAtoms_xlink: *mut nsStaticAtom; #[link_name = "_ZN9nsGkAtoms9xml_spaceE"] @@ -5473,6 +5493,8 @@ cfg_if! { pub static nsGkAtoms_autocheck: *mut nsStaticAtom; #[link_name = "?autocomplete@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_autocomplete: *mut nsStaticAtom; + #[link_name = "?autocomplete_richlistbox@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_autocomplete_richlistbox: *mut nsStaticAtom; #[link_name = "?autofocus@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_autofocus: *mut nsStaticAtom; #[link_name = "?autoplay@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -5563,8 +5585,6 @@ cfg_if! { pub static nsGkAtoms_browser: *mut nsStaticAtom; #[link_name = "?mozbrowser@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_mozbrowser: *mut nsStaticAtom; - #[link_name = "?bulletinboard@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_bulletinboard: *mut nsStaticAtom; #[link_name = "?button@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_button: *mut nsStaticAtom; #[link_name = "?brighttitlebarforeground@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -5763,6 +5783,12 @@ cfg_if! { pub static nsGkAtoms_data: *mut nsStaticAtom; #[link_name = "?datalist@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_datalist: *mut nsStaticAtom; + #[link_name = "?datal10nid@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_datal10nid: *mut nsStaticAtom; + #[link_name = "?datal10nargs@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_datal10nargs: *mut nsStaticAtom; + #[link_name = "?datal10nattrs@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_datal10nattrs: *mut nsStaticAtom; #[link_name = "?dataType@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_dataType: *mut nsStaticAtom; #[link_name = "?dateTime@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -6179,8 +6205,6 @@ cfg_if! { pub static nsGkAtoms_graphicsSymbol: *mut nsStaticAtom; #[link_name = "?grid@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_grid: *mut nsStaticAtom; - #[link_name = "?grippy@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_grippy: *mut nsStaticAtom; #[link_name = "?group@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_group: *mut nsStaticAtom; #[link_name = "?groupbox@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -6437,8 +6461,6 @@ cfg_if! { pub static nsGkAtoms_line: *mut nsStaticAtom; #[link_name = "?link@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_link: *mut nsStaticAtom; - #[link_name = "?list@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_list: *mut nsStaticAtom; #[link_name = "?listbox@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_listbox: *mut nsStaticAtom; #[link_name = "?listboxbody@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -6585,8 +6607,8 @@ cfg_if! { pub static nsGkAtoms_minusSign: *mut nsStaticAtom; #[link_name = "?minwidth@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_minwidth: *mut nsStaticAtom; - #[link_name = "?_mixed@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms__mixed: *mut nsStaticAtom; + #[link_name = "?mixed@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "?messagemanagergroup@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_messagemanagergroup: *mut nsStaticAtom; #[link_name = "?mod@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -7025,6 +7047,8 @@ cfg_if! { pub static nsGkAtoms_onmessage: *mut nsStaticAtom; #[link_name = "?onmessageerror@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_onmessageerror: *mut nsStaticAtom; + #[link_name = "?onmidimessage@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_onmidimessage: *mut nsStaticAtom; #[link_name = "?onmousedown@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_onmousedown: *mut nsStaticAtom; #[link_name = "?onmouseenter@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -7793,8 +7817,6 @@ cfg_if! { pub static nsGkAtoms_sup: *mut nsStaticAtom; #[link_name = "?summary@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_summary: *mut nsStaticAtom; - #[link_name = "?_switch@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms__switch: *mut nsStaticAtom; #[link_name = "?systemProperty@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_systemProperty: *mut nsStaticAtom; #[link_name = "?tab@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -8133,6 +8155,8 @@ cfg_if! { pub static nsGkAtoms_colorInterpolation: *mut nsStaticAtom; #[link_name = "?colorInterpolationFilters@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_colorInterpolationFilters: *mut nsStaticAtom; + #[link_name = "?colorpicker@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_colorpicker: *mut nsStaticAtom; #[link_name = "?colorProfile@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_colorProfile: *mut nsStaticAtom; #[link_name = "?cursor@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -8491,6 +8515,8 @@ cfg_if! { pub static nsGkAtoms_seed: *mut nsStaticAtom; #[link_name = "?shape_rendering@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_shape_rendering: *mut nsStaticAtom; + #[link_name = "?simpleScopeChain@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_simpleScopeChain: *mut nsStaticAtom; #[link_name = "?skewX@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_skewX: *mut nsStaticAtom; #[link_name = "?skewY@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -8817,8 +8843,8 @@ cfg_if! { pub static nsGkAtoms_domainofapplication_: *mut nsStaticAtom; #[link_name = "?edge_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_edge_: *mut nsStaticAtom; - #[link_name = "?el_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_el_: *mut nsStaticAtom; + #[link_name = "?el@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "?emptyset_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_emptyset_: *mut nsStaticAtom; #[link_name = "?eq_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9059,8 +9085,8 @@ cfg_if! { pub static nsGkAtoms_notsubset_: *mut nsStaticAtom; #[link_name = "?numalign_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_numalign_: *mut nsStaticAtom; - #[link_name = "?other_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_other_: *mut nsStaticAtom; + #[link_name = "?other@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "?outerproduct_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_outerproduct_: *mut nsStaticAtom; #[link_name = "?partialdiff_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9135,8 +9161,6 @@ cfg_if! { pub static nsGkAtoms_sep_: *mut nsStaticAtom; #[link_name = "?setdiff_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_setdiff_: *mut nsStaticAtom; - #[link_name = "?set_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_set_: *mut nsStaticAtom; #[link_name = "?share_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_share_: *mut nsStaticAtom; #[link_name = "?shift_@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9469,6 +9493,8 @@ cfg_if! { pub static nsGkAtoms_apzCallbackTransform: *mut nsStaticAtom; #[link_name = "?restylableAnonymousNode@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_restylableAnonymousNode: *mut nsStaticAtom; + #[link_name = "?docLevelNativeAnonymousContent@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_docLevelNativeAnonymousContent: *mut nsStaticAtom; #[link_name = "?paintRequestTime@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_paintRequestTime: *mut nsStaticAtom; #[link_name = "?pseudoProperty@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9537,8 +9563,6 @@ cfg_if! { pub static nsGkAtoms_ba: *mut nsStaticAtom; #[link_name = "?crh@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_crh: *mut nsStaticAtom; - #[link_name = "?el@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "?ga@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_ga: *mut nsStaticAtom; #[link_name = "?nl@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9563,8 +9587,6 @@ cfg_if! { pub static nsGkAtoms_monospace: *mut nsStaticAtom; #[link_name = "?mozfixed@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_mozfixed: *mut nsStaticAtom; - #[link_name = "?Remote@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_Remote: *mut nsStaticAtom; #[link_name = "?RemoteId@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_RemoteId: *mut nsStaticAtom; #[link_name = "?RemoteType@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9767,8 +9789,6 @@ cfg_if! { pub static nsGkAtoms_pages: *mut nsStaticAtom; #[link_name = "?scrollbars@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_scrollbars: *mut nsStaticAtom; - #[link_name = "?other@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "?apz@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_apz: *mut nsStaticAtom; #[link_name = "?restore@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -9859,8 +9879,6 @@ cfg_if! { pub static nsGkAtoms_menuitemcheckbox: *mut nsStaticAtom; #[link_name = "?menuitemradio@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_menuitemradio: *mut nsStaticAtom; - #[link_name = "?mixed@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] - pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "?multiline@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_multiline: *mut nsStaticAtom; #[link_name = "?navigation@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -10009,6 +10027,28 @@ cfg_if! { pub static nsGkAtoms_onaddsourcebuffer: *mut nsStaticAtom; #[link_name = "?onremovesourcebuffer@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_onremovesourcebuffer: *mut nsStaticAtom; + #[link_name = "?about@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_about: *mut nsStaticAtom; + #[link_name = "?ID@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_ID: *mut nsStaticAtom; + #[link_name = "?nodeID@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_nodeID: *mut nsStaticAtom; + #[link_name = "?aboutEach@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_aboutEach: *mut nsStaticAtom; + #[link_name = "?resource@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_resource: *mut nsStaticAtom; + #[link_name = "?RDF@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_RDF: *mut nsStaticAtom; + #[link_name = "?Description@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_Description: *mut nsStaticAtom; + #[link_name = "?Bag@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_Bag: *mut nsStaticAtom; + #[link_name = "?Seq@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_Seq: *mut nsStaticAtom; + #[link_name = "?Alt@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_Alt: *mut nsStaticAtom; + #[link_name = "?parseType@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] + pub static nsGkAtoms_parseType: *mut nsStaticAtom; #[link_name = "?xlink@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] pub static nsGkAtoms_xlink: *mut nsStaticAtom; #[link_name = "?xml_space@nsGkAtoms@@2PEAVnsStaticAtom@@EA"] @@ -10678,6 +10718,8 @@ cfg_if! { pub static nsGkAtoms_autocheck: *mut nsStaticAtom; #[link_name = "\x01?autocomplete@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_autocomplete: *mut nsStaticAtom; + #[link_name = "\x01?autocomplete_richlistbox@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_autocomplete_richlistbox: *mut nsStaticAtom; #[link_name = "\x01?autofocus@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_autofocus: *mut nsStaticAtom; #[link_name = "\x01?autoplay@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -10768,8 +10810,6 @@ cfg_if! { pub static nsGkAtoms_browser: *mut nsStaticAtom; #[link_name = "\x01?mozbrowser@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_mozbrowser: *mut nsStaticAtom; - #[link_name = "\x01?bulletinboard@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_bulletinboard: *mut nsStaticAtom; #[link_name = "\x01?button@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_button: *mut nsStaticAtom; #[link_name = "\x01?brighttitlebarforeground@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -10968,6 +11008,12 @@ cfg_if! { pub static nsGkAtoms_data: *mut nsStaticAtom; #[link_name = "\x01?datalist@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_datalist: *mut nsStaticAtom; + #[link_name = "\x01?datal10nid@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_datal10nid: *mut nsStaticAtom; + #[link_name = "\x01?datal10nargs@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_datal10nargs: *mut nsStaticAtom; + #[link_name = "\x01?datal10nattrs@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_datal10nattrs: *mut nsStaticAtom; #[link_name = "\x01?dataType@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_dataType: *mut nsStaticAtom; #[link_name = "\x01?dateTime@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -11384,8 +11430,6 @@ cfg_if! { pub static nsGkAtoms_graphicsSymbol: *mut nsStaticAtom; #[link_name = "\x01?grid@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_grid: *mut nsStaticAtom; - #[link_name = "\x01?grippy@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_grippy: *mut nsStaticAtom; #[link_name = "\x01?group@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_group: *mut nsStaticAtom; #[link_name = "\x01?groupbox@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -11642,8 +11686,6 @@ cfg_if! { pub static nsGkAtoms_line: *mut nsStaticAtom; #[link_name = "\x01?link@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_link: *mut nsStaticAtom; - #[link_name = "\x01?list@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_list: *mut nsStaticAtom; #[link_name = "\x01?listbox@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_listbox: *mut nsStaticAtom; #[link_name = "\x01?listboxbody@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -11790,8 +11832,8 @@ cfg_if! { pub static nsGkAtoms_minusSign: *mut nsStaticAtom; #[link_name = "\x01?minwidth@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_minwidth: *mut nsStaticAtom; - #[link_name = "\x01?_mixed@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms__mixed: *mut nsStaticAtom; + #[link_name = "\x01?mixed@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "\x01?messagemanagergroup@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_messagemanagergroup: *mut nsStaticAtom; #[link_name = "\x01?mod@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -12230,6 +12272,8 @@ cfg_if! { pub static nsGkAtoms_onmessage: *mut nsStaticAtom; #[link_name = "\x01?onmessageerror@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_onmessageerror: *mut nsStaticAtom; + #[link_name = "\x01?onmidimessage@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_onmidimessage: *mut nsStaticAtom; #[link_name = "\x01?onmousedown@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_onmousedown: *mut nsStaticAtom; #[link_name = "\x01?onmouseenter@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -12998,8 +13042,6 @@ cfg_if! { pub static nsGkAtoms_sup: *mut nsStaticAtom; #[link_name = "\x01?summary@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_summary: *mut nsStaticAtom; - #[link_name = "\x01?_switch@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms__switch: *mut nsStaticAtom; #[link_name = "\x01?systemProperty@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_systemProperty: *mut nsStaticAtom; #[link_name = "\x01?tab@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -13338,6 +13380,8 @@ cfg_if! { pub static nsGkAtoms_colorInterpolation: *mut nsStaticAtom; #[link_name = "\x01?colorInterpolationFilters@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_colorInterpolationFilters: *mut nsStaticAtom; + #[link_name = "\x01?colorpicker@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_colorpicker: *mut nsStaticAtom; #[link_name = "\x01?colorProfile@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_colorProfile: *mut nsStaticAtom; #[link_name = "\x01?cursor@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -13696,6 +13740,8 @@ cfg_if! { pub static nsGkAtoms_seed: *mut nsStaticAtom; #[link_name = "\x01?shape_rendering@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_shape_rendering: *mut nsStaticAtom; + #[link_name = "\x01?simpleScopeChain@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_simpleScopeChain: *mut nsStaticAtom; #[link_name = "\x01?skewX@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_skewX: *mut nsStaticAtom; #[link_name = "\x01?skewY@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14022,8 +14068,8 @@ cfg_if! { pub static nsGkAtoms_domainofapplication_: *mut nsStaticAtom; #[link_name = "\x01?edge_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_edge_: *mut nsStaticAtom; - #[link_name = "\x01?el_@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_el_: *mut nsStaticAtom; + #[link_name = "\x01?el@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "\x01?emptyset_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_emptyset_: *mut nsStaticAtom; #[link_name = "\x01?eq_@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14264,8 +14310,8 @@ cfg_if! { pub static nsGkAtoms_notsubset_: *mut nsStaticAtom; #[link_name = "\x01?numalign_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_numalign_: *mut nsStaticAtom; - #[link_name = "\x01?other_@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_other_: *mut nsStaticAtom; + #[link_name = "\x01?other@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "\x01?outerproduct_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_outerproduct_: *mut nsStaticAtom; #[link_name = "\x01?partialdiff_@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14340,8 +14386,6 @@ cfg_if! { pub static nsGkAtoms_sep_: *mut nsStaticAtom; #[link_name = "\x01?setdiff_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_setdiff_: *mut nsStaticAtom; - #[link_name = "\x01?set_@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_set_: *mut nsStaticAtom; #[link_name = "\x01?share_@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_share_: *mut nsStaticAtom; #[link_name = "\x01?shift_@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14674,6 +14718,8 @@ cfg_if! { pub static nsGkAtoms_apzCallbackTransform: *mut nsStaticAtom; #[link_name = "\x01?restylableAnonymousNode@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_restylableAnonymousNode: *mut nsStaticAtom; + #[link_name = "\x01?docLevelNativeAnonymousContent@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_docLevelNativeAnonymousContent: *mut nsStaticAtom; #[link_name = "\x01?paintRequestTime@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_paintRequestTime: *mut nsStaticAtom; #[link_name = "\x01?pseudoProperty@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14742,8 +14788,6 @@ cfg_if! { pub static nsGkAtoms_ba: *mut nsStaticAtom; #[link_name = "\x01?crh@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_crh: *mut nsStaticAtom; - #[link_name = "\x01?el@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_el: *mut nsStaticAtom; #[link_name = "\x01?ga@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_ga: *mut nsStaticAtom; #[link_name = "\x01?nl@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14768,8 +14812,6 @@ cfg_if! { pub static nsGkAtoms_monospace: *mut nsStaticAtom; #[link_name = "\x01?mozfixed@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_mozfixed: *mut nsStaticAtom; - #[link_name = "\x01?Remote@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_Remote: *mut nsStaticAtom; #[link_name = "\x01?RemoteId@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_RemoteId: *mut nsStaticAtom; #[link_name = "\x01?RemoteType@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -14972,8 +15014,6 @@ cfg_if! { pub static nsGkAtoms_pages: *mut nsStaticAtom; #[link_name = "\x01?scrollbars@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_scrollbars: *mut nsStaticAtom; - #[link_name = "\x01?other@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_other: *mut nsStaticAtom; #[link_name = "\x01?apz@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_apz: *mut nsStaticAtom; #[link_name = "\x01?restore@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -15064,8 +15104,6 @@ cfg_if! { pub static nsGkAtoms_menuitemcheckbox: *mut nsStaticAtom; #[link_name = "\x01?menuitemradio@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_menuitemradio: *mut nsStaticAtom; - #[link_name = "\x01?mixed@nsGkAtoms@@2PAVnsStaticAtom@@A"] - pub static nsGkAtoms_mixed: *mut nsStaticAtom; #[link_name = "\x01?multiline@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_multiline: *mut nsStaticAtom; #[link_name = "\x01?navigation@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -15214,6 +15252,28 @@ cfg_if! { pub static nsGkAtoms_onaddsourcebuffer: *mut nsStaticAtom; #[link_name = "\x01?onremovesourcebuffer@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_onremovesourcebuffer: *mut nsStaticAtom; + #[link_name = "\x01?about@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_about: *mut nsStaticAtom; + #[link_name = "\x01?ID@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_ID: *mut nsStaticAtom; + #[link_name = "\x01?nodeID@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_nodeID: *mut nsStaticAtom; + #[link_name = "\x01?aboutEach@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_aboutEach: *mut nsStaticAtom; + #[link_name = "\x01?resource@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_resource: *mut nsStaticAtom; + #[link_name = "\x01?RDF@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_RDF: *mut nsStaticAtom; + #[link_name = "\x01?Description@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_Description: *mut nsStaticAtom; + #[link_name = "\x01?Bag@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_Bag: *mut nsStaticAtom; + #[link_name = "\x01?Seq@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_Seq: *mut nsStaticAtom; + #[link_name = "\x01?Alt@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_Alt: *mut nsStaticAtom; + #[link_name = "\x01?parseType@nsGkAtoms@@2PAVnsStaticAtom@@A"] + pub static nsGkAtoms_parseType: *mut nsStaticAtom; #[link_name = "\x01?xlink@nsGkAtoms@@2PAVnsStaticAtom@@A"] pub static nsGkAtoms_xlink: *mut nsStaticAtom; #[link_name = "\x01?xml_space@nsGkAtoms@@2PAVnsStaticAtom@@A"] @@ -15886,6 +15946,8 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_autocheck as *mut _) } }}; ("autocomplete") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_autocomplete as *mut _) } }}; +("autocomplete-richlistbox") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_autocomplete_richlistbox as *mut _) } }}; ("autofocus") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_autofocus as *mut _) } }}; ("autoplay") => @@ -15976,8 +16038,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_browser as *mut _) } }}; ("mozbrowser") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mozbrowser as *mut _) } }}; -("bulletinboard") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_bulletinboard as *mut _) } }}; ("button") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_button as *mut _) } }}; ("brighttitlebarforeground") => @@ -16176,6 +16236,12 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_data as *mut _) } }}; ("datalist") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_datalist as *mut _) } }}; +("data-l10n-id") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_datal10nid as *mut _) } }}; +("data-l10n-args") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_datal10nargs as *mut _) } }}; +("data-l10n-attrs") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_datal10nattrs as *mut _) } }}; ("data-type") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_dataType as *mut _) } }}; ("date-time") => @@ -16592,8 +16658,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_graphicsSymbol as *mut _) } }}; ("grid") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_grid as *mut _) } }}; -("grippy") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_grippy as *mut _) } }}; ("group") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_group as *mut _) } }}; ("groupbox") => @@ -16850,8 +16914,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_line as *mut _) } }}; ("link") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_link as *mut _) } }}; -("list") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_list as *mut _) } }}; ("listbox") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_listbox as *mut _) } }}; ("listboxbody") => @@ -16999,7 +17061,7 @@ macro_rules! atom { ("minwidth") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_minwidth as *mut _) } }}; ("mixed") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__mixed as *mut _) } }}; + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mixed as *mut _) } }}; ("messagemanagergroup") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_messagemanagergroup as *mut _) } }}; ("mod") => @@ -17438,6 +17500,8 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmessage as *mut _) } }}; ("onmessageerror") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmessageerror as *mut _) } }}; +("onmidimessage") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmidimessage as *mut _) } }}; ("onmousedown") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmousedown as *mut _) } }}; ("onmouseenter") => @@ -18206,8 +18270,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_sup as *mut _) } }}; ("summary") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_summary as *mut _) } }}; -("switch") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__switch as *mut _) } }}; ("system-property") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_systemProperty as *mut _) } }}; ("tab") => @@ -18546,6 +18608,8 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_colorInterpolation as *mut _) } }}; ("color-interpolation-filters") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_colorInterpolationFilters as *mut _) } }}; +("colorpicker") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_colorpicker as *mut _) } }}; ("color-profile") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_colorProfile as *mut _) } }}; ("cursor") => @@ -18904,6 +18968,8 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_seed as *mut _) } }}; ("shape-rendering") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_shape_rendering as *mut _) } }}; +("simpleScopeChain") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_simpleScopeChain as *mut _) } }}; ("skewX") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_skewX as *mut _) } }}; ("skewY") => @@ -19231,7 +19297,7 @@ macro_rules! atom { ("edge") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_edge_ as *mut _) } }}; ("el") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_el_ as *mut _) } }}; + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_el as *mut _) } }}; ("emptyset") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_emptyset_ as *mut _) } }}; ("eq") => @@ -19473,7 +19539,7 @@ macro_rules! atom { ("numalign") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_numalign_ as *mut _) } }}; ("other") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_other_ as *mut _) } }}; + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_other as *mut _) } }}; ("outerproduct") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_outerproduct_ as *mut _) } }}; ("partialdiff") => @@ -19548,8 +19614,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_sep_ as *mut _) } }}; ("setdiff") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_setdiff_ as *mut _) } }}; -("set") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_set_ as *mut _) } }}; ("share") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_share_ as *mut _) } }}; ("shift") => @@ -19882,6 +19946,8 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_apzCallbackTransform as *mut _) } }}; ("restylableAnonymousNode") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_restylableAnonymousNode as *mut _) } }}; +("docLevelNativeAnonymousContent") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_docLevelNativeAnonymousContent as *mut _) } }}; ("PaintRequestTime") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_paintRequestTime as *mut _) } }}; ("PseudoProperty") => @@ -19950,8 +20016,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_ba as *mut _) } }}; ("crh") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_crh as *mut _) } }}; -("el") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_el as *mut _) } }}; ("ga") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_ga as *mut _) } }}; ("nl") => @@ -19976,8 +20040,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_monospace as *mut _) } }}; ("-moz-fixed") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mozfixed as *mut _) } }}; -("remote") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Remote as *mut _) } }}; ("_remote_id") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_RemoteId as *mut _) } }}; ("remoteType") => @@ -20180,8 +20242,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_pages as *mut _) } }}; ("scrollbars") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_scrollbars as *mut _) } }}; -("other") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_other as *mut _) } }}; ("apz") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_apz as *mut _) } }}; ("restore") => @@ -20272,8 +20332,6 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_menuitemcheckbox as *mut _) } }}; ("menuitemradio") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_menuitemradio as *mut _) } }}; -("mixed") => - {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mixed as *mut _) } }}; ("multiline") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_multiline as *mut _) } }}; ("navigation") => @@ -20422,6 +20480,28 @@ macro_rules! atom { {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onaddsourcebuffer as *mut _) } }}; ("onremovesourcebuffer") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onremovesourcebuffer as *mut _) } }}; +("about") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_about as *mut _) } }}; +("ID") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_ID as *mut _) } }}; +("nodeID") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_nodeID as *mut _) } }}; +("aboutEach") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_aboutEach as *mut _) } }}; +("resource") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_resource as *mut _) } }}; +("RDF") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_RDF as *mut _) } }}; +("Description") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Description as *mut _) } }}; +("Bag") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Bag as *mut _) } }}; +("Seq") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Seq as *mut _) } }}; +("Alt") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_Alt as *mut _) } }}; +("parseType") => + {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_parseType as *mut _) } }}; ("xlink") => {{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_xlink as *mut _) } }}; ("xml:space") => diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 2cf7305e663..4e76b4679e0 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -5,8 +5,8 @@ use gecko_bindings::structs::nsStyleTransformMatrix; use gecko_bindings::structs::nsTArray; type nsACString_internal = nsACString; type nsAString_internal = nsAString; -pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues; -pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>; +pub type ComputedStyleBorrowed<'a> = &'a ::properties::ComputedValues; +pub type ComputedStyleBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>; pub type ServoComputedDataBorrowed<'a> = &'a ServoComputedData; pub type RawServoAnimationValueTableBorrowed<'a> = &'a (); use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue; @@ -118,9 +118,7 @@ unsafe impl Sync for nsStyleContentData_CounterFunction {} use gecko_bindings::structs::nsStyleContentType; unsafe impl Send for nsStyleContentType {} unsafe impl Sync for nsStyleContentType {} -use gecko_bindings::structs::nsStyleContext; -unsafe impl Send for nsStyleContext {} -unsafe impl Sync for nsStyleContext {} +use gecko_bindings::structs::ComputedStyle; use gecko_bindings::structs::nsStyleCoord; unsafe impl Send for nsStyleCoord {} unsafe impl Sync for nsStyleCoord {} @@ -238,8 +236,7 @@ use gecko_bindings::structs::LoaderReusableStyleSheets; use gecko_bindings::structs::SheetLoadData; use gecko_bindings::structs::ServoStyleSheet; use gecko_bindings::structs::ServoComputedData; -use gecko_bindings::structs::ServoStyleContext; -use gecko_bindings::structs::ServoStyleContextStrong; +use gecko_bindings::structs::ComputedStyleStrong; use gecko_bindings::structs::EffectCompositor_CascadeLevel; use gecko_bindings::structs::UpdateAnimationsTasks; use gecko_bindings::structs::ParsingMode; @@ -255,60 +252,46 @@ use gecko_bindings::structs::FontFamilyName; use gecko_bindings::structs::mozilla::SharedFontList; pub type nsTArrayBorrowed_uintptr_t<'a> = &'a mut ::gecko_bindings::structs::nsTArray<usize>; pub type RawServoStyleSetOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoStyleSet>; -pub type RawServoStyleSetOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoStyleSet>; +pub type RawServoStyleSetOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoStyleSet>; pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet; pub type RawServoStyleSetBorrowedOrNull<'a> = Option<&'a RawServoStyleSet>; pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet; pub type RawServoStyleSetBorrowedMutOrNull<'a> = Option<&'a mut RawServoStyleSet>; -enum RawServoStyleSetVoid { -} +enum RawServoStyleSetVoid { } pub struct RawServoStyleSet(RawServoStyleSetVoid); -pub type RawServoAuthorStylesOwned = - ::gecko_bindings::sugar::ownership::Owned<RawServoAuthorStyles>; -pub type RawServoAuthorStylesOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoAuthorStyles>; +pub type RawServoAuthorStylesOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoAuthorStyles>; +pub type RawServoAuthorStylesOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoAuthorStyles>; pub type RawServoAuthorStylesBorrowed<'a> = &'a RawServoAuthorStyles; pub type RawServoAuthorStylesBorrowedOrNull<'a> = Option<&'a RawServoAuthorStyles>; pub type RawServoAuthorStylesBorrowedMut<'a> = &'a mut RawServoAuthorStyles; pub type RawServoAuthorStylesBorrowedMutOrNull<'a> = Option<&'a mut RawServoAuthorStyles>; -enum RawServoAuthorStylesVoid { -} +enum RawServoAuthorStylesVoid { } pub struct RawServoAuthorStyles(RawServoAuthorStylesVoid); -pub type RawServoSelectorListOwned = - ::gecko_bindings::sugar::ownership::Owned<RawServoSelectorList>; -pub type RawServoSelectorListOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoSelectorList>; +pub type RawServoSelectorListOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoSelectorList>; +pub type RawServoSelectorListOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoSelectorList>; pub type RawServoSelectorListBorrowed<'a> = &'a RawServoSelectorList; pub type RawServoSelectorListBorrowedOrNull<'a> = Option<&'a RawServoSelectorList>; pub type RawServoSelectorListBorrowedMut<'a> = &'a mut RawServoSelectorList; pub type RawServoSelectorListBorrowedMutOrNull<'a> = Option<&'a mut RawServoSelectorList>; -pub type RawServoSourceSizeListOwned = - ::gecko_bindings::sugar::ownership::Owned<RawServoSourceSizeList>; -pub type RawServoSourceSizeListOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoSourceSizeList>; +pub type RawServoSourceSizeListOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoSourceSizeList>; +pub type RawServoSourceSizeListOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoSourceSizeList>; pub type RawServoSourceSizeListBorrowed<'a> = &'a RawServoSourceSizeList; pub type RawServoSourceSizeListBorrowedOrNull<'a> = Option<&'a RawServoSourceSizeList>; pub type RawServoSourceSizeListBorrowedMut<'a> = &'a mut RawServoSourceSizeList; pub type RawServoSourceSizeListBorrowedMutOrNull<'a> = Option<&'a mut RawServoSourceSizeList>; -pub type ServoElementSnapshotOwned = - ::gecko_bindings::sugar::ownership::Owned<ServoElementSnapshot>; -pub type ServoElementSnapshotOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<ServoElementSnapshot>; +pub type ServoElementSnapshotOwned = ::gecko_bindings::sugar::ownership::Owned<ServoElementSnapshot>; +pub type ServoElementSnapshotOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<ServoElementSnapshot>; pub type ServoElementSnapshotBorrowed<'a> = &'a ServoElementSnapshot; pub type ServoElementSnapshotBorrowedOrNull<'a> = Option<&'a ServoElementSnapshot>; pub type ServoElementSnapshotBorrowedMut<'a> = &'a mut ServoElementSnapshot; pub type ServoElementSnapshotBorrowedMutOrNull<'a> = Option<&'a mut ServoElementSnapshot>; -pub type RawServoAnimationValueMapOwned = - ::gecko_bindings::sugar::ownership::Owned<RawServoAnimationValueMap>; -pub type RawServoAnimationValueMapOwnedOrNull = - ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoAnimationValueMap>; +pub type RawServoAnimationValueMapOwned = ::gecko_bindings::sugar::ownership::Owned<RawServoAnimationValueMap>; +pub type RawServoAnimationValueMapOwnedOrNull = ::gecko_bindings::sugar::ownership::OwnedOrNull<RawServoAnimationValueMap>; pub type RawServoAnimationValueMapBorrowed<'a> = &'a RawServoAnimationValueMap; pub type RawServoAnimationValueMapBorrowedOrNull<'a> = Option<&'a RawServoAnimationValueMap>; pub type RawServoAnimationValueMapBorrowedMut<'a> = &'a mut RawServoAnimationValueMap; pub type RawServoAnimationValueMapBorrowedMutOrNull<'a> = Option<&'a mut RawServoAnimationValueMap>; -enum RawServoAnimationValueMapVoid { -} +enum RawServoAnimationValueMapVoid { } pub struct RawServoAnimationValueMap(RawServoAnimationValueMapVoid); pub type RawGeckoNodeBorrowed<'a> = &'a RawGeckoNode; pub type RawGeckoNodeBorrowedOrNull<'a> = Option<&'a RawGeckoNode>; @@ -317,8 +300,7 @@ pub type RawGeckoElementBorrowedOrNull<'a> = Option<&'a RawGeckoElement>; pub type RawGeckoDocumentBorrowed<'a> = &'a RawGeckoDocument; pub type RawGeckoDocumentBorrowedOrNull<'a> = Option<&'a RawGeckoDocument>; pub type RawServoDeclarationBlockStrongBorrowed<'a> = &'a RawServoDeclarationBlockStrong; -pub type RawServoDeclarationBlockStrongBorrowedOrNull<'a> = - Option<&'a RawServoDeclarationBlockStrong>; +pub type RawServoDeclarationBlockStrongBorrowedOrNull<'a> = Option<&'a RawServoDeclarationBlockStrong>; pub type RawGeckoPresContextBorrowed<'a> = &'a RawGeckoPresContext; pub type RawGeckoPresContextBorrowedOrNull<'a> = Option<&'a RawGeckoPresContext>; pub type RawGeckoXBLBindingBorrowed<'a> = &'a RawGeckoXBLBinding; @@ -336,11 +318,9 @@ pub type nsTimingFunctionBorrowedOrNull<'a> = Option<&'a nsTimingFunction>; pub type nsTimingFunctionBorrowedMut<'a> = &'a mut nsTimingFunction; pub type nsTimingFunctionBorrowedMutOrNull<'a> = Option<&'a mut nsTimingFunction>; pub type RawGeckoAnimationPropertySegmentBorrowed<'a> = &'a RawGeckoAnimationPropertySegment; -pub type RawGeckoAnimationPropertySegmentBorrowedOrNull<'a> = - Option<&'a RawGeckoAnimationPropertySegment>; +pub type RawGeckoAnimationPropertySegmentBorrowedOrNull<'a> = Option<&'a RawGeckoAnimationPropertySegment>; pub type RawGeckoAnimationPropertySegmentBorrowedMut<'a> = &'a mut RawGeckoAnimationPropertySegment; -pub type RawGeckoAnimationPropertySegmentBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoAnimationPropertySegment>; +pub type RawGeckoAnimationPropertySegmentBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoAnimationPropertySegment>; pub type RawGeckoComputedTimingBorrowed<'a> = &'a RawGeckoComputedTiming; pub type RawGeckoComputedTimingBorrowedOrNull<'a> = Option<&'a RawGeckoComputedTiming>; pub type RawGeckoComputedTimingBorrowedMut<'a> = &'a mut RawGeckoComputedTiming; @@ -354,18 +334,13 @@ pub type RawGeckoKeyframeListBorrowedOrNull<'a> = Option<&'a RawGeckoKeyframeLis pub type RawGeckoKeyframeListBorrowedMut<'a> = &'a mut RawGeckoKeyframeList; pub type RawGeckoKeyframeListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoKeyframeList>; pub type RawGeckoPropertyValuePairListBorrowed<'a> = &'a RawGeckoPropertyValuePairList; -pub type RawGeckoPropertyValuePairListBorrowedOrNull<'a> = - Option<&'a RawGeckoPropertyValuePairList>; +pub type RawGeckoPropertyValuePairListBorrowedOrNull<'a> = Option<&'a RawGeckoPropertyValuePairList>; pub type RawGeckoPropertyValuePairListBorrowedMut<'a> = &'a mut RawGeckoPropertyValuePairList; -pub type RawGeckoPropertyValuePairListBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoPropertyValuePairList>; +pub type RawGeckoPropertyValuePairListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoPropertyValuePairList>; pub type RawGeckoComputedKeyframeValuesListBorrowed<'a> = &'a RawGeckoComputedKeyframeValuesList; -pub type RawGeckoComputedKeyframeValuesListBorrowedOrNull<'a> = - Option<&'a RawGeckoComputedKeyframeValuesList>; -pub type RawGeckoComputedKeyframeValuesListBorrowedMut<'a> = - &'a mut RawGeckoComputedKeyframeValuesList; -pub type RawGeckoComputedKeyframeValuesListBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoComputedKeyframeValuesList>; +pub type RawGeckoComputedKeyframeValuesListBorrowedOrNull<'a> = Option<&'a RawGeckoComputedKeyframeValuesList>; +pub type RawGeckoComputedKeyframeValuesListBorrowedMut<'a> = &'a mut RawGeckoComputedKeyframeValuesList; +pub type RawGeckoComputedKeyframeValuesListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoComputedKeyframeValuesList>; pub type RawGeckoFontFaceRuleListBorrowed<'a> = &'a RawGeckoFontFaceRuleList; pub type RawGeckoFontFaceRuleListBorrowedOrNull<'a> = Option<&'a RawGeckoFontFaceRuleList>; pub type RawGeckoFontFaceRuleListBorrowedMut<'a> = &'a mut RawGeckoFontFaceRuleList; @@ -373,37 +348,28 @@ pub type RawGeckoFontFaceRuleListBorrowedMutOrNull<'a> = Option<&'a mut RawGecko pub type RawGeckoServoStyleRuleListBorrowed<'a> = &'a RawGeckoServoStyleRuleList; pub type RawGeckoServoStyleRuleListBorrowedOrNull<'a> = Option<&'a RawGeckoServoStyleRuleList>; pub type RawGeckoServoStyleRuleListBorrowedMut<'a> = &'a mut RawGeckoServoStyleRuleList; -pub type RawGeckoServoStyleRuleListBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoServoStyleRuleList>; +pub type RawGeckoServoStyleRuleListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoServoStyleRuleList>; pub type RawGeckoServoAnimationValueListBorrowed<'a> = &'a RawGeckoServoAnimationValueList; -pub type RawGeckoServoAnimationValueListBorrowedOrNull<'a> = - Option<&'a RawGeckoServoAnimationValueList>; +pub type RawGeckoServoAnimationValueListBorrowedOrNull<'a> = Option<&'a RawGeckoServoAnimationValueList>; pub type RawGeckoServoAnimationValueListBorrowedMut<'a> = &'a mut RawGeckoServoAnimationValueList; -pub type RawGeckoServoAnimationValueListBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoServoAnimationValueList>; +pub type RawGeckoServoAnimationValueListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoServoAnimationValueList>; pub type RawGeckoStyleAnimationListBorrowed<'a> = &'a RawGeckoStyleAnimationList; pub type RawGeckoStyleAnimationListBorrowedOrNull<'a> = Option<&'a RawGeckoStyleAnimationList>; pub type RawGeckoStyleAnimationListBorrowedMut<'a> = &'a mut RawGeckoStyleAnimationList; -pub type RawGeckoStyleAnimationListBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoStyleAnimationList>; +pub type RawGeckoStyleAnimationListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoStyleAnimationList>; pub type RawGeckoStyleChildrenIteratorBorrowed<'a> = &'a RawGeckoStyleChildrenIterator; -pub type RawGeckoStyleChildrenIteratorBorrowedOrNull<'a> = - Option<&'a RawGeckoStyleChildrenIterator>; +pub type RawGeckoStyleChildrenIteratorBorrowedOrNull<'a> = Option<&'a RawGeckoStyleChildrenIterator>; pub type RawGeckoStyleChildrenIteratorBorrowedMut<'a> = &'a mut RawGeckoStyleChildrenIterator; -pub type RawGeckoStyleChildrenIteratorBorrowedMutOrNull<'a> = - Option<&'a mut RawGeckoStyleChildrenIterator>; +pub type RawGeckoStyleChildrenIteratorBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoStyleChildrenIterator>; pub type ServoCssRulesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoCssRules>; pub type ServoCssRulesBorrowed<'a> = &'a ServoCssRules; pub type ServoCssRulesBorrowedOrNull<'a> = Option<&'a ServoCssRules>; -enum ServoCssRulesVoid { -} +enum ServoCssRulesVoid { } pub struct ServoCssRules(ServoCssRulesVoid); -pub type RawServoStyleSheetContentsStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoStyleSheetContents>; +pub type RawServoStyleSheetContentsStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoStyleSheetContents>; pub type RawServoStyleSheetContentsBorrowed<'a> = &'a RawServoStyleSheetContents; pub type RawServoStyleSheetContentsBorrowedOrNull<'a> = Option<&'a RawServoStyleSheetContents>; -pub type RawServoDeclarationBlockStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoDeclarationBlock>; +pub type RawServoDeclarationBlockStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoDeclarationBlock>; pub type RawServoDeclarationBlockBorrowed<'a> = &'a RawServoDeclarationBlock; pub type RawServoDeclarationBlockBorrowedOrNull<'a> = Option<&'a RawServoDeclarationBlock>; pub type RawServoStyleRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoStyleRule>; @@ -412,25 +378,20 @@ pub type RawServoStyleRuleBorrowedOrNull<'a> = Option<&'a RawServoStyleRule>; pub type RawServoImportRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoImportRule>; pub type RawServoImportRuleBorrowed<'a> = &'a RawServoImportRule; pub type RawServoImportRuleBorrowedOrNull<'a> = Option<&'a RawServoImportRule>; -enum RawServoImportRuleVoid { -} +enum RawServoImportRuleVoid { } pub struct RawServoImportRule(RawServoImportRuleVoid); -pub type RawServoAnimationValueStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoAnimationValue>; +pub type RawServoAnimationValueStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoAnimationValue>; pub type RawServoAnimationValueBorrowed<'a> = &'a RawServoAnimationValue; pub type RawServoAnimationValueBorrowedOrNull<'a> = Option<&'a RawServoAnimationValue>; pub type RawServoKeyframeStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoKeyframe>; pub type RawServoKeyframeBorrowed<'a> = &'a RawServoKeyframe; pub type RawServoKeyframeBorrowedOrNull<'a> = Option<&'a RawServoKeyframe>; -enum RawServoKeyframeVoid { -} +enum RawServoKeyframeVoid { } pub struct RawServoKeyframe(RawServoKeyframeVoid); -pub type RawServoKeyframesRuleStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoKeyframesRule>; +pub type RawServoKeyframesRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoKeyframesRule>; pub type RawServoKeyframesRuleBorrowed<'a> = &'a RawServoKeyframesRule; pub type RawServoKeyframesRuleBorrowedOrNull<'a> = Option<&'a RawServoKeyframesRule>; -enum RawServoKeyframesRuleVoid { -} +enum RawServoKeyframesRuleVoid { } pub struct RawServoKeyframesRule(RawServoKeyframesRuleVoid); pub type RawServoMediaListStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoMediaList>; pub type RawServoMediaListBorrowed<'a> = &'a RawServoMediaList; @@ -438,49 +399,37 @@ pub type RawServoMediaListBorrowedOrNull<'a> = Option<&'a RawServoMediaList>; pub type RawServoMediaRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoMediaRule>; pub type RawServoMediaRuleBorrowed<'a> = &'a RawServoMediaRule; pub type RawServoMediaRuleBorrowedOrNull<'a> = Option<&'a RawServoMediaRule>; -enum RawServoMediaRuleVoid { -} +enum RawServoMediaRuleVoid { } pub struct RawServoMediaRule(RawServoMediaRuleVoid); -pub type RawServoNamespaceRuleStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoNamespaceRule>; +pub type RawServoNamespaceRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoNamespaceRule>; pub type RawServoNamespaceRuleBorrowed<'a> = &'a RawServoNamespaceRule; pub type RawServoNamespaceRuleBorrowedOrNull<'a> = Option<&'a RawServoNamespaceRule>; -enum RawServoNamespaceRuleVoid { -} +enum RawServoNamespaceRuleVoid { } pub struct RawServoNamespaceRule(RawServoNamespaceRuleVoid); pub type RawServoPageRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoPageRule>; pub type RawServoPageRuleBorrowed<'a> = &'a RawServoPageRule; pub type RawServoPageRuleBorrowedOrNull<'a> = Option<&'a RawServoPageRule>; -enum RawServoPageRuleVoid { -} +enum RawServoPageRuleVoid { } pub struct RawServoPageRule(RawServoPageRuleVoid); -pub type RawServoSupportsRuleStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoSupportsRule>; +pub type RawServoSupportsRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoSupportsRule>; pub type RawServoSupportsRuleBorrowed<'a> = &'a RawServoSupportsRule; pub type RawServoSupportsRuleBorrowedOrNull<'a> = Option<&'a RawServoSupportsRule>; -enum RawServoSupportsRuleVoid { -} +enum RawServoSupportsRuleVoid { } pub struct RawServoSupportsRule(RawServoSupportsRuleVoid); -pub type RawServoDocumentRuleStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoDocumentRule>; +pub type RawServoDocumentRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoDocumentRule>; pub type RawServoDocumentRuleBorrowed<'a> = &'a RawServoDocumentRule; pub type RawServoDocumentRuleBorrowedOrNull<'a> = Option<&'a RawServoDocumentRule>; -enum RawServoDocumentRuleVoid { -} +enum RawServoDocumentRuleVoid { } pub struct RawServoDocumentRule(RawServoDocumentRuleVoid); -pub type RawServoFontFeatureValuesRuleStrong = - ::gecko_bindings::sugar::ownership::Strong<RawServoFontFeatureValuesRule>; +pub type RawServoFontFeatureValuesRuleStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoFontFeatureValuesRule>; pub type RawServoFontFeatureValuesRuleBorrowed<'a> = &'a RawServoFontFeatureValuesRule; -pub type RawServoFontFeatureValuesRuleBorrowedOrNull<'a> = - Option<&'a RawServoFontFeatureValuesRule>; -enum RawServoFontFeatureValuesRuleVoid { -} +pub type RawServoFontFeatureValuesRuleBorrowedOrNull<'a> = Option<&'a RawServoFontFeatureValuesRule>; +enum RawServoFontFeatureValuesRuleVoid { } pub struct RawServoFontFeatureValuesRule(RawServoFontFeatureValuesRuleVoid); pub type RawServoRuleNodeStrong = ::gecko_bindings::sugar::ownership::Strong<RawServoRuleNode>; pub type RawServoRuleNodeBorrowed<'a> = &'a RawServoRuleNode; pub type RawServoRuleNodeBorrowedOrNull<'a> = Option<&'a RawServoRuleNode>; -enum RawServoRuleNodeVoid { -} +enum RawServoRuleNodeVoid { } pub struct RawServoRuleNode(RawServoRuleNodeVoid); extern "C" { @@ -634,9 +583,9 @@ extern "C" { pub fn Gecko_DestroyAnonymousContentList(anon_content: *mut nsTArray<*mut nsIContent>); } extern "C" { - pub fn Gecko_ServoStyleContext_Init( - context: *mut ServoStyleContext, - parent_context: ServoStyleContextBorrowedOrNull, + pub fn Gecko_ComputedStyle_Init( + context: *mut ComputedStyle, + parent_context: ComputedStyleBorrowedOrNull, pres_context: RawGeckoPresContextBorrowed, values: ServoComputedDataBorrowed, pseudo_type: CSSPseudoElementType, @@ -644,7 +593,7 @@ extern "C" { ); } extern "C" { - pub fn Gecko_ServoStyleContext_Destroy(context: *mut ServoStyleContext); + pub fn Gecko_ComputedStyle_Destroy(context: *mut ComputedStyle); } extern "C" { pub fn Gecko_ConstructStyleChildrenIterator( @@ -927,8 +876,8 @@ extern "C" { extern "C" { pub fn Gecko_UpdateAnimations( aElementOrPseudo: RawGeckoElementBorrowed, - aOldComputedValues: ServoStyleContextBorrowedOrNull, - aComputedValues: ServoStyleContextBorrowedOrNull, + aOldComputedValues: ComputedStyleBorrowedOrNull, + aComputedValues: ComputedStyleBorrowedOrNull, aTasks: UpdateAnimationsTasks, ); } @@ -993,23 +942,6 @@ extern "C" { pub fn Gecko_ReleaseAtom(aAtom: *mut nsAtom); } extern "C" { - pub fn Gecko_GetAtomAsUTF16(aAtom: *mut nsAtom, aLength: *mut u32) -> *const u16; -} -extern "C" { - pub fn Gecko_AtomEqualsUTF8( - aAtom: *mut nsAtom, - aString: *const ::std::os::raw::c_char, - aLength: u32, - ) -> bool; -} -extern "C" { - pub fn Gecko_AtomEqualsUTF8IgnoreCase( - aAtom: *mut nsAtom, - aString: *const ::std::os::raw::c_char, - aLength: u32, - ) -> bool; -} -extern "C" { pub fn Gecko_CopyFontFamilyFrom(dst: *mut nsFont, src: *const nsFont); } extern "C" { @@ -1238,8 +1170,8 @@ extern "C" { } extern "C" { pub fn Gecko_CalcStyleDifference( - old_style: ServoStyleContextBorrowed, - new_style: ServoStyleContextBorrowed, + old_style: ComputedStyleBorrowed, + new_style: ComputedStyleBorrowed, any_style_changed: *mut bool, reset_only_changed: *mut bool, ) -> u32; @@ -1592,11 +1524,6 @@ extern "C" { ) -> RawGeckoElementBorrowedOrNull; } extern "C" { - pub fn Gecko_GetXBLBinding( - aElement: RawGeckoElementBorrowed, - ) -> RawGeckoXBLBindingBorrowedOrNull; -} -extern "C" { pub fn Gecko_XBLBinding_GetRawServoStyles( aXBLBinding: RawGeckoXBLBindingBorrowed, ) -> RawServoAuthorStylesBorrowedOrNull; @@ -2059,7 +1986,7 @@ extern "C" { extern "C" { pub fn Servo_Element_GetPrimaryComputedValues( node: RawGeckoElementBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_Element_HasPseudoComputedValues( @@ -2071,7 +1998,7 @@ extern "C" { pub fn Servo_Element_GetPseudoComputedValues( node: RawGeckoElementBorrowed, index: usize, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed) -> bool; @@ -2230,9 +2157,9 @@ extern "C" { extern "C" { pub fn Servo_StyleSet_ResolveForDeclarations( set: RawServoStyleSetBorrowed, - parent_style: ServoStyleContextBorrowedOrNull, + parent_style: ComputedStyleBorrowedOrNull, declarations: RawServoDeclarationBlockBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_SelectorList_Parse(selector_list: *const nsACString) -> *mut RawServoSelectorList; @@ -2327,10 +2254,10 @@ extern "C" { ) -> usize; } extern "C" { - pub fn Servo_StyleContext_AddRef(ctx: ServoStyleContextBorrowed); + pub fn Servo_ComputedStyle_AddRef(ctx: ComputedStyleBorrowed); } extern "C" { - pub fn Servo_StyleContext_Release(ctx: ServoStyleContextBorrowed); + pub fn Servo_ComputedStyle_Release(ctx: ComputedStyleBorrowed); } extern "C" { pub fn Servo_StyleSet_MightHaveAttributeDependency( @@ -2707,20 +2634,20 @@ extern "C" { pub fn Servo_GetComputedKeyframeValues( keyframes: RawGeckoKeyframeListBorrowed, element: RawGeckoElementBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, set: RawServoStyleSetBorrowed, result: RawGeckoComputedKeyframeValuesListBorrowedMut, ); } extern "C" { pub fn Servo_ComputedValues_ExtractAnimationValue( - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, property: nsCSSPropertyID, ) -> RawServoAnimationValueStrong; } extern "C" { pub fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions( - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, ) -> bool; } extern "C" { @@ -2752,7 +2679,7 @@ extern "C" { pub fn Servo_GetAnimationValues( declarations: RawServoDeclarationBlockBorrowed, element: RawGeckoElementBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, style_set: RawServoStyleSetBorrowed, animation_values: RawGeckoServoAnimationValueListBorrowedMut, ); @@ -2840,7 +2767,7 @@ extern "C" { pub fn Servo_AnimationValue_Compute( element: RawGeckoElementBorrowed, declarations: RawServoDeclarationBlockBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, raw_data: RawServoStyleSetBorrowed, ) -> RawServoAnimationValueStrong; } @@ -2877,7 +2804,7 @@ extern "C" { declarations: RawServoDeclarationBlockBorrowed, property: nsCSSPropertyID, buffer: *mut nsAString, - computed_values: ServoStyleContextBorrowedOrNull, + computed_values: ComputedStyleBorrowedOrNull, custom_properties: RawServoDeclarationBlockBorrowedOrNull, ); } @@ -3119,21 +3046,21 @@ extern "C" { } extern "C" { pub fn Servo_ComputedValues_GetForAnonymousBox( - parent_style_or_null: ServoStyleContextBorrowedOrNull, + parent_style_or_null: ComputedStyleBorrowedOrNull, pseudo_tag: *mut nsAtom, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_ComputedValues_Inherit( set: RawServoStyleSetBorrowed, pseudo_tag: *mut nsAtom, - parent_style: ServoStyleContextBorrowedOrNull, + parent_style: ComputedStyleBorrowedOrNull, target: InheritTarget, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { - pub fn Servo_ComputedValues_GetStyleBits(values: ServoStyleContextBorrowed) -> u64; + pub fn Servo_ComputedValues_GetStyleBits(values: ComputedStyleBorrowed) -> u64; } extern "C" { pub fn Servo_ComputedValues_EqualCustomProperties( @@ -3143,7 +3070,7 @@ extern "C" { } extern "C" { pub fn Servo_ComputedValues_GetStyleRuleList( - values: ServoStyleContextBorrowed, + values: ComputedStyleBorrowed, rules: RawGeckoServoStyleRuleListBorrowedMut, ); } @@ -3170,35 +3097,35 @@ extern "C" { pub fn Servo_ResolveStyle( element: RawGeckoElementBorrowed, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_ResolvePseudoStyle( element: RawGeckoElementBorrowed, pseudo_type: CSSPseudoElementType, is_probe: bool, - inherited_style: ServoStyleContextBorrowedOrNull, + inherited_style: ComputedStyleBorrowedOrNull, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_ComputedValues_ResolveXULTreePseudoStyle( element: RawGeckoElementBorrowed, pseudo_tag: *mut nsAtom, - inherited_style: ServoStyleContextBorrowed, + inherited_style: ComputedStyleBorrowed, input_word: *const AtomArray, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_SetExplicitStyle( element: RawGeckoElementBorrowed, - primary_style: ServoStyleContextBorrowed, + primary_style: ComputedStyleBorrowed, ); } extern "C" { pub fn Servo_HasAuthorSpecifiedRules( - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, element: RawGeckoElementBorrowed, pseudo_type: CSSPseudoElementType, rule_type_mask: u32, @@ -3212,17 +3139,17 @@ extern "C" { rule_inclusion: StyleRuleInclusion, snapshots: *const ServoElementSnapshotTable, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_ReparentStyle( - style_to_reparent: ServoStyleContextBorrowed, - parent_style: ServoStyleContextBorrowed, - parent_style_ignoring_first_line: ServoStyleContextBorrowed, - layout_parent_style: ServoStyleContextBorrowed, + style_to_reparent: ComputedStyleBorrowed, + parent_style: ComputedStyleBorrowed, + parent_style_ignoring_first_line: ComputedStyleBorrowed, + layout_parent_style: ComputedStyleBorrowed, element: RawGeckoElementBorrowedOrNull, set: RawServoStyleSetBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_TraverseSubtree( @@ -3245,18 +3172,18 @@ extern "C" { pub fn Servo_StyleSet_GetBaseComputedValuesForElement( set: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, - existing_style: ServoStyleContextBorrowed, + existing_style: ComputedStyleBorrowed, snapshots: *const ServoElementSnapshotTable, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_StyleSet_GetComputedValuesByAddingAnimation( set: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, - existing_style: ServoStyleContextBorrowed, + existing_style: ComputedStyleBorrowed, snapshots: *const ServoElementSnapshotTable, animation: RawServoAnimationValueBorrowed, - ) -> ServoStyleContextStrong; + ) -> ComputedStyleStrong; } extern "C" { pub fn Servo_SerializeFontValueForCanvas( @@ -3266,17 +3193,17 @@ extern "C" { } extern "C" { pub fn Servo_GetCustomPropertyValue( - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, name: *const nsAString, value: *mut nsAString, ) -> bool; } extern "C" { - pub fn Servo_GetCustomPropertiesCount(computed_values: ServoStyleContextBorrowed) -> u32; + pub fn Servo_GetCustomPropertiesCount(computed_values: ComputedStyleBorrowed) -> u32; } extern "C" { pub fn Servo_GetCustomPropertyNameAt( - arg1: ServoStyleContextBorrowed, + arg1: ComputedStyleBorrowed, index: u32, name: *mut nsAString, ) -> bool; @@ -3358,6 +3285,9 @@ extern "C" { ) -> bool; } extern "C" { + pub fn Servo_Property_IsShorthand(name: *const nsACString, found: *mut bool) -> bool; +} +extern "C" { pub fn Gecko_CreateCSSErrorReporter( sheet: *mut ServoStyleSheet, loader: *mut Loader, diff --git a/components/style/gecko/generated/structs.rs b/components/style/gecko/generated/structs.rs index 172ad57dd9d..ddb76282f1e 100644 --- a/components/style/gecko/generated/structs.rs +++ b/components/style/gecko/generated/structs.rs @@ -10,14 +10,12 @@ pub type ServoUnsafeCell<T> = ::std::cell::UnsafeCell<T>; pub type ServoCell<T> = ::std::cell::Cell<T>; pub type ServoNodeData = AtomicRefCell<ElementData>; pub type ServoWritingMode = ::logical_geometry::WritingMode; -pub type ServoCustomPropertiesMap = - Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>; +pub type ServoCustomPropertiesMap = Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>; pub type ServoRuleNode = Option<::rule_tree::StrongRuleNode>; pub type ServoVisitedStyle = Option<::servo_arc::RawOffsetArc<::properties::ComputedValues>>; pub type ServoComputedValueFlags = ::properties::computed_value_flags::ComputedValueFlags; pub type ServoRawOffsetArc<T> = ::servo_arc::RawOffsetArc<T>; -pub type ServoStyleContextStrong = - ::gecko_bindings::sugar::ownership::Strong<::properties::ComputedValues>; +pub type ComputedStyleStrong = ::gecko_bindings::sugar::ownership::Strong<::properties::ComputedValues>; #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { @@ -827,14 +825,6 @@ pub mod root { pub const NS_STYLE_SCROLL_SNAP_TYPE_NONE: u32 = 0; pub const NS_STYLE_SCROLL_SNAP_TYPE_MANDATORY: u32 = 1; pub const NS_STYLE_SCROLL_SNAP_TYPE_PROXIMITY: u32 = 2; - pub const NS_STYLE_ORIENTATION_PORTRAIT: u32 = 0; - pub const NS_STYLE_ORIENTATION_LANDSCAPE: u32 = 1; - pub const NS_STYLE_SCAN_PROGRESSIVE: u32 = 0; - pub const NS_STYLE_SCAN_INTERLACE: u32 = 1; - pub const NS_STYLE_DISPLAY_MODE_BROWSER: u32 = 0; - pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: u32 = 1; - pub const NS_STYLE_DISPLAY_MODE_STANDALONE: u32 = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: u32 = 3; pub const CSS_PSEUDO_ELEMENT_IS_CSS2: u32 = 1; pub const CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS: u32 = 2; pub const CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE: u32 = 4; @@ -953,11 +943,6 @@ pub mod root { pub struct atomic { pub _address: u8, } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct function { - pub _address: u8, - } pub type _Base_bitset__WordT = ::std::os::raw::c_ulong; pub type bitset__Base = u8; pub type bitset__WordT = ::std::os::raw::c_ulong; @@ -1151,7 +1136,7 @@ pub mod root { pub type Conditional_Type<A> = A; pub const ArenaObjectID_eArenaObjectID_DummyBeforeFirstObjectID: root::mozilla::ArenaObjectID = 171; - pub const ArenaObjectID_eArenaObjectID_GeckoStyleContext: root::mozilla::ArenaObjectID = + pub const ArenaObjectID_eArenaObjectID_GeckoComputedStyle: root::mozilla::ArenaObjectID = 172; pub const ArenaObjectID_eArenaObjectID_nsLineBox: root::mozilla::ArenaObjectID = 173; pub const ArenaObjectID_eArenaObjectID_nsRuleNode: root::mozilla::ArenaObjectID = 174; @@ -1204,6 +1189,142 @@ pub mod root { pub const ArenaObjectID_eArenaObjectID_nsStyleEffects: root::mozilla::ArenaObjectID = 210; pub const ArenaObjectID_eArenaObjectID_COUNT: root::mozilla::ArenaObjectID = 211; pub type ArenaObjectID = u32; + /// This class is designed to cause crashes when various kinds of memory + /// corruption are observed. For instance, let's say we have a class C where we + /// suspect out-of-bounds writes to some members. We can insert a member of type + /// Poison near the members we suspect are being corrupted by out-of-bounds + /// writes. Or perhaps we have a class K we suspect is subject to use-after-free + /// violations, in which case it doesn't particularly matter where in the class + /// we add the member of type Poison. + /// + /// In either case, we then insert calls to Check() throughout the code. Doing + /// so enables us to narrow down the location where the corruption is occurring. + /// A pleasant side-effect of these additional Check() calls is that crash + /// signatures may become more regular, as crashes will ideally occur + /// consolidated at the point of a Check(), rather than scattered about at + /// various uses of the corrupted memory. + #[repr(C)] + #[derive(Debug)] + pub struct CorruptionCanary { + pub mValue: usize, + } + pub const CorruptionCanary_kCanarySet: usize = 252382987; + #[test] + fn bindgen_test_layout_CorruptionCanary() { + assert_eq!( + ::std::mem::size_of::<CorruptionCanary>(), + 8usize, + concat!("Size of: ", stringify!(CorruptionCanary)) + ); + assert_eq!( + ::std::mem::align_of::<CorruptionCanary>(), + 8usize, + concat!("Alignment of ", stringify!(CorruptionCanary)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<CorruptionCanary>())).mValue as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CorruptionCanary), + "::", + stringify!(mValue) + ) + ); + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct Maybe { + pub _address: u8, + } + pub type Maybe_ValueType<T> = T; + #[repr(u8)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum SheetType { + Agent = 0, + User = 1, + PresHint = 2, + Doc = 3, + StyleAttr = 4, + Override = 5, + Animation = 6, + Transition = 7, + Count = 8, + Unknown = 255, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct StaticRefPtr<T> { + pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + } + /// This struct represents a combined color from a numeric color and + /// the current foreground color (currentcolor keyword). + /// Conceptually, the formula is "color * (1 - p) + currentcolor * p" + /// where p is mForegroundRatio. See mozilla::LinearBlendColors for + /// the actual algorithm. + #[repr(C)] + #[derive(Debug, Copy)] + pub struct StyleComplexColor { + pub mColor: root::nscolor, + pub mForegroundRatio: u8, + pub mIsAuto: bool, + } + #[test] + fn bindgen_test_layout_StyleComplexColor() { + assert_eq!( + ::std::mem::size_of::<StyleComplexColor>(), + 8usize, + concat!("Size of: ", stringify!(StyleComplexColor)) + ); + assert_eq!( + ::std::mem::align_of::<StyleComplexColor>(), + 4usize, + concat!("Alignment of ", stringify!(StyleComplexColor)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<StyleComplexColor>())).mColor as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StyleComplexColor), + "::", + stringify!(mColor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<StyleComplexColor>())).mForegroundRatio as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StyleComplexColor), + "::", + stringify!(mForegroundRatio) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<StyleComplexColor>())).mIsAuto as *const _ as usize + }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StyleComplexColor), + "::", + stringify!(mIsAuto) + ) + ); + } + impl Clone for StyleComplexColor { + fn clone(&self) -> Self { + *self + } + } /// A default deletion policy using plain old operator delete. /// /// Note that this type can be specialized, but authors should beware of the risk @@ -1220,1364 +1341,187 @@ pub mod root { pub struct DefaultDelete { pub _address: u8, } - pub type MallocSizeOf = - ::std::option::Option<unsafe extern "C" fn(p: *const ::std::os::raw::c_void) -> usize>; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct ReverseIterator<IteratorT> { - pub mCurrent: IteratorT, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<IteratorT>>, - } - pub type Array_iterator<T> = *mut T; - pub type Array_const_iterator<T> = *mut T; - pub type Array_reverse_iterator<T> = root::mozilla::ReverseIterator<T>; - pub type Array_const_reverse_iterator<T> = root::mozilla::ReverseIterator<T>; - pub mod css { + pub mod gfx { #[allow(unused_imports)] use self::super::super::super::root; - #[repr(u8)] - /// Enum defining the mode in which a sheet is to be parsed. This is - /// usually, but not always, the same as the cascade level at which the - /// sheet will apply (see nsStyleSet.h). Most of the Loader APIs only - /// support loading of author sheets. - /// - /// Author sheets are the normal case: styles embedded in or linked - /// from HTML pages. They are also the most restricted. - /// - /// User sheets can do anything author sheets can do, and also get - /// access to a few CSS extensions that are not yet suitable for - /// exposure on the public Web, but are very useful for expressing - /// user style overrides, such as @-moz-document rules. - /// - /// XXX: eUserSheetFeatures was added in bug 1035091, but some patches in - /// that bug never landed to use this enum value. Currently, all the features - /// in user sheet are also available in author sheet. - /// - /// Agent sheets have access to all author- and user-sheet features - /// plus more extensions that are necessary for internal use but, - /// again, not yet suitable for exposure on the public Web. Some of - /// these are outright unsafe to expose; in particular, incorrect - /// styling of anonymous box pseudo-elements can violate layout - /// invariants. - /// - /// Agent sheets that do not use any unsafe rules could use - /// eSafeAgentSheetFeatures when creating the sheet. This enum value allows - /// Servo backend to recognize the sheets as the agent level, but Gecko - /// backend will parse it under _author_ level. - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum SheetParsingMode { - eAuthorSheetFeatures = 0, - eUserSheetFeatures = 1, - eAgentSheetFeatures = 2, - eSafeAgentSheetFeatures = 3, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct GroupRule { - _unused: [u8; 0], - } - impl Clone for GroupRule { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct ImageLoader { - _unused: [u8; 0], - } - impl Clone for ImageLoader { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - pub struct URLValueData__bindgen_vtable(::std::os::raw::c_void); - #[repr(C)] - #[derive(Debug)] - pub struct URLValueData { - pub vtable_: *const URLValueData__bindgen_vtable, - pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, - pub mURI: root::nsMainThreadPtrHandle<root::nsIURI>, - pub mExtraData: root::RefPtr<root::mozilla::URLExtraData>, - pub mURIResolved: bool, - pub mIsLocalRef: [u8; 2usize], - pub mMightHaveRef: [u8; 2usize], - pub mStrings: root::mozilla::css::URLValueData_RustOrGeckoString, - pub mUsingRustString: bool, - pub mLoadedImage: bool, - pub mCORSMode: root::mozilla::CORSMode, - } - pub type URLValueData_HasThreadSafeRefCnt = root::mozilla::TrueType; - #[repr(C)] - #[derive(Debug)] - pub struct URLValueData_RustOrGeckoString { - pub mString: root::__BindgenUnionField<::nsstring::nsStringRepr>, - pub mRustString: root::__BindgenUnionField< - ::gecko_bindings::structs::ServoRawOffsetArc<root::RustString>, - >, - pub bindgen_union_field: [u64; 2usize], - } - #[test] - fn bindgen_test_layout_URLValueData_RustOrGeckoString() { - assert_eq!( - ::std::mem::size_of::<URLValueData_RustOrGeckoString>(), - 16usize, - concat!("Size of: ", stringify!(URLValueData_RustOrGeckoString)) - ); - assert_eq!( - ::std::mem::align_of::<URLValueData_RustOrGeckoString>(), - 8usize, - concat!("Alignment of ", stringify!(URLValueData_RustOrGeckoString)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData_RustOrGeckoString>())).mString - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(URLValueData_RustOrGeckoString), - "::", - stringify!(mString) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData_RustOrGeckoString>())).mRustString - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(URLValueData_RustOrGeckoString), - "::", - stringify!(mRustString) - ) - ); - } - #[test] - fn bindgen_test_layout_URLValueData() { - assert_eq!( - ::std::mem::size_of::<URLValueData>(), - 64usize, - concat!("Size of: ", stringify!(URLValueData)) - ); - assert_eq!( - ::std::mem::align_of::<URLValueData>(), - 8usize, - concat!("Alignment of ", stringify!(URLValueData)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mRefCnt as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mRefCnt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<URLValueData>())).mURI as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mURI) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mExtraData as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mExtraData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mURIResolved as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mURIResolved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mIsLocalRef as *const _ as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mIsLocalRef) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mMightHaveRef as *const _ as usize - }, - 35usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mMightHaveRef) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mStrings as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mStrings) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mUsingRustString as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mUsingRustString) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mLoadedImage as *const _ as usize - }, - 57usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mLoadedImage) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<URLValueData>())).mCORSMode as *const _ as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(URLValueData), - "::", - stringify!(mCORSMode) - ) - ); - } - #[repr(C)] - #[derive(Debug)] - pub struct URLValue { - pub _base: root::mozilla::css::URLValueData, - } - #[test] - fn bindgen_test_layout_URLValue() { - assert_eq!( - ::std::mem::size_of::<URLValue>(), - 64usize, - concat!("Size of: ", stringify!(URLValue)) - ); - assert_eq!( - ::std::mem::align_of::<URLValue>(), - 8usize, - concat!("Alignment of ", stringify!(URLValue)) - ); - } - #[repr(C)] - #[derive(Debug)] - pub struct ImageValue { - pub _base: root::mozilla::css::URLValueData, - pub mRequests: [u64; 4usize], - } - #[test] - fn bindgen_test_layout_ImageValue() { - assert_eq!( - ::std::mem::size_of::<ImageValue>(), - 96usize, - concat!("Size of: ", stringify!(ImageValue)) - ); - assert_eq!( - ::std::mem::align_of::<ImageValue>(), - 8usize, - concat!("Alignment of ", stringify!(ImageValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ImageValue>())).mRequests as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ImageValue), - "::", - stringify!(mRequests) - ) - ); - } + pub type Float = f32; #[repr(C)] - pub struct GridNamedArea { - pub mName: ::nsstring::nsStringRepr, - pub mColumnStart: u32, - pub mColumnEnd: u32, - pub mRowStart: u32, - pub mRowEnd: u32, - } - #[test] - fn bindgen_test_layout_GridNamedArea() { - assert_eq!( - ::std::mem::size_of::<GridNamedArea>(), - 32usize, - concat!("Size of: ", stringify!(GridNamedArea)) - ); - assert_eq!( - ::std::mem::align_of::<GridNamedArea>(), - 8usize, - concat!("Alignment of ", stringify!(GridNamedArea)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<GridNamedArea>())).mName as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GridNamedArea), - "::", - stringify!(mName) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridNamedArea>())).mColumnStart as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GridNamedArea), - "::", - stringify!(mColumnStart) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridNamedArea>())).mColumnEnd as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GridNamedArea), - "::", - stringify!(mColumnEnd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridNamedArea>())).mRowStart as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GridNamedArea), - "::", - stringify!(mRowStart) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridNamedArea>())).mRowEnd as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(GridNamedArea), - "::", - stringify!(mRowEnd) - ) - ); + #[derive(Debug, Copy, Clone)] + pub struct IntPointTyped { + pub _address: u8, } + pub type IntPointTyped_ToInt = u32; + pub type IntPointTyped_Coord = u8; + pub type IntPointTyped_Super = u8; #[repr(C)] - pub struct GridTemplateAreasValue { - pub mNamedAreas: root::nsTArray<root::mozilla::css::GridNamedArea>, - pub mTemplates: root::nsTArray<::nsstring::nsStringRepr>, - pub mNColumns: u32, - pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, - } - pub type GridTemplateAreasValue_HasThreadSafeRefCnt = root::mozilla::TrueType; - #[test] - fn bindgen_test_layout_GridTemplateAreasValue() { - assert_eq!( - ::std::mem::size_of::<GridTemplateAreasValue>(), - 32usize, - concat!("Size of: ", stringify!(GridTemplateAreasValue)) - ); - assert_eq!( - ::std::mem::align_of::<GridTemplateAreasValue>(), - 8usize, - concat!("Alignment of ", stringify!(GridTemplateAreasValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridTemplateAreasValue>())).mNamedAreas as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GridTemplateAreasValue), - "::", - stringify!(mNamedAreas) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridTemplateAreasValue>())).mTemplates as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GridTemplateAreasValue), - "::", - stringify!(mTemplates) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridTemplateAreasValue>())).mNColumns as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GridTemplateAreasValue), - "::", - stringify!(mNColumns) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<GridTemplateAreasValue>())).mRefCnt as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GridTemplateAreasValue), - "::", - stringify!(mRefCnt) - ) - ); + #[derive(Debug, Copy, Clone)] + pub struct SizeTyped { + pub _address: u8, } + pub type SizeTyped_Super = u8; #[repr(C)] #[derive(Debug, Copy)] - pub struct RGBAColorData { - pub mR: f32, - pub mG: f32, - pub mB: f32, - pub mA: f32, + pub struct FontVariation { + pub mTag: u32, + pub mValue: f32, } #[test] - fn bindgen_test_layout_RGBAColorData() { - assert_eq!( - ::std::mem::size_of::<RGBAColorData>(), - 16usize, - concat!("Size of: ", stringify!(RGBAColorData)) - ); - assert_eq!( - ::std::mem::align_of::<RGBAColorData>(), - 4usize, - concat!("Alignment of ", stringify!(RGBAColorData)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mR as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RGBAColorData), - "::", - stringify!(mR) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mG as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(RGBAColorData), - "::", - stringify!(mG) - ) - ); + fn bindgen_test_layout_FontVariation() { assert_eq!( - unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mB as *const _ as usize }, + ::std::mem::size_of::<FontVariation>(), 8usize, - concat!( - "Offset of field: ", - stringify!(RGBAColorData), - "::", - stringify!(mB) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mA as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(RGBAColorData), - "::", - stringify!(mA) - ) - ); - } - impl Clone for RGBAColorData { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct ComplexColorData { - pub mColor: root::mozilla::css::RGBAColorData, - pub mForegroundRatio: f32, - } - #[test] - fn bindgen_test_layout_ComplexColorData() { - assert_eq!( - ::std::mem::size_of::<ComplexColorData>(), - 20usize, - concat!("Size of: ", stringify!(ComplexColorData)) + concat!("Size of: ", stringify!(FontVariation)) ); assert_eq!( - ::std::mem::align_of::<ComplexColorData>(), + ::std::mem::align_of::<FontVariation>(), 4usize, - concat!("Alignment of ", stringify!(ComplexColorData)) + concat!("Alignment of ", stringify!(FontVariation)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<ComplexColorData>())).mColor as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<FontVariation>())).mTag as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(ComplexColorData), + stringify!(FontVariation), "::", - stringify!(mColor) + stringify!(mTag) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<ComplexColorData>())).mForegroundRatio as *const _ - as usize + &(*(::std::ptr::null::<FontVariation>())).mValue as *const _ as usize }, - 16usize, + 4usize, concat!( "Offset of field: ", - stringify!(ComplexColorData), + stringify!(FontVariation), "::", - stringify!(mForegroundRatio) + stringify!(mValue) ) ); } - impl Clone for ComplexColorData { + impl Clone for FontVariation { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug)] - pub struct ComplexColorValue { - pub _base: root::mozilla::css::ComplexColorData, - pub mRefCnt: root::nsAutoRefCnt, - } - pub type ComplexColorValue_HasThreadSafeRefCnt = root::mozilla::FalseType; - #[test] - fn bindgen_test_layout_ComplexColorValue() { - assert_eq!( - ::std::mem::size_of::<ComplexColorValue>(), - 32usize, - concat!("Size of: ", stringify!(ComplexColorValue)) - ); - assert_eq!( - ::std::mem::align_of::<ComplexColorValue>(), - 8usize, - concat!("Alignment of ", stringify!(ComplexColorValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ComplexColorValue>())).mRefCnt as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ComplexColorValue), - "::", - stringify!(mRefCnt) - ) - ); - } - /// Style sheet reuse * - #[repr(C)] - pub struct LoaderReusableStyleSheets { - pub mReusableSheets: root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>, - } - #[test] - fn bindgen_test_layout_LoaderReusableStyleSheets() { - assert_eq!( - ::std::mem::size_of::<LoaderReusableStyleSheets>(), - 8usize, - concat!("Size of: ", stringify!(LoaderReusableStyleSheets)) - ); - assert_eq!( - ::std::mem::align_of::<LoaderReusableStyleSheets>(), - 8usize, - concat!("Alignment of ", stringify!(LoaderReusableStyleSheets)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<LoaderReusableStyleSheets>())).mReusableSheets - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(LoaderReusableStyleSheets), - "::", - stringify!(mReusableSheets) - ) - ); + #[derive(Debug, Copy, Clone)] + pub struct ScaleFactor { + pub _address: u8, } #[repr(C)] - pub struct Loader { - pub mRefCnt: root::nsCycleCollectingAutoRefCnt, - pub mSheets: root::nsAutoPtr<root::mozilla::css::Loader_Sheets>, - pub mPostedEvents: root::mozilla::css::Loader_LoadDataArray, - pub mObservers: [u64; 2usize], - pub mDocument: *mut root::nsIDocument, - pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>, - pub mDatasToNotifyOn: u32, - pub mCompatMode: root::nsCompatibility, - pub mPreferredSheet: ::nsstring::nsStringRepr, - pub mStyleBackendType: [u8; 2usize], - pub mEnabled: bool, - pub mReporter: root::nsCOMPtr, + #[derive(Debug, Copy)] + pub struct UserData { + pub _bindgen_opaque_blob: [u64; 2usize], } - pub use self :: super :: super :: super :: root :: mozilla :: net :: ReferrerPolicy as Loader_ReferrerPolicy; - pub type Loader_HasThreadSafeRefCnt = root::mozilla::FalseType; + pub type UserData_destroyFunc = u64; #[repr(C)] #[derive(Debug, Copy)] - pub struct Loader_cycleCollection { - pub _base: root::nsCycleCollectionParticipant, + pub struct UserData_Entry { + pub _bindgen_opaque_blob: [u64; 3usize], } #[test] - fn bindgen_test_layout_Loader_cycleCollection() { + fn bindgen_test_layout_UserData_Entry() { assert_eq!( - ::std::mem::size_of::<Loader_cycleCollection>(), - 16usize, - concat!("Size of: ", stringify!(Loader_cycleCollection)) + ::std::mem::size_of::<UserData_Entry>(), + 24usize, + concat!("Size of: ", stringify!(UserData_Entry)) ); assert_eq!( - ::std::mem::align_of::<Loader_cycleCollection>(), + ::std::mem::align_of::<UserData_Entry>(), 8usize, - concat!("Alignment of ", stringify!(Loader_cycleCollection)) + concat!("Alignment of ", stringify!(UserData_Entry)) ); } - impl Clone for Loader_cycleCollection { + impl Clone for UserData_Entry { fn clone(&self) -> Self { *self } } - pub type Loader_LoadDataArray = - root::nsTArray<root::RefPtr<root::mozilla::css::SheetLoadData>>; - #[repr(C)] - #[derive(Debug)] - pub struct Loader_Sheets { - pub mCompleteSheets: [u64; 4usize], - pub mLoadingDatas: [u64; 4usize], - pub mPendingDatas: [u64; 4usize], - } - #[test] - fn bindgen_test_layout_Loader_Sheets() { - assert_eq!( - ::std::mem::size_of::<Loader_Sheets>(), - 96usize, - concat!("Size of: ", stringify!(Loader_Sheets)) - ); - assert_eq!( - ::std::mem::align_of::<Loader_Sheets>(), - 8usize, - concat!("Alignment of ", stringify!(Loader_Sheets)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader_Sheets>())).mCompleteSheets as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Loader_Sheets), - "::", - stringify!(mCompleteSheets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader_Sheets>())).mLoadingDatas as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Loader_Sheets), - "::", - stringify!(mLoadingDatas) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader_Sheets>())).mPendingDatas as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Loader_Sheets), - "::", - stringify!(mPendingDatas) - ) - ); - } - extern "C" { - #[link_name = "\u{1}_ZN7mozilla3css6Loader21_cycleCollectorGlobalE"] - pub static mut Loader__cycleCollectorGlobal: - root::mozilla::css::Loader_cycleCollection; - } - #[test] - fn bindgen_test_layout_Loader() { - assert_eq!( - ::std::mem::size_of::<Loader>(), - 96usize, - concat!("Size of: ", stringify!(Loader)) - ); - assert_eq!( - ::std::mem::align_of::<Loader>(), - 8usize, - concat!("Alignment of ", stringify!(Loader)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mRefCnt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mRefCnt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mSheets as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mSheets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader>())).mPostedEvents as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mPostedEvents) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mObservers as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mObservers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mDocument as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mDocument) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mDocGroup as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mDocGroup) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader>())).mDatasToNotifyOn as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mDatasToNotifyOn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mCompatMode as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mCompatMode) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader>())).mPreferredSheet as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mPreferredSheet) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Loader>())).mStyleBackendType as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mStyleBackendType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mEnabled as *const _ as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Loader>())).mReporter as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(Loader), - "::", - stringify!(mReporter) - ) - ); - } - #[repr(C)] - pub struct SheetLoadData { - pub _base: root::nsIRunnable, - pub _base_1: root::nsIUnicharStreamLoaderObserver, - pub _base_2: root::nsIThreadObserver, - pub mRefCnt: root::nsAutoRefCnt, - pub mLoader: root::RefPtr<root::mozilla::css::Loader>, - pub mTitle: ::nsstring::nsStringRepr, - pub mEncoding: *const root::mozilla::Encoding, - pub mURI: root::nsCOMPtr, - pub mLineNumber: u32, - pub mSheet: root::RefPtr<root::mozilla::StyleSheet>, - pub mNext: *mut root::mozilla::css::SheetLoadData, - pub mParentData: root::RefPtr<root::mozilla::css::SheetLoadData>, - pub mPendingChildren: u32, - pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 2usize], u8>, - pub mOwningElement: root::nsCOMPtr, - pub mObserver: root::nsCOMPtr, - pub mLoaderPrincipal: root::nsCOMPtr, - pub mRequestingNode: root::nsCOMPtr, - pub mPreloadEncoding: *const root::mozilla::Encoding, - pub mStatus: root::nsresult, - } - pub type SheetLoadData_HasThreadSafeRefCnt = root::mozilla::FalseType; - #[test] - fn bindgen_test_layout_SheetLoadData() { - assert_eq!( - ::std::mem::size_of::<SheetLoadData>(), - 160usize, - concat!("Size of: ", stringify!(SheetLoadData)) - ); - assert_eq!( - ::std::mem::align_of::<SheetLoadData>(), - 8usize, - concat!("Alignment of ", stringify!(SheetLoadData)) - ); - } - impl SheetLoadData { - #[inline] - pub fn mSyncLoad(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_mSyncLoad(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn mIsNonDocumentSheet(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_mIsNonDocumentSheet(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn mIsLoading(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_mIsLoading(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn mIsBeingParsed(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_mIsBeingParsed(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn mIsCancelled(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_mIsCancelled(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn mMustNotify(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_mMustNotify(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn mWasAlternate(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_mWasAlternate(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn mUseSystemPrincipal(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_mUseSystemPrincipal(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn mSheetAlreadyComplete(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } - } - #[inline] - pub fn set_mSheetAlreadyComplete(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn mIsCrossOriginNoCORS(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u8) } - } - #[inline] - pub fn set_mIsCrossOriginNoCORS(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn mBlockResourceTiming(&self) -> bool { - unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u8) } - } - #[inline] - pub fn set_mBlockResourceTiming(&mut self, val: bool) { - unsafe { - let val: u8 = ::std::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - mSyncLoad: bool, - mIsNonDocumentSheet: bool, - mIsLoading: bool, - mIsBeingParsed: bool, - mIsCancelled: bool, - mMustNotify: bool, - mWasAlternate: bool, - mUseSystemPrincipal: bool, - mSheetAlreadyComplete: bool, - mIsCrossOriginNoCORS: bool, - mBlockResourceTiming: bool, - ) -> root::__BindgenBitfieldUnit<[u8; 2usize], u8> { - let mut __bindgen_bitfield_unit : root :: __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > = Default :: default ( ) ; - __bindgen_bitfield_unit.set(0usize, 1u8, { - let mSyncLoad: u8 = unsafe { ::std::mem::transmute(mSyncLoad) }; - mSyncLoad as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let mIsNonDocumentSheet: u8 = - unsafe { ::std::mem::transmute(mIsNonDocumentSheet) }; - mIsNonDocumentSheet as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let mIsLoading: u8 = unsafe { ::std::mem::transmute(mIsLoading) }; - mIsLoading as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let mIsBeingParsed: u8 = unsafe { ::std::mem::transmute(mIsBeingParsed) }; - mIsBeingParsed as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let mIsCancelled: u8 = unsafe { ::std::mem::transmute(mIsCancelled) }; - mIsCancelled as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let mMustNotify: u8 = unsafe { ::std::mem::transmute(mMustNotify) }; - mMustNotify as u64 - }); - __bindgen_bitfield_unit.set(6usize, 1u8, { - let mWasAlternate: u8 = unsafe { ::std::mem::transmute(mWasAlternate) }; - mWasAlternate as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let mUseSystemPrincipal: u8 = - unsafe { ::std::mem::transmute(mUseSystemPrincipal) }; - mUseSystemPrincipal as u64 - }); - __bindgen_bitfield_unit.set(8usize, 1u8, { - let mSheetAlreadyComplete: u8 = - unsafe { ::std::mem::transmute(mSheetAlreadyComplete) }; - mSheetAlreadyComplete as u64 - }); - __bindgen_bitfield_unit.set(9usize, 1u8, { - let mIsCrossOriginNoCORS: u8 = - unsafe { ::std::mem::transmute(mIsCrossOriginNoCORS) }; - mIsCrossOriginNoCORS as u64 - }); - __bindgen_bitfield_unit.set(10usize, 1u8, { - let mBlockResourceTiming: u8 = - unsafe { ::std::mem::transmute(mBlockResourceTiming) }; - mBlockResourceTiming as u64 - }); - __bindgen_bitfield_unit - } - } - #[repr(C)] - #[derive(Debug)] - pub struct Rule { - pub _base: root::nsISupports, - pub _base_1: root::nsWrapperCache, - pub mRefCnt: root::nsCycleCollectingAutoRefCnt, - pub mSheet: *mut root::mozilla::StyleSheet, - pub mParentRule: *mut root::mozilla::css::GroupRule, - pub mLineNumber: u32, - pub mColumnNumber: u32, - } - pub type Rule_HasThreadSafeRefCnt = root::mozilla::FalseType; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Rule_cycleCollection { - pub _base: root::nsXPCOMCycleCollectionParticipant, - } #[test] - fn bindgen_test_layout_Rule_cycleCollection() { + fn bindgen_test_layout_UserData() { assert_eq!( - ::std::mem::size_of::<Rule_cycleCollection>(), + ::std::mem::size_of::<UserData>(), 16usize, - concat!("Size of: ", stringify!(Rule_cycleCollection)) + concat!("Size of: ", stringify!(UserData)) ); assert_eq!( - ::std::mem::align_of::<Rule_cycleCollection>(), + ::std::mem::align_of::<UserData>(), 8usize, - concat!("Alignment of ", stringify!(Rule_cycleCollection)) + concat!("Alignment of ", stringify!(UserData)) ); } - impl Clone for Rule_cycleCollection { + impl Clone for UserData { fn clone(&self) -> Self { *self } } - pub const Rule_UNKNOWN_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 0; - pub const Rule_CHARSET_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 1; - pub const Rule_IMPORT_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 2; - pub const Rule_NAMESPACE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 3; - pub const Rule_STYLE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 4; - pub const Rule_MEDIA_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 5; - pub const Rule_FONT_FACE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 6; - pub const Rule_PAGE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 7; - pub const Rule_KEYFRAME_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 8; - pub const Rule_KEYFRAMES_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 9; - pub const Rule_DOCUMENT_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 10; - pub const Rule_SUPPORTS_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 11; - pub const Rule_FONT_FEATURE_VALUES_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 12; - pub const Rule_COUNTER_STYLE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 13; - pub type Rule__bindgen_ty_1 = u32; - extern "C" { - #[link_name = "\u{1}_ZN7mozilla3css4Rule21_cycleCollectorGlobalE"] - pub static mut Rule__cycleCollectorGlobal: root::mozilla::css::Rule_cycleCollection; - } - #[test] - fn bindgen_test_layout_Rule() { - assert_eq!( - ::std::mem::size_of::<Rule>(), - 64usize, - concat!("Size of: ", stringify!(Rule)) - ); - assert_eq!( - ::std::mem::align_of::<Rule>(), - 8usize, - concat!("Alignment of ", stringify!(Rule)) - ); - } #[repr(C)] - pub struct ErrorReporter { - pub mError: root::nsAutoString, - pub mErrorLine: ::nsstring::nsStringRepr, - pub mFileName: ::nsstring::nsStringRepr, - pub mScanner: *const root::nsCSSScanner, - pub mSheet: *const root::mozilla::StyleSheet, - pub mLoader: *const root::mozilla::css::Loader, - pub mURI: *mut root::nsIURI, - pub mInnerWindowID: u64, - pub mErrorLineNumber: u32, - pub mPrevErrorLineNumber: u32, - pub mErrorColNumber: u32, + pub struct SourceSurface__bindgen_vtable(::std::os::raw::c_void); + /// This is the base class for source surfaces. These objects are surfaces + /// which may be used as a source in a SurfacePattern or a DrawSurface call. + /// They cannot be drawn to directly. + /// + /// Although SourceSurface has thread-safe refcount, some SourceSurface cannot + /// be used on random threads at the same time. Only DataSourceSurface can be + /// used on random threads now. This will be fixed in the future. Eventually + /// all SourceSurface should be thread-safe. + #[repr(C)] + #[derive(Debug)] + pub struct SourceSurface { + pub vtable_: *const SourceSurface__bindgen_vtable, + pub _base: u64, + pub mUserData: root::mozilla::gfx::UserData, } #[test] - fn bindgen_test_layout_ErrorReporter() { + fn bindgen_test_layout_SourceSurface() { assert_eq!( - ::std::mem::size_of::<ErrorReporter>(), - 240usize, - concat!("Size of: ", stringify!(ErrorReporter)) + ::std::mem::size_of::<SourceSurface>(), + 32usize, + concat!("Size of: ", stringify!(SourceSurface)) ); assert_eq!( - ::std::mem::align_of::<ErrorReporter>(), + ::std::mem::align_of::<SourceSurface>(), 8usize, - concat!("Alignment of ", stringify!(ErrorReporter)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mError as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mError) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mErrorLine as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mErrorLine) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mFileName as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mFileName) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mScanner as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mScanner) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mSheet as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mSheet) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mLoader as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mLoader) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<ErrorReporter>())).mURI as *const _ as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mURI) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mInnerWindowID as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mInnerWindowID) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mErrorLineNumber as *const _ - as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mErrorLineNumber) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mPrevErrorLineNumber as *const _ - as usize - }, - 228usize, - concat!( - "Offset of field: ", - stringify!(ErrorReporter), - "::", - stringify!(mPrevErrorLineNumber) - ) + concat!("Alignment of ", stringify!(SourceSurface)) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<ErrorReporter>())).mErrorColNumber as *const _ - as usize + &(*(::std::ptr::null::<SourceSurface>())).mUserData as *const _ as usize }, - 232usize, + 16usize, concat!( "Offset of field: ", - stringify!(ErrorReporter), + stringify!(SourceSurface), "::", - stringify!(mErrorColNumber) + stringify!(mUserData) ) ); } - #[repr(i32)] - /// Enum defining the type of URL matching function for a @-moz-document rule - /// condition. - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum URLMatchingFunction { - eURL = 0, - eURLPrefix = 1, - eDomain = 2, - eRegExp = 3, - } } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum Side { + eSideTop = 0, + eSideRight = 1, + eSideBottom = 2, + eSideLeft = 3, + } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum HalfCorner { + eCornerTopLeftX = 0, + eCornerTopLeftY = 1, + eCornerTopRightX = 2, + eCornerTopRightY = 3, + eCornerBottomRightX = 4, + eCornerBottomRightY = 5, + eCornerBottomLeftX = 6, + eCornerBottomLeftY = 7, + } + pub type MallocSizeOf = + ::std::option::Option<unsafe extern "C" fn(p: *const ::std::os::raw::c_void) -> usize>; #[repr(C)] #[derive(Debug)] pub struct ThreadSafeAutoRefCnt { @@ -2609,6 +1553,16 @@ pub mod root { ) ); } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct ReverseIterator<IteratorT> { + pub mCurrent: IteratorT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<IteratorT>>, + } + pub type Array_iterator<T> = *mut T; + pub type Array_const_iterator<T> = *mut T; + pub type Array_reverse_iterator<T> = root::mozilla::ReverseIterator<T>; + pub type Array_const_reverse_iterator<T> = root::mozilla::ReverseIterator<T>; pub type EnumeratedArray_ArrayType = u8; pub type EnumeratedArray_iterator = root::mozilla::EnumeratedArray_ArrayType; pub type EnumeratedArray_const_iterator = root::mozilla::EnumeratedArray_ArrayType; @@ -2831,160 +1785,6 @@ pub mod root { } pub type Variant_Tag = root::mozilla::detail::VariantTag; pub type Variant_Impl = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct Maybe { - pub _address: u8, - } - pub type Maybe_ValueType<T> = T; - pub mod gfx { - #[allow(unused_imports)] - use self::super::super::super::root; - pub type Float = f32; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct IntPointTyped { - pub _address: u8, - } - pub type IntPointTyped_ToInt = u32; - pub type IntPointTyped_Coord = u8; - pub type IntPointTyped_Super = u8; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct FontVariation { - pub mTag: u32, - pub mValue: f32, - } - #[test] - fn bindgen_test_layout_FontVariation() { - assert_eq!( - ::std::mem::size_of::<FontVariation>(), - 8usize, - concat!("Size of: ", stringify!(FontVariation)) - ); - assert_eq!( - ::std::mem::align_of::<FontVariation>(), - 4usize, - concat!("Alignment of ", stringify!(FontVariation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<FontVariation>())).mTag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FontVariation), - "::", - stringify!(mTag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<FontVariation>())).mValue as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FontVariation), - "::", - stringify!(mValue) - ) - ); - } - impl Clone for FontVariation { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct UserData { - pub _bindgen_opaque_blob: [u64; 2usize], - } - pub type UserData_destroyFunc = u64; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct UserData_Entry { - pub _bindgen_opaque_blob: [u64; 3usize], - } - #[test] - fn bindgen_test_layout_UserData_Entry() { - assert_eq!( - ::std::mem::size_of::<UserData_Entry>(), - 24usize, - concat!("Size of: ", stringify!(UserData_Entry)) - ); - assert_eq!( - ::std::mem::align_of::<UserData_Entry>(), - 8usize, - concat!("Alignment of ", stringify!(UserData_Entry)) - ); - } - impl Clone for UserData_Entry { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_UserData() { - assert_eq!( - ::std::mem::size_of::<UserData>(), - 16usize, - concat!("Size of: ", stringify!(UserData)) - ); - assert_eq!( - ::std::mem::align_of::<UserData>(), - 8usize, - concat!("Alignment of ", stringify!(UserData)) - ); - } - impl Clone for UserData { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - pub struct SourceSurface__bindgen_vtable(::std::os::raw::c_void); - /// This is the base class for source surfaces. These objects are surfaces - /// which may be used as a source in a SurfacePattern or a DrawSurface call. - /// They cannot be drawn to directly. - /// - /// Although SourceSurface has thread-safe refcount, some SourceSurface cannot - /// be used on random threads at the same time. Only DataSourceSurface can be - /// used on random threads now. This will be fixed in the future. Eventually - /// all SourceSurface should be thread-safe. - #[repr(C)] - #[derive(Debug)] - pub struct SourceSurface { - pub vtable_: *const SourceSurface__bindgen_vtable, - pub _base: u64, - pub mUserData: root::mozilla::gfx::UserData, - } - #[test] - fn bindgen_test_layout_SourceSurface() { - assert_eq!( - ::std::mem::size_of::<SourceSurface>(), - 32usize, - concat!("Size of: ", stringify!(SourceSurface)) - ); - assert_eq!( - ::std::mem::align_of::<SourceSurface>(), - 8usize, - concat!("Alignment of ", stringify!(SourceSurface)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<SourceSurface>())).mUserData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(SourceSurface), - "::", - stringify!(mUserData) - ) - ); - } - } pub mod layers { #[allow(unused_imports)] use self::super::super::super::root; @@ -3096,6 +1896,18 @@ pub mod root { pub struct Nullable { pub _address: u8, } + pub mod prototypes { + #[allow(unused_imports)] + use self::super::super::super::super::root; + } + pub mod constructors { + #[allow(unused_imports)] + use self::super::super::super::super::root; + } + pub mod namedpropertiesobjects { + #[allow(unused_imports)] + use self::super::super::super::super::root; + } #[repr(C)] #[derive(Debug, Copy)] pub struct Promise { @@ -3215,7 +2027,7 @@ pub mod root { } } #[repr(C)] - #[derive(Debug, Copy)] + #[derive(Debug)] pub struct NodeInfo_NodeInfoInner { pub mName: *const root::nsAtom, pub mPrefix: *mut root::nsAtom, @@ -3223,8 +2035,7 @@ pub mod root { pub mNodeType: u16, pub mNameString: *const root::nsAString, pub mExtraName: *mut root::nsAtom, - pub mHash: root::PLHashNumber, - pub mHashInitialized: bool, + pub mHash: [u32; 2usize], } #[test] fn bindgen_test_layout_NodeInfo_NodeInfoInner() { @@ -3329,24 +2140,6 @@ pub mod root { stringify!(mHash) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<NodeInfo_NodeInfoInner>())).mHashInitialized - as *const _ as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(NodeInfo_NodeInfoInner), - "::", - stringify!(mHashInitialized) - ) - ); - } - impl Clone for NodeInfo_NodeInfoInner { - fn clone(&self) -> Self { - *self - } } extern "C" { #[link_name = "\u{1}_ZN7mozilla3dom8NodeInfo21_cycleCollectorGlobalE"] @@ -3538,6 +2331,12 @@ pub mod root { pub const VisibilityState_Visible: root::mozilla::dom::VisibilityState = 1; pub const VisibilityState_EndGuard_: root::mozilla::dom::VisibilityState = 2; pub type VisibilityState = u8; + pub const FlashClassification_Unclassified: root::mozilla::dom::FlashClassification = 0; + pub const FlashClassification_Unknown: root::mozilla::dom::FlashClassification = 1; + pub const FlashClassification_Allowed: root::mozilla::dom::FlashClassification = 2; + pub const FlashClassification_Denied: root::mozilla::dom::FlashClassification = 3; + pub const FlashClassification_EndGuard_: root::mozilla::dom::FlashClassification = 4; + pub type FlashClassification = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct IPCClientInfo { @@ -3625,16 +2424,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct ServiceWorkerRegistration { - _unused: [u8; 0], - } - impl Clone for ServiceWorkerRegistration { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct TimeoutManager { _unused: [u8; 0], } @@ -3765,6 +2554,16 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct AboutCapabilities { + _unused: [u8; 0], + } + impl Clone for AboutCapabilities { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct AnonymousContent { _unused: [u8; 0], } @@ -3775,6 +2574,36 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct BoxObject { + _unused: [u8; 0], + } + impl Clone for BoxObject { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DocumentTimeline { + _unused: [u8; 0], + } + impl Clone for DocumentTimeline { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DOMImplementation { + _unused: [u8; 0], + } + impl Clone for DOMImplementation { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct FontFaceSet { _unused: [u8; 0], } @@ -3805,6 +2634,16 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct HTMLImageElement { + _unused: [u8; 0], + } + impl Clone for HTMLImageElement { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct Link { _unused: [u8; 0], } @@ -3823,27 +2662,26 @@ pub mod root { *self } } + pub type OrientationType = u8; #[repr(C)] #[derive(Debug, Copy)] - pub struct XPathEvaluator { + pub struct ScriptLoader { _unused: [u8; 0], } - impl Clone for XPathEvaluator { + impl Clone for ScriptLoader { fn clone(&self) -> Self { *self } } - pub mod prototypes { - #[allow(unused_imports)] - use self::super::super::super::super::root; - } - pub mod constructors { - #[allow(unused_imports)] - use self::super::super::super::super::root; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct XPathEvaluator { + _unused: [u8; 0], } - pub mod namedpropertiesobjects { - #[allow(unused_imports)] - use self::super::super::super::super::root; + impl Clone for XPathEvaluator { + fn clone(&self) -> Self { + *self + } } #[repr(C)] #[derive(Debug, Copy)] @@ -4579,17 +3417,227 @@ pub mod root { concat!("Alignment of ", stringify!(DOMRectReadOnly)) ); } + #[repr(C)] + #[derive(Debug)] + pub struct DOMRect { + pub _base: root::mozilla::dom::DOMRectReadOnly, + pub mX: f64, + pub mY: f64, + pub mWidth: f64, + pub mHeight: f64, + } + #[test] + fn bindgen_test_layout_DOMRect() { + assert_eq!( + ::std::mem::size_of::<DOMRect>(), + 80usize, + concat!("Size of: ", stringify!(DOMRect)) + ); + assert_eq!( + ::std::mem::align_of::<DOMRect>(), + 8usize, + concat!("Alignment of ", stringify!(DOMRect)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<DOMRect>())).mX as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(DOMRect), + "::", + stringify!(mX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<DOMRect>())).mY as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(DOMRect), + "::", + stringify!(mY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<DOMRect>())).mWidth as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(DOMRect), + "::", + stringify!(mWidth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<DOMRect>())).mHeight as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(DOMRect), + "::", + stringify!(mHeight) + ) + ); + } pub const ShadowRootMode_Open: root::mozilla::dom::ShadowRootMode = 0; pub const ShadowRootMode_Closed: root::mozilla::dom::ShadowRootMode = 1; pub const ShadowRootMode_EndGuard_: root::mozilla::dom::ShadowRootMode = 2; pub type ShadowRootMode = u8; #[repr(C)] + #[derive(Debug, Copy)] + pub struct IntersectionCallback { + pub _bindgen_opaque_blob: [u64; 6usize], + } + #[test] + fn bindgen_test_layout_IntersectionCallback() { + assert_eq!( + ::std::mem::size_of::<IntersectionCallback>(), + 48usize, + concat!("Size of: ", stringify!(IntersectionCallback)) + ); + assert_eq!( + ::std::mem::align_of::<IntersectionCallback>(), + 8usize, + concat!("Alignment of ", stringify!(IntersectionCallback)) + ); + } + impl Clone for IntersectionCallback { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + pub struct DOMIntersectionObserverEntry { + pub _base: root::nsISupports, + pub _base_1: root::nsWrapperCache, + pub mRefCnt: root::nsCycleCollectingAutoRefCnt, + pub mOwner: root::nsCOMPtr, + pub mTime: root::DOMHighResTimeStamp, + pub mRootBounds: root::RefPtr<root::mozilla::dom::DOMRect>, + pub mBoundingClientRect: root::RefPtr<root::mozilla::dom::DOMRect>, + pub mIntersectionRect: root::RefPtr<root::mozilla::dom::DOMRect>, + pub mIsIntersecting: bool, + pub mTarget: root::RefPtr<root::mozilla::dom::Element>, + pub mIntersectionRatio: f64, + } + pub type DOMIntersectionObserverEntry_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DOMIntersectionObserverEntry_cycleCollection { + pub _base: root::nsXPCOMCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_DOMIntersectionObserverEntry_cycleCollection() { + assert_eq!( + ::std::mem::size_of::<DOMIntersectionObserverEntry_cycleCollection>(), + 16usize, + concat!( + "Size of: ", + stringify!(DOMIntersectionObserverEntry_cycleCollection) + ) + ); + assert_eq!( + ::std::mem::align_of::<DOMIntersectionObserverEntry_cycleCollection>(), + 8usize, + concat!( + "Alignment of ", + stringify!(DOMIntersectionObserverEntry_cycleCollection) + ) + ); + } + impl Clone for DOMIntersectionObserverEntry_cycleCollection { + fn clone(&self) -> Self { + *self + } + } + extern "C" { + # [ link_name = "\u{1}_ZN7mozilla3dom28DOMIntersectionObserverEntry21_cycleCollectorGlobalE" ] pub static mut DOMIntersectionObserverEntry__cycleCollectorGlobal : root :: mozilla :: dom :: DOMIntersectionObserverEntry_cycleCollection ; + } + #[test] + fn bindgen_test_layout_DOMIntersectionObserverEntry() { + assert_eq!( + ::std::mem::size_of::<DOMIntersectionObserverEntry>(), + 104usize, + concat!("Size of: ", stringify!(DOMIntersectionObserverEntry)) + ); + assert_eq!( + ::std::mem::align_of::<DOMIntersectionObserverEntry>(), + 8usize, + concat!("Alignment of ", stringify!(DOMIntersectionObserverEntry)) + ); + } + #[repr(C)] + pub struct DOMIntersectionObserver { + pub _base: root::nsISupports, + pub _base_1: root::nsWrapperCache, + pub mRefCnt: root::nsCycleCollectingAutoRefCnt, + pub mOwner: root::nsCOMPtr, + pub mDocument: root::RefPtr<root::nsIDocument>, + pub mCallback: root::RefPtr<root::mozilla::dom::IntersectionCallback>, + pub mRoot: root::RefPtr<root::mozilla::dom::Element>, + pub mRootMargin: root::nsCSSRect, + pub mThresholds: root::nsTArray<f64>, + pub mObservationTargets: root::nsTArray<*mut root::mozilla::dom::Element>, + pub mQueuedEntries: + root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>, + pub mConnected: bool, + } + pub type DOMIntersectionObserver_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DOMIntersectionObserver_cycleCollection { + pub _base: root::nsXPCOMCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_DOMIntersectionObserver_cycleCollection() { + assert_eq!( + ::std::mem::size_of::<DOMIntersectionObserver_cycleCollection>(), + 16usize, + concat!( + "Size of: ", + stringify!(DOMIntersectionObserver_cycleCollection) + ) + ); + assert_eq!( + ::std::mem::align_of::<DOMIntersectionObserver_cycleCollection>(), + 8usize, + concat!( + "Alignment of ", + stringify!(DOMIntersectionObserver_cycleCollection) + ) + ); + } + impl Clone for DOMIntersectionObserver_cycleCollection { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct DOMIntersectionObserver_COMTypeInfo { + pub _address: u8, + } + extern "C" { + # [ link_name = "\u{1}_ZN7mozilla3dom23DOMIntersectionObserver21_cycleCollectorGlobalE" ] pub static mut DOMIntersectionObserver__cycleCollectorGlobal : root :: mozilla :: dom :: DOMIntersectionObserver_cycleCollection ; + } + #[test] + fn bindgen_test_layout_DOMIntersectionObserver() { + assert_eq!( + ::std::mem::size_of::<DOMIntersectionObserver>(), + 168usize, + concat!("Size of: ", stringify!(DOMIntersectionObserver)) + ); + assert_eq!( + ::std::mem::align_of::<DOMIntersectionObserver>(), + 8usize, + concat!("Alignment of ", stringify!(DOMIntersectionObserver)) + ); + } + #[repr(C)] pub struct Element { pub _base: root::mozilla::dom::FragmentOrElement, pub mState: root::mozilla::EventStates, - pub mServoData: ::gecko_bindings::structs::ServoCell< - *mut ::gecko_bindings::structs::ServoNodeData, - >, + pub mServoData: ::gecko_bindings::structs::ServoCell<*mut ::gecko_bindings::structs::ServoNodeData>, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -4708,7 +3756,7 @@ pub mod root { pub type Element_nsElementMatchFunc = ::std::option::Option< unsafe extern "C" fn(aElement: *mut root::mozilla::dom::Element) -> bool, >; - pub const Element_kAllServoDescendantBits: u32 = 25296896; + pub const Element_kAllServoDescendantBits: u32 = 12648448; pub const Element_kFireMutationEvent: bool = true; pub const Element_kDontFireMutationEvent: bool = false; pub const Element_kNotifyDocumentObservers: bool = true; @@ -4906,6 +3954,52 @@ pub mod root { *self } } + /// Represents the insertion point in a slot for a given node. + #[repr(C)] + #[derive(Debug)] + pub struct ShadowRoot_SlotAssignment { + pub mSlot: *mut root::mozilla::dom::HTMLSlotElement, + pub mIndex: [u32; 2usize], + } + #[test] + fn bindgen_test_layout_ShadowRoot_SlotAssignment() { + assert_eq!( + ::std::mem::size_of::<ShadowRoot_SlotAssignment>(), + 16usize, + concat!("Size of: ", stringify!(ShadowRoot_SlotAssignment)) + ); + assert_eq!( + ::std::mem::align_of::<ShadowRoot_SlotAssignment>(), + 8usize, + concat!("Alignment of ", stringify!(ShadowRoot_SlotAssignment)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ShadowRoot_SlotAssignment>())).mSlot as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ShadowRoot_SlotAssignment), + "::", + stringify!(mSlot) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ShadowRoot_SlotAssignment>())).mIndex as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ShadowRoot_SlotAssignment), + "::", + stringify!(mIndex) + ) + ); + } pub type ShadowRoot_SlotArray = u8; extern "C" { #[link_name = "\u{1}_ZN7mozilla3dom10ShadowRoot21_cycleCollectorGlobalE"] @@ -5254,231 +4348,6 @@ pub mod root { } } #[repr(C)] - pub struct CSSVariableValues { - /// Map of variable names to IDs. Variable IDs are indexes into - /// mVariables. - pub mVariableIDs: [u64; 4usize], - /// Array of variables, indexed by variable ID. - pub mVariables: root::nsTArray<root::mozilla::CSSVariableValues_Variable>, - } - #[repr(C)] - pub struct CSSVariableValues_Variable { - pub mVariableName: ::nsstring::nsStringRepr, - pub mValue: ::nsstring::nsStringRepr, - pub mFirstToken: root::nsCSSTokenSerializationType, - pub mLastToken: root::nsCSSTokenSerializationType, - } - #[test] - fn bindgen_test_layout_CSSVariableValues_Variable() { - assert_eq!( - ::std::mem::size_of::<CSSVariableValues_Variable>(), - 40usize, - concat!("Size of: ", stringify!(CSSVariableValues_Variable)) - ); - assert_eq!( - ::std::mem::align_of::<CSSVariableValues_Variable>(), - 8usize, - concat!("Alignment of ", stringify!(CSSVariableValues_Variable)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues_Variable>())).mVariableName as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues_Variable), - "::", - stringify!(mVariableName) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues_Variable>())).mValue as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues_Variable), - "::", - stringify!(mValue) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues_Variable>())).mFirstToken as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues_Variable), - "::", - stringify!(mFirstToken) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues_Variable>())).mLastToken as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues_Variable), - "::", - stringify!(mLastToken) - ) - ); - } - #[test] - fn bindgen_test_layout_CSSVariableValues() { - assert_eq!( - ::std::mem::size_of::<CSSVariableValues>(), - 40usize, - concat!("Size of: ", stringify!(CSSVariableValues)) - ); - assert_eq!( - ::std::mem::align_of::<CSSVariableValues>(), - 8usize, - concat!("Alignment of ", stringify!(CSSVariableValues)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues>())).mVariableIDs as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues), - "::", - stringify!(mVariableIDs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<CSSVariableValues>())).mVariables as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CSSVariableValues), - "::", - stringify!(mVariables) - ) - ); - } - #[repr(u8)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum SheetType { - Agent = 0, - User = 1, - PresHint = 2, - Doc = 3, - ScopedDoc = 4, - StyleAttr = 5, - Override = 6, - Animation = 7, - Transition = 8, - Count = 9, - Unknown = 255, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct StaticRefPtr<T> { - pub mRawPtr: *mut T, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, - } - /// This struct represents a combined color from a numeric color and - /// the current foreground color (currentcolor keyword). - /// Conceptually, the formula is "color * (1 - p) + currentcolor * p" - /// where p is mForegroundRatio. See mozilla::LinearBlendColors for - /// the actual algorithm. - #[repr(C)] - #[derive(Debug, Copy)] - pub struct StyleComplexColor { - pub mColor: root::nscolor, - pub mForegroundRatio: u8, - pub mIsAuto: bool, - } - #[test] - fn bindgen_test_layout_StyleComplexColor() { - assert_eq!( - ::std::mem::size_of::<StyleComplexColor>(), - 8usize, - concat!("Size of: ", stringify!(StyleComplexColor)) - ); - assert_eq!( - ::std::mem::align_of::<StyleComplexColor>(), - 4usize, - concat!("Alignment of ", stringify!(StyleComplexColor)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleComplexColor>())).mColor as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleComplexColor), - "::", - stringify!(mColor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleComplexColor>())).mForegroundRatio as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StyleComplexColor), - "::", - stringify!(mForegroundRatio) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleComplexColor>())).mIsAuto as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StyleComplexColor), - "::", - stringify!(mIsAuto) - ) - ); - } - impl Clone for StyleComplexColor { - fn clone(&self) -> Self { - *self - } - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum Side { - eSideTop = 0, - eSideRight = 1, - eSideBottom = 2, - eSideLeft = 3, - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum HalfCorner { - eCornerTopLeftX = 0, - eCornerTopLeftY = 1, - eCornerTopRightX = 2, - eCornerTopRightY = 3, - eCornerBottomRightX = 4, - eCornerBottomRightY = 5, - eCornerBottomLeftX = 6, - eCornerBottomLeftY = 7, - } - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct NotNull<T> { pub mBasePtr: T, @@ -6505,6 +5374,1366 @@ pub mod root { pub const StyleBackendType_Servo: root::mozilla::StyleBackendType = 2; /// Enumeration that represents one of the two supported style system backends. pub type StyleBackendType = u8; + pub mod css { + #[allow(unused_imports)] + use self::super::super::super::root; + #[repr(u8)] + /// Enum defining the mode in which a sheet is to be parsed. This is + /// usually, but not always, the same as the cascade level at which the + /// sheet will apply (see nsStyleSet.h). Most of the Loader APIs only + /// support loading of author sheets. + /// + /// Author sheets are the normal case: styles embedded in or linked + /// from HTML pages. They are also the most restricted. + /// + /// User sheets can do anything author sheets can do, and also get + /// access to a few CSS extensions that are not yet suitable for + /// exposure on the public Web, but are very useful for expressing + /// user style overrides, such as @-moz-document rules. + /// + /// XXX: eUserSheetFeatures was added in bug 1035091, but some patches in + /// that bug never landed to use this enum value. Currently, all the features + /// in user sheet are also available in author sheet. + /// + /// Agent sheets have access to all author- and user-sheet features + /// plus more extensions that are necessary for internal use but, + /// again, not yet suitable for exposure on the public Web. Some of + /// these are outright unsafe to expose; in particular, incorrect + /// styling of anonymous box pseudo-elements can violate layout + /// invariants. + /// + /// Agent sheets that do not use any unsafe rules could use + /// eSafeAgentSheetFeatures when creating the sheet. This enum value allows + /// Servo backend to recognize the sheets as the agent level, but Gecko + /// backend will parse it under _author_ level. + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum SheetParsingMode { + eAuthorSheetFeatures = 0, + eUserSheetFeatures = 1, + eAgentSheetFeatures = 2, + eSafeAgentSheetFeatures = 3, + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct GroupRule { + _unused: [u8; 0], + } + impl Clone for GroupRule { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct ImageLoader { + _unused: [u8; 0], + } + impl Clone for ImageLoader { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + pub struct URLValueData__bindgen_vtable(::std::os::raw::c_void); + #[repr(C)] + #[derive(Debug)] + pub struct URLValueData { + pub vtable_: *const URLValueData__bindgen_vtable, + pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, + pub mURI: root::nsMainThreadPtrHandle<root::nsIURI>, + pub mExtraData: root::RefPtr<root::mozilla::URLExtraData>, + pub mURIResolved: bool, + pub mIsLocalRef: [u8; 2usize], + pub mMightHaveRef: [u8; 2usize], + pub mStrings: root::mozilla::css::URLValueData_RustOrGeckoString, + pub mUsingRustString: bool, + pub mLoadedImage: bool, + pub mCORSMode: root::mozilla::CORSMode, + } + pub type URLValueData_HasThreadSafeRefCnt = root::mozilla::TrueType; + #[repr(C)] + #[derive(Debug)] + pub struct URLValueData_RustOrGeckoString { + pub mString: root::__BindgenUnionField<::nsstring::nsStringRepr>, + pub mRustString: + root::__BindgenUnionField<::gecko_bindings::structs::ServoRawOffsetArc<root::RustString>>, + pub bindgen_union_field: [u64; 2usize], + } + #[test] + fn bindgen_test_layout_URLValueData_RustOrGeckoString() { + assert_eq!( + ::std::mem::size_of::<URLValueData_RustOrGeckoString>(), + 16usize, + concat!("Size of: ", stringify!(URLValueData_RustOrGeckoString)) + ); + assert_eq!( + ::std::mem::align_of::<URLValueData_RustOrGeckoString>(), + 8usize, + concat!("Alignment of ", stringify!(URLValueData_RustOrGeckoString)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData_RustOrGeckoString>())).mString + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(URLValueData_RustOrGeckoString), + "::", + stringify!(mString) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData_RustOrGeckoString>())).mRustString + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(URLValueData_RustOrGeckoString), + "::", + stringify!(mRustString) + ) + ); + } + #[test] + fn bindgen_test_layout_URLValueData() { + assert_eq!( + ::std::mem::size_of::<URLValueData>(), + 64usize, + concat!("Size of: ", stringify!(URLValueData)) + ); + assert_eq!( + ::std::mem::align_of::<URLValueData>(), + 8usize, + concat!("Alignment of ", stringify!(URLValueData)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mRefCnt as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mRefCnt) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<URLValueData>())).mURI as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mURI) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mExtraData as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mExtraData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mURIResolved as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mURIResolved) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mIsLocalRef as *const _ as usize + }, + 33usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mIsLocalRef) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mMightHaveRef as *const _ as usize + }, + 35usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mMightHaveRef) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mStrings as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mStrings) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mUsingRustString as *const _ + as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mUsingRustString) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mLoadedImage as *const _ as usize + }, + 57usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mLoadedImage) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<URLValueData>())).mCORSMode as *const _ as usize + }, + 58usize, + concat!( + "Offset of field: ", + stringify!(URLValueData), + "::", + stringify!(mCORSMode) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct URLValue { + pub _base: root::mozilla::css::URLValueData, + } + #[test] + fn bindgen_test_layout_URLValue() { + assert_eq!( + ::std::mem::size_of::<URLValue>(), + 64usize, + concat!("Size of: ", stringify!(URLValue)) + ); + assert_eq!( + ::std::mem::align_of::<URLValue>(), + 8usize, + concat!("Alignment of ", stringify!(URLValue)) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct ImageValue { + pub _base: root::mozilla::css::URLValueData, + pub mRequests: [u64; 4usize], + } + #[test] + fn bindgen_test_layout_ImageValue() { + assert_eq!( + ::std::mem::size_of::<ImageValue>(), + 96usize, + concat!("Size of: ", stringify!(ImageValue)) + ); + assert_eq!( + ::std::mem::align_of::<ImageValue>(), + 8usize, + concat!("Alignment of ", stringify!(ImageValue)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ImageValue>())).mRequests as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImageValue), + "::", + stringify!(mRequests) + ) + ); + } + #[repr(C)] + pub struct GridNamedArea { + pub mName: ::nsstring::nsStringRepr, + pub mColumnStart: u32, + pub mColumnEnd: u32, + pub mRowStart: u32, + pub mRowEnd: u32, + } + #[test] + fn bindgen_test_layout_GridNamedArea() { + assert_eq!( + ::std::mem::size_of::<GridNamedArea>(), + 32usize, + concat!("Size of: ", stringify!(GridNamedArea)) + ); + assert_eq!( + ::std::mem::align_of::<GridNamedArea>(), + 8usize, + concat!("Alignment of ", stringify!(GridNamedArea)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<GridNamedArea>())).mName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GridNamedArea), + "::", + stringify!(mName) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridNamedArea>())).mColumnStart as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GridNamedArea), + "::", + stringify!(mColumnStart) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridNamedArea>())).mColumnEnd as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GridNamedArea), + "::", + stringify!(mColumnEnd) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridNamedArea>())).mRowStart as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GridNamedArea), + "::", + stringify!(mRowStart) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridNamedArea>())).mRowEnd as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(GridNamedArea), + "::", + stringify!(mRowEnd) + ) + ); + } + #[repr(C)] + pub struct GridTemplateAreasValue { + pub mNamedAreas: root::nsTArray<root::mozilla::css::GridNamedArea>, + pub mTemplates: root::nsTArray<::nsstring::nsStringRepr>, + pub mNColumns: u32, + pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, + } + pub type GridTemplateAreasValue_HasThreadSafeRefCnt = root::mozilla::TrueType; + #[test] + fn bindgen_test_layout_GridTemplateAreasValue() { + assert_eq!( + ::std::mem::size_of::<GridTemplateAreasValue>(), + 32usize, + concat!("Size of: ", stringify!(GridTemplateAreasValue)) + ); + assert_eq!( + ::std::mem::align_of::<GridTemplateAreasValue>(), + 8usize, + concat!("Alignment of ", stringify!(GridTemplateAreasValue)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridTemplateAreasValue>())).mNamedAreas as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GridTemplateAreasValue), + "::", + stringify!(mNamedAreas) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridTemplateAreasValue>())).mTemplates as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GridTemplateAreasValue), + "::", + stringify!(mTemplates) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridTemplateAreasValue>())).mNColumns as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GridTemplateAreasValue), + "::", + stringify!(mNColumns) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<GridTemplateAreasValue>())).mRefCnt as *const _ + as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GridTemplateAreasValue), + "::", + stringify!(mRefCnt) + ) + ); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct RGBAColorData { + pub mR: f32, + pub mG: f32, + pub mB: f32, + pub mA: f32, + } + #[test] + fn bindgen_test_layout_RGBAColorData() { + assert_eq!( + ::std::mem::size_of::<RGBAColorData>(), + 16usize, + concat!("Size of: ", stringify!(RGBAColorData)) + ); + assert_eq!( + ::std::mem::align_of::<RGBAColorData>(), + 4usize, + concat!("Alignment of ", stringify!(RGBAColorData)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mR as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(RGBAColorData), + "::", + stringify!(mR) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mG as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(RGBAColorData), + "::", + stringify!(mG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mB as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(RGBAColorData), + "::", + stringify!(mB) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<RGBAColorData>())).mA as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(RGBAColorData), + "::", + stringify!(mA) + ) + ); + } + impl Clone for RGBAColorData { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct ComplexColorData { + pub mColor: root::mozilla::css::RGBAColorData, + pub mForegroundRatio: f32, + } + #[test] + fn bindgen_test_layout_ComplexColorData() { + assert_eq!( + ::std::mem::size_of::<ComplexColorData>(), + 20usize, + concat!("Size of: ", stringify!(ComplexColorData)) + ); + assert_eq!( + ::std::mem::align_of::<ComplexColorData>(), + 4usize, + concat!("Alignment of ", stringify!(ComplexColorData)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ComplexColorData>())).mColor as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ComplexColorData), + "::", + stringify!(mColor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ComplexColorData>())).mForegroundRatio as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ComplexColorData), + "::", + stringify!(mForegroundRatio) + ) + ); + } + impl Clone for ComplexColorData { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug)] + pub struct ComplexColorValue { + pub _base: root::mozilla::css::ComplexColorData, + pub mRefCnt: root::nsAutoRefCnt, + } + pub type ComplexColorValue_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_ComplexColorValue() { + assert_eq!( + ::std::mem::size_of::<ComplexColorValue>(), + 32usize, + concat!("Size of: ", stringify!(ComplexColorValue)) + ); + assert_eq!( + ::std::mem::align_of::<ComplexColorValue>(), + 8usize, + concat!("Alignment of ", stringify!(ComplexColorValue)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ComplexColorValue>())).mRefCnt as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ComplexColorValue), + "::", + stringify!(mRefCnt) + ) + ); + } + /// Style sheet reuse * + #[repr(C)] + pub struct LoaderReusableStyleSheets { + pub mReusableSheets: root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>, + } + #[test] + fn bindgen_test_layout_LoaderReusableStyleSheets() { + assert_eq!( + ::std::mem::size_of::<LoaderReusableStyleSheets>(), + 8usize, + concat!("Size of: ", stringify!(LoaderReusableStyleSheets)) + ); + assert_eq!( + ::std::mem::align_of::<LoaderReusableStyleSheets>(), + 8usize, + concat!("Alignment of ", stringify!(LoaderReusableStyleSheets)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<LoaderReusableStyleSheets>())).mReusableSheets + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(LoaderReusableStyleSheets), + "::", + stringify!(mReusableSheets) + ) + ); + } + #[repr(C)] + pub struct Loader { + pub mRefCnt: root::nsCycleCollectingAutoRefCnt, + pub mSheets: root::nsAutoPtr<root::mozilla::css::Loader_Sheets>, + pub mPostedEvents: root::mozilla::css::Loader_LoadDataArray, + pub mObservers: [u64; 2usize], + pub mDocument: *mut root::nsIDocument, + pub mDocGroup: root::RefPtr<root::mozilla::dom::DocGroup>, + pub mDatasToNotifyOn: u32, + pub mCompatMode: root::nsCompatibility, + pub mPreferredSheet: ::nsstring::nsStringRepr, + pub mStyleBackendType: [u8; 2usize], + pub mEnabled: bool, + pub mReporter: root::nsCOMPtr, + } + pub use self :: super :: super :: super :: root :: mozilla :: net :: ReferrerPolicy as Loader_ReferrerPolicy; + pub type Loader_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Loader_cycleCollection { + pub _base: root::nsCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_Loader_cycleCollection() { + assert_eq!( + ::std::mem::size_of::<Loader_cycleCollection>(), + 16usize, + concat!("Size of: ", stringify!(Loader_cycleCollection)) + ); + assert_eq!( + ::std::mem::align_of::<Loader_cycleCollection>(), + 8usize, + concat!("Alignment of ", stringify!(Loader_cycleCollection)) + ); + } + impl Clone for Loader_cycleCollection { + fn clone(&self) -> Self { + *self + } + } + pub type Loader_LoadDataArray = + root::nsTArray<root::RefPtr<root::mozilla::css::SheetLoadData>>; + #[repr(C)] + #[derive(Debug)] + pub struct Loader_Sheets { + pub mCompleteSheets: [u64; 4usize], + pub mLoadingDatas: [u64; 4usize], + pub mPendingDatas: [u64; 4usize], + } + #[test] + fn bindgen_test_layout_Loader_Sheets() { + assert_eq!( + ::std::mem::size_of::<Loader_Sheets>(), + 96usize, + concat!("Size of: ", stringify!(Loader_Sheets)) + ); + assert_eq!( + ::std::mem::align_of::<Loader_Sheets>(), + 8usize, + concat!("Alignment of ", stringify!(Loader_Sheets)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader_Sheets>())).mCompleteSheets as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Loader_Sheets), + "::", + stringify!(mCompleteSheets) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader_Sheets>())).mLoadingDatas as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(Loader_Sheets), + "::", + stringify!(mLoadingDatas) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader_Sheets>())).mPendingDatas as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(Loader_Sheets), + "::", + stringify!(mPendingDatas) + ) + ); + } + extern "C" { + #[link_name = "\u{1}_ZN7mozilla3css6Loader21_cycleCollectorGlobalE"] + pub static mut Loader__cycleCollectorGlobal: + root::mozilla::css::Loader_cycleCollection; + } + #[test] + fn bindgen_test_layout_Loader() { + assert_eq!( + ::std::mem::size_of::<Loader>(), + 96usize, + concat!("Size of: ", stringify!(Loader)) + ); + assert_eq!( + ::std::mem::align_of::<Loader>(), + 8usize, + concat!("Alignment of ", stringify!(Loader)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mRefCnt as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mRefCnt) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mSheets as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mSheets) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader>())).mPostedEvents as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mPostedEvents) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mObservers as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mObservers) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mDocument as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mDocument) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mDocGroup as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mDocGroup) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader>())).mDatasToNotifyOn as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mDatasToNotifyOn) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mCompatMode as *const _ as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mCompatMode) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader>())).mPreferredSheet as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mPreferredSheet) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<Loader>())).mStyleBackendType as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mStyleBackendType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mEnabled as *const _ as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mEnabled) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<Loader>())).mReporter as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(Loader), + "::", + stringify!(mReporter) + ) + ); + } + #[repr(C)] + pub struct SheetLoadData { + pub _base: root::nsIRunnable, + pub _base_1: root::nsIUnicharStreamLoaderObserver, + pub _base_2: root::nsIThreadObserver, + pub mRefCnt: root::nsAutoRefCnt, + pub mLoader: root::RefPtr<root::mozilla::css::Loader>, + pub mTitle: ::nsstring::nsStringRepr, + pub mEncoding: *const root::mozilla::Encoding, + pub mURI: root::nsCOMPtr, + pub mLineNumber: u32, + pub mSheet: root::RefPtr<root::mozilla::StyleSheet>, + pub mNext: *mut root::mozilla::css::SheetLoadData, + pub mParentData: root::RefPtr<root::mozilla::css::SheetLoadData>, + pub mPendingChildren: u32, + pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 2usize], u8>, + pub mOwningElement: root::nsCOMPtr, + pub mObserver: root::nsCOMPtr, + pub mLoaderPrincipal: root::nsCOMPtr, + pub mRequestingNode: root::nsCOMPtr, + pub mPreloadEncoding: *const root::mozilla::Encoding, + } + pub type SheetLoadData_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_SheetLoadData() { + assert_eq!( + ::std::mem::size_of::<SheetLoadData>(), + 152usize, + concat!("Size of: ", stringify!(SheetLoadData)) + ); + assert_eq!( + ::std::mem::align_of::<SheetLoadData>(), + 8usize, + concat!("Alignment of ", stringify!(SheetLoadData)) + ); + } + impl SheetLoadData { + #[inline] + pub fn mSyncLoad(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_mSyncLoad(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsNonDocumentSheet(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsNonDocumentSheet(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsLoading(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsLoading(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsBeingParsed(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsBeingParsed(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsCancelled(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsCancelled(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn mMustNotify(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } + } + #[inline] + pub fn set_mMustNotify(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn mWasAlternate(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } + } + #[inline] + pub fn set_mWasAlternate(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn mUseSystemPrincipal(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } + } + #[inline] + pub fn set_mUseSystemPrincipal(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn mSheetAlreadyComplete(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } + } + #[inline] + pub fn set_mSheetAlreadyComplete(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsCrossOriginNoCORS(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsCrossOriginNoCORS(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn mBlockResourceTiming(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u8) } + } + #[inline] + pub fn set_mBlockResourceTiming(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn mLoadFailed(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u8) } + } + #[inline] + pub fn set_mLoadFailed(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + mSyncLoad: bool, + mIsNonDocumentSheet: bool, + mIsLoading: bool, + mIsBeingParsed: bool, + mIsCancelled: bool, + mMustNotify: bool, + mWasAlternate: bool, + mUseSystemPrincipal: bool, + mSheetAlreadyComplete: bool, + mIsCrossOriginNoCORS: bool, + mBlockResourceTiming: bool, + mLoadFailed: bool, + ) -> root::__BindgenBitfieldUnit<[u8; 2usize], u8> { + let mut __bindgen_bitfield_unit : root :: __BindgenBitfieldUnit < [ u8 ; 2usize ] , u8 > = Default :: default ( ) ; + __bindgen_bitfield_unit.set(0usize, 1u8, { + let mSyncLoad: u8 = unsafe { ::std::mem::transmute(mSyncLoad) }; + mSyncLoad as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let mIsNonDocumentSheet: u8 = + unsafe { ::std::mem::transmute(mIsNonDocumentSheet) }; + mIsNonDocumentSheet as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let mIsLoading: u8 = unsafe { ::std::mem::transmute(mIsLoading) }; + mIsLoading as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let mIsBeingParsed: u8 = unsafe { ::std::mem::transmute(mIsBeingParsed) }; + mIsBeingParsed as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let mIsCancelled: u8 = unsafe { ::std::mem::transmute(mIsCancelled) }; + mIsCancelled as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let mMustNotify: u8 = unsafe { ::std::mem::transmute(mMustNotify) }; + mMustNotify as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let mWasAlternate: u8 = unsafe { ::std::mem::transmute(mWasAlternate) }; + mWasAlternate as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let mUseSystemPrincipal: u8 = + unsafe { ::std::mem::transmute(mUseSystemPrincipal) }; + mUseSystemPrincipal as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mSheetAlreadyComplete: u8 = + unsafe { ::std::mem::transmute(mSheetAlreadyComplete) }; + mSheetAlreadyComplete as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let mIsCrossOriginNoCORS: u8 = + unsafe { ::std::mem::transmute(mIsCrossOriginNoCORS) }; + mIsCrossOriginNoCORS as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let mBlockResourceTiming: u8 = + unsafe { ::std::mem::transmute(mBlockResourceTiming) }; + mBlockResourceTiming as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let mLoadFailed: u8 = unsafe { ::std::mem::transmute(mLoadFailed) }; + mLoadFailed as u64 + }); + __bindgen_bitfield_unit + } + } + #[repr(C)] + #[derive(Debug)] + pub struct Rule { + pub _base: root::nsISupports, + pub _base_1: root::nsWrapperCache, + pub mRefCnt: root::nsCycleCollectingAutoRefCnt, + pub mSheet: *mut root::mozilla::StyleSheet, + pub mParentRule: *mut root::mozilla::css::GroupRule, + pub mLineNumber: u32, + pub mColumnNumber: u32, + } + pub type Rule_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Rule_cycleCollection { + pub _base: root::nsXPCOMCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_Rule_cycleCollection() { + assert_eq!( + ::std::mem::size_of::<Rule_cycleCollection>(), + 16usize, + concat!("Size of: ", stringify!(Rule_cycleCollection)) + ); + assert_eq!( + ::std::mem::align_of::<Rule_cycleCollection>(), + 8usize, + concat!("Alignment of ", stringify!(Rule_cycleCollection)) + ); + } + impl Clone for Rule_cycleCollection { + fn clone(&self) -> Self { + *self + } + } + pub const Rule_UNKNOWN_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 0; + pub const Rule_CHARSET_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 1; + pub const Rule_IMPORT_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 2; + pub const Rule_NAMESPACE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 3; + pub const Rule_STYLE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 4; + pub const Rule_MEDIA_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 5; + pub const Rule_FONT_FACE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 6; + pub const Rule_PAGE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 7; + pub const Rule_KEYFRAME_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 8; + pub const Rule_KEYFRAMES_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 9; + pub const Rule_DOCUMENT_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 10; + pub const Rule_SUPPORTS_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 11; + pub const Rule_FONT_FEATURE_VALUES_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 12; + pub const Rule_COUNTER_STYLE_RULE: root::mozilla::css::Rule__bindgen_ty_1 = 13; + pub type Rule__bindgen_ty_1 = u32; + extern "C" { + #[link_name = "\u{1}_ZN7mozilla3css4Rule21_cycleCollectorGlobalE"] + pub static mut Rule__cycleCollectorGlobal: root::mozilla::css::Rule_cycleCollection; + } + #[test] + fn bindgen_test_layout_Rule() { + assert_eq!( + ::std::mem::size_of::<Rule>(), + 64usize, + concat!("Size of: ", stringify!(Rule)) + ); + assert_eq!( + ::std::mem::align_of::<Rule>(), + 8usize, + concat!("Alignment of ", stringify!(Rule)) + ); + } + #[repr(C)] + pub struct ErrorReporter { + pub mError: root::nsAutoString, + pub mErrorLine: ::nsstring::nsStringRepr, + pub mFileName: ::nsstring::nsStringRepr, + pub mScanner: *const root::nsCSSScanner, + pub mSheet: *const root::mozilla::StyleSheet, + pub mLoader: *const root::mozilla::css::Loader, + pub mURI: *mut root::nsIURI, + pub mInnerWindowID: u64, + pub mErrorLineNumber: u32, + pub mPrevErrorLineNumber: u32, + pub mErrorColNumber: u32, + } + #[test] + fn bindgen_test_layout_ErrorReporter() { + assert_eq!( + ::std::mem::size_of::<ErrorReporter>(), + 240usize, + concat!("Size of: ", stringify!(ErrorReporter)) + ); + assert_eq!( + ::std::mem::align_of::<ErrorReporter>(), + 8usize, + concat!("Alignment of ", stringify!(ErrorReporter)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mError as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mError) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mErrorLine as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mErrorLine) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mFileName as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mFileName) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mScanner as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mScanner) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mSheet as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mSheet) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mLoader as *const _ as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mLoader) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<ErrorReporter>())).mURI as *const _ as usize }, + 208usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mURI) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mInnerWindowID as *const _ + as usize + }, + 216usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mInnerWindowID) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mErrorLineNumber as *const _ + as usize + }, + 224usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mErrorLineNumber) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mPrevErrorLineNumber as *const _ + as usize + }, + 228usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mPrevErrorLineNumber) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ErrorReporter>())).mErrorColNumber as *const _ + as usize + }, + 232usize, + concat!( + "Offset of field: ", + stringify!(ErrorReporter), + "::", + stringify!(mErrorColNumber) + ) + ); + } + #[repr(i32)] + /// Enum defining the type of URL matching function for a @-moz-document rule + /// condition. + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum URLMatchingFunction { + eURL = 0, + eURLPrefix = 1, + eDomain = 2, + eRegExp = 3, + } + } pub mod profiler { #[allow(unused_imports)] use self::super::super::super::root; @@ -6710,12 +6939,6 @@ pub mod root { } } } - #[repr(C)] - #[derive(Debug)] - pub struct OwningNonNull<T> { - pub mPtr: root::RefPtr<T>, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, - } pub mod net { #[allow(unused_imports)] use self::super::super::super::root; @@ -7015,6 +7238,16 @@ pub mod root { *self } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct EventListenerManager { + _unused: [u8; 0], + } + impl Clone for EventListenerManager { + fn clone(&self) -> Self { + *self + } + } pub mod widget { #[allow(unused_imports)] use self::super::super::super::root; @@ -7113,48 +7346,43 @@ pub mod root { } } } - /// This class is designed to cause crashes when various kinds of memory - /// corruption are observed. For instance, let's say we have a class C where we - /// suspect out-of-bounds writes to some members. We can insert a member of type - /// Poison near the members we suspect are being corrupted by out-of-bounds - /// writes. Or perhaps we have a class K we suspect is subject to use-after-free - /// violations, in which case it doesn't particularly matter where in the class - /// we add the member of type Poison. - /// - /// In either case, we then insert calls to Check() throughout the code. Doing - /// so enables us to narrow down the location where the corruption is occurring. - /// A pleasant side-effect of these additional Check() calls is that crash - /// signatures may become more regular, as crashes will ideally occur - /// consolidated at the point of a Check(), rather than scattered about at - /// various uses of the corrupted memory. + pub mod layout { + #[allow(unused_imports)] + use self::super::super::super::root; + pub const FrameChildListID_kPrincipalList: root::mozilla::layout::FrameChildListID = 1; + pub const FrameChildListID_kPopupList: root::mozilla::layout::FrameChildListID = 2; + pub const FrameChildListID_kCaptionList: root::mozilla::layout::FrameChildListID = 4; + pub const FrameChildListID_kColGroupList: root::mozilla::layout::FrameChildListID = 8; + pub const FrameChildListID_kSelectPopupList: root::mozilla::layout::FrameChildListID = + 16; + pub const FrameChildListID_kAbsoluteList: root::mozilla::layout::FrameChildListID = 32; + pub const FrameChildListID_kFixedList: root::mozilla::layout::FrameChildListID = 64; + pub const FrameChildListID_kOverflowList: root::mozilla::layout::FrameChildListID = 128; + pub const FrameChildListID_kOverflowContainersList: + root::mozilla::layout::FrameChildListID = 256; + pub const FrameChildListID_kExcessOverflowContainersList: + root::mozilla::layout::FrameChildListID = 512; + pub const FrameChildListID_kOverflowOutOfFlowList: + root::mozilla::layout::FrameChildListID = 1024; + pub const FrameChildListID_kFloatList: root::mozilla::layout::FrameChildListID = 2048; + pub const FrameChildListID_kBulletList: root::mozilla::layout::FrameChildListID = 4096; + pub const FrameChildListID_kPushedFloatsList: root::mozilla::layout::FrameChildListID = + 8192; + pub const FrameChildListID_kBackdropList: root::mozilla::layout::FrameChildListID = + 16384; + pub const FrameChildListID_kNoReflowPrincipalList: + root::mozilla::layout::FrameChildListID = 32768; + pub type FrameChildListID = u32; + } #[repr(C)] - #[derive(Debug)] - pub struct CorruptionCanary { - pub mValue: usize, + #[derive(Debug, Copy)] + pub struct UndisplayedNode { + _unused: [u8; 0], } - pub const CorruptionCanary_kCanarySet: usize = 252382987; - #[test] - fn bindgen_test_layout_CorruptionCanary() { - assert_eq!( - ::std::mem::size_of::<CorruptionCanary>(), - 8usize, - concat!("Size of: ", stringify!(CorruptionCanary)) - ); - assert_eq!( - ::std::mem::align_of::<CorruptionCanary>(), - 8usize, - concat!("Alignment of ", stringify!(CorruptionCanary)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<CorruptionCanary>())).mValue as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CorruptionCanary), - "::", - stringify!(mValue) - ) - ); + impl Clone for UndisplayedNode { + fn clone(&self) -> Self { + *self + } } #[repr(C)] #[derive(Debug, Copy)] @@ -7176,7 +7404,33 @@ pub mod root { pub header: root::mozilla::ArenaAllocator_ArenaHeader, pub next: *mut root::mozilla::ArenaAllocator_ArenaChunk, } + pub type CSSSize = [u32; 2usize]; pub type LayoutDeviceIntPoint = [u32; 2usize]; + pub type CSSToLayoutDeviceScale = u32; + pub type LayoutDeviceToScreenScale = u32; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct CSSPixel { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_CSSPixel() { + assert_eq!( + ::std::mem::size_of::<CSSPixel>(), + 1usize, + concat!("Size of: ", stringify!(CSSPixel)) + ); + assert_eq!( + ::std::mem::align_of::<CSSPixel>(), + 1usize, + concat!("Alignment of ", stringify!(CSSPixel)) + ); + } + impl Clone for CSSPixel { + fn clone(&self) -> Self { + *self + } + } #[repr(C)] #[derive(Debug, Copy)] pub struct LayoutDevicePixel { @@ -7200,6 +7454,29 @@ pub mod root { *self } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct ScreenPixel { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_ScreenPixel() { + assert_eq!( + ::std::mem::size_of::<ScreenPixel>(), + 1usize, + concat!("Size of: ", stringify!(ScreenPixel)) + ); + assert_eq!( + ::std::mem::align_of::<ScreenPixel>(), + 1usize, + concat!("Alignment of ", stringify!(ScreenPixel)) + ); + } + impl Clone for ScreenPixel { + fn clone(&self) -> Self { + *self + } + } pub mod a11y { #[allow(unused_imports)] use self::super::super::super::root; @@ -7314,50 +7591,73 @@ pub mod root { root::mozilla::UseCounter = 52; pub const UseCounter_eUseCounter_custom_JS_asmjs: root::mozilla::UseCounter = 53; pub const UseCounter_eUseCounter_custom_JS_wasm: root::mozilla::UseCounter = 54; - pub const UseCounter_eUseCounter_EnablePrivilege: root::mozilla::UseCounter = 55; - pub const UseCounter_eUseCounter_DOMExceptionCode: root::mozilla::UseCounter = 56; - pub const UseCounter_eUseCounter_MutationEvent: root::mozilla::UseCounter = 57; - pub const UseCounter_eUseCounter_Components: root::mozilla::UseCounter = 58; - pub const UseCounter_eUseCounter_PrefixedVisibilityAPI: root::mozilla::UseCounter = 59; - pub const UseCounter_eUseCounter_NodeIteratorDetach: root::mozilla::UseCounter = 60; - pub const UseCounter_eUseCounter_LenientThis: root::mozilla::UseCounter = 61; - pub const UseCounter_eUseCounter_GetSetUserData: root::mozilla::UseCounter = 62; - pub const UseCounter_eUseCounter_MozGetAsFile: root::mozilla::UseCounter = 63; - pub const UseCounter_eUseCounter_UseOfCaptureEvents: root::mozilla::UseCounter = 64; - pub const UseCounter_eUseCounter_UseOfReleaseEvents: root::mozilla::UseCounter = 65; - pub const UseCounter_eUseCounter_UseOfDOM3LoadMethod: root::mozilla::UseCounter = 66; - pub const UseCounter_eUseCounter_ChromeUseOfDOM3LoadMethod: root::mozilla::UseCounter = 67; - pub const UseCounter_eUseCounter_ShowModalDialog: root::mozilla::UseCounter = 68; - pub const UseCounter_eUseCounter_SyncXMLHttpRequest: root::mozilla::UseCounter = 69; - pub const UseCounter_eUseCounter_Window_Cc_ontrollers: root::mozilla::UseCounter = 70; - pub const UseCounter_eUseCounter_ImportXULIntoContent: root::mozilla::UseCounter = 71; - pub const UseCounter_eUseCounter_PannerNodeDoppler: root::mozilla::UseCounter = 72; - pub const UseCounter_eUseCounter_NavigatorGetUserMedia: root::mozilla::UseCounter = 73; - pub const UseCounter_eUseCounter_WebrtcDeprecatedPrefix: root::mozilla::UseCounter = 74; + pub const UseCounter_eUseCounter_console_assert: root::mozilla::UseCounter = 55; + pub const UseCounter_eUseCounter_console_clear: root::mozilla::UseCounter = 56; + pub const UseCounter_eUseCounter_console_count: root::mozilla::UseCounter = 57; + pub const UseCounter_eUseCounter_console_debug: root::mozilla::UseCounter = 58; + pub const UseCounter_eUseCounter_console_error: root::mozilla::UseCounter = 59; + pub const UseCounter_eUseCounter_console_info: root::mozilla::UseCounter = 60; + pub const UseCounter_eUseCounter_console_log: root::mozilla::UseCounter = 61; + pub const UseCounter_eUseCounter_console_table: root::mozilla::UseCounter = 62; + pub const UseCounter_eUseCounter_console_trace: root::mozilla::UseCounter = 63; + pub const UseCounter_eUseCounter_console_warn: root::mozilla::UseCounter = 64; + pub const UseCounter_eUseCounter_console_dir: root::mozilla::UseCounter = 65; + pub const UseCounter_eUseCounter_console_dirxml: root::mozilla::UseCounter = 66; + pub const UseCounter_eUseCounter_console_group: root::mozilla::UseCounter = 67; + pub const UseCounter_eUseCounter_console_groupCollapsed: root::mozilla::UseCounter = 68; + pub const UseCounter_eUseCounter_console_groupEnd: root::mozilla::UseCounter = 69; + pub const UseCounter_eUseCounter_console_time: root::mozilla::UseCounter = 70; + pub const UseCounter_eUseCounter_console_timeEnd: root::mozilla::UseCounter = 71; + pub const UseCounter_eUseCounter_console_exception: root::mozilla::UseCounter = 72; + pub const UseCounter_eUseCounter_console_timeStamp: root::mozilla::UseCounter = 73; + pub const UseCounter_eUseCounter_console_profile: root::mozilla::UseCounter = 74; + pub const UseCounter_eUseCounter_console_profileEnd: root::mozilla::UseCounter = 75; + pub const UseCounter_eUseCounter_EnablePrivilege: root::mozilla::UseCounter = 76; + pub const UseCounter_eUseCounter_DOMExceptionCode: root::mozilla::UseCounter = 77; + pub const UseCounter_eUseCounter_MutationEvent: root::mozilla::UseCounter = 78; + pub const UseCounter_eUseCounter_Components: root::mozilla::UseCounter = 79; + pub const UseCounter_eUseCounter_PrefixedVisibilityAPI: root::mozilla::UseCounter = 80; + pub const UseCounter_eUseCounter_NodeIteratorDetach: root::mozilla::UseCounter = 81; + pub const UseCounter_eUseCounter_LenientThis: root::mozilla::UseCounter = 82; + pub const UseCounter_eUseCounter_MozGetAsFile: root::mozilla::UseCounter = 83; + pub const UseCounter_eUseCounter_UseOfCaptureEvents: root::mozilla::UseCounter = 84; + pub const UseCounter_eUseCounter_UseOfReleaseEvents: root::mozilla::UseCounter = 85; + pub const UseCounter_eUseCounter_UseOfDOM3LoadMethod: root::mozilla::UseCounter = 86; + pub const UseCounter_eUseCounter_ChromeUseOfDOM3LoadMethod: root::mozilla::UseCounter = 87; + pub const UseCounter_eUseCounter_ShowModalDialog: root::mozilla::UseCounter = 88; + pub const UseCounter_eUseCounter_SyncXMLHttpRequest: root::mozilla::UseCounter = 89; + pub const UseCounter_eUseCounter_Window_Cc_ontrollers: root::mozilla::UseCounter = 90; + pub const UseCounter_eUseCounter_ImportXULIntoContent: root::mozilla::UseCounter = 91; + pub const UseCounter_eUseCounter_PannerNodeDoppler: root::mozilla::UseCounter = 92; + pub const UseCounter_eUseCounter_NavigatorGetUserMedia: root::mozilla::UseCounter = 93; + pub const UseCounter_eUseCounter_WebrtcDeprecatedPrefix: root::mozilla::UseCounter = 94; pub const UseCounter_eUseCounter_RTCPeerConnectionGetStreams: root::mozilla::UseCounter = - 75; - pub const UseCounter_eUseCounter_AppCache: root::mozilla::UseCounter = 76; - pub const UseCounter_eUseCounter_AppCacheInsecure: root::mozilla::UseCounter = 77; + 95; + pub const UseCounter_eUseCounter_AppCache: root::mozilla::UseCounter = 96; + pub const UseCounter_eUseCounter_AppCacheInsecure: root::mozilla::UseCounter = 97; pub const UseCounter_eUseCounter_PrefixedImageSmoothingEnabled: root::mozilla::UseCounter = - 78; - pub const UseCounter_eUseCounter_PrefixedFullscreenAPI: root::mozilla::UseCounter = 79; - pub const UseCounter_eUseCounter_LenientSetter: root::mozilla::UseCounter = 80; - pub const UseCounter_eUseCounter_FileLastModifiedDate: root::mozilla::UseCounter = 81; + 98; + pub const UseCounter_eUseCounter_PrefixedFullscreenAPI: root::mozilla::UseCounter = 99; + pub const UseCounter_eUseCounter_LenientSetter: root::mozilla::UseCounter = 100; + pub const UseCounter_eUseCounter_FileLastModifiedDate: root::mozilla::UseCounter = 101; pub const UseCounter_eUseCounter_ImageBitmapRenderingContext_TransferImageBitmap: - root::mozilla::UseCounter = 82; + root::mozilla::UseCounter = 102; pub const UseCounter_eUseCounter_URLCreateObjectURL_MediaStream: root::mozilla::UseCounter = - 83; - pub const UseCounter_eUseCounter_XMLBaseAttribute: root::mozilla::UseCounter = 84; - pub const UseCounter_eUseCounter_WindowContentUntrusted: root::mozilla::UseCounter = 85; + 103; + pub const UseCounter_eUseCounter_XMLBaseAttribute: root::mozilla::UseCounter = 104; + pub const UseCounter_eUseCounter_WindowContentUntrusted: root::mozilla::UseCounter = 105; pub const UseCounter_eUseCounter_RegisterProtocolHandlerInsecure: - root::mozilla::UseCounter = 86; + root::mozilla::UseCounter = 106; pub const UseCounter_eUseCounter_MixedDisplayObjectSubrequest: root::mozilla::UseCounter = - 87; - pub const UseCounter_eUseCounter_MotionEvent: root::mozilla::UseCounter = 88; - pub const UseCounter_eUseCounter_OrientationEvent: root::mozilla::UseCounter = 89; - pub const UseCounter_eUseCounter_ProximityEvent: root::mozilla::UseCounter = 90; - pub const UseCounter_eUseCounter_AmbientLightEvent: root::mozilla::UseCounter = 91; - pub const UseCounter_eUseCounter_Count: root::mozilla::UseCounter = 92; + 107; + pub const UseCounter_eUseCounter_MotionEvent: root::mozilla::UseCounter = 108; + pub const UseCounter_eUseCounter_OrientationEvent: root::mozilla::UseCounter = 109; + pub const UseCounter_eUseCounter_ProximityEvent: root::mozilla::UseCounter = 110; + pub const UseCounter_eUseCounter_AmbientLightEvent: root::mozilla::UseCounter = 111; + pub const UseCounter_eUseCounter_IDBOpenDBOptions_StorageType: root::mozilla::UseCounter = + 112; + pub const UseCounter_eUseCounter_GetPropertyCSSValue: root::mozilla::UseCounter = 113; + pub const UseCounter_eUseCounter_Count: root::mozilla::UseCounter = 114; pub type UseCounter = i16; pub const LogLevel_Disabled: root::mozilla::LogLevel = 0; pub const LogLevel_Error: root::mozilla::LogLevel = 1; @@ -7593,6 +7893,16 @@ pub mod root { ); } #[repr(C)] + #[derive(Debug, Copy)] + pub struct PendingAnimationTracker { + _unused: [u8; 0], + } + impl Clone for PendingAnimationTracker { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] #[derive(Debug)] pub struct ScrollbarStyles { pub mHorizontal: u8, @@ -9341,316 +9651,17 @@ pub mod root { pub const SERVO_PREF_ENABLED__webkit_mask_position_y: bool = true; pub const SERVO_PREF_ENABLED__webkit_mask_repeat: bool = true; pub const SERVO_PREF_ENABLED__webkit_mask_size: bool = true; - /// Utility class to handle animated style values - #[repr(C)] - #[derive(Debug, Copy)] - pub struct StyleAnimationValue { - pub _bindgen_opaque_blob: [u64; 2usize], - } - pub const StyleAnimationValue_Unit_eUnit_Null: root::mozilla::StyleAnimationValue_Unit = 0; - pub const StyleAnimationValue_Unit_eUnit_Normal: root::mozilla::StyleAnimationValue_Unit = - 1; - pub const StyleAnimationValue_Unit_eUnit_Auto: root::mozilla::StyleAnimationValue_Unit = 2; - pub const StyleAnimationValue_Unit_eUnit_None: root::mozilla::StyleAnimationValue_Unit = 3; - pub const StyleAnimationValue_Unit_eUnit_Enumerated: - root::mozilla::StyleAnimationValue_Unit = 4; - pub const StyleAnimationValue_Unit_eUnit_Visibility: - root::mozilla::StyleAnimationValue_Unit = 5; - pub const StyleAnimationValue_Unit_eUnit_Integer: root::mozilla::StyleAnimationValue_Unit = - 6; - pub const StyleAnimationValue_Unit_eUnit_Coord: root::mozilla::StyleAnimationValue_Unit = 7; - pub const StyleAnimationValue_Unit_eUnit_Percent: root::mozilla::StyleAnimationValue_Unit = - 8; - pub const StyleAnimationValue_Unit_eUnit_Float: root::mozilla::StyleAnimationValue_Unit = 9; - pub const StyleAnimationValue_Unit_eUnit_Color: root::mozilla::StyleAnimationValue_Unit = - 10; - pub const StyleAnimationValue_Unit_eUnit_CurrentColor: - root::mozilla::StyleAnimationValue_Unit = 11; - pub const StyleAnimationValue_Unit_eUnit_ComplexColor: - root::mozilla::StyleAnimationValue_Unit = 12; - pub const StyleAnimationValue_Unit_eUnit_Calc: root::mozilla::StyleAnimationValue_Unit = 13; - pub const StyleAnimationValue_Unit_eUnit_ObjectPosition: - root::mozilla::StyleAnimationValue_Unit = 14; - pub const StyleAnimationValue_Unit_eUnit_URL: root::mozilla::StyleAnimationValue_Unit = 15; - pub const StyleAnimationValue_Unit_eUnit_DiscreteCSSValue: - root::mozilla::StyleAnimationValue_Unit = 16; - pub const StyleAnimationValue_Unit_eUnit_CSSValuePair: - root::mozilla::StyleAnimationValue_Unit = 17; - pub const StyleAnimationValue_Unit_eUnit_CSSValueTriplet: - root::mozilla::StyleAnimationValue_Unit = 18; - pub const StyleAnimationValue_Unit_eUnit_CSSRect: root::mozilla::StyleAnimationValue_Unit = - 19; - pub const StyleAnimationValue_Unit_eUnit_Dasharray: - root::mozilla::StyleAnimationValue_Unit = 20; - pub const StyleAnimationValue_Unit_eUnit_Shadow: root::mozilla::StyleAnimationValue_Unit = - 21; - pub const StyleAnimationValue_Unit_eUnit_Shape: root::mozilla::StyleAnimationValue_Unit = - 22; - pub const StyleAnimationValue_Unit_eUnit_Filter: root::mozilla::StyleAnimationValue_Unit = - 23; - pub const StyleAnimationValue_Unit_eUnit_Transform: - root::mozilla::StyleAnimationValue_Unit = 24; - pub const StyleAnimationValue_Unit_eUnit_BackgroundPositionCoord: - root::mozilla::StyleAnimationValue_Unit = 25; - pub const StyleAnimationValue_Unit_eUnit_CSSValuePairList: - root::mozilla::StyleAnimationValue_Unit = 26; - pub const StyleAnimationValue_Unit_eUnit_UnparsedString: - root::mozilla::StyleAnimationValue_Unit = 27; - /// The types and values for the values that we extract and animate. - pub type StyleAnimationValue_Unit = u32; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct StyleAnimationValue__bindgen_ty_1 { - pub mInt: root::__BindgenUnionField<i32>, - pub mCoord: root::__BindgenUnionField<root::nscoord>, - pub mFloat: root::__BindgenUnionField<f32>, - pub mCSSValue: root::__BindgenUnionField<*mut root::nsCSSValue>, - pub mCSSValuePair: root::__BindgenUnionField<*mut root::nsCSSValuePair>, - pub mCSSValueTriplet: root::__BindgenUnionField<*mut root::nsCSSValueTriplet>, - pub mCSSRect: root::__BindgenUnionField<*mut root::nsCSSRect>, - pub mCSSValueArray: root::__BindgenUnionField<*mut root::nsCSSValue_Array>, - pub mCSSValueList: root::__BindgenUnionField<*mut root::nsCSSValueList>, - pub mCSSValueSharedList: root::__BindgenUnionField<*mut root::nsCSSValueSharedList>, - pub mCSSValuePairList: root::__BindgenUnionField<*mut root::nsCSSValuePairList>, - pub mString: root::__BindgenUnionField<*mut root::nsStringBuffer>, - pub mComplexColor: - root::__BindgenUnionField<*mut root::mozilla::css::ComplexColorValue>, - pub bindgen_union_field: u64, - } - #[test] - fn bindgen_test_layout_StyleAnimationValue__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<StyleAnimationValue__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(StyleAnimationValue__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<StyleAnimationValue__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(StyleAnimationValue__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mInt as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mInt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCoord as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCoord) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mFloat as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mFloat) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValue - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValue) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValuePair - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValuePair) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValueTriplet - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValueTriplet) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSRect - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSRect) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValueArray - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValueArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValueList - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValueList) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())) - .mCSSValueSharedList as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValueSharedList) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mCSSValuePairList - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mCSSValuePairList) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mString - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mString) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<StyleAnimationValue__bindgen_ty_1>())).mComplexColor - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StyleAnimationValue__bindgen_ty_1), - "::", - stringify!(mComplexColor) - ) - ); - } - impl Clone for StyleAnimationValue__bindgen_ty_1 { - fn clone(&self) -> Self { - *self - } - } - pub const StyleAnimationValue_IntegerConstructorType_IntegerConstructor: - root::mozilla::StyleAnimationValue_IntegerConstructorType = 0; - pub type StyleAnimationValue_IntegerConstructorType = u32; - pub const StyleAnimationValue_CoordConstructorType_CoordConstructor: - root::mozilla::StyleAnimationValue_CoordConstructorType = 0; - pub type StyleAnimationValue_CoordConstructorType = u32; - pub const StyleAnimationValue_PercentConstructorType_PercentConstructor: - root::mozilla::StyleAnimationValue_PercentConstructorType = 0; - pub type StyleAnimationValue_PercentConstructorType = u32; - pub const StyleAnimationValue_FloatConstructorType_FloatConstructor: - root::mozilla::StyleAnimationValue_FloatConstructorType = 0; - pub type StyleAnimationValue_FloatConstructorType = u32; - pub const StyleAnimationValue_ColorConstructorType_ColorConstructor: - root::mozilla::StyleAnimationValue_ColorConstructorType = 0; - pub type StyleAnimationValue_ColorConstructorType = u32; - #[test] - fn bindgen_test_layout_StyleAnimationValue() { - assert_eq!( - ::std::mem::size_of::<StyleAnimationValue>(), - 16usize, - concat!("Size of: ", stringify!(StyleAnimationValue)) - ); - assert_eq!( - ::std::mem::align_of::<StyleAnimationValue>(), - 8usize, - concat!("Alignment of ", stringify!(StyleAnimationValue)) - ); - } - impl Clone for StyleAnimationValue { - fn clone(&self) -> Self { - *self - } - } #[repr(C)] #[derive(Debug)] pub struct AnimationValue { - pub mGecko: root::mozilla::StyleAnimationValue, + pub mGecko: usize, pub mServo: root::RefPtr<root::RawServoAnimationValue>, } #[test] fn bindgen_test_layout_AnimationValue() { assert_eq!( ::std::mem::size_of::<AnimationValue>(), - 24usize, + 16usize, concat!("Size of: ", stringify!(AnimationValue)) ); assert_eq!( @@ -9670,7 +9681,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<AnimationValue>())).mServo as *const _ as usize }, - 16usize, + 8usize, concat!( "Offset of field: ", stringify!(AnimationValue), @@ -9689,7 +9700,7 @@ pub mod root { fn bindgen_test_layout_PropertyStyleAnimationValuePair() { assert_eq!( ::std::mem::size_of::<PropertyStyleAnimationValuePair>(), - 32usize, + 24usize, concat!("Size of: ", stringify!(PropertyStyleAnimationValuePair)) ); assert_eq!( @@ -10850,7 +10861,7 @@ pub mod root { fn bindgen_test_layout_AnimationPropertySegment() { assert_eq!( ::std::mem::size_of::<AnimationPropertySegment>(), - 208usize, + 192usize, concat!("Size of: ", stringify!(AnimationPropertySegment)) ); assert_eq!( @@ -10901,7 +10912,7 @@ pub mod root { &(*(::std::ptr::null::<AnimationPropertySegment>())).mToValue as *const _ as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(AnimationPropertySegment), @@ -10914,7 +10925,7 @@ pub mod root { &(*(::std::ptr::null::<AnimationPropertySegment>())).mTimingFunction as *const _ as usize }, - 56usize, + 40usize, concat!( "Offset of field: ", stringify!(AnimationPropertySegment), @@ -10927,7 +10938,7 @@ pub mod root { &(*(::std::ptr::null::<AnimationPropertySegment>())).mFromComposite as *const _ as usize }, - 200usize, + 184usize, concat!( "Offset of field: ", stringify!(AnimationPropertySegment), @@ -10940,7 +10951,7 @@ pub mod root { &(*(::std::ptr::null::<AnimationPropertySegment>())).mToComposite as *const _ as usize }, - 201usize, + 185usize, concat!( "Offset of field: ", stringify!(AnimationPropertySegment), @@ -12006,6 +12017,10 @@ pub mod root { pub static mut StylePrefs_sMozDocumentEnabledInContent: bool; } extern "C" { + #[link_name = "\u{1}_ZN7mozilla10StylePrefs32sMozDocumentURLPrefixHackEnabledE"] + pub static mut StylePrefs_sMozDocumentURLPrefixHackEnabled: bool; + } + extern "C" { #[link_name = "\u{1}_ZN7mozilla10StylePrefs32sGridTemplateSubgridValueEnabledE"] pub static mut StylePrefs_sGridTemplateSubgridValueEnabled: bool; } @@ -12142,7 +12157,6 @@ pub mod root { pub mPresContext: *mut root::nsPresContext, pub mElementsToRestyle: [u64; 8usize], pub mIsInPreTraverse: bool, - pub mRuleProcessors: [u64; 2usize], } pub type EffectCompositor_HasThreadSafeRefCnt = root::mozilla::FalseType; #[repr(C)] @@ -12184,74 +12198,6 @@ pub mod root { pub const EffectCompositor_RestyleType_Layer: root::mozilla::EffectCompositor_RestyleType = 2; pub type EffectCompositor_RestyleType = i32; - #[repr(C)] - #[derive(Debug)] - pub struct EffectCompositor_AnimationStyleRuleProcessor { - pub _base: root::nsIStyleRuleProcessor, - pub mRefCnt: root::nsAutoRefCnt, - pub mCompositor: *mut root::mozilla::EffectCompositor, - pub mCascadeLevel: root::mozilla::EffectCompositor_CascadeLevel, - } - pub type EffectCompositor_AnimationStyleRuleProcessor_HasThreadSafeRefCnt = - root::mozilla::FalseType; - #[test] - fn bindgen_test_layout_EffectCompositor_AnimationStyleRuleProcessor() { - assert_eq!( - ::std::mem::size_of::<EffectCompositor_AnimationStyleRuleProcessor>(), - 32usize, - concat!( - "Size of: ", - stringify!(EffectCompositor_AnimationStyleRuleProcessor) - ) - ); - assert_eq!( - ::std::mem::align_of::<EffectCompositor_AnimationStyleRuleProcessor>(), - 8usize, - concat!( - "Alignment of ", - stringify!(EffectCompositor_AnimationStyleRuleProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<EffectCompositor_AnimationStyleRuleProcessor>())).mRefCnt - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(EffectCompositor_AnimationStyleRuleProcessor), - "::", - stringify!(mRefCnt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<EffectCompositor_AnimationStyleRuleProcessor>())) - .mCompositor as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(EffectCompositor_AnimationStyleRuleProcessor), - "::", - stringify!(mCompositor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<EffectCompositor_AnimationStyleRuleProcessor>())) - .mCascadeLevel as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(EffectCompositor_AnimationStyleRuleProcessor), - "::", - stringify!(mCascadeLevel) - ) - ); - } extern "C" { #[link_name = "\u{1}_ZN7mozilla16EffectCompositor21_cycleCollectorGlobalE"] pub static mut EffectCompositor__cycleCollectorGlobal: @@ -12262,7 +12208,7 @@ pub mod root { fn bindgen_test_layout_EffectCompositor() { assert_eq!( ::std::mem::size_of::<EffectCompositor>(), - 104usize, + 88usize, concat!("Size of: ", stringify!(EffectCompositor)) ); assert_eq!( @@ -12320,19 +12266,6 @@ pub mod root { stringify!(mIsInPreTraverse) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<EffectCompositor>())).mRuleProcessors as *const _ - as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(EffectCompositor), - "::", - stringify!(mRuleProcessors) - ) - ); } pub type CSSPseudoClassTypeBase = u8; #[repr(u8)] @@ -13158,60 +13091,97 @@ pub mod root { ) ); } + /// A ComputedStyle represents the computed style data for an element. The + /// computed style data are stored in a set of structs (see nsStyleStruct.h) that + /// are cached either on the style context or in the rule tree (see nsRuleNode.h + /// for a description of this caching and how the cached structs are shared). + /// + /// Since the data in |nsIStyleRule|s and |nsRuleNode|s are immutable (with a few + /// exceptions, like system color changes), the data in an ComputedStyle are also + /// immutable (with the additional exception of GetUniqueStyleData). When style + /// data change, ElementRestyler::Restyle creates a new style context. + /// + /// ComputedStyles are reference counted. References are generally held by: + /// 1. the |nsIFrame|s that are using the style context and + /// 2. any *child* style contexts (this might be the reverse of + /// expectation, but it makes sense in this case) + /// + /// FIXME(emilio): This comment is somewhat outdated now. #[repr(C)] - pub struct ServoStyleContext { - pub _base: root::nsStyleContext, + pub struct ComputedStyle { pub mPresContext: *mut root::nsPresContext, pub mSource: root::ServoComputedData, pub mCachedInheritingStyles: root::mozilla::CachedInheritingStyles, + pub mPseudoTag: root::RefPtr<root::nsAtom>, + pub mBits: u64, } #[test] - fn bindgen_test_layout_ServoStyleContext() { + fn bindgen_test_layout_ComputedStyle() { assert_eq!( - ::std::mem::size_of::<ServoStyleContext>(), + ::std::mem::size_of::<ComputedStyle>(), 248usize, - concat!("Size of: ", stringify!(ServoStyleContext)) + concat!("Size of: ", stringify!(ComputedStyle)) ); assert_eq!( - ::std::mem::align_of::<ServoStyleContext>(), + ::std::mem::align_of::<ComputedStyle>(), 8usize, - concat!("Alignment of ", stringify!(ServoStyleContext)) + concat!("Alignment of ", stringify!(ComputedStyle)) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<ServoStyleContext>())).mPresContext as *const _ as usize + &(*(::std::ptr::null::<ComputedStyle>())).mPresContext as *const _ as usize }, - 16usize, + 0usize, concat!( "Offset of field: ", - stringify!(ServoStyleContext), + stringify!(ComputedStyle), "::", stringify!(mPresContext) ) ); assert_eq!( + unsafe { &(*(::std::ptr::null::<ComputedStyle>())).mSource as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ComputedStyle), + "::", + stringify!(mSource) + ) + ); + assert_eq!( unsafe { - &(*(::std::ptr::null::<ServoStyleContext>())).mSource as *const _ as usize + &(*(::std::ptr::null::<ComputedStyle>())).mCachedInheritingStyles as *const _ + as usize }, - 24usize, + 224usize, concat!( "Offset of field: ", - stringify!(ServoStyleContext), + stringify!(ComputedStyle), "::", - stringify!(mSource) + stringify!(mCachedInheritingStyles) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<ServoStyleContext>())).mCachedInheritingStyles - as *const _ as usize + &(*(::std::ptr::null::<ComputedStyle>())).mPseudoTag as *const _ as usize }, + 232usize, + concat!( + "Offset of field: ", + stringify!(ComputedStyle), + "::", + stringify!(mPseudoTag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<ComputedStyle>())).mBits as *const _ as usize }, 240usize, concat!( "Offset of field: ", - stringify!(ServoStyleContext), + stringify!(ComputedStyle), "::", - stringify!(mCachedInheritingStyles) + stringify!(mBits) ) ); } @@ -13398,6 +13368,107 @@ pub mod root { ); } #[repr(C)] + #[derive(Debug, Copy)] + pub struct ServoTraversalStatistics { + pub mElementsTraversed: u32, + pub mElementsStyled: u32, + pub mElementsMatched: u32, + pub mStylesShared: u32, + pub mStylesReused: u32, + } + extern "C" { + #[link_name = "\u{1}_ZN7mozilla24ServoTraversalStatistics7sActiveE"] + pub static mut ServoTraversalStatistics_sActive: bool; + } + extern "C" { + #[link_name = "\u{1}_ZN7mozilla24ServoTraversalStatistics10sSingletonE"] + pub static mut ServoTraversalStatistics_sSingleton: + root::mozilla::ServoTraversalStatistics; + } + #[test] + fn bindgen_test_layout_ServoTraversalStatistics() { + assert_eq!( + ::std::mem::size_of::<ServoTraversalStatistics>(), + 20usize, + concat!("Size of: ", stringify!(ServoTraversalStatistics)) + ); + assert_eq!( + ::std::mem::align_of::<ServoTraversalStatistics>(), + 4usize, + concat!("Alignment of ", stringify!(ServoTraversalStatistics)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsTraversed + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsTraversed) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsStyled as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsStyled) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsMatched + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsMatched) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mStylesShared as *const _ + as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mStylesShared) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mStylesReused as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mStylesReused) + ) + ); + } + impl Clone for ServoTraversalStatistics { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] #[derive(Debug)] pub struct CSSFontFaceDescriptors { pub mFamily: root::nsCSSValue, @@ -14173,6 +14244,24 @@ pub mod root { *self } } + #[repr(C)] + #[derive(Debug)] + pub struct RefPtr<T> { + pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + } + pub type RefPtr_element_type<T> = T; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct RefPtr_Proxy { + pub _address: u8, + } + pub type RefPtr_Proxy_member_function = u8; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct RefPtr_ConstRemovingRefPtrTraits { + pub _address: u8, + } pub type nsAString = root::nsTSubstring<u16>; pub type nsAutoString = [u64; 19usize]; pub type nsACString = root::nsTSubstring<::std::os::raw::c_char>; @@ -14182,6 +14271,130 @@ pub mod root { pub struct nsCharTraits { pub _address: u8, } + pub type nscoord = i32; + pub type nscolor = u32; + #[repr(C)] + pub struct nsISupports__bindgen_vtable(::std::os::raw::c_void); + /// Basic component object model interface. Objects which implement + /// this interface support runtime interface discovery (QueryInterface) + /// and a reference counted memory model (AddRef/Release). This is + /// modelled after the win32 IUnknown API. + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsISupports { + pub vtable_: *const nsISupports__bindgen_vtable, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsISupports_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsISupports() { + assert_eq!( + ::std::mem::size_of::<nsISupports>(), + 8usize, + concat!("Size of: ", stringify!(nsISupports)) + ); + assert_eq!( + ::std::mem::align_of::<nsISupports>(), + 8usize, + concat!("Alignment of ", stringify!(nsISupports)) + ); + } + impl Clone for nsISupports { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PRThread { + _unused: [u8; 0], + } + impl Clone for PRThread { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsCycleCollectingAutoRefCnt { + pub mRefCntAndFlags: usize, + } + pub type nsCycleCollectingAutoRefCnt_Suspect = ::std::option::Option< + unsafe extern "C" fn( + aPtr: *mut ::std::os::raw::c_void, + aCp: *mut root::nsCycleCollectionParticipant, + aRefCnt: *mut root::nsCycleCollectingAutoRefCnt, + aShouldDelete: *mut bool, + ), + >; + #[test] + fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { + assert_eq!( + ::std::mem::size_of::<nsCycleCollectingAutoRefCnt>(), + 8usize, + concat!("Size of: ", stringify!(nsCycleCollectingAutoRefCnt)) + ); + assert_eq!( + ::std::mem::align_of::<nsCycleCollectingAutoRefCnt>(), + 8usize, + concat!("Alignment of ", stringify!(nsCycleCollectingAutoRefCnt)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsCycleCollectingAutoRefCnt>())).mRefCntAndFlags as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsCycleCollectingAutoRefCnt), + "::", + stringify!(mRefCntAndFlags) + ) + ); + } + impl Clone for nsCycleCollectingAutoRefCnt { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsAutoRefCnt { + pub mValue: root::nsrefcnt, + } + pub const nsAutoRefCnt_isThreadSafe: bool = false; + #[test] + fn bindgen_test_layout_nsAutoRefCnt() { + assert_eq!( + ::std::mem::size_of::<nsAutoRefCnt>(), + 8usize, + concat!("Size of: ", stringify!(nsAutoRefCnt)) + ); + assert_eq!( + ::std::mem::align_of::<nsAutoRefCnt>(), + 8usize, + concat!("Alignment of ", stringify!(nsAutoRefCnt)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAutoRefCnt>())).mValue as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAutoRefCnt), + "::", + stringify!(mValue) + ) + ); + } + impl Clone for nsAutoRefCnt { + fn clone(&self) -> Self { + *self + } + } /// @see nsTAString #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -14352,419 +14565,6 @@ pub mod root { pub type nsTAutoStringN_literalstring_type<T> = root::nsTAutoStringN_base_string_type<T>; pub type nsTAutoStringN_DataFlags<T> = root::nsTAutoStringN_base_string_type<T>; pub type nsTAutoStringN_ClassFlags<T> = root::nsTAutoStringN_base_string_type<T>; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Nothing: - root::nsCSSTokenSerializationType = 0; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Whitespace: - root::nsCSSTokenSerializationType = 1; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_AtKeyword_or_Hash: - root::nsCSSTokenSerializationType = 2; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Number: - root::nsCSSTokenSerializationType = 3; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Dimension: - root::nsCSSTokenSerializationType = 4; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Percentage: - root::nsCSSTokenSerializationType = 5; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_URange: - root::nsCSSTokenSerializationType = 6; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_URL_or_BadURL: - root::nsCSSTokenSerializationType = 7; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Function: - root::nsCSSTokenSerializationType = 8; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Ident: - root::nsCSSTokenSerializationType = 9; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_CDC: - root::nsCSSTokenSerializationType = 10; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_DashMatch: - root::nsCSSTokenSerializationType = 11; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_ContainsMatch: - root::nsCSSTokenSerializationType = 12; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Hash: - root::nsCSSTokenSerializationType = 13; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_At: - root::nsCSSTokenSerializationType = 14; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Dot_or_Plus: - root::nsCSSTokenSerializationType = 15; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Minus: - root::nsCSSTokenSerializationType = 16; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_OpenParen: - root::nsCSSTokenSerializationType = 17; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Question: - root::nsCSSTokenSerializationType = 18; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Assorted: - root::nsCSSTokenSerializationType = 19; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Equals: - root::nsCSSTokenSerializationType = 20; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Bar: - root::nsCSSTokenSerializationType = 21; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Slash: - root::nsCSSTokenSerializationType = 22; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Symbol_Asterisk: - root::nsCSSTokenSerializationType = 23; - pub const nsCSSTokenSerializationType_eCSSTokenSerialization_Other: - root::nsCSSTokenSerializationType = 24; - pub type nsCSSTokenSerializationType = u32; - #[repr(C)] - pub struct nsCSSScanner { - pub mBuffer: *const u16, - pub mOffset: u32, - pub mCount: u32, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mTokenLineNumber: u32, - pub mTokenLineOffset: u32, - pub mTokenOffset: u32, - pub mRecordStartOffset: u32, - pub mEOFCharacters: root::nsCSSScanner_EOFCharacters, - pub mReporter: *mut root::mozilla::css::ErrorReporter, - pub mRecording: bool, - pub mSeenBadToken: bool, - pub mSeenVariableReference: bool, - pub mSourceMapURL: ::nsstring::nsStringRepr, - pub mSourceURL: ::nsstring::nsStringRepr, - } - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_None: root::nsCSSScanner_EOFCharacters = 0; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_DropBackslash: - root::nsCSSScanner_EOFCharacters = 1; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_ReplacementChar: - root::nsCSSScanner_EOFCharacters = 2; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_Asterisk: root::nsCSSScanner_EOFCharacters = - 4; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_Slash: root::nsCSSScanner_EOFCharacters = 8; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_DoubleQuote: - root::nsCSSScanner_EOFCharacters = 16; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_SingleQuote: - root::nsCSSScanner_EOFCharacters = 32; - pub const nsCSSScanner_EOFCharacters_eEOFCharacters_CloseParen: - root::nsCSSScanner_EOFCharacters = 64; - pub type nsCSSScanner_EOFCharacters = u32; - #[test] - fn bindgen_test_layout_nsCSSScanner() { - assert_eq!( - ::std::mem::size_of::<nsCSSScanner>(), - 96usize, - concat!("Size of: ", stringify!(nsCSSScanner)) - ); - assert_eq!( - ::std::mem::align_of::<nsCSSScanner>(), - 8usize, - concat!("Alignment of ", stringify!(nsCSSScanner)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mBuffer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mBuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mOffset as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mOffset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mCount as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mLineNumber as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mLineNumber) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mLineOffset as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mLineOffset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsCSSScanner>())).mTokenLineNumber as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mTokenLineNumber) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsCSSScanner>())).mTokenLineOffset as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mTokenLineOffset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mTokenOffset as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mTokenOffset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsCSSScanner>())).mRecordStartOffset as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mRecordStartOffset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mEOFCharacters as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mEOFCharacters) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mReporter as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mReporter) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mRecording as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mRecording) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mSeenBadToken as *const _ as usize }, - 57usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mSeenBadToken) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsCSSScanner>())).mSeenVariableReference as *const _ as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mSeenVariableReference) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mSourceMapURL as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mSourceMapURL) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCSSScanner>())).mSourceURL as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(nsCSSScanner), - "::", - stringify!(mSourceURL) - ) - ); - } - #[repr(C)] - pub struct nsISupports__bindgen_vtable(::std::os::raw::c_void); - /// Basic component object model interface. Objects which implement - /// this interface support runtime interface discovery (QueryInterface) - /// and a reference counted memory model (AddRef/Release). This is - /// modelled after the win32 IUnknown API. - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsISupports { - pub vtable_: *const nsISupports__bindgen_vtable, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsISupports_COMTypeInfo { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_nsISupports() { - assert_eq!( - ::std::mem::size_of::<nsISupports>(), - 8usize, - concat!("Size of: ", stringify!(nsISupports)) - ); - assert_eq!( - ::std::mem::align_of::<nsISupports>(), - 8usize, - concat!("Alignment of ", stringify!(nsISupports)) - ); - } - impl Clone for nsISupports { - fn clone(&self) -> Self { - *self - } - } - pub type PRUint32 = ::std::os::raw::c_uint; - pub type PRIntn = ::std::os::raw::c_int; - pub type PRUintn = ::std::os::raw::c_uint; - /// TYPES: PRSize - /// DESCRIPTION: - /// A type for representing the size of objects. - pub type PRSize = usize; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct PRThread { - _unused: [u8; 0], - } - impl Clone for PRThread { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsCycleCollectingAutoRefCnt { - pub mRefCntAndFlags: usize, - } - pub type nsCycleCollectingAutoRefCnt_Suspect = ::std::option::Option< - unsafe extern "C" fn( - aPtr: *mut ::std::os::raw::c_void, - aCp: *mut root::nsCycleCollectionParticipant, - aRefCnt: *mut root::nsCycleCollectingAutoRefCnt, - aShouldDelete: *mut bool, - ), - >; - #[test] - fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { - assert_eq!( - ::std::mem::size_of::<nsCycleCollectingAutoRefCnt>(), - 8usize, - concat!("Size of: ", stringify!(nsCycleCollectingAutoRefCnt)) - ); - assert_eq!( - ::std::mem::align_of::<nsCycleCollectingAutoRefCnt>(), - 8usize, - concat!("Alignment of ", stringify!(nsCycleCollectingAutoRefCnt)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsCycleCollectingAutoRefCnt>())).mRefCntAndFlags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsCycleCollectingAutoRefCnt), - "::", - stringify!(mRefCntAndFlags) - ) - ); - } - impl Clone for nsCycleCollectingAutoRefCnt { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsAutoRefCnt { - pub mValue: root::nsrefcnt, - } - pub const nsAutoRefCnt_isThreadSafe: bool = false; - #[test] - fn bindgen_test_layout_nsAutoRefCnt() { - assert_eq!( - ::std::mem::size_of::<nsAutoRefCnt>(), - 8usize, - concat!("Size of: ", stringify!(nsAutoRefCnt)) - ); - assert_eq!( - ::std::mem::align_of::<nsAutoRefCnt>(), - 8usize, - concat!("Alignment of ", stringify!(nsAutoRefCnt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAutoRefCnt>())).mValue as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAutoRefCnt), - "::", - stringify!(mValue) - ) - ); - } - impl Clone for nsAutoRefCnt { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug)] - pub struct RefPtr<T> { - pub mRawPtr: *mut T, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, - } - pub type RefPtr_element_type<T> = T; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct RefPtr_Proxy { - pub _address: u8, - } - pub type RefPtr_Proxy_member_function = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct RefPtr_ConstRemovingRefPtrTraits { - pub _address: u8, - } pub mod JS { #[allow(unused_imports)] use self::super::super::root; @@ -14940,281 +14740,6 @@ pub mod root { ); } } - pub type Value_PayloadType = u64; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Value_layout { - pub asBits: root::__BindgenUnionField<u64>, - pub debugView: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_1>, - pub s: root::__BindgenUnionField<root::JS::Value_layout__bindgen_ty_2>, - pub asDouble: root::__BindgenUnionField<f64>, - pub asPtr: root::__BindgenUnionField<*mut ::std::os::raw::c_void>, - pub asWord: root::__BindgenUnionField<usize>, - pub asUIntPtr: root::__BindgenUnionField<usize>, - pub bindgen_union_field: u64, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Value_layout__bindgen_ty_1 { - pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 8usize], u64>, - pub __bindgen_align: [u64; 0usize], - } - #[test] - fn bindgen_test_layout_Value_layout__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<Value_layout__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(Value_layout__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<Value_layout__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(Value_layout__bindgen_ty_1)) - ); - } - impl Clone for Value_layout__bindgen_ty_1 { - fn clone(&self) -> Self { - *self - } - } - impl Value_layout__bindgen_ty_1 { - #[inline] - pub fn payload47(&self) -> u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 47u8) as u64) } - } - #[inline] - pub fn set_payload47(&mut self, val: u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 47u8, val as u64) - } - } - #[inline] - pub fn tag(&self) -> root::JSValueTag { - unsafe { ::std::mem::transmute(self._bitfield_1.get(47usize, 17u8) as u32) } - } - #[inline] - pub fn set_tag(&mut self, val: root::JSValueTag) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(47usize, 17u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - payload47: u64, - tag: root::JSValueTag, - ) -> root::__BindgenBitfieldUnit<[u8; 8usize], u64> { - let mut __bindgen_bitfield_unit: root::__BindgenBitfieldUnit< - [u8; 8usize], - u64, - > = Default::default(); - __bindgen_bitfield_unit.set(0usize, 47u8, { - let payload47: u64 = unsafe { ::std::mem::transmute(payload47) }; - payload47 as u64 - }); - __bindgen_bitfield_unit.set(47usize, 17u8, { - let tag: u32 = unsafe { ::std::mem::transmute(tag) }; - tag as u64 - }); - __bindgen_bitfield_unit - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Value_layout__bindgen_ty_2 { - pub payload: root::JS::Value_layout__bindgen_ty_2__bindgen_ty_1, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Value_layout__bindgen_ty_2__bindgen_ty_1 { - pub i32: root::__BindgenUnionField<i32>, - pub u32: root::__BindgenUnionField<u32>, - pub why: root::__BindgenUnionField<root::JSWhyMagic>, - pub bindgen_union_field: u32, - } - #[test] - fn bindgen_test_layout_Value_layout__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(Value_layout__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<Value_layout__bindgen_ty_2__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(Value_layout__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Value_layout__bindgen_ty_2__bindgen_ty_1>())).i32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(i32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Value_layout__bindgen_ty_2__bindgen_ty_1>())).u32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(u32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Value_layout__bindgen_ty_2__bindgen_ty_1>())).why - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(why) - ) - ); - } - impl Clone for Value_layout__bindgen_ty_2__bindgen_ty_1 { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_Value_layout__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::<Value_layout__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(Value_layout__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<Value_layout__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(Value_layout__bindgen_ty_2)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<Value_layout__bindgen_ty_2>())).payload as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout__bindgen_ty_2), - "::", - stringify!(payload) - ) - ); - } - impl Clone for Value_layout__bindgen_ty_2 { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_Value_layout() { - assert_eq!( - ::std::mem::size_of::<Value_layout>(), - 8usize, - concat!("Size of: ", stringify!(Value_layout)) - ); - assert_eq!( - ::std::mem::align_of::<Value_layout>(), - 8usize, - concat!("Alignment of ", stringify!(Value_layout)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).asBits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(asBits) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).debugView as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(debugView) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(s) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).asDouble as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(asDouble) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).asPtr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(asPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).asWord as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(asWord) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<Value_layout>())).asUIntPtr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Value_layout), - "::", - stringify!(asUIntPtr) - ) - ); - } - impl Clone for Value_layout { - fn clone(&self) -> Self { - *self - } - } #[repr(C)] #[derive(Debug, Copy)] pub struct ConstUTF8CharsZ { @@ -15330,66 +14855,98 @@ pub mod root { ); } } - /// Factors implementation for all template versions of nsCOMPtr. - /// - /// Here's the way people normally do things like this: - /// - /// template<class T> class Foo { ... }; - /// template<> class Foo<void*> { ... }; - /// template<class T> class Foo<T*> : private Foo<void*> { ... }; #[repr(C)] - #[derive(Debug)] - pub struct nsCOMPtr_base { - pub mRawPtr: *mut root::nsISupports, + #[derive(Debug, Copy)] + pub struct nsTArrayHeader { + pub mLength: u32, + pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 4usize], u32>, + } + extern "C" { + #[link_name = "\u{1}_ZN14nsTArrayHeader9sEmptyHdrE"] + pub static mut nsTArrayHeader_sEmptyHdr: root::nsTArrayHeader; } #[test] - fn bindgen_test_layout_nsCOMPtr_base() { + fn bindgen_test_layout_nsTArrayHeader() { assert_eq!( - ::std::mem::size_of::<nsCOMPtr_base>(), + ::std::mem::size_of::<nsTArrayHeader>(), 8usize, - concat!("Size of: ", stringify!(nsCOMPtr_base)) + concat!("Size of: ", stringify!(nsTArrayHeader)) ); assert_eq!( - ::std::mem::align_of::<nsCOMPtr_base>(), - 8usize, - concat!("Alignment of ", stringify!(nsCOMPtr_base)) + ::std::mem::align_of::<nsTArrayHeader>(), + 4usize, + concat!("Alignment of ", stringify!(nsTArrayHeader)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCOMPtr_base>())).mRawPtr as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<nsTArrayHeader>())).mLength as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(nsCOMPtr_base), + stringify!(nsTArrayHeader), "::", - stringify!(mRawPtr) + stringify!(mLength) ) ); } - #[repr(C)] - #[derive(Debug)] - pub struct nsCOMPtr { - pub _base: root::nsCOMPtr_base, - } - pub type nsCOMPtr_element_type<T> = T; - #[repr(C)] - #[derive(Debug)] - pub struct nsAutoPtr<T> { - pub mRawPtr: *mut T, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + impl Clone for nsTArrayHeader { + fn clone(&self) -> Self { + *self + } } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsAutoPtr_Ptr<T> { - pub mPtr: *mut T, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + impl nsTArrayHeader { + #[inline] + pub fn mCapacity(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } + } + #[inline] + pub fn set_mCapacity(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 31u8, val as u64) + } + } + #[inline] + pub fn mIsAutoArray(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } + } + #[inline] + pub fn set_mIsAutoArray(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + mCapacity: u32, + mIsAutoArray: u32, + ) -> root::__BindgenBitfieldUnit<[u8; 4usize], u32> { + let mut __bindgen_bitfield_unit: root::__BindgenBitfieldUnit< + [u8; 4usize], + u32, + > = Default::default(); + __bindgen_bitfield_unit.set(0usize, 31u8, { + let mCapacity: u32 = unsafe { ::std::mem::transmute(mCapacity) }; + mCapacity as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let mIsAutoArray: u32 = unsafe { ::std::mem::transmute(mIsAutoArray) }; + mIsAutoArray as u64 + }); + __bindgen_bitfield_unit + } } - pub type nsAutoPtr_element_type<T> = T; + pub type AutoTArray_self_type = u8; + pub type AutoTArray_base_type<E> = root::nsTArray<E>; + pub type AutoTArray_Header<E> = root::AutoTArray_base_type<E>; + pub type AutoTArray_elem_type<E> = root::AutoTArray_base_type<E>; #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct nsAutoPtr_Proxy { - pub _address: u8, + pub struct AutoTArray__bindgen_ty_1 { + pub mAutoBuf: root::__BindgenUnionField<*mut ::std::os::raw::c_char>, + pub mAlign: root::__BindgenUnionField<u8>, + pub bindgen_union_field: u64, } - pub type nsAutoPtr_Proxy_member_function = u8; pub type PLDHashNumber = u32; #[repr(C)] #[derive(Debug, Copy)] @@ -15782,129 +15339,6 @@ pub mod root { pub type nsPtrHashKey_KeyTypePointer<T> = *mut T; pub const nsPtrHashKey_ALLOW_MEMMOVE: root::nsPtrHashKey__bindgen_ty_1 = 0; pub type nsPtrHashKey__bindgen_ty_1 = i32; - /// hashkey wrapper using nsAString KeyType - /// - /// @see nsTHashtable::EntryType for specification - #[repr(C)] - pub struct nsStringHashKey { - pub _base: root::PLDHashEntryHdr, - pub mStr: ::nsstring::nsStringRepr, - } - pub type nsStringHashKey_KeyType = *const root::nsAString; - pub type nsStringHashKey_KeyTypePointer = *const root::nsAString; - pub const nsStringHashKey_ALLOW_MEMMOVE: root::nsStringHashKey__bindgen_ty_1 = 1; - pub type nsStringHashKey__bindgen_ty_1 = u32; - #[test] - fn bindgen_test_layout_nsStringHashKey() { - assert_eq!( - ::std::mem::size_of::<nsStringHashKey>(), - 24usize, - concat!("Size of: ", stringify!(nsStringHashKey)) - ); - assert_eq!( - ::std::mem::align_of::<nsStringHashKey>(), - 8usize, - concat!("Alignment of ", stringify!(nsStringHashKey)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsStringHashKey>())).mStr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsStringHashKey), - "::", - stringify!(mStr) - ) - ); - } - /// hashkey wrapper using nsACString KeyType - /// - /// @see nsTHashtable::EntryType for specification - #[repr(C)] - #[derive(Debug)] - pub struct nsCStringHashKey { - pub _base: root::PLDHashEntryHdr, - pub mStr: root::nsCString, - } - pub type nsCStringHashKey_KeyType = *const root::nsACString; - pub type nsCStringHashKey_KeyTypePointer = *const root::nsACString; - pub const nsCStringHashKey_ALLOW_MEMMOVE: root::nsCStringHashKey__bindgen_ty_1 = 1; - pub type nsCStringHashKey__bindgen_ty_1 = u32; - #[test] - fn bindgen_test_layout_nsCStringHashKey() { - assert_eq!( - ::std::mem::size_of::<nsCStringHashKey>(), - 24usize, - concat!("Size of: ", stringify!(nsCStringHashKey)) - ); - assert_eq!( - ::std::mem::align_of::<nsCStringHashKey>(), - 8usize, - concat!("Alignment of ", stringify!(nsCStringHashKey)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsCStringHashKey>())).mStr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsCStringHashKey), - "::", - stringify!(mStr) - ) - ); - } - /// hashkey wrapper using nsISupports* KeyType - /// - /// @see nsTHashtable::EntryType for specification - #[repr(C)] - #[derive(Debug)] - pub struct nsISupportsHashKey { - pub _base: root::PLDHashEntryHdr, - pub mSupports: root::nsCOMPtr, - } - pub type nsISupportsHashKey_KeyType = *mut root::nsISupports; - pub type nsISupportsHashKey_KeyTypePointer = *const root::nsISupports; - pub const nsISupportsHashKey_ALLOW_MEMMOVE: root::nsISupportsHashKey__bindgen_ty_1 = 1; - pub type nsISupportsHashKey__bindgen_ty_1 = u32; - #[test] - fn bindgen_test_layout_nsISupportsHashKey() { - assert_eq!( - ::std::mem::size_of::<nsISupportsHashKey>(), - 16usize, - concat!("Size of: ", stringify!(nsISupportsHashKey)) - ); - assert_eq!( - ::std::mem::align_of::<nsISupportsHashKey>(), - 8usize, - concat!("Alignment of ", stringify!(nsISupportsHashKey)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsISupportsHashKey>())).mSupports as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsISupportsHashKey), - "::", - stringify!(mSupports) - ) - ); - } - /// hashkey wrapper using refcounted * KeyType - /// - /// @see nsTHashtable::EntryType for specification - #[repr(C)] - #[derive(Debug)] - pub struct nsRefPtrHashKey<T> { - pub _base: root::PLDHashEntryHdr, - pub mKey: root::RefPtr<T>, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, - } - pub type nsRefPtrHashKey_KeyType<T> = *mut T; - pub type nsRefPtrHashKey_KeyTypePointer<T> = *mut T; - pub const nsRefPtrHashKey_ALLOW_MEMMOVE: root::nsRefPtrHashKey__bindgen_ty_1 = 0; - pub type nsRefPtrHashKey__bindgen_ty_1 = i32; /// a base class for templated hashtables. /// /// Clients will rarely need to use this class directly. Check the derived @@ -15970,166 +15404,6 @@ pub mod root { pub _base: root::PLDHashTable_Iterator, } pub type nsTHashtable_Iterator_Base = root::PLDHashTable_Iterator; - /// the private nsTHashtable::EntryType class used by nsBaseHashtable - /// @see nsTHashtable for the specification of this class - /// @see nsBaseHashtable for template parameters - #[repr(C)] - #[derive(Debug)] - pub struct nsBaseHashtableET<KeyClass, DataType> { - pub _base: KeyClass, - pub mData: DataType, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, - pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, - } - pub type nsBaseHashtableET_KeyType = [u8; 0usize]; - pub type nsBaseHashtableET_KeyTypePointer = [u8; 0usize]; - /// templated hashtable for simple data types - /// This class manages simple data types that do not need construction or - /// destruction. - /// - /// @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h - /// for a complete specification. - /// @param DataType the datatype stored in the hashtable, - /// for example, uint32_t or nsCOMPtr. If UserDataType is not the same, - /// DataType must implicitly cast to UserDataType - /// @param UserDataType the user sees, for example uint32_t or nsISupports* - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsBaseHashtable { - pub _address: u8, - } - pub type nsBaseHashtable_fallible_t = root::mozilla::fallible_t; - pub type nsBaseHashtable_KeyType = [u8; 0usize]; - pub type nsBaseHashtable_EntryType<KeyClass, DataType> = - root::nsBaseHashtableET<KeyClass, DataType>; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsBaseHashtable_LookupResult<KeyClass, DataType> { - pub mEntry: *mut root::nsBaseHashtable_EntryType<KeyClass, DataType>, - pub mTable: *mut u8, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, - pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, - } - #[repr(C)] - #[derive(Debug)] - pub struct nsBaseHashtable_EntryPtr<KeyClass, DataType> { - pub mEntry: *mut root::nsBaseHashtable_EntryType<KeyClass, DataType>, - pub mExistingEntry: bool, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, - pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, - } - #[repr(C)] - #[derive(Debug)] - pub struct nsBaseHashtable_Iterator { - pub _base: root::PLDHashTable_Iterator, - } - pub type nsBaseHashtable_Iterator_Base = root::PLDHashTable_Iterator; - /// templated hashtable class maps keys to simple datatypes. - /// See nsBaseHashtable for complete declaration - /// @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h - /// for a complete specification. - /// @param DataType the simple datatype being wrapped - /// @see nsInterfaceHashtable, nsClassHashtable - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsDataHashtable { - pub _address: u8, - } - pub type nsDataHashtable_BaseClass = u8; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsTArrayHeader { - pub mLength: u32, - pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 4usize], u32>, - } - extern "C" { - #[link_name = "\u{1}_ZN14nsTArrayHeader9sEmptyHdrE"] - pub static mut nsTArrayHeader_sEmptyHdr: root::nsTArrayHeader; - } - #[test] - fn bindgen_test_layout_nsTArrayHeader() { - assert_eq!( - ::std::mem::size_of::<nsTArrayHeader>(), - 8usize, - concat!("Size of: ", stringify!(nsTArrayHeader)) - ); - assert_eq!( - ::std::mem::align_of::<nsTArrayHeader>(), - 4usize, - concat!("Alignment of ", stringify!(nsTArrayHeader)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsTArrayHeader>())).mLength as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsTArrayHeader), - "::", - stringify!(mLength) - ) - ); - } - impl Clone for nsTArrayHeader { - fn clone(&self) -> Self { - *self - } - } - impl nsTArrayHeader { - #[inline] - pub fn mCapacity(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } - } - #[inline] - pub fn set_mCapacity(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 31u8, val as u64) - } - } - #[inline] - pub fn mIsAutoArray(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_mIsAutoArray(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - mCapacity: u32, - mIsAutoArray: u32, - ) -> root::__BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: root::__BindgenBitfieldUnit< - [u8; 4usize], - u32, - > = Default::default(); - __bindgen_bitfield_unit.set(0usize, 31u8, { - let mCapacity: u32 = unsafe { ::std::mem::transmute(mCapacity) }; - mCapacity as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let mIsAutoArray: u32 = unsafe { ::std::mem::transmute(mIsAutoArray) }; - mIsAutoArray as u64 - }); - __bindgen_bitfield_unit - } - } - pub type AutoTArray_self_type = u8; - pub type AutoTArray_base_type<E> = root::nsTArray<E>; - pub type AutoTArray_Header<E> = root::AutoTArray_base_type<E>; - pub type AutoTArray_elem_type<E> = root::AutoTArray_base_type<E>; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct AutoTArray__bindgen_ty_1 { - pub mAutoBuf: root::__BindgenUnionField<*mut ::std::os::raw::c_char>, - pub mAlign: root::__BindgenUnionField<u8>, - pub bindgen_union_field: u64, - } - pub type nscoord = i32; - pub type nscolor = u32; #[repr(C)] #[derive(Debug, Copy)] pub struct gfxFontFeature { @@ -17220,7 +16494,7 @@ pub mod root { /// has changed whether the frame is a container for fixed-pos or abs-pos /// elements, but reframing is otherwise not needed. /// - /// Note that nsStyleContext::CalcStyleDifference adjusts results + /// Note that ComputedStyle::CalcStyleDifference adjusts results /// returned by style struct CalcDifference methods to return this hint /// only if there was a change to whether the element's overall style /// indicates that it establishes a containing block. @@ -17399,6 +16673,47 @@ pub mod root { /// RestyleManager::RestyleHintToString. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct nsRestyleHint(pub u32); + /// Factors implementation for all template versions of nsCOMPtr. + /// + /// Here's the way people normally do things like this: + /// + /// template<class T> class Foo { ... }; + /// template<> class Foo<void*> { ... }; + /// template<class T> class Foo<T*> : private Foo<void*> { ... }; + #[repr(C)] + #[derive(Debug)] + pub struct nsCOMPtr_base { + pub mRawPtr: *mut root::nsISupports, + } + #[test] + fn bindgen_test_layout_nsCOMPtr_base() { + assert_eq!( + ::std::mem::size_of::<nsCOMPtr_base>(), + 8usize, + concat!("Size of: ", stringify!(nsCOMPtr_base)) + ); + assert_eq!( + ::std::mem::align_of::<nsCOMPtr_base>(), + 8usize, + concat!("Alignment of ", stringify!(nsCOMPtr_base)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsCOMPtr_base>())).mRawPtr as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsCOMPtr_base), + "::", + stringify!(mRawPtr) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsCOMPtr { + pub _base: root::nsCOMPtr_base, + } + pub type nsCOMPtr_element_type<T> = T; /// We want C++ to be able to read the style struct fields of ComputedValues /// so we define this type on the C++ side and use the bindgenned version /// on the Rust side. @@ -17408,15 +16723,11 @@ pub mod root { pub Color: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoColor>, pub List: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoList>, pub Text: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoText>, - pub Visibility: - ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoVisibility>, - pub UserInterface: - ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoUserInterface>, - pub TableBorder: - ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoTableBorder>, + pub Visibility: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoVisibility>, + pub UserInterface: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoUserInterface>, + pub TableBorder: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoTableBorder>, pub SVG: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoSVG>, - pub Background: - ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoBackground>, + pub Background: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoBackground>, pub Position: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoPosition>, pub TextReset: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoTextReset>, pub Display: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoDisplay>, @@ -17794,56 +17105,25 @@ pub mod root { } } pub type UniqueProfilerBacktrace = root::mozilla::UniquePtr<root::ProfilerBacktrace>; - pub const JSValueTag_JSVAL_TAG_MAX_DOUBLE: root::JSValueTag = 131056; - pub const JSValueTag_JSVAL_TAG_INT32: root::JSValueTag = 131057; - pub const JSValueTag_JSVAL_TAG_UNDEFINED: root::JSValueTag = 131059; - pub const JSValueTag_JSVAL_TAG_NULL: root::JSValueTag = 131060; - pub const JSValueTag_JSVAL_TAG_BOOLEAN: root::JSValueTag = 131058; - pub const JSValueTag_JSVAL_TAG_MAGIC: root::JSValueTag = 131061; - pub const JSValueTag_JSVAL_TAG_STRING: root::JSValueTag = 131062; - pub const JSValueTag_JSVAL_TAG_SYMBOL: root::JSValueTag = 131063; - pub const JSValueTag_JSVAL_TAG_PRIVATE_GCTHING: root::JSValueTag = 131064; - pub const JSValueTag_JSVAL_TAG_OBJECT: root::JSValueTag = 131068; - pub type JSValueTag = u32; - /// a hole in a native object's elements - pub const JSWhyMagic_JS_ELEMENTS_HOLE: root::JSWhyMagic = 0; - /// there is not a pending iterator value - pub const JSWhyMagic_JS_NO_ITER_VALUE: root::JSWhyMagic = 1; - /// exception value thrown when closing a generator - pub const JSWhyMagic_JS_GENERATOR_CLOSING: root::JSWhyMagic = 2; - /// compiler sentinel value - pub const JSWhyMagic_JS_NO_CONSTANT: root::JSWhyMagic = 3; - /// used in debug builds to catch tracing errors - pub const JSWhyMagic_JS_THIS_POISON: root::JSWhyMagic = 4; - /// used in debug builds to catch tracing errors - pub const JSWhyMagic_JS_ARG_POISON: root::JSWhyMagic = 5; - /// an empty subnode in the AST serializer - pub const JSWhyMagic_JS_SERIALIZE_NO_NODE: root::JSWhyMagic = 6; - /// lazy arguments value on the stack - pub const JSWhyMagic_JS_LAZY_ARGUMENTS: root::JSWhyMagic = 7; - /// optimized-away 'arguments' value - pub const JSWhyMagic_JS_OPTIMIZED_ARGUMENTS: root::JSWhyMagic = 8; - /// magic value passed to natives to indicate construction - pub const JSWhyMagic_JS_IS_CONSTRUCTING: root::JSWhyMagic = 9; - /// value of static block object slot - pub const JSWhyMagic_JS_BLOCK_NEEDS_CLONE: root::JSWhyMagic = 10; - /// see class js::HashableValue - pub const JSWhyMagic_JS_HASH_KEY_EMPTY: root::JSWhyMagic = 11; - /// error while running Ion code - pub const JSWhyMagic_JS_ION_ERROR: root::JSWhyMagic = 12; - /// missing recover instruction result - pub const JSWhyMagic_JS_ION_BAILOUT: root::JSWhyMagic = 13; - /// optimized out slot - pub const JSWhyMagic_JS_OPTIMIZED_OUT: root::JSWhyMagic = 14; - /// uninitialized lexical bindings that produce ReferenceError on touch. - pub const JSWhyMagic_JS_UNINITIALIZED_LEXICAL: root::JSWhyMagic = 15; - /// standard constructors are not created for off-thread parsing. - pub const JSWhyMagic_JS_OFF_THREAD_CONSTRUCTOR: root::JSWhyMagic = 16; - /// for local use - pub const JSWhyMagic_JS_GENERIC_MAGIC: root::JSWhyMagic = 17; - /// for local use - pub const JSWhyMagic_JS_WHY_MAGIC_COUNT: root::JSWhyMagic = 18; - pub type JSWhyMagic = u32; + #[repr(C)] + #[derive(Debug)] + pub struct nsAutoPtr<T> { + pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsAutoPtr_Ptr<T> { + pub mPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + } + pub type nsAutoPtr_element_type<T> = T; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsAutoPtr_Proxy { + pub _address: u8, + } + pub type nsAutoPtr_Proxy_member_function = u8; /// This structure precedes the string buffers "we" allocate. It may be the /// case that nsTAString::mData does not point to one of these special /// buffers. The mDataFlags member variable distinguishes the buffer type. @@ -17901,13 +17181,14 @@ pub mod root { ) ); } + /// Functions to create content, to be used only inside Gecko + /// (mozilla/content and mozilla/layout). #[repr(C)] #[derive(Debug)] pub struct nsAtom { - pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 4usize], u32>, pub mHash: u32, - pub mString: *mut u16, + pub mString: *const u16, } #[repr(u8)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -17921,7 +17202,7 @@ pub mod root { fn bindgen_test_layout_nsAtom() { assert_eq!( ::std::mem::size_of::<nsAtom>(), - 24usize, + 16usize, concat!("Size of: ", stringify!(nsAtom)) ); assert_eq!( @@ -17930,18 +17211,8 @@ pub mod root { concat!("Alignment of ", stringify!(nsAtom)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAtom>())).mRefCnt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAtom), - "::", - stringify!(mRefCnt) - ) - ); - assert_eq!( unsafe { &(*(::std::ptr::null::<nsAtom>())).mHash as *const _ as usize }, - 12usize, + 4usize, concat!( "Offset of field: ", stringify!(nsAtom), @@ -17951,7 +17222,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsAtom>())).mString as *const _ as usize }, - 16usize, + 8usize, concat!( "Offset of field: ", stringify!(nsAtom), @@ -18012,7 +17283,7 @@ pub mod root { fn bindgen_test_layout_nsStaticAtom() { assert_eq!( ::std::mem::size_of::<nsStaticAtom>(), - 24usize, + 16usize, concat!("Size of: ", stringify!(nsStaticAtom)) ); assert_eq!( @@ -18731,305 +18002,132 @@ pub mod root { ) ); } - pub type gfxSize = [u64; 2usize]; #[repr(C)] #[derive(Debug, Copy)] - pub struct nsIDOMNode { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIDOMNode_COMTypeInfo { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_nsIDOMNode() { - assert_eq!( - ::std::mem::size_of::<nsIDOMNode>(), - 8usize, - concat!("Size of: ", stringify!(nsIDOMNode)) - ); - assert_eq!( - ::std::mem::align_of::<nsIDOMNode>(), - 8usize, - concat!("Alignment of ", stringify!(nsIDOMNode)) - ); + pub struct nsBindingManager { + _unused: [u8; 0], } - impl Clone for nsIDOMNode { + impl Clone for nsBindingManager { fn clone(&self) -> Self { *self } } - pub const kNameSpaceID_None: i32 = 0; - pub type PLHashNumber = root::PRUint32; - pub type PLHashFunction = ::std::option::Option< - unsafe extern "C" fn(key: *const ::std::os::raw::c_void) -> root::PLHashNumber, - >; - pub type PLHashComparator = ::std::option::Option< - unsafe extern "C" fn(v1: *const ::std::os::raw::c_void, v2: *const ::std::os::raw::c_void) - -> root::PRIntn, - >; + pub type gfxSize = [u64; 2usize]; + /// hashkey wrapper using nsAString KeyType + /// + /// @see nsTHashtable::EntryType for specification #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLHashAllocOps { - pub allocTable: ::std::option::Option< - unsafe extern "C" fn(pool: *mut ::std::os::raw::c_void, size: root::PRSize) - -> *mut ::std::os::raw::c_void, - >, - pub freeTable: ::std::option::Option< - unsafe extern "C" fn( - pool: *mut ::std::os::raw::c_void, - item: *mut ::std::os::raw::c_void, - ), - >, - pub allocEntry: ::std::option::Option< - unsafe extern "C" fn( - pool: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_void, - ) -> *mut root::PLHashEntry, - >, - pub freeEntry: ::std::option::Option< - unsafe extern "C" fn( - pool: *mut ::std::os::raw::c_void, - he: *mut root::PLHashEntry, - flag: root::PRUintn, - ), - >, - } - #[test] - fn bindgen_test_layout_PLHashAllocOps() { - assert_eq!( - ::std::mem::size_of::<PLHashAllocOps>(), - 32usize, - concat!("Size of: ", stringify!(PLHashAllocOps)) - ); - assert_eq!( - ::std::mem::align_of::<PLHashAllocOps>(), - 8usize, - concat!("Alignment of ", stringify!(PLHashAllocOps)) - ); + pub struct nsStringHashKey { + pub _base: root::PLDHashEntryHdr, + pub mStr: ::nsstring::nsStringRepr, + } + pub type nsStringHashKey_KeyType = *const root::nsAString; + pub type nsStringHashKey_KeyTypePointer = *const root::nsAString; + pub const nsStringHashKey_ALLOW_MEMMOVE: root::nsStringHashKey__bindgen_ty_1 = 1; + pub type nsStringHashKey__bindgen_ty_1 = u32; + #[test] + fn bindgen_test_layout_nsStringHashKey() { assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashAllocOps>())).allocTable as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PLHashAllocOps), - "::", - stringify!(allocTable) - ) + ::std::mem::size_of::<nsStringHashKey>(), + 24usize, + concat!("Size of: ", stringify!(nsStringHashKey)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashAllocOps>())).freeTable as *const _ as usize }, + ::std::mem::align_of::<nsStringHashKey>(), 8usize, - concat!( - "Offset of field: ", - stringify!(PLHashAllocOps), - "::", - stringify!(freeTable) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashAllocOps>())).allocEntry as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PLHashAllocOps), - "::", - stringify!(allocEntry) - ) + concat!("Alignment of ", stringify!(nsStringHashKey)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashAllocOps>())).freeEntry as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::<nsStringHashKey>())).mStr as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(PLHashAllocOps), + stringify!(nsStringHashKey), "::", - stringify!(freeEntry) + stringify!(mStr) ) ); } - impl Clone for PLHashAllocOps { - fn clone(&self) -> Self { - *self - } - } + /// hashkey wrapper using nsACString KeyType + /// + /// @see nsTHashtable::EntryType for specification #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLHashEntry { - pub next: *mut root::PLHashEntry, - pub keyHash: root::PLHashNumber, - pub key: *const ::std::os::raw::c_void, - pub value: *mut ::std::os::raw::c_void, + #[derive(Debug)] + pub struct nsCStringHashKey { + pub _base: root::PLDHashEntryHdr, + pub mStr: root::nsCString, } + pub type nsCStringHashKey_KeyType = *const root::nsACString; + pub type nsCStringHashKey_KeyTypePointer = *const root::nsACString; + pub const nsCStringHashKey_ALLOW_MEMMOVE: root::nsCStringHashKey__bindgen_ty_1 = 1; + pub type nsCStringHashKey__bindgen_ty_1 = u32; #[test] - fn bindgen_test_layout_PLHashEntry() { + fn bindgen_test_layout_nsCStringHashKey() { assert_eq!( - ::std::mem::size_of::<PLHashEntry>(), - 32usize, - concat!("Size of: ", stringify!(PLHashEntry)) + ::std::mem::size_of::<nsCStringHashKey>(), + 24usize, + concat!("Size of: ", stringify!(nsCStringHashKey)) ); assert_eq!( - ::std::mem::align_of::<PLHashEntry>(), + ::std::mem::align_of::<nsCStringHashKey>(), 8usize, - concat!("Alignment of ", stringify!(PLHashEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashEntry>())).next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PLHashEntry), - "::", - stringify!(next) - ) + concat!("Alignment of ", stringify!(nsCStringHashKey)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashEntry>())).keyHash as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<nsCStringHashKey>())).mStr as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(PLHashEntry), - "::", - stringify!(keyHash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashEntry>())).key as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PLHashEntry), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashEntry>())).value as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(PLHashEntry), + stringify!(nsCStringHashKey), "::", - stringify!(value) + stringify!(mStr) ) ); } - impl Clone for PLHashEntry { - fn clone(&self) -> Self { - *self - } + /// hashkey wrapper using refcounted * KeyType + /// + /// @see nsTHashtable::EntryType for specification + #[repr(C)] + #[derive(Debug)] + pub struct nsRefPtrHashKey<T> { + pub _base: root::PLDHashEntryHdr, + pub mKey: root::RefPtr<T>, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, } + pub type nsRefPtrHashKey_KeyType<T> = *mut T; + pub type nsRefPtrHashKey_KeyTypePointer<T> = *mut T; + pub const nsRefPtrHashKey_ALLOW_MEMMOVE: root::nsRefPtrHashKey__bindgen_ty_1 = 0; + pub type nsRefPtrHashKey__bindgen_ty_1 = i32; + pub type DOMHighResTimeStamp = f64; #[repr(C)] #[derive(Debug, Copy)] - pub struct PLHashTable { - pub buckets: *mut *mut root::PLHashEntry, - pub nentries: root::PRUint32, - pub shift: root::PRUint32, - pub keyHash: root::PLHashFunction, - pub keyCompare: root::PLHashComparator, - pub valueCompare: root::PLHashComparator, - pub allocOps: *const root::PLHashAllocOps, - pub allocPriv: *mut ::std::os::raw::c_void, + pub struct nsIDOMNode { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIDOMNode_COMTypeInfo { + pub _address: u8, } #[test] - fn bindgen_test_layout_PLHashTable() { - assert_eq!( - ::std::mem::size_of::<PLHashTable>(), - 56usize, - concat!("Size of: ", stringify!(PLHashTable)) - ); + fn bindgen_test_layout_nsIDOMNode() { assert_eq!( - ::std::mem::align_of::<PLHashTable>(), + ::std::mem::size_of::<nsIDOMNode>(), 8usize, - concat!("Alignment of ", stringify!(PLHashTable)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).buckets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(buckets) - ) + concat!("Size of: ", stringify!(nsIDOMNode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).nentries as *const _ as usize }, + ::std::mem::align_of::<nsIDOMNode>(), 8usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(nentries) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).shift as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(shift) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).keyHash as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(keyHash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).keyCompare as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(keyCompare) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).valueCompare as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(valueCompare) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).allocOps as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(allocOps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<PLHashTable>())).allocPriv as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(PLHashTable), - "::", - stringify!(allocPriv) - ) + concat!("Alignment of ", stringify!(nsIDOMNode)) ); } - impl Clone for PLHashTable { + impl Clone for nsIDOMNode { fn clone(&self) -> Self { *self } } + pub const kNameSpaceID_None: i32 = 0; #[repr(C)] #[derive(Debug, Copy)] pub struct nsIVariant { @@ -19058,10 +18156,77 @@ pub mod root { *self } } + /// the private nsTHashtable::EntryType class used by nsBaseHashtable + /// @see nsTHashtable for the specification of this class + /// @see nsBaseHashtable for template parameters + #[repr(C)] + #[derive(Debug)] + pub struct nsBaseHashtableET<KeyClass, DataType> { + pub _base: KeyClass, + pub mData: DataType, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, + } + pub type nsBaseHashtableET_KeyType = [u8; 0usize]; + pub type nsBaseHashtableET_KeyTypePointer = [u8; 0usize]; + /// templated hashtable for simple data types + /// This class manages simple data types that do not need construction or + /// destruction. + /// + /// @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h + /// for a complete specification. + /// @param DataType the datatype stored in the hashtable, + /// for example, uint32_t or nsCOMPtr. If UserDataType is not the same, + /// DataType must implicitly cast to UserDataType + /// @param UserDataType the user sees, for example uint32_t or nsISupports* + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsBaseHashtable { + pub _address: u8, + } + pub type nsBaseHashtable_fallible_t = root::mozilla::fallible_t; + pub type nsBaseHashtable_KeyType = [u8; 0usize]; + pub type nsBaseHashtable_EntryType<KeyClass, DataType> = + root::nsBaseHashtableET<KeyClass, DataType>; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsBaseHashtable_LookupResult<KeyClass, DataType> { + pub mEntry: *mut root::nsBaseHashtable_EntryType<KeyClass, DataType>, + pub mTable: *mut u8, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, + } #[repr(C)] + #[derive(Debug)] + pub struct nsBaseHashtable_EntryPtr<KeyClass, DataType> { + pub mEntry: *mut root::nsBaseHashtable_EntryType<KeyClass, DataType>, + pub mExistingEntry: bool, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<KeyClass>>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<DataType>>, + } + #[repr(C)] + #[derive(Debug)] + pub struct nsBaseHashtable_Iterator { + pub _base: root::PLDHashTable_Iterator, + } + pub type nsBaseHashtable_Iterator_Base = root::PLDHashTable_Iterator; + /// templated hashtable class maps keys to simple datatypes. + /// See nsBaseHashtable for complete declaration + /// @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h + /// for a complete specification. + /// @param DataType the simple datatype being wrapped + /// @see nsInterfaceHashtable, nsClassHashtable + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsDataHashtable { + pub _address: u8, + } + pub type nsDataHashtable_BaseClass = u8; + #[repr(C)] + #[derive(Debug)] pub struct nsNodeInfoManager { pub mRefCnt: root::nsCycleCollectingAutoRefCnt, - pub mNodeInfoHash: *mut root::PLHashTable, + pub mNodeInfoHash: [u64; 4usize], pub mDocument: *mut root::nsIDocument, pub mNonDocumentNodeInfos: u32, pub mPrincipal: root::nsCOMPtr, @@ -19105,6 +18270,27 @@ pub mod root { pub const nsNodeInfoManager_Tri_eTriFalse: root::nsNodeInfoManager_Tri = 1; pub const nsNodeInfoManager_Tri_eTriTrue: root::nsNodeInfoManager_Tri = 2; pub type nsNodeInfoManager_Tri = u32; + #[repr(C)] + #[derive(Debug)] + pub struct nsNodeInfoManager_NodeInfoInnerKey { + pub _base: root::nsPtrHashKey<root::mozilla::dom::NodeInfo_NodeInfoInner>, + } + #[test] + fn bindgen_test_layout_nsNodeInfoManager_NodeInfoInnerKey() { + assert_eq!( + ::std::mem::size_of::<nsNodeInfoManager_NodeInfoInnerKey>(), + 16usize, + concat!("Size of: ", stringify!(nsNodeInfoManager_NodeInfoInnerKey)) + ); + assert_eq!( + ::std::mem::align_of::<nsNodeInfoManager_NodeInfoInnerKey>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsNodeInfoManager_NodeInfoInnerKey) + ) + ); + } extern "C" { #[link_name = "\u{1}_ZN17nsNodeInfoManager21_cycleCollectorGlobalE"] pub static mut nsNodeInfoManager__cycleCollectorGlobal: @@ -19114,7 +18300,7 @@ pub mod root { fn bindgen_test_layout_nsNodeInfoManager() { assert_eq!( ::std::mem::size_of::<nsNodeInfoManager>(), - 336usize, + 360usize, concat!("Size of: ", stringify!(nsNodeInfoManager)) ); assert_eq!( @@ -19146,7 +18332,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mDocument as *const _ as usize }, - 16usize, + 40usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19159,7 +18345,7 @@ pub mod root { &(*(::std::ptr::null::<nsNodeInfoManager>())).mNonDocumentNodeInfos as *const _ as usize }, - 24usize, + 48usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19171,7 +18357,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mPrincipal as *const _ as usize }, - 32usize, + 56usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19183,7 +18369,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mDefaultPrincipal as *const _ as usize }, - 40usize, + 64usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19195,7 +18381,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mTextNodeInfo as *const _ as usize }, - 48usize, + 72usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19207,7 +18393,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mCommentNodeInfo as *const _ as usize }, - 56usize, + 80usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19219,7 +18405,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mDocumentNodeInfo as *const _ as usize }, - 64usize, + 88usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19231,7 +18417,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mBindingManager as *const _ as usize }, - 72usize, + 96usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19244,7 +18430,7 @@ pub mod root { &(*(::std::ptr::null::<nsNodeInfoManager>())).mRecentlyUsedNodeInfos as *const _ as usize }, - 80usize, + 104usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19256,7 +18442,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mSVGEnabled as *const _ as usize }, - 328usize, + 352usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19268,7 +18454,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsNodeInfoManager>())).mMathMLEnabled as *const _ as usize }, - 332usize, + 356usize, concat!( "Offset of field: ", stringify!(nsNodeInfoManager), @@ -19479,31 +18665,30 @@ pub mod root { *self } } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_77 = 4; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_77 = 8; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_77 = 16; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_77 = 32; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_77 = 64; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_77 = 128; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_77 = 256; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_77 = 512; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_77 = 1024; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_77 = 2048; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_77 = 4096; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_77 = 8192; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_77 = 16384; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_77 = 32768; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_77 = 61440; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_77 = 65536; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_77 = 131072; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_77 = 262144; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_77 = 524288; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_77 = 1048576; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_77 = 1572864; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = 2097152; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = 4194304; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_77 = 21; - pub type _bindgen_ty_77 = u32; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_29 = 4; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_29 = 8; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_29 = 16; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_29 = 32; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_29 = 64; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_29 = 128; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_29 = 256; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_29 = 512; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_29 = 1024; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_29 = 2048; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_29 = 4096; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_29 = 8192; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_29 = 16384; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_29 = 30720; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_29 = 32768; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_29 = 65536; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_29 = 131072; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_29 = 262144; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_29 = 524288; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_29 = 786432; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_29 = 1048576; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_29 = 2097152; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_29 = 20; + pub type _bindgen_ty_29 = u32; /// An internal interface that abstracts some DOMNode-related parts that both /// nsIContent and nsIDocument share. An instance of this interface has a list /// of nsIContent children and provides access to them. @@ -19515,7 +18700,7 @@ pub mod root { pub mNextSibling: *mut root::nsIContent, pub mPreviousSibling: *mut root::nsIContent, pub mFirstChild: *mut root::nsIContent, - pub __bindgen_anon_1: root::nsINode__bindgen_ty_1, + pub __bindgen_anon_1: root::nsINode__bindgen_ty_2, pub mSlots: *mut root::nsINode_nsSlots, } pub type nsINode_BoxQuadOptions = root::mozilla::dom::BoxQuadOptions; @@ -19535,30 +18720,31 @@ pub mod root { pub _address: u8, } /// nsIDocument nodes - pub const nsINode_eDOCUMENT: root::nsINode__bindgen_ty_2 = 2; + pub const nsINode_eDOCUMENT: root::nsINode__bindgen_ty_1 = 2; /// nsIAttribute nodes - pub const nsINode_eATTRIBUTE: root::nsINode__bindgen_ty_2 = 4; + pub const nsINode_eATTRIBUTE: root::nsINode__bindgen_ty_1 = 4; /// text nodes - pub const nsINode_eTEXT: root::nsINode__bindgen_ty_2 = 8; + pub const nsINode_eTEXT: root::nsINode__bindgen_ty_1 = 8; /// xml processing instructions - pub const nsINode_ePROCESSING_INSTRUCTION: root::nsINode__bindgen_ty_2 = 16; + pub const nsINode_ePROCESSING_INSTRUCTION: root::nsINode__bindgen_ty_1 = 16; /// comment nodes - pub const nsINode_eCOMMENT: root::nsINode__bindgen_ty_2 = 32; + pub const nsINode_eCOMMENT: root::nsINode__bindgen_ty_1 = 32; /// form control elements - pub const nsINode_eHTML_FORM_CONTROL: root::nsINode__bindgen_ty_2 = 64; + pub const nsINode_eHTML_FORM_CONTROL: root::nsINode__bindgen_ty_1 = 64; /// document fragments - pub const nsINode_eDOCUMENT_FRAGMENT: root::nsINode__bindgen_ty_2 = 128; - /// data nodes (comments, PIs, text). Nodes of this type always - /// returns a non-null value for nsIContent::GetText() - pub const nsINode_eDATA_NODE: root::nsINode__bindgen_ty_2 = 256; + pub const nsINode_eDOCUMENT_FRAGMENT: root::nsINode__bindgen_ty_1 = 128; + /// character data nodes (comments, PIs, text). + pub const nsINode_eDATA_NODE: root::nsINode__bindgen_ty_1 = 256; /// HTMLMediaElement - pub const nsINode_eMEDIA: root::nsINode__bindgen_ty_2 = 512; + pub const nsINode_eMEDIA: root::nsINode__bindgen_ty_1 = 512; /// animation elements - pub const nsINode_eANIMATION: root::nsINode__bindgen_ty_2 = 1024; + pub const nsINode_eANIMATION: root::nsINode__bindgen_ty_1 = 1024; /// filter elements that implement SVGFilterPrimitiveStandardAttributes - pub const nsINode_eFILTER: root::nsINode__bindgen_ty_2 = 2048; + pub const nsINode_eFILTER: root::nsINode__bindgen_ty_1 = 2048; + /// SVGGeometryElement + pub const nsINode_eSHAPE: root::nsINode__bindgen_ty_1 = 4096; /// Bit-flags to pass (or'ed together) to IsNodeOfType() - pub type nsINode__bindgen_ty_2 = u32; + pub type nsINode__bindgen_ty_1 = u32; pub const nsINode_FlattenedParentType_eNotForStyle: root::nsINode_FlattenedParentType = 0; pub const nsINode_FlattenedParentType_eForStyle: root::nsINode_FlattenedParentType = 1; pub type nsINode_FlattenedParentType = u32; @@ -19686,62 +18872,60 @@ pub mod root { NodeHasDirAutoSet = 20, NodeHasTextNodeDirectionalityMap = 21, NodeAncestorHasDirAuto = 22, - ElementIsInStyleScope = 23, - ElementIsScopedStyleRoot = 24, - NodeHandlingClick = 25, - NodeHasRelevantHoverRules = 26, - ElementHasWeirdParserInsertionMode = 27, - ParserHasNotified = 28, - MayBeApzAware = 29, - ElementMayHaveAnonymousChildren = 30, - NodeMayHaveChildrenWithLayoutBoxesDisabled = 31, - BooleanFlagCount = 32, + NodeHandlingClick = 23, + NodeHasRelevantHoverRules = 24, + ElementHasWeirdParserInsertionMode = 25, + ParserHasNotified = 26, + MayBeApzAware = 27, + ElementMayHaveAnonymousChildren = 28, + NodeMayHaveChildrenWithLayoutBoxesDisabled = 29, + BooleanFlagCount = 30, } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsINode__bindgen_ty_1 { + pub struct nsINode__bindgen_ty_2 { pub mPrimaryFrame: root::__BindgenUnionField<*mut root::nsIFrame>, pub mSubtreeRoot: root::__BindgenUnionField<*mut root::nsINode>, pub bindgen_union_field: u64, } #[test] - fn bindgen_test_layout_nsINode__bindgen_ty_1() { + fn bindgen_test_layout_nsINode__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::<nsINode__bindgen_ty_1>(), + ::std::mem::size_of::<nsINode__bindgen_ty_2>(), 8usize, - concat!("Size of: ", stringify!(nsINode__bindgen_ty_1)) + concat!("Size of: ", stringify!(nsINode__bindgen_ty_2)) ); assert_eq!( - ::std::mem::align_of::<nsINode__bindgen_ty_1>(), + ::std::mem::align_of::<nsINode__bindgen_ty_2>(), 8usize, - concat!("Alignment of ", stringify!(nsINode__bindgen_ty_1)) + concat!("Alignment of ", stringify!(nsINode__bindgen_ty_2)) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsINode__bindgen_ty_1>())).mPrimaryFrame as *const _ as usize + &(*(::std::ptr::null::<nsINode__bindgen_ty_2>())).mPrimaryFrame as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(nsINode__bindgen_ty_1), + stringify!(nsINode__bindgen_ty_2), "::", stringify!(mPrimaryFrame) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsINode__bindgen_ty_1>())).mSubtreeRoot as *const _ as usize + &(*(::std::ptr::null::<nsINode__bindgen_ty_2>())).mSubtreeRoot as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(nsINode__bindgen_ty_1), + stringify!(nsINode__bindgen_ty_2), "::", stringify!(mSubtreeRoot) ) ); } - impl Clone for nsINode__bindgen_ty_1 { + impl Clone for nsINode__bindgen_ty_2 { fn clone(&self) -> Self { *self } @@ -19831,8 +19015,8 @@ pub mod root { ) ); } - /// Functions to create content, to be used only inside Gecko - /// (mozilla/content and mozilla/layout). + /// A node of content in a document's content model. This interface + /// is supported by all content objects. #[repr(C)] pub struct nsIContent { pub _base: root::nsINode, @@ -20021,103 +19205,112 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsFrameManagerBase { + pub struct nsILayoutHistoryState { + _unused: [u8; 0], + } + impl Clone for nsILayoutHistoryState { + fn clone(&self) -> Self { + *self + } + } + /// Frame manager interface. The frame manager serves one purpose: + /// <li>handles structural modifications to the frame model. If the frame model + /// lock can be acquired, then the changes are processed immediately; otherwise, + /// they're queued and processed later. + /// + /// FIXME(emilio): The comment above doesn't make any sense, there's no "frame + /// model lock" of any sort afaict. + #[repr(C)] + #[derive(Debug)] + pub struct nsFrameManager { pub mPresShell: *mut root::nsIPresShell, pub mRootFrame: *mut root::nsIFrame, - pub mDisplayNoneMap: *mut root::nsFrameManagerBase_UndisplayedMap, - pub mDisplayContentsMap: *mut root::nsFrameManagerBase_UndisplayedMap, + pub mDisplayNoneMap: *mut root::nsFrameManager_UndisplayedMap, + pub mDisplayContentsMap: *mut root::nsFrameManager_UndisplayedMap, pub mIsDestroyingFrames: bool, } + pub type nsFrameManager_ComputedStyle = root::mozilla::ComputedStyle; + pub use self::super::root::mozilla::layout::FrameChildListID as nsFrameManager_ChildListID; + pub type nsFrameManager_UndisplayedNode = root::mozilla::UndisplayedNode; #[repr(C)] #[derive(Debug, Copy)] - pub struct nsFrameManagerBase_UndisplayedMap { + pub struct nsFrameManager_UndisplayedMap { _unused: [u8; 0], } - impl Clone for nsFrameManagerBase_UndisplayedMap { + impl Clone for nsFrameManager_UndisplayedMap { fn clone(&self) -> Self { *self } } #[test] - fn bindgen_test_layout_nsFrameManagerBase() { + fn bindgen_test_layout_nsFrameManager() { assert_eq!( - ::std::mem::size_of::<nsFrameManagerBase>(), + ::std::mem::size_of::<nsFrameManager>(), 40usize, - concat!("Size of: ", stringify!(nsFrameManagerBase)) + concat!("Size of: ", stringify!(nsFrameManager)) ); assert_eq!( - ::std::mem::align_of::<nsFrameManagerBase>(), + ::std::mem::align_of::<nsFrameManager>(), 8usize, - concat!("Alignment of ", stringify!(nsFrameManagerBase)) + concat!("Alignment of ", stringify!(nsFrameManager)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsFrameManagerBase>())).mPresShell as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<nsFrameManager>())).mPresShell as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(nsFrameManagerBase), + stringify!(nsFrameManager), "::", stringify!(mPresShell) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsFrameManagerBase>())).mRootFrame as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<nsFrameManager>())).mRootFrame as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(nsFrameManagerBase), + stringify!(nsFrameManager), "::", stringify!(mRootFrame) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsFrameManagerBase>())).mDisplayNoneMap as *const _ as usize + &(*(::std::ptr::null::<nsFrameManager>())).mDisplayNoneMap as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(nsFrameManagerBase), + stringify!(nsFrameManager), "::", stringify!(mDisplayNoneMap) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsFrameManagerBase>())).mDisplayContentsMap as *const _ - as usize + &(*(::std::ptr::null::<nsFrameManager>())).mDisplayContentsMap as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(nsFrameManagerBase), + stringify!(nsFrameManager), "::", stringify!(mDisplayContentsMap) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsFrameManagerBase>())).mIsDestroyingFrames as *const _ - as usize + &(*(::std::ptr::null::<nsFrameManager>())).mIsDestroyingFrames as *const _ as usize }, 32usize, concat!( "Offset of field: ", - stringify!(nsFrameManagerBase), + stringify!(nsFrameManager), "::", stringify!(mIsDestroyingFrames) ) ); } - impl Clone for nsFrameManagerBase { - fn clone(&self) -> Self { - *self - } - } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIWeakReference { @@ -20609,7 +19802,7 @@ pub mod root { pub mViewManager: *mut root::nsViewManager, pub mFrameArena: root::nsPresArena, pub mSelection: root::RefPtr<root::nsFrameSelection>, - pub mFrameManager: *mut root::nsFrameManagerBase, + pub mFrameManager: *mut root::nsFrameManager, pub mForwardingContainer: u64, pub mDocAccessible: *mut root::mozilla::a11y::DocAccessible, pub mReflowContinueTimer: root::nsCOMPtr, @@ -21373,17 +20566,28 @@ pub mod root { } } #[inline] - pub fn mNeedThrottledAnimationFlush(&self) -> bool { + pub fn mResizeEventPending(&self) -> bool { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u8) } } #[inline] - pub fn set_mNeedThrottledAnimationFlush(&mut self, val: bool) { + pub fn set_mResizeEventPending(&mut self, val: bool) { unsafe { let val: u8 = ::std::mem::transmute(val); self._bitfield_1.set(16usize, 1u8, val as u64) } } #[inline] + pub fn mNeedThrottledAnimationFlush(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u8) } + } + #[inline] + pub fn set_mNeedThrottledAnimationFlush(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] pub fn new_bitfield_1( mDidInitialize: bool, mIsDestroying: bool, @@ -21401,6 +20605,7 @@ pub mod root { mNeedStyleFlush: bool, mObservingStyleFlushes: bool, mObservingLayoutFlushes: bool, + mResizeEventPending: bool, mNeedThrottledAnimationFlush: bool, ) -> root::__BindgenBitfieldUnit<[u8; 3usize], u8> { let mut __bindgen_bitfield_unit: root::__BindgenBitfieldUnit< @@ -21478,6 +20683,10 @@ pub mod root { mObservingLayoutFlushes as u64 }); __bindgen_bitfield_unit.set(16usize, 1u8, { + let mResizeEventPending: u8 = unsafe { ::std::mem::transmute(mResizeEventPending) }; + mResizeEventPending as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { let mNeedThrottledAnimationFlush: u8 = unsafe { ::std::mem::transmute(mNeedThrottledAnimationFlush) }; mNeedThrottledAnimationFlush as u64 @@ -21485,6 +20694,327 @@ pub mod root { __bindgen_bitfield_unit } } + #[repr(C)] + #[derive(Debug)] + pub struct nsAttrName { + pub mBits: usize, + } + #[test] + fn bindgen_test_layout_nsAttrName() { + assert_eq!( + ::std::mem::size_of::<nsAttrName>(), + 8usize, + concat!("Size of: ", stringify!(nsAttrName)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrName>(), + 8usize, + concat!("Alignment of ", stringify!(nsAttrName)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAttrName>())).mBits as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrName), + "::", + stringify!(mBits) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsAttrValue { + pub mBits: usize, + } + pub const nsAttrValue_ValueType_eString: root::nsAttrValue_ValueType = 0; + pub const nsAttrValue_ValueType_eAtom: root::nsAttrValue_ValueType = 2; + pub const nsAttrValue_ValueType_eInteger: root::nsAttrValue_ValueType = 3; + pub const nsAttrValue_ValueType_eColor: root::nsAttrValue_ValueType = 7; + pub const nsAttrValue_ValueType_eEnum: root::nsAttrValue_ValueType = 11; + pub const nsAttrValue_ValueType_ePercent: root::nsAttrValue_ValueType = 15; + pub const nsAttrValue_ValueType_eCSSDeclaration: root::nsAttrValue_ValueType = 16; + pub const nsAttrValue_ValueType_eURL: root::nsAttrValue_ValueType = 17; + pub const nsAttrValue_ValueType_eImage: root::nsAttrValue_ValueType = 18; + pub const nsAttrValue_ValueType_eAtomArray: root::nsAttrValue_ValueType = 19; + pub const nsAttrValue_ValueType_eDoubleValue: root::nsAttrValue_ValueType = 20; + pub const nsAttrValue_ValueType_eIntMarginValue: root::nsAttrValue_ValueType = 21; + pub const nsAttrValue_ValueType_eSVGAngle: root::nsAttrValue_ValueType = 22; + pub const nsAttrValue_ValueType_eSVGTypesBegin: root::nsAttrValue_ValueType = 22; + pub const nsAttrValue_ValueType_eSVGIntegerPair: root::nsAttrValue_ValueType = 23; + pub const nsAttrValue_ValueType_eSVGLength: root::nsAttrValue_ValueType = 24; + pub const nsAttrValue_ValueType_eSVGLengthList: root::nsAttrValue_ValueType = 25; + pub const nsAttrValue_ValueType_eSVGNumberList: root::nsAttrValue_ValueType = 26; + pub const nsAttrValue_ValueType_eSVGNumberPair: root::nsAttrValue_ValueType = 27; + pub const nsAttrValue_ValueType_eSVGPathData: root::nsAttrValue_ValueType = 28; + pub const nsAttrValue_ValueType_eSVGPointList: root::nsAttrValue_ValueType = 29; + pub const nsAttrValue_ValueType_eSVGPreserveAspectRatio: root::nsAttrValue_ValueType = 30; + pub const nsAttrValue_ValueType_eSVGStringList: root::nsAttrValue_ValueType = 31; + pub const nsAttrValue_ValueType_eSVGTransformList: root::nsAttrValue_ValueType = 32; + pub const nsAttrValue_ValueType_eSVGViewBox: root::nsAttrValue_ValueType = 33; + pub const nsAttrValue_ValueType_eSVGTypesEnd: root::nsAttrValue_ValueType = 33; + pub type nsAttrValue_ValueType = u32; + /// Structure for a mapping from int (enum) values to strings. When you use + /// it you generally create an array of them. + /// Instantiate like this: + /// EnumTable myTable[] = { + /// { "string1", 1 }, + /// { "string2", 2 }, + /// { nullptr, 0 } + /// } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsAttrValue_EnumTable { + /// The string the value maps to + pub tag: *const ::std::os::raw::c_char, + /// The enum value that maps to this string + pub value: i16, + } + #[test] + fn bindgen_test_layout_nsAttrValue_EnumTable() { + assert_eq!( + ::std::mem::size_of::<nsAttrValue_EnumTable>(), + 16usize, + concat!("Size of: ", stringify!(nsAttrValue_EnumTable)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrValue_EnumTable>(), + 8usize, + concat!("Alignment of ", stringify!(nsAttrValue_EnumTable)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAttrValue_EnumTable>())).tag as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrValue_EnumTable), + "::", + stringify!(tag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAttrValue_EnumTable>())).value as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsAttrValue_EnumTable), + "::", + stringify!(value) + ) + ); + } + impl Clone for nsAttrValue_EnumTable { + fn clone(&self) -> Self { + *self + } + } + pub const nsAttrValue_ValueBaseType_eStringBase: root::nsAttrValue_ValueBaseType = 0; + pub const nsAttrValue_ValueBaseType_eOtherBase: root::nsAttrValue_ValueBaseType = 1; + pub const nsAttrValue_ValueBaseType_eAtomBase: root::nsAttrValue_ValueBaseType = 2; + pub const nsAttrValue_ValueBaseType_eIntegerBase: root::nsAttrValue_ValueBaseType = 3; + pub type nsAttrValue_ValueBaseType = u32; + extern "C" { + #[link_name = "\u{1}_ZN11nsAttrValue15sEnumTableArrayE"] + pub static mut nsAttrValue_sEnumTableArray: + *mut root::nsTArray<*const root::nsAttrValue_EnumTable>; + } + #[test] + fn bindgen_test_layout_nsAttrValue() { + assert_eq!( + ::std::mem::size_of::<nsAttrValue>(), + 8usize, + concat!("Size of: ", stringify!(nsAttrValue)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrValue>(), + 8usize, + concat!("Alignment of ", stringify!(nsAttrValue)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAttrValue>())).mBits as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrValue), + "::", + stringify!(mBits) + ) + ); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsMappedAttributes { + _unused: [u8; 0], + } + impl Clone for nsMappedAttributes { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsHTMLStyleSheet { + _unused: [u8; 0], + } + impl Clone for nsHTMLStyleSheet { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug)] + pub struct nsAttrAndChildArray { + pub mImpl: *mut root::nsAttrAndChildArray_Impl, + } + pub type nsAttrAndChildArray_BorrowedAttrInfo = root::mozilla::dom::BorrowedAttrInfo; + #[repr(C)] + #[derive(Debug)] + pub struct nsAttrAndChildArray_InternalAttr { + pub mName: root::nsAttrName, + pub mValue: root::nsAttrValue, + } + #[test] + fn bindgen_test_layout_nsAttrAndChildArray_InternalAttr() { + assert_eq!( + ::std::mem::size_of::<nsAttrAndChildArray_InternalAttr>(), + 16usize, + concat!("Size of: ", stringify!(nsAttrAndChildArray_InternalAttr)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrAndChildArray_InternalAttr>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsAttrAndChildArray_InternalAttr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_InternalAttr>())).mName as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_InternalAttr), + "::", + stringify!(mName) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_InternalAttr>())).mValue as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_InternalAttr), + "::", + stringify!(mValue) + ) + ); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsAttrAndChildArray_Impl { + pub mAttrAndChildCount: u32, + pub mBufferSize: u32, + pub mMappedAttrs: *mut root::nsMappedAttributes, + pub mBuffer: [*mut ::std::os::raw::c_void; 1usize], + } + #[test] + fn bindgen_test_layout_nsAttrAndChildArray_Impl() { + assert_eq!( + ::std::mem::size_of::<nsAttrAndChildArray_Impl>(), + 24usize, + concat!("Size of: ", stringify!(nsAttrAndChildArray_Impl)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrAndChildArray_Impl>(), + 8usize, + concat!("Alignment of ", stringify!(nsAttrAndChildArray_Impl)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mAttrAndChildCount as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_Impl), + "::", + stringify!(mAttrAndChildCount) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mBufferSize as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_Impl), + "::", + stringify!(mBufferSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mMappedAttrs as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_Impl), + "::", + stringify!(mMappedAttrs) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mBuffer as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray_Impl), + "::", + stringify!(mBuffer) + ) + ); + } + impl Clone for nsAttrAndChildArray_Impl { + fn clone(&self) -> Self { + *self + } + } + #[test] + fn bindgen_test_layout_nsAttrAndChildArray() { + assert_eq!( + ::std::mem::size_of::<nsAttrAndChildArray>(), + 8usize, + concat!("Size of: ", stringify!(nsAttrAndChildArray)) + ); + assert_eq!( + ::std::mem::align_of::<nsAttrAndChildArray>(), + 8usize, + concat!("Alignment of ", stringify!(nsAttrAndChildArray)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsAttrAndChildArray>())).mImpl as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsAttrAndChildArray), + "::", + stringify!(mImpl) + ) + ); + } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCompatibility { @@ -21494,6 +21024,144 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct nsIApplicationCacheContainer { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIApplicationCacheContainer_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsIApplicationCacheContainer() { + assert_eq!( + ::std::mem::size_of::<nsIApplicationCacheContainer>(), + 8usize, + concat!("Size of: ", stringify!(nsIApplicationCacheContainer)) + ); + assert_eq!( + ::std::mem::align_of::<nsIApplicationCacheContainer>(), + 8usize, + concat!("Alignment of ", stringify!(nsIApplicationCacheContainer)) + ); + } + impl Clone for nsIApplicationCacheContainer { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIPrintSettings { + _unused: [u8; 0], + } + impl Clone for nsIPrintSettings { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsDOMNavigationTiming { + _unused: [u8; 0], + } + impl Clone for nsDOMNavigationTiming { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIContentViewer { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIContentViewer_COMTypeInfo { + pub _address: u8, + } + pub const nsIContentViewer_ePrompt: root::nsIContentViewer__bindgen_ty_1 = 0; + pub const nsIContentViewer_eDontPromptAndDontUnload: root::nsIContentViewer__bindgen_ty_1 = 1; + pub const nsIContentViewer_eDontPromptAndUnload: root::nsIContentViewer__bindgen_ty_1 = 2; + pub type nsIContentViewer__bindgen_ty_1 = u32; + pub const nsIContentViewer_eDelayResize: root::nsIContentViewer__bindgen_ty_2 = 1; + pub type nsIContentViewer__bindgen_ty_2 = u32; + #[test] + fn bindgen_test_layout_nsIContentViewer() { + assert_eq!( + ::std::mem::size_of::<nsIContentViewer>(), + 8usize, + concat!("Size of: ", stringify!(nsIContentViewer)) + ); + assert_eq!( + ::std::mem::align_of::<nsIContentViewer>(), + 8usize, + concat!("Alignment of ", stringify!(nsIContentViewer)) + ); + } + impl Clone for nsIContentViewer { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIInterfaceRequestor { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIInterfaceRequestor_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsIInterfaceRequestor() { + assert_eq!( + ::std::mem::size_of::<nsIInterfaceRequestor>(), + 8usize, + concat!("Size of: ", stringify!(nsIInterfaceRequestor)) + ); + assert_eq!( + ::std::mem::align_of::<nsIInterfaceRequestor>(), + 8usize, + concat!("Alignment of ", stringify!(nsIInterfaceRequestor)) + ); + } + impl Clone for nsIInterfaceRequestor { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsILoadContext { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsILoadContext_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsILoadContext() { + assert_eq!( + ::std::mem::size_of::<nsILoadContext>(), + 8usize, + concat!("Size of: ", stringify!(nsILoadContext)) + ); + assert_eq!( + ::std::mem::align_of::<nsILoadContext>(), + 8usize, + concat!("Alignment of ", stringify!(nsILoadContext)) + ); + } + impl Clone for nsILoadContext { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct nsILoadGroup { pub _base: root::nsIRequest, } @@ -21638,6 +21306,95 @@ pub mod root { } } #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIChannelEventSink { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIChannelEventSink_COMTypeInfo { + pub _address: u8, + } + pub const nsIChannelEventSink_REDIRECT_TEMPORARY: root::nsIChannelEventSink__bindgen_ty_1 = 1; + pub const nsIChannelEventSink_REDIRECT_PERMANENT: root::nsIChannelEventSink__bindgen_ty_1 = 2; + pub const nsIChannelEventSink_REDIRECT_INTERNAL: root::nsIChannelEventSink__bindgen_ty_1 = 4; + pub const nsIChannelEventSink_REDIRECT_STS_UPGRADE: root::nsIChannelEventSink__bindgen_ty_1 = 8; + pub type nsIChannelEventSink__bindgen_ty_1 = u32; + #[test] + fn bindgen_test_layout_nsIChannelEventSink() { + assert_eq!( + ::std::mem::size_of::<nsIChannelEventSink>(), + 8usize, + concat!("Size of: ", stringify!(nsIChannelEventSink)) + ); + assert_eq!( + ::std::mem::align_of::<nsIChannelEventSink>(), + 8usize, + concat!("Alignment of ", stringify!(nsIChannelEventSink)) + ); + } + impl Clone for nsIChannelEventSink { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIProgressEventSink { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIProgressEventSink_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsIProgressEventSink() { + assert_eq!( + ::std::mem::size_of::<nsIProgressEventSink>(), + 8usize, + concat!("Size of: ", stringify!(nsIProgressEventSink)) + ); + assert_eq!( + ::std::mem::align_of::<nsIProgressEventSink>(), + 8usize, + concat!("Alignment of ", stringify!(nsIProgressEventSink)) + ); + } + impl Clone for nsIProgressEventSink { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsISecurityEventSink { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsISecurityEventSink_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsISecurityEventSink() { + assert_eq!( + ::std::mem::size_of::<nsISecurityEventSink>(), + 8usize, + concat!("Size of: ", stringify!(nsISecurityEventSink)) + ); + assert_eq!( + ::std::mem::align_of::<nsISecurityEventSink>(), + 8usize, + concat!("Alignment of ", stringify!(nsISecurityEventSink)) + ); + } + impl Clone for nsISecurityEventSink { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] #[derive(Debug)] pub struct nsIGlobalObject { pub _base: root::nsISupports, @@ -21831,8 +21588,6 @@ pub mod root { pub mPerformance: root::RefPtr<root::mozilla::dom::Performance>, pub mTimeoutManager: root::mozilla::UniquePtr<root::mozilla::dom::TimeoutManager>, pub mNavigator: root::RefPtr<root::mozilla::dom::Navigator>, - pub mServiceWorkerRegistrationTable: - root::nsPIDOMWindowInner_ServiceWorkerRegistrationTable, pub mMutationBits: u32, pub mActivePeerConnections: u32, pub mIsDocumentLoaded: bool, @@ -21861,12 +21616,11 @@ pub mod root { pub struct nsPIDOMWindowInner_COMTypeInfo { pub _address: u8, } - pub type nsPIDOMWindowInner_ServiceWorkerRegistrationTable = [u64; 4usize]; #[test] fn bindgen_test_layout_nsPIDOMWindowInner() { assert_eq!( ::std::mem::size_of::<nsPIDOMWindowInner>(), - 200usize, + 168usize, concat!("Size of: ", stringify!(nsPIDOMWindowInner)) ); assert_eq!( @@ -21971,22 +21725,9 @@ pub mod root { ); assert_eq!( unsafe { - &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mServiceWorkerRegistrationTable - as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(nsPIDOMWindowInner), - "::", - stringify!(mServiceWorkerRegistrationTable) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMutationBits as *const _ as usize }, - 104usize, + 72usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -21999,7 +21740,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mActivePeerConnections as *const _ as usize }, - 108usize, + 76usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22012,7 +21753,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mIsDocumentLoaded as *const _ as usize }, - 112usize, + 80usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22025,7 +21766,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mIsHandlingResizeEvent as *const _ as usize }, - 113usize, + 81usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22038,7 +21779,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMayHavePaintEventListener as *const _ as usize }, - 114usize, + 82usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22051,7 +21792,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMayHaveTouchEventListener as *const _ as usize }, - 115usize, + 83usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22064,7 +21805,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMayHaveSelectionChangeEventListener as *const _ as usize }, - 116usize, + 84usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22077,7 +21818,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMayHaveMouseEnterLeaveEventListener as *const _ as usize }, - 117usize, + 85usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22090,7 +21831,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())) .mMayHavePointerEnterLeaveEventListener as *const _ as usize }, - 118usize, + 86usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22103,7 +21844,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mInnerObjectsFreed as *const _ as usize }, - 119usize, + 87usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22115,7 +21856,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mAudioCaptured as *const _ as usize }, - 120usize, + 88usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22127,7 +21868,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mOuterWindow as *const _ as usize }, - 128usize, + 96usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22139,7 +21880,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mFocusedNode as *const _ as usize }, - 136usize, + 104usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22151,7 +21892,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mAudioContexts as *const _ as usize }, - 144usize, + 112usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22163,7 +21904,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mTabGroup as *const _ as usize }, - 152usize, + 120usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22175,7 +21916,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mWindowID as *const _ as usize }, - 160usize, + 128usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22188,7 +21929,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mHasNotifiedGlobalCreated as *const _ as usize }, - 168usize, + 136usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22201,7 +21942,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mMarkedCCGeneration as *const _ as usize }, - 172usize, + 140usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22213,7 +21954,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mTopInnerWindow as *const _ as usize }, - 176usize, + 144usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22226,7 +21967,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mHasTriedToCacheTopInnerWindow as *const _ as usize }, - 184usize, + 152usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22239,7 +21980,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mNumOfIndexedDBDatabases as *const _ as usize }, - 188usize, + 156usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22252,7 +21993,7 @@ pub mod root { &(*(::std::ptr::null::<nsPIDOMWindowInner>())).mNumOfOpenWebSockets as *const _ as usize }, - 192usize, + 160usize, concat!( "Offset of field: ", stringify!(nsPIDOMWindowInner), @@ -22583,6 +22324,40 @@ pub mod root { ) ); } + /// Hashtable key class to use with nsTHashtable/nsBaseHashtable + #[repr(C)] + #[derive(Debug)] + pub struct nsURIHashKey { + pub _base: root::PLDHashEntryHdr, + pub mKey: root::nsCOMPtr, + } + pub type nsURIHashKey_KeyType = *mut root::nsIURI; + pub type nsURIHashKey_KeyTypePointer = *const root::nsIURI; + pub const nsURIHashKey_ALLOW_MEMMOVE: root::nsURIHashKey__bindgen_ty_1 = 1; + pub type nsURIHashKey__bindgen_ty_1 = u32; + #[test] + fn bindgen_test_layout_nsURIHashKey() { + assert_eq!( + ::std::mem::size_of::<nsURIHashKey>(), + 16usize, + concat!("Size of: ", stringify!(nsURIHashKey)) + ); + assert_eq!( + ::std::mem::align_of::<nsURIHashKey>(), + 8usize, + concat!("Alignment of ", stringify!(nsURIHashKey)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsURIHashKey>())).mKey as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsURIHashKey), + "::", + stringify!(mKey) + ) + ); + } #[repr(C)] #[derive(Debug, Copy)] pub struct nsContentList { @@ -22823,6 +22598,12 @@ pub mod root { pub type nsRunnableMethod_ReturnTypeEnforcer_ReturnTypeIsSafe = ::std::os::raw::c_int; pub type nsRunnableMethod_check = root::nsRunnableMethod_ReturnTypeEnforcer; #[repr(C)] + #[derive(Debug)] + pub struct nsRevocableEventPtr<T> { + pub mEvent: root::RefPtr<T>, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, + } + #[repr(C)] #[derive(Debug, Copy)] pub struct nsIIOService { _unused: [u8; 0], @@ -23878,8 +23659,8 @@ pub mod root { pub type RawGeckoCSSPropertyIDList = root::nsTArray<root::nsCSSPropertyID>; pub type RawGeckoGfxMatrix4x4 = [root::mozilla::gfx::Float; 16usize]; pub type RawGeckoStyleChildrenIterator = root::mozilla::dom::StyleChildrenIterator; - pub type ServoStyleContextBorrowed = *const root::mozilla::ServoStyleContext; - pub type ServoStyleContextBorrowedOrNull = *const root::mozilla::ServoStyleContext; + pub type ComputedStyleBorrowed = *const root::mozilla::ComputedStyle; + pub type ComputedStyleBorrowedOrNull = *const root::mozilla::ComputedStyle; pub type ServoComputedDataBorrowed = *const root::ServoComputedData; pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode; pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode; @@ -23912,20 +23693,30 @@ pub mod root { pub type RawGeckoStyleChildrenIteratorBorrowedMut = *mut root::RawGeckoStyleChildrenIterator; #[repr(C)] #[derive(Debug, Copy)] - pub struct nsHTMLCSSStyleSheet { + pub struct nsDOMStyleSheetSetList { _unused: [u8; 0], } - impl Clone for nsHTMLCSSStyleSheet { + impl Clone for nsDOMStyleSheetSetList { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsHTMLStyleSheet { + pub struct nsFrameLoader { _unused: [u8; 0], } - impl Clone for nsHTMLStyleSheet { + impl Clone for nsFrameLoader { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsHTMLCSSStyleSheet { + _unused: [u8; 0], + } + impl Clone for nsHTMLCSSStyleSheet { fn clone(&self) -> Self { *self } @@ -23952,6 +23743,16 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct nsIObjectLoadingContent { + _unused: [u8; 0], + } + impl Clone for nsIObjectLoadingContent { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct nsIStructuredCloneContainer { _unused: [u8; 0], } @@ -23971,6 +23772,484 @@ pub mod root { } } #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsSVGElement { + _unused: [u8; 0], + } + impl Clone for nsSVGElement { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + pub struct nsDocHeaderData { + pub mField: root::RefPtr<root::nsAtom>, + pub mData: ::nsstring::nsStringRepr, + pub mNext: *mut root::nsDocHeaderData, + } + #[test] + fn bindgen_test_layout_nsDocHeaderData() { + assert_eq!( + ::std::mem::size_of::<nsDocHeaderData>(), + 32usize, + concat!("Size of: ", stringify!(nsDocHeaderData)) + ); + assert_eq!( + ::std::mem::align_of::<nsDocHeaderData>(), + 8usize, + concat!("Alignment of ", stringify!(nsDocHeaderData)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsDocHeaderData>())).mField as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsDocHeaderData), + "::", + stringify!(mField) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsDocHeaderData>())).mData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsDocHeaderData), + "::", + stringify!(mData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsDocHeaderData>())).mNext as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(nsDocHeaderData), + "::", + stringify!(mNext) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap { + pub mMap: [u64; 4usize], + pub mPendingLoads: [u64; 4usize], + pub mHaveShutDown: bool, + } + pub type nsExternalResourceMap_nsSubDocEnumFunc = ::std::option::Option< + unsafe extern "C" fn(aDocument: *mut root::nsIDocument, aData: *mut ::std::os::raw::c_void) + -> bool, + >; + /// A class that represents an external resource load that has begun but + /// doesn't have a document yet. Observers can be registered on this object, + /// and will be notified after the document is created. Observers registered + /// after the document has been created will NOT be notified. When observers + /// are notified, the subject will be the newly-created document, the topic + /// will be "external-resource-document-created", and the data will be null. + /// If document creation fails for some reason, observers will still be + /// notified, with a null document pointer. + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_ExternalResourceLoad { + pub _base: root::nsISupports, + pub mObservers: [u64; 10usize], + } + #[test] + fn bindgen_test_layout_nsExternalResourceMap_ExternalResourceLoad() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap_ExternalResourceLoad>(), + 88usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_ExternalResourceLoad) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap_ExternalResourceLoad>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_ExternalResourceLoad) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_ExternalResourceLoad>())).mObservers + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_ExternalResourceLoad), + "::", + stringify!(mObservers) + ) + ); + } + #[repr(C)] + pub struct nsExternalResourceMap_ExternalResource { + pub mDocument: root::nsCOMPtr, + pub mViewer: root::nsCOMPtr, + pub mLoadGroup: root::nsCOMPtr, + } + #[test] + fn bindgen_test_layout_nsExternalResourceMap_ExternalResource() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap_ExternalResource>(), + 24usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_ExternalResource) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap_ExternalResource>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_ExternalResource) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_ExternalResource>())).mDocument + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_ExternalResource), + "::", + stringify!(mDocument) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_ExternalResource>())).mViewer + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_ExternalResource), + "::", + stringify!(mViewer) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_ExternalResource>())).mLoadGroup + as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_ExternalResource), + "::", + stringify!(mLoadGroup) + ) + ); + } + #[repr(C)] + pub struct nsExternalResourceMap_PendingLoad { + pub _base: root::nsExternalResourceMap_ExternalResourceLoad, + pub _base_1: root::nsIStreamListener, + pub mRefCnt: root::nsAutoRefCnt, + pub mDisplayDocument: root::nsCOMPtr, + pub mTargetListener: root::nsCOMPtr, + pub mURI: root::nsCOMPtr, + } + pub type nsExternalResourceMap_PendingLoad_HasThreadSafeRefCnt = root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_PendingLoad() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap_PendingLoad>(), + 128usize, + concat!("Size of: ", stringify!(nsExternalResourceMap_PendingLoad)) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap_PendingLoad>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_PendingLoad) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks { + pub _base: root::nsIInterfaceRequestor, + pub mRefCnt: root::nsAutoRefCnt, + pub mCallbacks: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_HasThreadSafeRefCnt = + root::mozilla::FalseType; + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim { + pub _base: root::nsIInterfaceRequestor, + pub _base_1: root::nsILoadContext, + pub mRefCnt: root::nsAutoRefCnt, + pub mIfReq: root::nsCOMPtr, + pub mRealPtr: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim_HasThreadSafeRefCnt = + root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim>(), + 40usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsILoadContextShim) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim { + pub _base: root::nsIInterfaceRequestor, + pub _base_1: root::nsIProgressEventSink, + pub mRefCnt: root::nsAutoRefCnt, + pub mIfReq: root::nsCOMPtr, + pub mRealPtr: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim_HasThreadSafeRefCnt = + root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim() { + assert_eq!( + ::std::mem::size_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim, + >(), + 40usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim) + ) + ); + assert_eq!( + ::std::mem::align_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsIProgressEventSinkShim) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim { + pub _base: root::nsIInterfaceRequestor, + pub _base_1: root::nsIChannelEventSink, + pub mRefCnt: root::nsAutoRefCnt, + pub mIfReq: root::nsCOMPtr, + pub mRealPtr: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim_HasThreadSafeRefCnt = + root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim() { + assert_eq ! ( :: std :: mem :: size_of :: < nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim ) ) ); + assert_eq!( + ::std::mem::align_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsIChannelEventSinkShim) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim { + pub _base: root::nsIInterfaceRequestor, + pub _base_1: root::nsISecurityEventSink, + pub mRefCnt: root::nsAutoRefCnt, + pub mIfReq: root::nsCOMPtr, + pub mRealPtr: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim_HasThreadSafeRefCnt = + root::mozilla::FalseType; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim() { + assert_eq!( + ::std::mem::size_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim, + >(), + 40usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim) + ) + ); + assert_eq!( + ::std::mem::align_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks_nsISecurityEventSinkShim) + ) + ); + } + #[repr(C)] + #[derive(Debug)] + pub struct nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim { + pub _base: root::nsIInterfaceRequestor, + pub _base_1: root::nsIApplicationCacheContainer, + pub mRefCnt: root::nsAutoRefCnt, + pub mIfReq: root::nsCOMPtr, + pub mRealPtr: root::nsCOMPtr, + } + pub type nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim_HasThreadSafeRefCnt = root :: mozilla :: FalseType ; + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim( +) { + assert_eq!( + ::std::mem::size_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim, + >(), + 40usize, + concat!( + "Size of: ", + stringify!( + nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim + ) + ) + ); + assert_eq!( + ::std::mem::align_of::< + nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!( + nsExternalResourceMap_LoadgroupCallbacks_nsIApplicationCacheContainerShim + ) + ) + ); + } + #[test] + fn bindgen_test_layout_nsExternalResourceMap_LoadgroupCallbacks() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap_LoadgroupCallbacks>(), + 24usize, + concat!( + "Size of: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap_LoadgroupCallbacks>(), + 8usize, + concat!( + "Alignment of ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_LoadgroupCallbacks>())).mRefCnt + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks), + "::", + stringify!(mRefCnt) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap_LoadgroupCallbacks>())).mCallbacks + as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap_LoadgroupCallbacks), + "::", + stringify!(mCallbacks) + ) + ); + } + #[test] + fn bindgen_test_layout_nsExternalResourceMap() { + assert_eq!( + ::std::mem::size_of::<nsExternalResourceMap>(), + 72usize, + concat!("Size of: ", stringify!(nsExternalResourceMap)) + ); + assert_eq!( + ::std::mem::align_of::<nsExternalResourceMap>(), + 8usize, + concat!("Alignment of ", stringify!(nsExternalResourceMap)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsExternalResourceMap>())).mMap as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap), + "::", + stringify!(mMap) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap>())).mPendingLoads as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap), + "::", + stringify!(mPendingLoads) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsExternalResourceMap>())).mHaveShutDown as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(nsExternalResourceMap), + "::", + stringify!(mHaveShutDown) + ) + ); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PrincipalFlashClassifier { + _unused: [u8; 0], + } + impl Clone for PrincipalFlashClassifier { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] pub struct nsIDocument { pub _base: root::nsINode, pub _base_1: root::mozilla::dom::DocumentOrShadowRoot, @@ -24006,19 +24285,30 @@ pub mod root { pub mStyleAttrStyleSheet: root::RefPtr<root::nsHTMLCSSStyleSheet>, pub mImageTracker: root::RefPtr<root::mozilla::dom::ImageTracker>, pub mActivityObservers: u64, + pub mStyledLinks: [u64; 4usize], pub mLinksToUpdate: root::nsIDocument_LinksToUpdateList, pub mAnimationController: root::RefPtr<root::nsSMILAnimationController>, pub mPropertyTable: root::nsPropertyTable, - pub mExtraPropertyTables: root::nsTArray<root::nsAutoPtr<root::nsPropertyTable>>, pub mChildrenCollection: root::nsCOMPtr, + pub mImages: root::RefPtr<root::nsContentList>, + pub mEmbeds: root::RefPtr<root::nsContentList>, + pub mLinks: root::RefPtr<root::nsContentList>, + pub mForms: root::RefPtr<root::nsContentList>, + pub mScripts: root::RefPtr<root::nsContentList>, + pub mApplets: root::nsCOMPtr, + pub mAnchors: root::RefPtr<root::nsContentList>, pub mFontFaceSet: root::RefPtr<root::mozilla::dom::FontFaceSet>, pub mLastFocusTime: root::mozilla::TimeStamp, pub mDocumentState: root::mozilla::EventStates, pub mReadyForIdle: root::RefPtr<root::mozilla::dom::Promise>, - pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 7usize], u8>, + pub mAboutCapabilities: root::RefPtr<root::mozilla::dom::AboutCapabilities>, + pub _bitfield_1: root::__BindgenBitfieldUnit<[u8; 11usize], u8>, + pub mPendingFullscreenRequests: u8, + pub mXMLDeclarationBits: u8, + pub mOnloadBlockCount: u32, + pub mAsyncOnloadBlockCount: u32, pub mCompatMode: root::nsCompatibility, pub mReadyState: root::nsIDocument_ReadyState, - pub mStyleBackendType: root::mozilla::StyleBackendType, pub mVisibilityState: root::mozilla::dom::VisibilityState, pub mType: root::nsIDocument_Type, pub mDefaultElementType: u8, @@ -24037,6 +24327,10 @@ pub mod root { pub mPresShell: *mut root::nsIPresShell, pub mSubtreeModifiedTargets: root::nsCOMArray, pub mSubtreeModifiedDepth: u32, + pub mPreloadingImages: [u64; 4usize], + pub mPreloadedPreconnects: [u64; 4usize], + pub mPreloadPictureDepth: u32, + pub mPreloadPictureFoundSource: ::nsstring::nsStringRepr, pub mDisplayDocument: root::nsCOMPtr, pub mEventsSuppressed: u32, /// https://html.spec.whatwg.org/#ignore-destructive-writes-counter @@ -24057,6 +24351,7 @@ pub mod root { pub mAnonymousContents: root::nsTArray<root::RefPtr<root::mozilla::dom::AnonymousContent>>, pub mBlockDOMContentLoaded: u32, pub mDOMMediaQueryLists: root::mozilla::LinkedList, + pub mObservers: [u64; 2usize], pub mUseCounters: [u64; 2usize], pub mChildDocumentUseCounters: [u64; 2usize], pub mNotifiedPageForUseCounter: [u64; 2usize], @@ -24069,6 +24364,57 @@ pub mod root { pub mBufferedCSPViolations: root::nsTArray<root::nsCOMPtr>, pub mAncestorPrincipals: root::nsTArray<root::nsCOMPtr>, pub mAncestorOuterWindowIDs: root::nsTArray<u64>, + pub mParser: root::nsCOMPtr, + pub mStackRefCnt: root::nsrefcnt, + pub mWeakSink: root::nsWeakPtr, + pub mUpdateNestLevel: u32, + pub mViewportType: root::nsIDocument_ViewportType, + pub mSubDocuments: *mut root::PLDHashTable, + pub mHeaderData: *mut root::nsDocHeaderData, + pub mPrincipalFlashClassifier: root::RefPtr<root::PrincipalFlashClassifier>, + pub mFlashClassification: root::mozilla::dom::FlashClassification, + pub mIsThirdParty: [u8; 2usize], + pub mPendingTitleChangeEvent: u64, + pub mTiming: root::RefPtr<root::nsDOMNavigationTiming>, + pub mLoadingTimeStamp: root::mozilla::TimeStamp, + pub mAutoFocusElement: root::nsWeakPtr, + pub mScrollToRef: root::nsCString, + pub mScopeObject: root::nsWeakPtr, + pub mIntersectionObservers: [u64; 4usize], + pub mFullScreenStack: root::nsTArray<root::nsWeakPtr>, + pub mFullscreenRoot: root::nsWeakPtr, + pub mDOMImplementation: root::RefPtr<root::mozilla::dom::DOMImplementation>, + pub mImageMaps: root::RefPtr<root::nsContentList>, + pub mResponsiveContent: [u64; 4usize], + pub mPlugins: [u64; 4usize], + pub mChildren: root::nsAttrAndChildArray, + pub mDocumentTimeline: root::RefPtr<root::mozilla::dom::DocumentTimeline>, + pub mTimelines: root::mozilla::LinkedList, + pub mScriptLoader: root::RefPtr<root::mozilla::dom::ScriptLoader>, + pub mBoxObjectTable: *mut u8, + pub mPendingAnimationTracker: root::RefPtr<root::mozilla::PendingAnimationTracker>, + pub mTemplateContentsOwner: root::nsCOMPtr, + pub mExternalResourceMap: root::nsExternalResourceMap, + pub mOrientationPendingPromise: root::RefPtr<root::mozilla::dom::Promise>, + pub mCurrentOrientationAngle: u16, + pub mCurrentOrientationType: root::mozilla::dom::OrientationType, + pub mInitializableFrameLoaders: root::nsTArray<root::RefPtr<root::nsFrameLoader>>, + pub mFrameLoaderFinalizers: root::nsTArray<root::nsCOMPtr>, + pub mFrameLoaderRunner: u64, + pub mLayoutHistoryState: root::nsCOMPtr, + pub mScaleMinFloat: root::mozilla::LayoutDeviceToScreenScale, + pub mScaleMaxFloat: root::mozilla::LayoutDeviceToScreenScale, + pub mScaleFloat: root::mozilla::LayoutDeviceToScreenScale, + pub mPixelRatio: root::mozilla::CSSToLayoutDeviceScale, + pub mViewportSize: root::mozilla::CSSSize, + pub mListenerManager: root::RefPtr<root::mozilla::EventListenerManager>, + pub mMaybeEndOutermostXBLUpdateRunner: root::nsCOMPtr, + pub mOnloadBlocker: root::nsCOMPtr, + pub mOnDemandBuiltInUASheets: root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>, + pub mAdditionalSheets: [root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>; 3usize], + pub mLastStyleSheetSet: ::nsstring::nsStringRepr, + pub mStyleSheetSetList: root::RefPtr<root::nsDOMStyleSheetSetList>, + pub mLazySVGPresElements: [u64; 4usize], pub mServoRestyleRoot: root::nsCOMPtr, pub mServoRestyleRootDirtyBits: u32, pub mThrowOnDynamicMarkupInsertionCounter: u32, @@ -24077,6 +24423,7 @@ pub mod root { pub type nsIDocument_GlobalObject = root::mozilla::dom::GlobalObject; pub type nsIDocument_Encoding = root::mozilla::Encoding; pub type nsIDocument_NotNull<T> = root::mozilla::NotNull<T>; + pub type nsIDocument_ExternalResourceLoad = root::nsExternalResourceMap_ExternalResourceLoad; pub use self::super::root::mozilla::net::ReferrerPolicy as nsIDocument_ReferrerPolicyEnum; pub type nsIDocument_Element = root::mozilla::dom::Element; pub type nsIDocument_FullscreenRequest = root::mozilla::dom::FullscreenRequest; @@ -24342,49 +24689,6 @@ pub mod root { /// The callback function must not mutate any state for the given document. pub type nsIDocument_nsDocTestFunc = ::std::option::Option<unsafe extern "C" fn(aDocument: *const root::nsIDocument) -> bool>; - /// A class that represents an external resource load that has begun but - /// doesn't have a document yet. Observers can be registered on this object, - /// and will be notified after the document is created. Observers registered - /// after the document has been created will NOT be notified. When observers - /// are notified, the subject will be the newly-created document, the topic - /// will be "external-resource-document-created", and the data will be null. - /// If document creation fails for some reason, observers will still be - /// notified, with a null document pointer. - #[repr(C)] - #[derive(Debug)] - pub struct nsIDocument_ExternalResourceLoad { - pub _base: root::nsISupports, - pub mObservers: [u64; 10usize], - } - #[test] - fn bindgen_test_layout_nsIDocument_ExternalResourceLoad() { - assert_eq!( - ::std::mem::size_of::<nsIDocument_ExternalResourceLoad>(), - 88usize, - concat!("Size of: ", stringify!(nsIDocument_ExternalResourceLoad)) - ); - assert_eq!( - ::std::mem::align_of::<nsIDocument_ExternalResourceLoad>(), - 8usize, - concat!( - "Alignment of ", - stringify!(nsIDocument_ExternalResourceLoad) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsIDocument_ExternalResourceLoad>())).mObservers as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsIDocument_ExternalResourceLoad), - "::", - stringify!(mObservers) - ) - ); - } pub type nsIDocument_ActivityObserverEnumerator = ::std::option::Option< unsafe extern "C" fn(arg1: *mut root::nsISupports, arg2: *mut ::std::os::raw::c_void), >; @@ -24413,68 +24717,70 @@ pub mod root { root::nsIDocument_DeprecatedOperations = 5; pub const nsIDocument_DeprecatedOperations_eLenientThis: root::nsIDocument_DeprecatedOperations = 6; - pub const nsIDocument_DeprecatedOperations_eGetSetUserData: - root::nsIDocument_DeprecatedOperations = 7; pub const nsIDocument_DeprecatedOperations_eMozGetAsFile: - root::nsIDocument_DeprecatedOperations = 8; + root::nsIDocument_DeprecatedOperations = 7; pub const nsIDocument_DeprecatedOperations_eUseOfCaptureEvents: - root::nsIDocument_DeprecatedOperations = 9; + root::nsIDocument_DeprecatedOperations = 8; pub const nsIDocument_DeprecatedOperations_eUseOfReleaseEvents: - root::nsIDocument_DeprecatedOperations = 10; + root::nsIDocument_DeprecatedOperations = 9; pub const nsIDocument_DeprecatedOperations_eUseOfDOM3LoadMethod: - root::nsIDocument_DeprecatedOperations = 11; + root::nsIDocument_DeprecatedOperations = 10; pub const nsIDocument_DeprecatedOperations_eChromeUseOfDOM3LoadMethod: - root::nsIDocument_DeprecatedOperations = 12; + root::nsIDocument_DeprecatedOperations = 11; pub const nsIDocument_DeprecatedOperations_eShowModalDialog: - root::nsIDocument_DeprecatedOperations = 13; + root::nsIDocument_DeprecatedOperations = 12; pub const nsIDocument_DeprecatedOperations_eSyncXMLHttpRequest: - root::nsIDocument_DeprecatedOperations = 14; + root::nsIDocument_DeprecatedOperations = 13; pub const nsIDocument_DeprecatedOperations_eWindow_Cc_ontrollers: - root::nsIDocument_DeprecatedOperations = 15; + root::nsIDocument_DeprecatedOperations = 14; pub const nsIDocument_DeprecatedOperations_eImportXULIntoContent: - root::nsIDocument_DeprecatedOperations = 16; + root::nsIDocument_DeprecatedOperations = 15; pub const nsIDocument_DeprecatedOperations_ePannerNodeDoppler: - root::nsIDocument_DeprecatedOperations = 17; + root::nsIDocument_DeprecatedOperations = 16; pub const nsIDocument_DeprecatedOperations_eNavigatorGetUserMedia: - root::nsIDocument_DeprecatedOperations = 18; + root::nsIDocument_DeprecatedOperations = 17; pub const nsIDocument_DeprecatedOperations_eWebrtcDeprecatedPrefix: - root::nsIDocument_DeprecatedOperations = 19; + root::nsIDocument_DeprecatedOperations = 18; pub const nsIDocument_DeprecatedOperations_eRTCPeerConnectionGetStreams: - root::nsIDocument_DeprecatedOperations = 20; + root::nsIDocument_DeprecatedOperations = 19; pub const nsIDocument_DeprecatedOperations_eAppCache: root::nsIDocument_DeprecatedOperations = - 21; + 20; pub const nsIDocument_DeprecatedOperations_eAppCacheInsecure: - root::nsIDocument_DeprecatedOperations = 22; + root::nsIDocument_DeprecatedOperations = 21; pub const nsIDocument_DeprecatedOperations_ePrefixedImageSmoothingEnabled: - root::nsIDocument_DeprecatedOperations = 23; + root::nsIDocument_DeprecatedOperations = 22; pub const nsIDocument_DeprecatedOperations_ePrefixedFullscreenAPI: - root::nsIDocument_DeprecatedOperations = 24; + root::nsIDocument_DeprecatedOperations = 23; pub const nsIDocument_DeprecatedOperations_eLenientSetter: - root::nsIDocument_DeprecatedOperations = 25; + root::nsIDocument_DeprecatedOperations = 24; pub const nsIDocument_DeprecatedOperations_eFileLastModifiedDate: - root::nsIDocument_DeprecatedOperations = 26; + root::nsIDocument_DeprecatedOperations = 25; pub const nsIDocument_DeprecatedOperations_eImageBitmapRenderingContext_TransferImageBitmap: - root::nsIDocument_DeprecatedOperations = 27; + root::nsIDocument_DeprecatedOperations = 26; pub const nsIDocument_DeprecatedOperations_eURLCreateObjectURL_MediaStream: - root::nsIDocument_DeprecatedOperations = 28; + root::nsIDocument_DeprecatedOperations = 27; pub const nsIDocument_DeprecatedOperations_eXMLBaseAttribute: - root::nsIDocument_DeprecatedOperations = 29; + root::nsIDocument_DeprecatedOperations = 28; pub const nsIDocument_DeprecatedOperations_eWindowContentUntrusted: - root::nsIDocument_DeprecatedOperations = 30; + root::nsIDocument_DeprecatedOperations = 29; pub const nsIDocument_DeprecatedOperations_eRegisterProtocolHandlerInsecure: - root::nsIDocument_DeprecatedOperations = 31; + root::nsIDocument_DeprecatedOperations = 30; pub const nsIDocument_DeprecatedOperations_eMixedDisplayObjectSubrequest: - root::nsIDocument_DeprecatedOperations = 32; + root::nsIDocument_DeprecatedOperations = 31; pub const nsIDocument_DeprecatedOperations_eMotionEvent: - root::nsIDocument_DeprecatedOperations = 33; + root::nsIDocument_DeprecatedOperations = 32; pub const nsIDocument_DeprecatedOperations_eOrientationEvent: - root::nsIDocument_DeprecatedOperations = 34; + root::nsIDocument_DeprecatedOperations = 33; pub const nsIDocument_DeprecatedOperations_eProximityEvent: - root::nsIDocument_DeprecatedOperations = 35; + root::nsIDocument_DeprecatedOperations = 34; pub const nsIDocument_DeprecatedOperations_eAmbientLightEvent: + root::nsIDocument_DeprecatedOperations = 35; + pub const nsIDocument_DeprecatedOperations_eIDBOpenDBOptions_StorageType: root::nsIDocument_DeprecatedOperations = 36; - pub const nsIDocument_DeprecatedOperations_eDeprecatedOperationCount: + pub const nsIDocument_DeprecatedOperations_eGetPropertyCSSValue: root::nsIDocument_DeprecatedOperations = 37; + pub const nsIDocument_DeprecatedOperations_eDeprecatedOperationCount: + root::nsIDocument_DeprecatedOperations = 38; pub type nsIDocument_DeprecatedOperations = u32; pub const nsIDocument_DocumentWarnings_eIgnoringWillChangeOverBudget: root::nsIDocument_DocumentWarnings = 0; @@ -24493,11 +24799,11 @@ pub mod root { pub const nsIDocument_ElementCallbackType_eAttributeChanged: root::nsIDocument_ElementCallbackType = 3; pub type nsIDocument_ElementCallbackType = u32; + pub const nsIDocument_UseCounterReportKind_eDefault: root::nsIDocument_UseCounterReportKind = 0; + pub const nsIDocument_UseCounterReportKind_eIncludeExternalResources: + root::nsIDocument_UseCounterReportKind = 1; + pub type nsIDocument_UseCounterReportKind = i32; pub type nsIDocument_LinksToUpdateList = [u64; 3usize]; - pub const nsIDocument_eScopedStyle_Unknown: root::nsIDocument__bindgen_ty_1 = 0; - pub const nsIDocument_eScopedStyle_Disabled: root::nsIDocument__bindgen_ty_1 = 1; - pub const nsIDocument_eScopedStyle_Enabled: root::nsIDocument__bindgen_ty_1 = 2; - pub type nsIDocument__bindgen_ty_1 = u32; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsIDocument_Type { @@ -24522,12 +24828,16 @@ pub mod root { *self } } + pub const nsIDocument_ViewportType_DisplayWidthHeight: root::nsIDocument_ViewportType = 0; + pub const nsIDocument_ViewportType_Specified: root::nsIDocument_ViewportType = 1; + pub const nsIDocument_ViewportType_Unknown: root::nsIDocument_ViewportType = 2; + pub type nsIDocument_ViewportType = u32; pub const nsIDocument_kSegmentSize: usize = 128; #[test] fn bindgen_test_layout_nsIDocument() { assert_eq!( ::std::mem::size_of::<nsIDocument>(), - 928usize, + 1712usize, concat!("Size of: ", stringify!(nsIDocument)) ); assert_eq!( @@ -25121,14 +25431,311 @@ pub mod root { } } #[inline] - pub fn mIsScopedStyleEnabled(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(53usize, 2u8) as u32) } + pub fn mInDestructor(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(53usize, 1u8) as u8) } } #[inline] - pub fn set_mIsScopedStyleEnabled(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mInDestructor(&mut self, val: bool) { unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(53usize, 2u8, val as u64) + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(53usize, 1u8, val as u64) + } + } + #[inline] + pub fn mIsGoingAway(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(54usize, 1u8) as u8) } + } + #[inline] + pub fn set_mIsGoingAway(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(54usize, 1u8, val as u64) + } + } + #[inline] + pub fn mInXBLUpdate(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(55usize, 1u8) as u8) } + } + #[inline] + pub fn set_mInXBLUpdate(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(55usize, 1u8, val as u64) + } + } + #[inline] + pub fn mNeedsReleaseAfterStackRefCntRelease(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 1u8) as u8) } + } + #[inline] + pub fn set_mNeedsReleaseAfterStackRefCntRelease(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(56usize, 1u8, val as u64) + } + } + #[inline] + pub fn mStyleSetFilled(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(57usize, 1u8) as u8) } + } + #[inline] + pub fn set_mStyleSetFilled(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(57usize, 1u8, val as u64) + } + } + #[inline] + pub fn mSSApplicableStateNotificationPending(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(58usize, 1u8) as u8) } + } + #[inline] + pub fn set_mSSApplicableStateNotificationPending(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(58usize, 1u8, val as u64) + } + } + #[inline] + pub fn mMayHaveTitleElement(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(59usize, 1u8) as u8) } + } + #[inline] + pub fn set_mMayHaveTitleElement(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(59usize, 1u8, val as u64) + } + } + #[inline] + pub fn mDOMLoadingSet(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(60usize, 1u8) as u8) } + } + #[inline] + pub fn set_mDOMLoadingSet(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(60usize, 1u8, val as u64) + } + } + #[inline] + pub fn mDOMInteractiveSet(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(61usize, 1u8) as u8) } + } + #[inline] + pub fn set_mDOMInteractiveSet(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(61usize, 1u8, val as u64) + } + } + #[inline] + pub fn mDOMCompleteSet(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(62usize, 1u8) as u8) } + } + #[inline] + pub fn set_mDOMCompleteSet(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(62usize, 1u8, val as u64) + } + } + #[inline] + pub fn mAutoFocusFired(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(63usize, 1u8) as u8) } + } + #[inline] + pub fn set_mAutoFocusFired(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(63usize, 1u8, val as u64) + } + } + #[inline] + pub fn mScrolledToRefAlready(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 1u8) as u8) } + } + #[inline] + pub fn set_mScrolledToRefAlready(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 1u8, val as u64) + } + } + #[inline] + pub fn mChangeScrollPosWhenScrollingToRef(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(65usize, 1u8) as u8) } + } + #[inline] + pub fn set_mChangeScrollPosWhenScrollingToRef(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(65usize, 1u8, val as u64) + } + } + #[inline] + pub fn mHasWarnedAboutBoxObjects(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(66usize, 1u8) as u8) } + } + #[inline] + pub fn set_mHasWarnedAboutBoxObjects(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(66usize, 1u8, val as u64) + } + } + #[inline] + pub fn mDelayFrameLoaderInitialization(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(67usize, 1u8) as u8) } + } + #[inline] + pub fn set_mDelayFrameLoaderInitialization(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(67usize, 1u8, val as u64) + } + } + #[inline] + pub fn mSynchronousDOMContentLoaded(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(68usize, 1u8) as u8) } + } + #[inline] + pub fn set_mSynchronousDOMContentLoaded(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(68usize, 1u8, val as u64) + } + } + #[inline] + pub fn mMaybeServiceWorkerControlled(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(69usize, 1u8) as u8) } + } + #[inline] + pub fn set_mMaybeServiceWorkerControlled(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(69usize, 1u8, val as u64) + } + } + #[inline] + pub fn mValidWidth(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(70usize, 1u8) as u8) } + } + #[inline] + pub fn set_mValidWidth(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(70usize, 1u8, val as u64) + } + } + #[inline] + pub fn mValidHeight(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(71usize, 1u8) as u8) } + } + #[inline] + pub fn set_mValidHeight(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(71usize, 1u8, val as u64) + } + } + #[inline] + pub fn mAutoSize(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(72usize, 1u8) as u8) } + } + #[inline] + pub fn set_mAutoSize(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(72usize, 1u8, val as u64) + } + } + #[inline] + pub fn mAllowZoom(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(73usize, 1u8) as u8) } + } + #[inline] + pub fn set_mAllowZoom(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(73usize, 1u8, val as u64) + } + } + #[inline] + pub fn mAllowDoubleTapZoom(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(74usize, 1u8) as u8) } + } + #[inline] + pub fn set_mAllowDoubleTapZoom(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(74usize, 1u8, val as u64) + } + } + #[inline] + pub fn mValidScaleFloat(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(75usize, 1u8) as u8) } + } + #[inline] + pub fn set_mValidScaleFloat(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(75usize, 1u8, val as u64) + } + } + #[inline] + pub fn mValidMaxScale(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(76usize, 1u8) as u8) } + } + #[inline] + pub fn set_mValidMaxScale(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(76usize, 1u8, val as u64) + } + } + #[inline] + pub fn mScaleStrEmpty(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(77usize, 1u8) as u8) } + } + #[inline] + pub fn set_mScaleStrEmpty(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(77usize, 1u8, val as u64) + } + } + #[inline] + pub fn mWidthStrEmpty(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(78usize, 1u8) as u8) } + } + #[inline] + pub fn set_mWidthStrEmpty(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(78usize, 1u8, val as u64) + } + } + #[inline] + pub fn mParserAborted(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(79usize, 1u8) as u8) } + } + #[inline] + pub fn set_mParserAborted(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(79usize, 1u8, val as u64) + } + } + #[inline] + pub fn mReportedUseCounters(&self) -> bool { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 1u8) as u8) } + } + #[inline] + pub fn set_mReportedUseCounters(&mut self, val: bool) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 1u8, val as u64) } } #[inline] @@ -25186,10 +25793,37 @@ pub mod root { mIsShadowDOMEnabled: bool, mIsSVGGlyphsDocument: bool, mAllowUnsafeHTML: bool, - mIsScopedStyleEnabled: ::std::os::raw::c_uint, - ) -> root::__BindgenBitfieldUnit<[u8; 7usize], u8> { + mInDestructor: bool, + mIsGoingAway: bool, + mInXBLUpdate: bool, + mNeedsReleaseAfterStackRefCntRelease: bool, + mStyleSetFilled: bool, + mSSApplicableStateNotificationPending: bool, + mMayHaveTitleElement: bool, + mDOMLoadingSet: bool, + mDOMInteractiveSet: bool, + mDOMCompleteSet: bool, + mAutoFocusFired: bool, + mScrolledToRefAlready: bool, + mChangeScrollPosWhenScrollingToRef: bool, + mHasWarnedAboutBoxObjects: bool, + mDelayFrameLoaderInitialization: bool, + mSynchronousDOMContentLoaded: bool, + mMaybeServiceWorkerControlled: bool, + mValidWidth: bool, + mValidHeight: bool, + mAutoSize: bool, + mAllowZoom: bool, + mAllowDoubleTapZoom: bool, + mValidScaleFloat: bool, + mValidMaxScale: bool, + mScaleStrEmpty: bool, + mWidthStrEmpty: bool, + mParserAborted: bool, + mReportedUseCounters: bool, + ) -> root::__BindgenBitfieldUnit<[u8; 11usize], u8> { let mut __bindgen_bitfield_unit: root::__BindgenBitfieldUnit< - [u8; 7usize], + [u8; 11usize], u8, > = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -25434,10 +26068,127 @@ pub mod root { let mAllowUnsafeHTML: u8 = unsafe { ::std::mem::transmute(mAllowUnsafeHTML) }; mAllowUnsafeHTML as u64 }); - __bindgen_bitfield_unit.set(53usize, 2u8, { - let mIsScopedStyleEnabled: u32 = - unsafe { ::std::mem::transmute(mIsScopedStyleEnabled) }; - mIsScopedStyleEnabled as u64 + __bindgen_bitfield_unit.set(53usize, 1u8, { + let mInDestructor: u8 = unsafe { ::std::mem::transmute(mInDestructor) }; + mInDestructor as u64 + }); + __bindgen_bitfield_unit.set(54usize, 1u8, { + let mIsGoingAway: u8 = unsafe { ::std::mem::transmute(mIsGoingAway) }; + mIsGoingAway as u64 + }); + __bindgen_bitfield_unit.set(55usize, 1u8, { + let mInXBLUpdate: u8 = unsafe { ::std::mem::transmute(mInXBLUpdate) }; + mInXBLUpdate as u64 + }); + __bindgen_bitfield_unit.set(56usize, 1u8, { + let mNeedsReleaseAfterStackRefCntRelease: u8 = + unsafe { ::std::mem::transmute(mNeedsReleaseAfterStackRefCntRelease) }; + mNeedsReleaseAfterStackRefCntRelease as u64 + }); + __bindgen_bitfield_unit.set(57usize, 1u8, { + let mStyleSetFilled: u8 = unsafe { ::std::mem::transmute(mStyleSetFilled) }; + mStyleSetFilled as u64 + }); + __bindgen_bitfield_unit.set(58usize, 1u8, { + let mSSApplicableStateNotificationPending: u8 = + unsafe { ::std::mem::transmute(mSSApplicableStateNotificationPending) }; + mSSApplicableStateNotificationPending as u64 + }); + __bindgen_bitfield_unit.set(59usize, 1u8, { + let mMayHaveTitleElement: u8 = + unsafe { ::std::mem::transmute(mMayHaveTitleElement) }; + mMayHaveTitleElement as u64 + }); + __bindgen_bitfield_unit.set(60usize, 1u8, { + let mDOMLoadingSet: u8 = unsafe { ::std::mem::transmute(mDOMLoadingSet) }; + mDOMLoadingSet as u64 + }); + __bindgen_bitfield_unit.set(61usize, 1u8, { + let mDOMInteractiveSet: u8 = unsafe { ::std::mem::transmute(mDOMInteractiveSet) }; + mDOMInteractiveSet as u64 + }); + __bindgen_bitfield_unit.set(62usize, 1u8, { + let mDOMCompleteSet: u8 = unsafe { ::std::mem::transmute(mDOMCompleteSet) }; + mDOMCompleteSet as u64 + }); + __bindgen_bitfield_unit.set(63usize, 1u8, { + let mAutoFocusFired: u8 = unsafe { ::std::mem::transmute(mAutoFocusFired) }; + mAutoFocusFired as u64 + }); + __bindgen_bitfield_unit.set(64usize, 1u8, { + let mScrolledToRefAlready: u8 = + unsafe { ::std::mem::transmute(mScrolledToRefAlready) }; + mScrolledToRefAlready as u64 + }); + __bindgen_bitfield_unit.set(65usize, 1u8, { + let mChangeScrollPosWhenScrollingToRef: u8 = + unsafe { ::std::mem::transmute(mChangeScrollPosWhenScrollingToRef) }; + mChangeScrollPosWhenScrollingToRef as u64 + }); + __bindgen_bitfield_unit.set(66usize, 1u8, { + let mHasWarnedAboutBoxObjects: u8 = + unsafe { ::std::mem::transmute(mHasWarnedAboutBoxObjects) }; + mHasWarnedAboutBoxObjects as u64 + }); + __bindgen_bitfield_unit.set(67usize, 1u8, { + let mDelayFrameLoaderInitialization: u8 = + unsafe { ::std::mem::transmute(mDelayFrameLoaderInitialization) }; + mDelayFrameLoaderInitialization as u64 + }); + __bindgen_bitfield_unit.set(68usize, 1u8, { + let mSynchronousDOMContentLoaded: u8 = + unsafe { ::std::mem::transmute(mSynchronousDOMContentLoaded) }; + mSynchronousDOMContentLoaded as u64 + }); + __bindgen_bitfield_unit.set(69usize, 1u8, { + let mMaybeServiceWorkerControlled: u8 = + unsafe { ::std::mem::transmute(mMaybeServiceWorkerControlled) }; + mMaybeServiceWorkerControlled as u64 + }); + __bindgen_bitfield_unit.set(70usize, 1u8, { + let mValidWidth: u8 = unsafe { ::std::mem::transmute(mValidWidth) }; + mValidWidth as u64 + }); + __bindgen_bitfield_unit.set(71usize, 1u8, { + let mValidHeight: u8 = unsafe { ::std::mem::transmute(mValidHeight) }; + mValidHeight as u64 + }); + __bindgen_bitfield_unit.set(72usize, 1u8, { + let mAutoSize: u8 = unsafe { ::std::mem::transmute(mAutoSize) }; + mAutoSize as u64 + }); + __bindgen_bitfield_unit.set(73usize, 1u8, { + let mAllowZoom: u8 = unsafe { ::std::mem::transmute(mAllowZoom) }; + mAllowZoom as u64 + }); + __bindgen_bitfield_unit.set(74usize, 1u8, { + let mAllowDoubleTapZoom: u8 = unsafe { ::std::mem::transmute(mAllowDoubleTapZoom) }; + mAllowDoubleTapZoom as u64 + }); + __bindgen_bitfield_unit.set(75usize, 1u8, { + let mValidScaleFloat: u8 = unsafe { ::std::mem::transmute(mValidScaleFloat) }; + mValidScaleFloat as u64 + }); + __bindgen_bitfield_unit.set(76usize, 1u8, { + let mValidMaxScale: u8 = unsafe { ::std::mem::transmute(mValidMaxScale) }; + mValidMaxScale as u64 + }); + __bindgen_bitfield_unit.set(77usize, 1u8, { + let mScaleStrEmpty: u8 = unsafe { ::std::mem::transmute(mScaleStrEmpty) }; + mScaleStrEmpty as u64 + }); + __bindgen_bitfield_unit.set(78usize, 1u8, { + let mWidthStrEmpty: u8 = unsafe { ::std::mem::transmute(mWidthStrEmpty) }; + mWidthStrEmpty as u64 + }); + __bindgen_bitfield_unit.set(79usize, 1u8, { + let mParserAborted: u8 = unsafe { ::std::mem::transmute(mParserAborted) }; + mParserAborted as u64 + }); + __bindgen_bitfield_unit.set(80usize, 1u8, { + let mReportedUseCounters: u8 = + unsafe { ::std::mem::transmute(mReportedUseCounters) }; + mReportedUseCounters as u64 }); __bindgen_bitfield_unit } @@ -25490,62 +26241,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsIXPConnectJSObjectHolder { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIXPConnectJSObjectHolder_COMTypeInfo { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_nsIXPConnectJSObjectHolder() { - assert_eq!( - ::std::mem::size_of::<nsIXPConnectJSObjectHolder>(), - 8usize, - concat!("Size of: ", stringify!(nsIXPConnectJSObjectHolder)) - ); - assert_eq!( - ::std::mem::align_of::<nsIXPConnectJSObjectHolder>(), - 8usize, - concat!("Alignment of ", stringify!(nsIXPConnectJSObjectHolder)) - ); - } - impl Clone for nsIXPConnectJSObjectHolder { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsIXPConnectWrappedJS { - pub _base: root::nsIXPConnectJSObjectHolder, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIXPConnectWrappedJS_COMTypeInfo { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_nsIXPConnectWrappedJS() { - assert_eq!( - ::std::mem::size_of::<nsIXPConnectWrappedJS>(), - 8usize, - concat!("Size of: ", stringify!(nsIXPConnectWrappedJS)) - ); - assert_eq!( - ::std::mem::align_of::<nsIXPConnectWrappedJS>(), - 8usize, - concat!("Alignment of ", stringify!(nsIXPConnectWrappedJS)) - ); - } - impl Clone for nsIXPConnectWrappedJS { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct nsIXPConnect { pub _base: root::nsISupports, } @@ -25578,20 +26273,20 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsBidi { + pub struct nsXBLPrototypeBinding { _unused: [u8; 0], } - impl Clone for nsBidi { + impl Clone for nsXBLPrototypeBinding { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsIPrintSettings { + pub struct nsBidi { _unused: [u8; 0], } - impl Clone for nsIPrintSettings { + impl Clone for nsBidi { fn clone(&self) -> Self { *self } @@ -25684,7 +26379,6 @@ pub mod root { pub mTheme: root::nsCOMPtr, pub mLangService: *mut root::nsLanguageAtomService, pub mPrintSettings: root::nsCOMPtr, - pub mPrefChangedTimer: root::nsCOMPtr, pub mBidiEngine: root::mozilla::UniquePtr<root::nsBidi>, pub mTransactions: [u64; 10usize], pub mTextPerf: root::nsAutoPtr<root::gfxTextPerfMetrics>, @@ -25899,7 +26593,7 @@ pub mod root { fn bindgen_test_layout_nsPresContext() { assert_eq!( ::std::mem::size_of::<nsPresContext>(), - 1400usize, + 1392usize, concat!("Size of: ", stringify!(nsPresContext)) ); assert_eq!( @@ -26270,20 +26964,8 @@ pub mod root { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsPresContext>())).mPrefChangedTimer as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(nsPresContext), - "::", - stringify!(mPrefChangedTimer) - ) - ); - assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mBidiEngine as *const _ as usize }, - 256usize, + 248usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26293,7 +26975,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mTransactions as *const _ as usize }, - 264usize, + 256usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26303,7 +26985,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mTextPerf as *const _ as usize }, - 344usize, + 336usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26313,7 +26995,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mMissingFonts as *const _ as usize }, - 352usize, + 344usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26323,7 +27005,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mVisibleArea as *const _ as usize }, - 360usize, + 352usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26336,7 +27018,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mLastResizeEventVisibleArea as *const _ as usize }, - 376usize, + 368usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26346,7 +27028,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mPageSize as *const _ as usize }, - 392usize, + 384usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26356,7 +27038,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mPageScale as *const _ as usize }, - 400usize, + 392usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26366,7 +27048,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mPPScale as *const _ as usize }, - 404usize, + 396usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26376,7 +27058,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mDefaultColor as *const _ as usize }, - 408usize, + 400usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26388,7 +27070,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mBackgroundColor as *const _ as usize }, - 412usize, + 404usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26398,7 +27080,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mLinkColor as *const _ as usize }, - 416usize, + 408usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26410,7 +27092,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mActiveLinkColor as *const _ as usize }, - 420usize, + 412usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26422,7 +27104,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mVisitedLinkColor as *const _ as usize }, - 424usize, + 416usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26434,7 +27116,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFocusBackgroundColor as *const _ as usize }, - 428usize, + 420usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26446,7 +27128,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFocusTextColor as *const _ as usize }, - 432usize, + 424usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26458,7 +27140,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mBodyTextColor as *const _ as usize }, - 436usize, + 428usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26471,7 +27153,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mViewportScrollbarOverrideElement as *const _ as usize }, - 440usize, + 432usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26484,7 +27166,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mViewportStyleScrollbar as *const _ as usize }, - 448usize, + 440usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26496,7 +27178,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFocusRingWidth as *const _ as usize }, - 512usize, + 504usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26509,7 +27191,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mExistThrottledUpdates as *const _ as usize }, - 513usize, + 505usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26521,7 +27203,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mImageAnimationMode as *const _ as usize }, - 514usize, + 506usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26534,7 +27216,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mImageAnimationModePref as *const _ as usize }, - 516usize, + 508usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26546,7 +27228,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mLangGroupFontPrefs as *const _ as usize }, - 520usize, + 512usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26558,7 +27240,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFontGroupCacheDirty as *const _ as usize }, - 1216usize, + 1208usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26570,7 +27252,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mLanguagesUsed as *const _ as usize }, - 1224usize, + 1216usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26582,7 +27264,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mBorderWidthTable as *const _ as usize }, - 1256usize, + 1248usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26595,7 +27277,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mInterruptChecksToSkip as *const _ as usize }, - 1268usize, + 1260usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26607,7 +27289,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mElementsRestyled as *const _ as usize }, - 1272usize, + 1264usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26619,7 +27301,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFramesConstructed as *const _ as usize }, - 1280usize, + 1272usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26631,7 +27313,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFramesReflowed as *const _ as usize }, - 1288usize, + 1280usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26643,7 +27325,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mReflowStartTime as *const _ as usize }, - 1296usize, + 1288usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26656,7 +27338,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mFirstNonBlankPaintTime as *const _ as usize }, - 1304usize, + 1296usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26668,7 +27350,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFirstClickTime as *const _ as usize }, - 1312usize, + 1304usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26678,7 +27360,7 @@ pub mod root { ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFirstKeyTime as *const _ as usize }, - 1320usize, + 1312usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26690,7 +27372,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFirstMouseMoveTime as *const _ as usize }, - 1328usize, + 1320usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26702,7 +27384,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mFirstScrollTime as *const _ as usize }, - 1336usize, + 1328usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26715,7 +27397,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mInteractionTimeEnabled as *const _ as usize }, - 1344usize, + 1336usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26728,7 +27410,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mLastStyleUpdateForAllAnimations as *const _ as usize }, - 1352usize, + 1344usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26740,7 +27422,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mTelemetryScrollLastY as *const _ as usize }, - 1360usize, + 1352usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26752,7 +27434,7 @@ pub mod root { unsafe { &(*(::std::ptr::null::<nsPresContext>())).mTelemetryScrollMaxY as *const _ as usize }, - 1364usize, + 1356usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26765,7 +27447,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mTelemetryScrollTotalY as *const _ as usize }, - 1368usize, + 1360usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -26778,7 +27460,7 @@ pub mod root { &(*(::std::ptr::null::<nsPresContext>())).mPendingMediaFeatureValuesChange as *const _ as usize }, - 1380usize, + 1372usize, concat!( "Offset of field: ", stringify!(nsPresContext), @@ -27053,193 +27735,204 @@ pub mod root { } } #[inline] - pub fn mIsEmulatingMedia(&self) -> ::std::os::raw::c_uint { + pub fn mPostedPrefChangedRunnable(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } } #[inline] - pub fn set_mIsEmulatingMedia(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mPostedPrefChangedRunnable(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(25usize, 1u8, val as u64) } } #[inline] - pub fn mIsGlyph(&self) -> ::std::os::raw::c_uint { + pub fn mIsEmulatingMedia(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } } #[inline] - pub fn set_mIsGlyph(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mIsEmulatingMedia(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(26usize, 1u8, val as u64) } } #[inline] - pub fn mUsesRootEMUnits(&self) -> ::std::os::raw::c_uint { + pub fn mIsGlyph(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } } #[inline] - pub fn set_mUsesRootEMUnits(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mIsGlyph(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(27usize, 1u8, val as u64) } } #[inline] - pub fn mUsesExChUnits(&self) -> ::std::os::raw::c_uint { + pub fn mUsesRootEMUnits(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } } #[inline] - pub fn set_mUsesExChUnits(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mUsesRootEMUnits(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(28usize, 1u8, val as u64) } } #[inline] - pub fn mCounterStylesDirty(&self) -> ::std::os::raw::c_uint { + pub fn mUsesExChUnits(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } } #[inline] - pub fn set_mCounterStylesDirty(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mUsesExChUnits(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(29usize, 1u8, val as u64) } } #[inline] - pub fn mFontFeatureValuesDirty(&self) -> ::std::os::raw::c_uint { + pub fn mCounterStylesDirty(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } } #[inline] - pub fn set_mFontFeatureValuesDirty(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mCounterStylesDirty(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(30usize, 1u8, val as u64) } } #[inline] - pub fn mSuppressResizeReflow(&self) -> ::std::os::raw::c_uint { + pub fn mFontFeatureValuesDirty(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } #[inline] - pub fn set_mSuppressResizeReflow(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mFontFeatureValuesDirty(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(31usize, 1u8, val as u64) } } #[inline] - pub fn mIsVisual(&self) -> ::std::os::raw::c_uint { + pub fn mSuppressResizeReflow(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u32) } } #[inline] - pub fn set_mIsVisual(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mSuppressResizeReflow(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(32usize, 1u8, val as u64) } } #[inline] - pub fn mIsChrome(&self) -> ::std::os::raw::c_uint { + pub fn mIsVisual(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u32) } } #[inline] - pub fn set_mIsChrome(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mIsVisual(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(33usize, 1u8, val as u64) } } #[inline] - pub fn mIsChromeOriginImage(&self) -> ::std::os::raw::c_uint { + pub fn mIsChrome(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u32) } } #[inline] - pub fn set_mIsChromeOriginImage(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mIsChrome(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(34usize, 1u8, val as u64) } } #[inline] - pub fn mPaintFlashing(&self) -> ::std::os::raw::c_uint { + pub fn mIsChromeOriginImage(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } } #[inline] - pub fn set_mPaintFlashing(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mIsChromeOriginImage(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(35usize, 1u8, val as u64) } } #[inline] - pub fn mPaintFlashingInitialized(&self) -> ::std::os::raw::c_uint { + pub fn mPaintFlashing(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } } #[inline] - pub fn set_mPaintFlashingInitialized(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mPaintFlashing(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(36usize, 1u8, val as u64) } } #[inline] - pub fn mHasWarnedAboutPositionedTableParts(&self) -> ::std::os::raw::c_uint { + pub fn mPaintFlashingInitialized(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u32) } } #[inline] - pub fn set_mHasWarnedAboutPositionedTableParts(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_mPaintFlashingInitialized(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(37usize, 1u8, val as u64) } } #[inline] - pub fn mHasWarnedAboutTooLargeDashedOrDottedRadius(&self) -> ::std::os::raw::c_uint { + pub fn mHasWarnedAboutPositionedTableParts(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u32) } } #[inline] + pub fn set_mHasWarnedAboutPositionedTableParts(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(38usize, 1u8, val as u64) + } + } + #[inline] + pub fn mHasWarnedAboutTooLargeDashedOrDottedRadius(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) } + } + #[inline] pub fn set_mHasWarnedAboutTooLargeDashedOrDottedRadius( &mut self, val: ::std::os::raw::c_uint, ) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(38usize, 1u8, val as u64) + self._bitfield_1.set(39usize, 1u8, val as u64) } } #[inline] pub fn mQuirkSheetAdded(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } } #[inline] pub fn set_mQuirkSheetAdded(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(39usize, 1u8, val as u64) + self._bitfield_1.set(40usize, 1u8, val as u64) } } #[inline] pub fn mNeedsPrefUpdate(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(41usize, 1u8) as u32) } } #[inline] pub fn set_mNeedsPrefUpdate(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(40usize, 1u8, val as u64) + self._bitfield_1.set(41usize, 1u8, val as u64) } } #[inline] pub fn mHadNonBlankPaint(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(41usize, 1u8) as u32) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(42usize, 1u8) as u32) } } #[inline] pub fn set_mHadNonBlankPaint(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(41usize, 1u8, val as u64) + self._bitfield_1.set(42usize, 1u8, val as u64) } } #[inline] @@ -27268,6 +27961,7 @@ pub mod root { mPendingThemeChanged: ::std::os::raw::c_uint, mPendingUIResolutionChanged: ::std::os::raw::c_uint, mPrefChangePendingNeedsReflow: ::std::os::raw::c_uint, + mPostedPrefChangedRunnable: ::std::os::raw::c_uint, mIsEmulatingMedia: ::std::os::raw::c_uint, mIsGlyph: ::std::os::raw::c_uint, mUsesRootEMUnits: ::std::os::raw::c_uint, @@ -27400,83 +28094,303 @@ pub mod root { mPrefChangePendingNeedsReflow as u64 }); __bindgen_bitfield_unit.set(25usize, 1u8, { + let mPostedPrefChangedRunnable: u32 = + unsafe { ::std::mem::transmute(mPostedPrefChangedRunnable) }; + mPostedPrefChangedRunnable as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { let mIsEmulatingMedia: u32 = unsafe { ::std::mem::transmute(mIsEmulatingMedia) }; mIsEmulatingMedia as u64 }); - __bindgen_bitfield_unit.set(26usize, 1u8, { + __bindgen_bitfield_unit.set(27usize, 1u8, { let mIsGlyph: u32 = unsafe { ::std::mem::transmute(mIsGlyph) }; mIsGlyph as u64 }); - __bindgen_bitfield_unit.set(27usize, 1u8, { + __bindgen_bitfield_unit.set(28usize, 1u8, { let mUsesRootEMUnits: u32 = unsafe { ::std::mem::transmute(mUsesRootEMUnits) }; mUsesRootEMUnits as u64 }); - __bindgen_bitfield_unit.set(28usize, 1u8, { + __bindgen_bitfield_unit.set(29usize, 1u8, { let mUsesExChUnits: u32 = unsafe { ::std::mem::transmute(mUsesExChUnits) }; mUsesExChUnits as u64 }); - __bindgen_bitfield_unit.set(29usize, 1u8, { + __bindgen_bitfield_unit.set(30usize, 1u8, { let mCounterStylesDirty: u32 = unsafe { ::std::mem::transmute(mCounterStylesDirty) }; mCounterStylesDirty as u64 }); - __bindgen_bitfield_unit.set(30usize, 1u8, { + __bindgen_bitfield_unit.set(31usize, 1u8, { let mFontFeatureValuesDirty: u32 = unsafe { ::std::mem::transmute(mFontFeatureValuesDirty) }; mFontFeatureValuesDirty as u64 }); - __bindgen_bitfield_unit.set(31usize, 1u8, { + __bindgen_bitfield_unit.set(32usize, 1u8, { let mSuppressResizeReflow: u32 = unsafe { ::std::mem::transmute(mSuppressResizeReflow) }; mSuppressResizeReflow as u64 }); - __bindgen_bitfield_unit.set(32usize, 1u8, { + __bindgen_bitfield_unit.set(33usize, 1u8, { let mIsVisual: u32 = unsafe { ::std::mem::transmute(mIsVisual) }; mIsVisual as u64 }); - __bindgen_bitfield_unit.set(33usize, 1u8, { + __bindgen_bitfield_unit.set(34usize, 1u8, { let mIsChrome: u32 = unsafe { ::std::mem::transmute(mIsChrome) }; mIsChrome as u64 }); - __bindgen_bitfield_unit.set(34usize, 1u8, { + __bindgen_bitfield_unit.set(35usize, 1u8, { let mIsChromeOriginImage: u32 = unsafe { ::std::mem::transmute(mIsChromeOriginImage) }; mIsChromeOriginImage as u64 }); - __bindgen_bitfield_unit.set(35usize, 1u8, { + __bindgen_bitfield_unit.set(36usize, 1u8, { let mPaintFlashing: u32 = unsafe { ::std::mem::transmute(mPaintFlashing) }; mPaintFlashing as u64 }); - __bindgen_bitfield_unit.set(36usize, 1u8, { + __bindgen_bitfield_unit.set(37usize, 1u8, { let mPaintFlashingInitialized: u32 = unsafe { ::std::mem::transmute(mPaintFlashingInitialized) }; mPaintFlashingInitialized as u64 }); - __bindgen_bitfield_unit.set(37usize, 1u8, { + __bindgen_bitfield_unit.set(38usize, 1u8, { let mHasWarnedAboutPositionedTableParts: u32 = unsafe { ::std::mem::transmute(mHasWarnedAboutPositionedTableParts) }; mHasWarnedAboutPositionedTableParts as u64 }); - __bindgen_bitfield_unit.set(38usize, 1u8, { + __bindgen_bitfield_unit.set(39usize, 1u8, { let mHasWarnedAboutTooLargeDashedOrDottedRadius: u32 = unsafe { ::std::mem::transmute(mHasWarnedAboutTooLargeDashedOrDottedRadius) }; mHasWarnedAboutTooLargeDashedOrDottedRadius as u64 }); - __bindgen_bitfield_unit.set(39usize, 1u8, { + __bindgen_bitfield_unit.set(40usize, 1u8, { let mQuirkSheetAdded: u32 = unsafe { ::std::mem::transmute(mQuirkSheetAdded) }; mQuirkSheetAdded as u64 }); - __bindgen_bitfield_unit.set(40usize, 1u8, { + __bindgen_bitfield_unit.set(41usize, 1u8, { let mNeedsPrefUpdate: u32 = unsafe { ::std::mem::transmute(mNeedsPrefUpdate) }; mNeedsPrefUpdate as u64 }); - __bindgen_bitfield_unit.set(41usize, 1u8, { + __bindgen_bitfield_unit.set(42usize, 1u8, { let mHadNonBlankPaint: u32 = unsafe { ::std::mem::transmute(mHadNonBlankPaint) }; mHadNonBlankPaint as u64 }); __bindgen_bitfield_unit } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsTimingFunction { + pub mType: root::nsTimingFunction_Type, + pub __bindgen_anon_1: root::nsTimingFunction__bindgen_ty_1, + } + #[repr(i32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsTimingFunction_Type { + Ease = 0, + Linear = 1, + EaseIn = 2, + EaseOut = 3, + EaseInOut = 4, + StepStart = 5, + StepEnd = 6, + CubicBezier = 7, + Frames = 8, + } + pub const nsTimingFunction_Keyword_Implicit: root::nsTimingFunction_Keyword = 0; + pub const nsTimingFunction_Keyword_Explicit: root::nsTimingFunction_Keyword = 1; + pub type nsTimingFunction_Keyword = i32; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsTimingFunction__bindgen_ty_1 { + pub mFunc: root::__BindgenUnionField<root::nsTimingFunction__bindgen_ty_1__bindgen_ty_1>, + pub __bindgen_anon_1: + root::__BindgenUnionField<root::nsTimingFunction__bindgen_ty_1__bindgen_ty_2>, + pub bindgen_union_field: [u32; 4usize], + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsTimingFunction__bindgen_ty_1__bindgen_ty_1 { + pub mX1: f32, + pub mY1: f32, + pub mX2: f32, + pub mY2: f32, + } + #[test] + fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>(), + 16usize, + concat!( + "Size of: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + concat!( + "Alignment of ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mX1 + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(mX1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mY1 + as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(mY1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mX2 + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(mX2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mY2 + as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(mY2) + ) + ); + } + impl Clone for nsTimingFunction__bindgen_ty_1__bindgen_ty_1 { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsTimingFunction__bindgen_ty_1__bindgen_ty_2 { + pub mStepsOrFrames: u32, + } + #[test] + fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>(), + 4usize, + concat!( + "Size of: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>(), + 4usize, + concat!( + "Alignment of ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>())) + .mStepsOrFrames as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mStepsOrFrames) + ) + ); + } + impl Clone for nsTimingFunction__bindgen_ty_1__bindgen_ty_2 { + fn clone(&self) -> Self { + *self + } + } + #[test] + fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1>(), + 16usize, + concat!("Size of: ", stringify!(nsTimingFunction__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1>(), + 4usize, + concat!("Alignment of ", stringify!(nsTimingFunction__bindgen_ty_1)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1>())).mFunc as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction__bindgen_ty_1), + "::", + stringify!(mFunc) + ) + ); + } + impl Clone for nsTimingFunction__bindgen_ty_1 { + fn clone(&self) -> Self { + *self + } + } + #[test] + fn bindgen_test_layout_nsTimingFunction() { + assert_eq!( + ::std::mem::size_of::<nsTimingFunction>(), + 20usize, + concat!("Size of: ", stringify!(nsTimingFunction)) + ); + assert_eq!( + ::std::mem::align_of::<nsTimingFunction>(), + 4usize, + concat!("Alignment of ", stringify!(nsTimingFunction)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<nsTimingFunction>())).mType as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(nsTimingFunction), + "::", + stringify!(mType) + ) + ); + } + impl Clone for nsTimingFunction { + fn clone(&self) -> Self { + *self + } + } #[repr(i16)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSKeyword { @@ -30730,34 +31644,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsIInterfaceRequestor { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIInterfaceRequestor_COMTypeInfo { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_nsIInterfaceRequestor() { - assert_eq!( - ::std::mem::size_of::<nsIInterfaceRequestor>(), - 8usize, - concat!("Size of: ", stringify!(nsIInterfaceRequestor)) - ); - assert_eq!( - ::std::mem::align_of::<nsIInterfaceRequestor>(), - 8usize, - concat!("Alignment of ", stringify!(nsIInterfaceRequestor)) - ); - } - impl Clone for nsIInterfaceRequestor { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct ProxyBehaviour { _unused: [u8; 0], } @@ -34533,221 +35419,6 @@ pub mod root { ); } #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsTimingFunction { - pub mType: root::nsTimingFunction_Type, - pub __bindgen_anon_1: root::nsTimingFunction__bindgen_ty_1, - } - #[repr(i32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsTimingFunction_Type { - Ease = 0, - Linear = 1, - EaseIn = 2, - EaseOut = 3, - EaseInOut = 4, - StepStart = 5, - StepEnd = 6, - CubicBezier = 7, - Frames = 8, - } - pub const nsTimingFunction_Keyword_Implicit: root::nsTimingFunction_Keyword = 0; - pub const nsTimingFunction_Keyword_Explicit: root::nsTimingFunction_Keyword = 1; - pub type nsTimingFunction_Keyword = i32; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsTimingFunction__bindgen_ty_1 { - pub mFunc: root::__BindgenUnionField<root::nsTimingFunction__bindgen_ty_1__bindgen_ty_1>, - pub __bindgen_anon_1: - root::__BindgenUnionField<root::nsTimingFunction__bindgen_ty_1__bindgen_ty_2>, - pub bindgen_union_field: [u32; 4usize], - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsTimingFunction__bindgen_ty_1__bindgen_ty_1 { - pub mX1: f32, - pub mY1: f32, - pub mX2: f32, - pub mY2: f32, - } - #[test] - fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mX1 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(mX1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mY1 - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(mY1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mX2 - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(mX2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_1>())).mY2 - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(mY2) - ) - ); - } - impl Clone for nsTimingFunction__bindgen_ty_1__bindgen_ty_1 { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsTimingFunction__bindgen_ty_1__bindgen_ty_2 { - pub mStepsOrFrames: u32, - } - #[test] - fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Size of: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1__bindgen_ty_2>())) - .mStepsOrFrames as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mStepsOrFrames) - ) - ); - } - impl Clone for nsTimingFunction__bindgen_ty_1__bindgen_ty_2 { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_nsTimingFunction__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<nsTimingFunction__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(nsTimingFunction__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<nsTimingFunction__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(nsTimingFunction__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsTimingFunction__bindgen_ty_1>())).mFunc as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction__bindgen_ty_1), - "::", - stringify!(mFunc) - ) - ); - } - impl Clone for nsTimingFunction__bindgen_ty_1 { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_nsTimingFunction() { - assert_eq!( - ::std::mem::size_of::<nsTimingFunction>(), - 20usize, - concat!("Size of: ", stringify!(nsTimingFunction)) - ); - assert_eq!( - ::std::mem::align_of::<nsTimingFunction>(), - 4usize, - concat!("Alignment of ", stringify!(nsTimingFunction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsTimingFunction>())).mType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsTimingFunction), - "::", - stringify!(mType) - ) - ); - } - impl Clone for nsTimingFunction { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] #[derive(Debug)] pub struct nsStyleDisplay { pub mBinding: root::RefPtr<root::mozilla::css::URLValue>, @@ -37105,32 +37776,23 @@ pub mod root { ); } #[repr(C)] + #[derive(Debug)] pub struct nsStyleVariables { - pub mVariables: root::mozilla::CSSVariableValues, + pub _address: u8, } pub const nsStyleVariables_kHasFinishStyle: bool = false; #[test] fn bindgen_test_layout_nsStyleVariables() { assert_eq!( ::std::mem::size_of::<nsStyleVariables>(), - 40usize, + 1usize, concat!("Size of: ", stringify!(nsStyleVariables)) ); assert_eq!( ::std::mem::align_of::<nsStyleVariables>(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(nsStyleVariables)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsStyleVariables>())).mVariables as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsStyleVariables), - "::", - stringify!(mVariables) - ) - ); } #[repr(C)] #[derive(Debug)] @@ -37584,40 +38246,6 @@ pub mod root { 127; pub const ThemeWidgetType_ThemeWidgetType_COUNT: root::ThemeWidgetType = 128; pub type ThemeWidgetType = u8; - /// Hashtable key class to use with nsTHashtable/nsBaseHashtable - #[repr(C)] - #[derive(Debug)] - pub struct nsURIHashKey { - pub _base: root::PLDHashEntryHdr, - pub mKey: root::nsCOMPtr, - } - pub type nsURIHashKey_KeyType = *mut root::nsIURI; - pub type nsURIHashKey_KeyTypePointer = *const root::nsIURI; - pub const nsURIHashKey_ALLOW_MEMMOVE: root::nsURIHashKey__bindgen_ty_1 = 1; - pub type nsURIHashKey__bindgen_ty_1 = u32; - #[test] - fn bindgen_test_layout_nsURIHashKey() { - assert_eq!( - ::std::mem::size_of::<nsURIHashKey>(), - 16usize, - concat!("Size of: ", stringify!(nsURIHashKey)) - ); - assert_eq!( - ::std::mem::align_of::<nsURIHashKey>(), - 8usize, - concat!("Alignment of ", stringify!(nsURIHashKey)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsURIHashKey>())).mKey as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsURIHashKey), - "::", - stringify!(mKey) - ) - ); - } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIConsoleReportCollector { @@ -37694,317 +38322,6 @@ pub mod root { *self } } - #[repr(C)] - #[derive(Debug)] - pub struct nsAttrName { - pub mBits: usize, - } - #[test] - fn bindgen_test_layout_nsAttrName() { - assert_eq!( - ::std::mem::size_of::<nsAttrName>(), - 8usize, - concat!("Size of: ", stringify!(nsAttrName)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrName>(), - 8usize, - concat!("Alignment of ", stringify!(nsAttrName)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAttrName>())).mBits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrName), - "::", - stringify!(mBits) - ) - ); - } - #[repr(C)] - #[derive(Debug)] - pub struct nsAttrValue { - pub mBits: usize, - } - pub const nsAttrValue_ValueType_eString: root::nsAttrValue_ValueType = 0; - pub const nsAttrValue_ValueType_eAtom: root::nsAttrValue_ValueType = 2; - pub const nsAttrValue_ValueType_eInteger: root::nsAttrValue_ValueType = 3; - pub const nsAttrValue_ValueType_eColor: root::nsAttrValue_ValueType = 7; - pub const nsAttrValue_ValueType_eEnum: root::nsAttrValue_ValueType = 11; - pub const nsAttrValue_ValueType_ePercent: root::nsAttrValue_ValueType = 15; - pub const nsAttrValue_ValueType_eCSSDeclaration: root::nsAttrValue_ValueType = 16; - pub const nsAttrValue_ValueType_eURL: root::nsAttrValue_ValueType = 17; - pub const nsAttrValue_ValueType_eImage: root::nsAttrValue_ValueType = 18; - pub const nsAttrValue_ValueType_eAtomArray: root::nsAttrValue_ValueType = 19; - pub const nsAttrValue_ValueType_eDoubleValue: root::nsAttrValue_ValueType = 20; - pub const nsAttrValue_ValueType_eIntMarginValue: root::nsAttrValue_ValueType = 21; - pub const nsAttrValue_ValueType_eSVGAngle: root::nsAttrValue_ValueType = 22; - pub const nsAttrValue_ValueType_eSVGTypesBegin: root::nsAttrValue_ValueType = 22; - pub const nsAttrValue_ValueType_eSVGIntegerPair: root::nsAttrValue_ValueType = 23; - pub const nsAttrValue_ValueType_eSVGLength: root::nsAttrValue_ValueType = 24; - pub const nsAttrValue_ValueType_eSVGLengthList: root::nsAttrValue_ValueType = 25; - pub const nsAttrValue_ValueType_eSVGNumberList: root::nsAttrValue_ValueType = 26; - pub const nsAttrValue_ValueType_eSVGNumberPair: root::nsAttrValue_ValueType = 27; - pub const nsAttrValue_ValueType_eSVGPathData: root::nsAttrValue_ValueType = 28; - pub const nsAttrValue_ValueType_eSVGPointList: root::nsAttrValue_ValueType = 29; - pub const nsAttrValue_ValueType_eSVGPreserveAspectRatio: root::nsAttrValue_ValueType = 30; - pub const nsAttrValue_ValueType_eSVGStringList: root::nsAttrValue_ValueType = 31; - pub const nsAttrValue_ValueType_eSVGTransformList: root::nsAttrValue_ValueType = 32; - pub const nsAttrValue_ValueType_eSVGViewBox: root::nsAttrValue_ValueType = 33; - pub const nsAttrValue_ValueType_eSVGTypesEnd: root::nsAttrValue_ValueType = 33; - pub type nsAttrValue_ValueType = u32; - /// Structure for a mapping from int (enum) values to strings. When you use - /// it you generally create an array of them. - /// Instantiate like this: - /// EnumTable myTable[] = { - /// { "string1", 1 }, - /// { "string2", 2 }, - /// { nullptr, 0 } - /// } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsAttrValue_EnumTable { - /// The string the value maps to - pub tag: *const ::std::os::raw::c_char, - /// The enum value that maps to this string - pub value: i16, - } - #[test] - fn bindgen_test_layout_nsAttrValue_EnumTable() { - assert_eq!( - ::std::mem::size_of::<nsAttrValue_EnumTable>(), - 16usize, - concat!("Size of: ", stringify!(nsAttrValue_EnumTable)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrValue_EnumTable>(), - 8usize, - concat!("Alignment of ", stringify!(nsAttrValue_EnumTable)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAttrValue_EnumTable>())).tag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrValue_EnumTable), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAttrValue_EnumTable>())).value as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsAttrValue_EnumTable), - "::", - stringify!(value) - ) - ); - } - impl Clone for nsAttrValue_EnumTable { - fn clone(&self) -> Self { - *self - } - } - pub const nsAttrValue_ValueBaseType_eStringBase: root::nsAttrValue_ValueBaseType = 0; - pub const nsAttrValue_ValueBaseType_eOtherBase: root::nsAttrValue_ValueBaseType = 1; - pub const nsAttrValue_ValueBaseType_eAtomBase: root::nsAttrValue_ValueBaseType = 2; - pub const nsAttrValue_ValueBaseType_eIntegerBase: root::nsAttrValue_ValueBaseType = 3; - pub type nsAttrValue_ValueBaseType = u32; - extern "C" { - #[link_name = "\u{1}_ZN11nsAttrValue15sEnumTableArrayE"] - pub static mut nsAttrValue_sEnumTableArray: - *mut root::nsTArray<*const root::nsAttrValue_EnumTable>; - } - #[test] - fn bindgen_test_layout_nsAttrValue() { - assert_eq!( - ::std::mem::size_of::<nsAttrValue>(), - 8usize, - concat!("Size of: ", stringify!(nsAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrValue>(), - 8usize, - concat!("Alignment of ", stringify!(nsAttrValue)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAttrValue>())).mBits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrValue), - "::", - stringify!(mBits) - ) - ); - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsMappedAttributes { - _unused: [u8; 0], - } - impl Clone for nsMappedAttributes { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug)] - pub struct nsAttrAndChildArray { - pub mImpl: *mut root::nsAttrAndChildArray_Impl, - } - pub type nsAttrAndChildArray_BorrowedAttrInfo = root::mozilla::dom::BorrowedAttrInfo; - #[repr(C)] - #[derive(Debug)] - pub struct nsAttrAndChildArray_InternalAttr { - pub mName: root::nsAttrName, - pub mValue: root::nsAttrValue, - } - #[test] - fn bindgen_test_layout_nsAttrAndChildArray_InternalAttr() { - assert_eq!( - ::std::mem::size_of::<nsAttrAndChildArray_InternalAttr>(), - 16usize, - concat!("Size of: ", stringify!(nsAttrAndChildArray_InternalAttr)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrAndChildArray_InternalAttr>(), - 8usize, - concat!( - "Alignment of ", - stringify!(nsAttrAndChildArray_InternalAttr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_InternalAttr>())).mName as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_InternalAttr), - "::", - stringify!(mName) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_InternalAttr>())).mValue as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_InternalAttr), - "::", - stringify!(mValue) - ) - ); - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsAttrAndChildArray_Impl { - pub mAttrAndChildCount: u32, - pub mBufferSize: u32, - pub mMappedAttrs: *mut root::nsMappedAttributes, - pub mBuffer: [*mut ::std::os::raw::c_void; 1usize], - } - #[test] - fn bindgen_test_layout_nsAttrAndChildArray_Impl() { - assert_eq!( - ::std::mem::size_of::<nsAttrAndChildArray_Impl>(), - 24usize, - concat!("Size of: ", stringify!(nsAttrAndChildArray_Impl)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrAndChildArray_Impl>(), - 8usize, - concat!("Alignment of ", stringify!(nsAttrAndChildArray_Impl)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mAttrAndChildCount as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_Impl), - "::", - stringify!(mAttrAndChildCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mBufferSize as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_Impl), - "::", - stringify!(mBufferSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mMappedAttrs as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_Impl), - "::", - stringify!(mMappedAttrs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsAttrAndChildArray_Impl>())).mBuffer as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray_Impl), - "::", - stringify!(mBuffer) - ) - ); - } - impl Clone for nsAttrAndChildArray_Impl { - fn clone(&self) -> Self { - *self - } - } - #[test] - fn bindgen_test_layout_nsAttrAndChildArray() { - assert_eq!( - ::std::mem::size_of::<nsAttrAndChildArray>(), - 8usize, - concat!("Size of: ", stringify!(nsAttrAndChildArray)) - ); - assert_eq!( - ::std::mem::align_of::<nsAttrAndChildArray>(), - 8usize, - concat!("Alignment of ", stringify!(nsAttrAndChildArray)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsAttrAndChildArray>())).mImpl as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsAttrAndChildArray), - "::", - stringify!(mImpl) - ) - ); - } /// An internal interface #[repr(C)] #[derive(Debug, Copy)] @@ -38036,60 +38353,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct nsXBLDocumentInfo { - _unused: [u8; 0], - } - impl Clone for nsXBLDocumentInfo { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsIStyleRuleProcessor { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIStyleRuleProcessor_COMTypeInfo { - pub _address: u8, - } - pub type nsIStyleRuleProcessor_EnumFunc = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut root::nsIStyleRuleProcessor, - arg2: *mut ::std::os::raw::c_void, - ) -> bool, - >; - #[test] - fn bindgen_test_layout_nsIStyleRuleProcessor() { - assert_eq!( - ::std::mem::size_of::<nsIStyleRuleProcessor>(), - 8usize, - concat!("Size of: ", stringify!(nsIStyleRuleProcessor)) - ); - assert_eq!( - ::std::mem::align_of::<nsIStyleRuleProcessor>(), - 8usize, - concat!("Alignment of ", stringify!(nsIStyleRuleProcessor)) - ); - } - impl Clone for nsIStyleRuleProcessor { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsXBLPrototypeBinding { - _unused: [u8; 0], - } - impl Clone for nsXBLPrototypeBinding { - fn clone(&self) -> Self { - *self - } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct nsAnonymousContentList { _unused: [u8; 0], } @@ -38767,27 +39030,27 @@ pub mod root { ) ); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 = 8388608; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 = 16777216; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 = 33554432; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 = 67108864; - pub const ELEMENT_SHARED_RESTYLE_BITS: root::_bindgen_ty_79 = 125829120; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 = 8388608; - pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 = - 16777216; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_79 = 33554432; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_79 = 67108864; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_79 = 8388608; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_79 = 16777216; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_79 = 33554432; - pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: root::_bindgen_ty_79 = 67108864; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 = 134217728; - pub const ELEMENT_HAS_CHILD_WITH_LATER_SIBLINGS_HINT: root::_bindgen_ty_79 = 268435456; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 = 41943040; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 = 83886080; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 = 260046848; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 = 27; - pub type _bindgen_ty_79 = u32; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_31 = 4194304; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_31 = 8388608; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_31 = 16777216; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_31 = 33554432; + pub const ELEMENT_SHARED_RESTYLE_BITS: root::_bindgen_ty_31 = 62914560; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_31 = 4194304; + pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_31 = + 8388608; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_31 = 16777216; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_31 = 33554432; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_31 = 4194304; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_31 = 8388608; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_31 = 16777216; + pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: root::_bindgen_ty_31 = 33554432; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_31 = 67108864; + pub const ELEMENT_HAS_CHILD_WITH_LATER_SIBLINGS_HINT: root::_bindgen_ty_31 = 134217728; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_31 = 20971520; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_31 = 41943040; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_31 = 130023424; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_31 = 26; + pub type _bindgen_ty_31 = u32; pub type nsStyledElementBase = root::mozilla::dom::Element; #[repr(C)] pub struct nsStyledElement { @@ -39319,6 +39582,16 @@ pub mod root { *self } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsCSSScanner { + _unused: [u8; 0], + } + impl Clone for nsCSSScanner { + fn clone(&self) -> Self { + *self + } + } pub const GECKO_IS_NIGHTLY: bool = true; #[repr(C)] pub struct ServoBundledURI { @@ -39604,283 +39877,6 @@ pub mod root { pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozPlaceholder: u32 = 8; pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8; pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12; - /// templated hashtable class maps keys to interface pointers. - /// See nsBaseHashtable for complete declaration. - /// @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h - /// for a complete specification. - /// @param Interface the interface-type being wrapped - /// @see nsDataHashtable, nsClassHashtable - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsInterfaceHashtable { - pub _address: u8, - } - pub type nsInterfaceHashtable_KeyType = [u8; 0usize]; - pub type nsInterfaceHashtable_UserDataType<Interface> = *mut Interface; - pub type nsInterfaceHashtable_base_type = u8; - pub type nsBindingList = root::nsTArray<root::RefPtr<root::nsXBLBinding>>; - #[repr(C)] - pub struct nsBindingManager { - pub _base: root::nsStubMutationObserver, - pub mRefCnt: root::nsCycleCollectingAutoRefCnt, - pub mBoundContentSet: u64, - pub mWrapperTable: root::nsAutoPtr<root::nsBindingManager_WrapperHashtable>, - pub mDocumentTable: u64, - pub mLoadingDocTable: u64, - pub mAttachedStack: root::nsBindingList, - pub mProcessingAttachedStack: bool, - pub mDestroyed: bool, - pub mAttachedStackSizeOnOutermost: u32, - pub mProcessAttachedQueueEvent: u64, - pub mDocument: *mut root::nsIDocument, - } - pub type nsBindingManager_HasThreadSafeRefCnt = root::mozilla::FalseType; - pub const nsBindingManager_DestructorHandling_eRunDtor: - root::nsBindingManager_DestructorHandling = 0; - pub const nsBindingManager_DestructorHandling_eDoNotRunDtor: - root::nsBindingManager_DestructorHandling = 1; - /// Notify the binding manager that an element - /// has been removed from its document, - /// so that it can update any bindings or - /// nsIAnonymousContentCreator-created anonymous - /// content that may depend on the document. - /// @param aContent the element that's being moved - /// @param aOldDocument the old document in which the - /// content resided. - /// @param aDestructorHandling whether or not to run the possible XBL - /// destructor. - pub type nsBindingManager_DestructorHandling = u32; - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsBindingManager_cycleCollection { - pub _base: root::nsXPCOMCycleCollectionParticipant, - } - #[test] - fn bindgen_test_layout_nsBindingManager_cycleCollection() { - assert_eq!( - ::std::mem::size_of::<nsBindingManager_cycleCollection>(), - 16usize, - concat!("Size of: ", stringify!(nsBindingManager_cycleCollection)) - ); - assert_eq!( - ::std::mem::align_of::<nsBindingManager_cycleCollection>(), - 8usize, - concat!( - "Alignment of ", - stringify!(nsBindingManager_cycleCollection) - ) - ); - } - impl Clone for nsBindingManager_cycleCollection { - fn clone(&self) -> Self { - *self - } - } - pub type nsBindingManager_BoundContentBindingCallback = root::std::function; - pub type nsBindingManager_WrapperHashtable = u8; - extern "C" { - #[link_name = "\u{1}_ZN16nsBindingManager21_cycleCollectorGlobalE"] - pub static mut nsBindingManager__cycleCollectorGlobal: - root::nsBindingManager_cycleCollection; - } - #[test] - fn bindgen_test_layout_nsBindingManager() { - assert_eq!( - ::std::mem::size_of::<nsBindingManager>(), - 80usize, - concat!("Size of: ", stringify!(nsBindingManager)) - ); - assert_eq!( - ::std::mem::align_of::<nsBindingManager>(), - 8usize, - concat!("Alignment of ", stringify!(nsBindingManager)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsBindingManager>())).mRefCnt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mRefCnt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mBoundContentSet as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mBoundContentSet) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mWrapperTable as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mWrapperTable) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mDocumentTable as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mDocumentTable) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mLoadingDocTable as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mLoadingDocTable) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mAttachedStack as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mAttachedStack) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mProcessingAttachedStack as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mProcessingAttachedStack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsBindingManager>())).mDestroyed as *const _ as usize }, - 57usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mDestroyed) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mAttachedStackSizeOnOutermost - as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mAttachedStackSizeOnOutermost) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<nsBindingManager>())).mProcessAttachedQueueEvent as *const _ - as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mProcessAttachedQueueEvent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsBindingManager>())).mDocument as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(nsBindingManager), - "::", - stringify!(mDocument) - ) - ); - } - /// An nsStyleContext represents the computed style data for an element. - /// The computed style data are stored in a set of structs (see - /// nsStyleStruct.h) that are cached either on the style context or in - /// the rule tree (see nsRuleNode.h for a description of this caching and - /// how the cached structs are shared). - /// - /// Since the data in |nsIStyleRule|s and |nsRuleNode|s are immutable - /// (with a few exceptions, like system color changes), the data in an - /// nsStyleContext are also immutable (with the additional exception of - /// GetUniqueStyleData). When style data change, - /// ElementRestyler::Restyle creates a new style context. - /// - /// Style contexts are reference counted. References are generally held - /// by: - /// 1. the |nsIFrame|s that are using the style context and - /// 2. any *child* style contexts (this might be the reverse of - /// expectation, but it makes sense in this case) - #[repr(C)] - #[derive(Debug)] - pub struct nsStyleContext { - pub mPseudoTag: root::RefPtr<root::nsAtom>, - pub mBits: u64, - } - #[test] - fn bindgen_test_layout_nsStyleContext() { - assert_eq!( - ::std::mem::size_of::<nsStyleContext>(), - 16usize, - concat!("Size of: ", stringify!(nsStyleContext)) - ); - assert_eq!( - ::std::mem::align_of::<nsStyleContext>(), - 8usize, - concat!("Alignment of ", stringify!(nsStyleContext)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsStyleContext>())).mPseudoTag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nsStyleContext), - "::", - stringify!(mPseudoTag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<nsStyleContext>())).mBits as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nsStyleContext), - "::", - stringify!(mBits) - ) - ); - } #[repr(C)] #[derive(Debug)] pub struct nsCSSCounterStyleRule { @@ -40423,10 +40419,6 @@ pub mod root { pub static mut nsContentUtils_sAnimationsAPIElementAnimateEnabled: bool; } extern "C" { - #[link_name = "\u{1}_ZN14nsContentUtils34sAnimationsAPIPendingMemberEnabledE"] - pub static mut nsContentUtils_sAnimationsAPIPendingMemberEnabled: bool; - } - extern "C" { #[link_name = "\u{1}_ZN14nsContentUtils19sGetBoxQuadsEnabledE"] pub static mut nsContentUtils_sGetBoxQuadsEnabled: bool; } @@ -40459,10 +40451,6 @@ pub mod root { pub static mut nsContentUtils_sBypassCSSOMOriginCheck: bool; } extern "C" { - #[link_name = "\u{1}_ZN14nsContentUtils21sIsScopedStyleEnabledE"] - pub static mut nsContentUtils_sIsScopedStyleEnabled: bool; - } - extern "C" { #[link_name = "\u{1}_ZN14nsContentUtils23sIsBytecodeCacheEnabledE"] pub static mut nsContentUtils_sIsBytecodeCacheEnabled: bool; } @@ -40860,44 +40848,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - } - #[test] - fn __bindgen_test_layout_nsTArray_open0_CSSVariableValues_Variable_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::nsTArray<root::mozilla::CSSVariableValues_Variable>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsTArray<root::mozilla::CSSVariableValues_Variable>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsTArray<root::mozilla::CSSVariableValues_Variable>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsTArray<root::mozilla::CSSVariableValues_Variable>) - ) - ); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_FontFamilyName_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsTArray<root::mozilla::FontFamilyName>>(), @@ -41599,6 +41549,18 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_NodeInfo_NodeInfoInner_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsPtrHashKey<root::mozilla::dom::NodeInfo_NodeInfoInner>>(), + 16usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsPtrHashKey<root::mozilla::dom::NodeInfo_NodeInfoInner>) + ) + ); + assert_eq ! ( :: std :: mem :: align_of :: < root :: nsPtrHashKey < root :: mozilla :: dom :: NodeInfo_NodeInfoInner > > ( ) , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: nsPtrHashKey < root :: mozilla :: dom :: NodeInfo_NodeInfoInner > ) ) ); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIPrincipal_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), @@ -42608,6 +42570,25 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_4() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), @@ -42793,6 +42774,44 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_2() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsAtom>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsAtom>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsAtom>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIObserver_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_3() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), @@ -42812,124 +42831,330 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_RawServoSelectorList_DefaultDelete_open1_RawServoSelectorList_close1_close0_instantiation( -) { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIContentViewer_close0_instantiation() { assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::RawServoSelectorList>>(), + ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::RawServoSelectorList>) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::RawServoSelectorList>>(), + ::std::mem::align_of::<root::nsCOMPtr>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::RawServoSelectorList>) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_DefaultDelete_open0_RawServoSelectorList_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSSelectorList_DefaultDelete_open1_nsCSSSelectorList_close1_close0_instantiation( -) { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_4() { assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSSelectorList>>(), + ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSSelectorList>) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSSelectorList>>(), + ::std::mem::align_of::<root::nsCOMPtr>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSSelectorList>) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSSelectorList_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIStreamListener_close0_instantiation() { assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSSelectorList_DefaultDelete_open1_nsCSSSelectorList_close1_close0_instantiation_1( -) { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_5() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSSelectorList>>(), + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSSelectorList>) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSSelectorList>>(), + ::std::mem::align_of::<root::nsCOMPtr>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSSelectorList>) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSSelectorList_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation_1() { assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, concat!( "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_RawServoSelectorList_DefaultDelete_open1_RawServoSelectorList_close1_close0_instantiation_1( + fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadContext_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation_2() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIProgressEventSink_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation_3() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIChannelEventSink_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation_4() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsISecurityEventSink_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIInterfaceRequestor_close0_instantiation_5() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIApplicationCacheContainer_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_5() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_UniquePtr_open0_RawServoSelectorList_DefaultDelete_open1_RawServoSelectorList_close1_close0_instantiation( ) { assert_eq!( ::std::mem::size_of::<root::mozilla::UniquePtr<root::RawServoSelectorList>>(), @@ -42949,7 +43174,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_DefaultDelete_open0_RawServoSelectorList_close0_instantiation_1() { + fn __bindgen_test_layout_DefaultDelete_open0_RawServoSelectorList_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::mozilla::DefaultDelete>(), 1usize, @@ -42968,21 +43193,41 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIObserver_close0_instantiation() { + fn __bindgen_test_layout_UniquePtr_open0_RawServoSelectorList_DefaultDelete_open1_RawServoSelectorList_close1_close0_instantiation_1( +) { assert_eq!( - ::std::mem::size_of::<root::nsCOMPtr>(), + ::std::mem::size_of::<root::mozilla::UniquePtr<root::RawServoSelectorList>>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::nsCOMPtr) + stringify!(root::mozilla::UniquePtr<root::RawServoSelectorList>) ) ); assert_eq!( - ::std::mem::align_of::<root::nsCOMPtr>(), + ::std::mem::align_of::<root::mozilla::UniquePtr<root::RawServoSelectorList>>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::nsCOMPtr) + stringify!(root::mozilla::UniquePtr<root::RawServoSelectorList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_open0_RawServoSelectorList_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::mozilla::DefaultDelete>(), + 1usize, + concat!( + "Size of template specialization: ", + stringify!(root::mozilla::DefaultDelete) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::mozilla::DefaultDelete>(), + 1usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::mozilla::DefaultDelete) ) ); } @@ -43066,7 +43311,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_4() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_6() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43085,7 +43330,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_5() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_7() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43104,7 +43349,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_6() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_8() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43123,7 +43368,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_7() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_9() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43142,7 +43387,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_8() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_10() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43308,6 +43553,25 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_Link_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsPtrHashKey<root::mozilla::dom::Link>>(), + 16usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsPtrHashKey<root::mozilla::dom::Link>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsPtrHashKey<root::mozilla::dom::Link>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsPtrHashKey<root::mozilla::dom::Link>) + ) + ); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_Link_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), @@ -43346,27 +43610,121 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsAutoPtr_open1_nsPropertyTable_close1_close0_instantiation( -) { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIHTMLCollection_close0_instantiation() { assert_eq!( - ::std::mem::size_of::<root::nsTArray<root::nsAutoPtr<root::nsPropertyTable>>>(), + ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::nsTArray<root::nsAutoPtr<root::nsPropertyTable>>) + stringify!(root::nsCOMPtr) ) ); assert_eq!( - ::std::mem::align_of::<root::nsTArray<root::nsAutoPtr<root::nsPropertyTable>>>(), + ::std::mem::align_of::<root::nsCOMPtr>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::nsTArray<root::nsAutoPtr<root::nsPropertyTable>>) + stringify!(root::nsCOMPtr) ) ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIHTMLCollection_close0_instantiation() { + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_2() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_3() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_4() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIHTMLCollection_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43385,6 +43743,25 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_5() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] fn __bindgen_test_layout_RefPtr_open0_FontFaceSet_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::FontFaceSet>>(), @@ -43423,6 +43800,25 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_RefPtr_open0_AboutCapabilities_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::AboutCapabilities>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::AboutCapabilities>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::AboutCapabilities>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::AboutCapabilities>) + ) + ); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIScriptGlobalObject_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), @@ -43442,7 +43838,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_4() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_6() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43480,7 +43876,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43537,7 +43933,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_5() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_7() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -43849,6 +44245,556 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIParser_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_PrincipalFlashClassifier_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::PrincipalFlashClassifier>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::PrincipalFlashClassifier>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::PrincipalFlashClassifier>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::PrincipalFlashClassifier>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsRevocableEventPtr_open0_nsRunnableMethod_open1_nsIDocument_void_close1_close0_instantiation( +) { + assert_eq!( + ::std::mem::size_of::<u64>(), + 8usize, + concat!("Size of template specialization: ", stringify!(u64)) + ); + assert_eq!( + ::std::mem::align_of::<u64>(), + 8usize, + concat!("Alignment of template specialization: ", stringify!(u64)) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsDOMNavigationTiming_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsDOMNavigationTiming>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsDOMNavigationTiming>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsDOMNavigationTiming>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsDOMNavigationTiming>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_DOMIntersectionObserver_close0_instantiation() { + assert_eq ! ( :: std :: mem :: size_of :: < root :: nsPtrHashKey < root :: mozilla :: dom :: DOMIntersectionObserver > > ( ) , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: nsPtrHashKey < root :: mozilla :: dom :: DOMIntersectionObserver > ) ) ); + assert_eq ! ( :: std :: mem :: align_of :: < root :: nsPtrHashKey < root :: mozilla :: dom :: DOMIntersectionObserver > > ( ) , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: nsPtrHashKey < root :: mozilla :: dom :: DOMIntersectionObserver > ) ) ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<root::nsWeakPtr>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<root::nsWeakPtr>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<root::nsWeakPtr>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<root::nsWeakPtr>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DOMImplementation_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMImplementation>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMImplementation>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMImplementation>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMImplementation>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_6() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsContentList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsContentList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_HTMLImageElement_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsPtrHashKey<root::mozilla::dom::HTMLImageElement>>(), + 16usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsPtrHashKey<root::mozilla::dom::HTMLImageElement>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsPtrHashKey<root::mozilla::dom::HTMLImageElement>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsPtrHashKey<root::mozilla::dom::HTMLImageElement>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_nsIObjectLoadingContent_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsPtrHashKey<root::nsIObjectLoadingContent>>(), + 16usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsPtrHashKey<root::nsIObjectLoadingContent>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsPtrHashKey<root::nsIObjectLoadingContent>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsPtrHashKey<root::nsIObjectLoadingContent>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DocumentTimeline_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DocumentTimeline>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DocumentTimeline>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DocumentTimeline>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DocumentTimeline>) + ) + ); + } + #[test] + fn __bindgen_test_layout_LinkedList_open0_DocumentTimeline_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::mozilla::LinkedList>(), + 24usize, + concat!( + "Size of template specialization: ", + stringify!(root::mozilla::LinkedList) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::mozilla::LinkedList>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::mozilla::LinkedList) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_ScriptLoader_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::ScriptLoader>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::ScriptLoader>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::ScriptLoader>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::ScriptLoader>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_PendingAnimationTracker_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::PendingAnimationTracker>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::PendingAnimationTracker>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::PendingAnimationTracker>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::PendingAnimationTracker>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_8() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_Promise_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Promise>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Promise>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::Promise>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Promise>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsFrameLoader_close1_close0_instantiation() + { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsFrameLoader>>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::nsFrameLoader>>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsFrameLoader>>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::nsFrameLoader>>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIRunnable_close1_close0_instantiation_1( +) { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<root::nsCOMPtr>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<root::nsCOMPtr>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<root::nsCOMPtr>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<root::nsCOMPtr>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIRunnable_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsRunnableMethod_open1_nsIDocument_void_close1_close0_instantiation( +) { + assert_eq!( + ::std::mem::size_of::<u64>(), + 8usize, + concat!("Size of template specialization: ", stringify!(u64)) + ); + assert_eq!( + ::std::mem::align_of::<u64>(), + 8usize, + concat!("Alignment of template specialization: ", stringify!(u64)) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsILayoutHistoryState_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_EventListenerManager_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::EventListenerManager>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::EventListenerManager>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::EventListenerManager>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::EventListenerManager>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIRunnable_close0_instantiation_2() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsIRequest_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_1() + { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_3() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::StyleSheet>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::StyleSheet>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::StyleSheet>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_2() + { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_4() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::StyleSheet>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::StyleSheet>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::StyleSheet>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsDOMStyleSheetSetList_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsDOMStyleSheetSetList>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsDOMStyleSheetSetList>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsDOMStyleSheetSetList>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsDOMStyleSheetSetList>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_open0_nsSVGElement_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsPtrHashKey<root::nsSVGElement>>(), + 16usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsPtrHashKey<root::nsSVGElement>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsPtrHashKey<root::nsSVGElement>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsPtrHashKey<root::nsSVGElement>) + ) + ); + } + #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsINode_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), @@ -43887,7 +44833,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_2() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_3() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -43906,7 +44852,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_3() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_4() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -43963,7 +44909,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_6() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocument_close0_instantiation_9() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44153,7 +45099,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_4() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_5() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -44191,7 +45137,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_5() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_6() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -44248,25 +45194,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsITimer_close0_instantiation_1() { - assert_eq!( - ::std::mem::size_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - } - #[test] fn __bindgen_test_layout_UniquePtr_open0_nsBidi_DefaultDelete_open1_nsBidi_close1_close0_instantiation( ) { assert_eq!( @@ -44421,7 +45348,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_9() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_11() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44440,7 +45367,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_10() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_12() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44631,84 +45558,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSValueList_DefaultDelete_open1_nsCSSValueList_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValueList>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValueList>) - ) - ); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSValueList_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - } - #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSValuePairList_DefaultDelete_open1_nsCSSValuePairList_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValuePairList>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValuePairList>) - ) - ); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSValuePairList_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsCSSValueGradientStop_close0_instantiation() { assert_eq!( ::std::mem::size_of::<root::nsTArray<root::nsCSSValueGradientStop>>(), @@ -44728,7 +45577,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_11() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_13() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44747,7 +45596,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_12() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_14() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44862,7 +45711,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -44976,7 +45825,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_6() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_7() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -45287,37 +46136,13 @@ pub mod root { #[test] fn __bindgen_test_layout_nsTArray_open0_pair_open1_nsString_nsString_close1_close0_instantiation( ) { - assert_eq!( - ::std::mem::size_of::< - root::nsTArray<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>, - >(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsTArray< - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>, - >) - ) - ); - assert_eq!( - ::std::mem::align_of::< - root::nsTArray<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>, - >(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsTArray< - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>, - >) - ) - ); + assert_eq ! ( :: std :: mem :: size_of :: < root :: nsTArray < root :: std :: pair < ::nsstring::nsStringRepr , ::nsstring::nsStringRepr > > > ( ) , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: nsTArray < root :: std :: pair < ::nsstring::nsStringRepr , ::nsstring::nsStringRepr > > ) ) ); + assert_eq ! ( :: std :: mem :: align_of :: < root :: nsTArray < root :: std :: pair < ::nsstring::nsStringRepr , ::nsstring::nsStringRepr > > > ( ) , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: nsTArray < root :: std :: pair < ::nsstring::nsStringRepr , ::nsstring::nsStringRepr > > ) ) ); } #[test] fn __bindgen_test_layout_pair_open0_nsString_nsString_close0_instantiation() { assert_eq!( - ::std::mem::size_of::< - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>, - >(), + ::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>(), 32usize, concat!( "Size of template specialization: ", @@ -45325,9 +46150,7 @@ pub mod root { ) ); assert_eq!( - ::std::mem::align_of::< - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>, - >(), + ::std::mem::align_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>(), 8usize, concat!( "Alignment of template specialization: ", @@ -45604,7 +46427,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_7() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_8() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -45623,7 +46446,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_8() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_9() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -45933,7 +46756,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_9() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_10() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -46313,7 +47136,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_10() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_11() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -46389,84 +47212,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSValueList_DefaultDelete_open1_nsCSSValueList_close1_close0_instantiation_1( -) { - assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValueList>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValueList>) - ) - ); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSValueList_close0_instantiation_1() { - assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - } - #[test] - fn __bindgen_test_layout_UniquePtr_open0_nsCSSValuePairList_DefaultDelete_open1_nsCSSValuePairList_close1_close0_instantiation_1( -) { - assert_eq!( - ::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValuePairList>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::UniquePtr<root::nsCSSValuePairList>) - ) - ); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_open0_nsCSSValuePairList_close0_instantiation_1() { - assert_eq!( - ::std::mem::size_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::mozilla::DefaultDelete>(), - 1usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::DefaultDelete) - ) - ); - } - #[test] fn __bindgen_test_layout_RefPtr_open0_RawServoAnimationValue_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::RawServoAnimationValue>>(), @@ -46486,25 +47231,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_13() { - assert_eq!( - ::std::mem::size_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsCOMPtr>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsCOMPtr) - ) - ); - } - #[test] fn __bindgen_test_layout_nsTArray_open0_nsCString_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::nsTArray<root::nsCString>>(), @@ -46524,7 +47250,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_14() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_15() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -46543,7 +47269,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_15() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_16() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -46562,7 +47288,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_16() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_17() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -46600,7 +47326,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_3() { + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_5() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), 8usize, @@ -46737,7 +47463,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_1() + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_3() { assert_eq!( ::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::StyleSheet>>>(), @@ -46757,7 +47483,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_4() { + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_6() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), 8usize, @@ -46801,7 +47527,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_5() { + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_7() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), 8usize, @@ -47071,7 +47797,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_17() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_18() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -47090,7 +47816,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_6() { + fn __bindgen_test_layout_RefPtr_open0_StyleSheet_close0_instantiation_8() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>(), 8usize, @@ -47456,7 +48182,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_2() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -47513,7 +48239,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation() { + fn __bindgen_test_layout_RefPtr_open0_nsContentList_close0_instantiation_7() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsContentList>>(), 8usize, @@ -47589,7 +48315,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_3() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_2() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -47666,6 +48392,255 @@ pub mod root { ); } #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsISupports_close0_instantiation_3() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DOMRect_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DOMRect_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DOMRect_close0_instantiation_2() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::DOMRect>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMRect>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Element>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Element>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_open0_nsPIDOMWindowInner_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsCOMPtr>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsCOMPtr) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_nsIDocument_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::nsIDocument>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::nsIDocument>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::nsIDocument>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::nsIDocument>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_IntersectionCallback_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::IntersectionCallback>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::IntersectionCallback>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::IntersectionCallback>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::IntersectionCallback>) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation_1() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Element>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::RefPtr<root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::Element>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_double_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<f64>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<f64>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<f64>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<f64>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_ptr_Element_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray<*mut root::mozilla::dom::Element>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::nsTArray<*mut root::mozilla::dom::Element>>(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray<*mut root::mozilla::dom::Element>) + ) + ); + } + #[test] + fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_DOMIntersectionObserverEntry_close1_close0_instantiation( +) { + assert_eq!( + ::std::mem::size_of::< + root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>, + >(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::nsTArray< + root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>, + >) + ) + ); + assert_eq!( + ::std::mem::align_of::< + root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>, + >(), + 8usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::nsTArray< + root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>, + >) + ) + ); + } + #[test] + fn __bindgen_test_layout_RefPtr_open0_DOMIntersectionObserverEntry_close0_instantiation() { + assert_eq!( + ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>(), + 8usize, + concat!( + "Size of template specialization: ", + stringify!(root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>) + ) + ); + assert_eq ! ( :: std :: mem :: align_of :: < root :: RefPtr < root :: mozilla :: dom :: DOMIntersectionObserverEntry > > ( ) , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: RefPtr < root :: mozilla :: dom :: DOMIntersectionObserverEntry > ) ) ); + } + #[test] fn __bindgen_test_layout_UniquePtr_open0_nsISMILAttr_DefaultDelete_open1_nsISMILAttr_close1_close0_instantiation( ) { assert_eq!( @@ -47762,7 +48737,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_11() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_12() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -47819,7 +48794,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation() { + fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation_2() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>(), 8usize, @@ -47857,7 +48832,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_18() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIURI_close0_instantiation_19() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, @@ -48126,7 +49101,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation_1() { + fn __bindgen_test_layout_RefPtr_open0_Element_close0_instantiation_3() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>(), 8usize, @@ -48145,38 +49120,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_OwningNonNull_open0_EffectCompositor_AnimationStyleRuleProcessor_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::< - root::mozilla::OwningNonNull< - root::mozilla::EffectCompositor_AnimationStyleRuleProcessor, - >, - >(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::mozilla::OwningNonNull< - root::mozilla::EffectCompositor_AnimationStyleRuleProcessor, - >) - ) - ); - assert_eq!( - ::std::mem::align_of::< - root::mozilla::OwningNonNull< - root::mozilla::EffectCompositor_AnimationStyleRuleProcessor, - >, - >(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::mozilla::OwningNonNull< - root::mozilla::EffectCompositor_AnimationStyleRuleProcessor, - >) - ) - ); - } - #[test] fn __bindgen_test_layout_UniquePtr_open0_nsStyleGridTemplate_DefaultDelete_open1_nsStyleGridTemplate_close1_close0_instantiation_2( ) { assert_eq!( @@ -48352,141 +49295,26 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_nsXBLBinding_close1_close0_instantiation() - { - assert_eq!( - ::std::mem::size_of::<root::nsTArray<root::RefPtr<root::nsXBLBinding>>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsTArray<root::RefPtr<root::nsXBLBinding>>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsTArray<root::RefPtr<root::nsXBLBinding>>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsTArray<root::RefPtr<root::nsXBLBinding>>) - ) - ); - } - #[test] - fn __bindgen_test_layout_RefPtr_open0_nsXBLBinding_close0_instantiation_2() { + fn __bindgen_test_layout_RefPtr_open0_ComputedStyle_close0_instantiation() { assert_eq!( - ::std::mem::size_of::<root::RefPtr<root::nsXBLBinding>>(), + ::std::mem::size_of::<root::RefPtr<root::mozilla::ComputedStyle>>(), 8usize, concat!( "Size of template specialization: ", - stringify!(root::RefPtr<root::nsXBLBinding>) + stringify!(root::RefPtr<root::mozilla::ComputedStyle>) ) ); assert_eq!( - ::std::mem::align_of::<root::RefPtr<root::nsXBLBinding>>(), + ::std::mem::align_of::<root::RefPtr<root::mozilla::ComputedStyle>>(), 8usize, concat!( "Alignment of template specialization: ", - stringify!(root::RefPtr<root::nsXBLBinding>) + stringify!(root::RefPtr<root::mozilla::ComputedStyle>) ) ); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsTHashtable_open1_nsRefPtrHashKey_open2_nsIContent_close2_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<u64>(), - 8usize, - concat!("Size of template specialization: ", stringify!(u64)) - ); - assert_eq!( - ::std::mem::align_of::<u64>(), - 8usize, - concat!("Alignment of template specialization: ", stringify!(u64)) - ); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_open0_nsIContent_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIContent>>(), - 16usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsRefPtrHashKey<root::nsIContent>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsRefPtrHashKey<root::nsIContent>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsRefPtrHashKey<root::nsIContent>) - ) - ); - } - #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<root::nsAutoPtr<root::nsBindingManager_WrapperHashtable>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::nsAutoPtr<root::nsBindingManager_WrapperHashtable>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::nsAutoPtr<root::nsBindingManager_WrapperHashtable>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::nsAutoPtr<root::nsBindingManager_WrapperHashtable>) - ) - ); - } - #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<u64>(), - 8usize, - concat!("Size of template specialization: ", stringify!(u64)) - ); - assert_eq!( - ::std::mem::align_of::<u64>(), - 8usize, - concat!("Alignment of template specialization: ", stringify!(u64)) - ); - } - #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsURIHashKey_nsIStreamListener_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<u64>(), - 8usize, - concat!("Size of template specialization: ", stringify!(u64)) - ); - assert_eq!( - ::std::mem::align_of::<u64>(), - 8usize, - concat!("Alignment of template specialization: ", stringify!(u64)) - ); - } - #[test] - fn __bindgen_test_layout_RefPtr_open0_nsRunnableMethod_open1_nsBindingManager_void_close1_close0_instantiation( -) { - assert_eq!( - ::std::mem::size_of::<u64>(), - 8usize, - concat!("Size of template specialization: ", stringify!(u64)) - ); - assert_eq!( - ::std::mem::align_of::<u64>(), - 8usize, - concat!("Alignment of template specialization: ", stringify!(u64)) - ); - } - #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_12() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_13() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -48505,25 +49333,6 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ServoStyleContext_close0_instantiation() { - assert_eq!( - ::std::mem::size_of::<root::RefPtr<root::mozilla::ServoStyleContext>>(), - 8usize, - concat!( - "Size of template specialization: ", - stringify!(root::RefPtr<root::mozilla::ServoStyleContext>) - ) - ); - assert_eq!( - ::std::mem::align_of::<root::RefPtr<root::mozilla::ServoStyleContext>>(), - 8usize, - concat!( - "Alignment of template specialization: ", - stringify!(root::RefPtr<root::mozilla::ServoStyleContext>) - ) - ); - } - #[test] fn __bindgen_test_layout_RefPtr_open0_RawServoDeclarationBlock_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::RawServoDeclarationBlock>>(), @@ -48543,7 +49352,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_13() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_14() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -48619,7 +49428,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_14() { + fn __bindgen_test_layout_RefPtr_open0_nsAtom_close0_instantiation_15() { assert_eq!( ::std::mem::size_of::<root::RefPtr<root::nsAtom>>(), 8usize, @@ -48638,7 +49447,7 @@ pub mod root { ); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIRunnable_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIRunnable_close0_instantiation_3() { assert_eq!( ::std::mem::size_of::<root::nsCOMPtr>(), 8usize, diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs index d96d4d68755..481ad3c29c7 100644 --- a/components/style/gecko/media_queries.rs +++ b/components/style/gecko/media_queries.rs @@ -176,7 +176,7 @@ impl Device { context.mMedium }; - MediaType(CustomIdent(Atom::from(medium_to_use))) + MediaType(CustomIdent(unsafe { Atom::from_raw(medium_to_use) })) } /// Returns the current viewport size in app units. @@ -262,7 +262,7 @@ impl ToCss for Expression { } // NB: CssStringWriter not needed, feature names are under control. - write!(dest, "{}", Atom::from(unsafe { *self.feature.mName }))?; + write!(dest, "{}", unsafe { Atom::from_static(*self.feature.mName) })?; if let Some(ref val) = self.value { dest.write_str(": ")?; @@ -394,9 +394,9 @@ impl MediaExpressionValue { } nsMediaFeature_ValueType::eIdent => { debug_assert_eq!(css_value.mUnit, nsCSSUnit::eCSSUnit_AtomIdent); - Some(MediaExpressionValue::Ident(Atom::from(unsafe { - *css_value.mValue.mAtom.as_ref() - }))) + Some(MediaExpressionValue::Ident(unsafe { + Atom::from_raw(*css_value.mValue.mAtom.as_ref()) + })) } nsMediaFeature_ValueType::eIntRatio => { let array = unsafe { css_value.array_unchecked() }; diff --git a/components/style/gecko/rules.rs b/components/style/gecko/rules.rs index 90d061cd738..329d66b2f58 100644 --- a/components/style/gecko/rules.rs +++ b/components/style/gecko/rules.rs @@ -281,7 +281,7 @@ impl ToNsCssValue for counter_style::System { let mut a = nsCSSValue::null(); let mut b = nsCSSValue::null(); a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_FIXED as i32); - b.set_integer(first_symbol_value.unwrap_or(1)); + b.set_integer(first_symbol_value.map_or(1, |v| v.value())); nscssvalue.set_pair(&a, &b); } Extends(other) => { @@ -326,7 +326,7 @@ impl ToNsCssValue for counter_style::Ranges { nscssvalue.set_pair_list(self.0.into_iter().map(|range| { fn set_bound(bound: CounterBound, nscssvalue: &mut nsCSSValue) { if let CounterBound::Integer(finite) = bound { - nscssvalue.set_integer(finite) + nscssvalue.set_integer(finite.value()) } else { nscssvalue.set_enum(structs::NS_STYLE_COUNTER_RANGE_INFINITE as i32) } @@ -345,7 +345,7 @@ impl ToNsCssValue for counter_style::Pad { fn convert(self, nscssvalue: &mut nsCSSValue) { let mut min_length = nsCSSValue::null(); let mut pad_with = nsCSSValue::null(); - min_length.set_integer(self.0 as i32); + min_length.set_integer(self.0.value()); pad_with.set_from(self.1); nscssvalue.set_pair(&min_length, &pad_with); } @@ -372,7 +372,7 @@ impl ToNsCssValue for counter_style::AdditiveSymbols { nscssvalue.set_pair_list(self.0.into_iter().map(|tuple| { let mut weight = nsCSSValue::null(); let mut symbol = nsCSSValue::null(); - weight.set_integer(tuple.weight as i32); + weight.set_integer(tuple.weight.value()); symbol.set_from(tuple.symbol); (weight, symbol) })); diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 434d2fef414..b6e99b2083f 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -274,6 +274,20 @@ impl NonTSPseudoClass { } } +impl ::selectors::parser::NonTSPseudoClass for NonTSPseudoClass { + type Impl = SelectorImpl; + + #[inline] + fn is_active_or_hover(&self) -> bool { + matches!(*self, NonTSPseudoClass::Active | NonTSPseudoClass::Hover) + } + + #[inline] + fn is_host(&self) -> bool { + false // TODO(emilio) + } +} + /// The dummy struct we use to implement our selector parsing. #[derive(Clone, Debug, Eq, PartialEq)] pub struct SelectorImpl; @@ -291,12 +305,6 @@ impl ::selectors::SelectorImpl for SelectorImpl { type PseudoElement = PseudoElement; type NonTSPseudoClass = NonTSPseudoClass; - - #[inline] - fn is_active_or_hover(pseudo_class: &Self::NonTSPseudoClass) -> bool { - matches!(*pseudo_class, NonTSPseudoClass::Active | - NonTSPseudoClass::Hover) - } } impl<'a> SelectorParser<'a> { diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs index 322fcdf2d1b..abc28c8f5ec 100644 --- a/components/style/gecko/values.rs +++ b/components/style/gecko/values.rs @@ -507,7 +507,7 @@ impl CounterStyleOrNone { let name = unsafe { bindings::Gecko_CounterStyle_GetName(gecko_value) }; if !name.is_null() { - let name = Atom::from(name); + let name = unsafe { Atom::from_raw(name) }; if name == atom!("none") { Either::First(CounterStyleOrNone::None) } else { diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index b4e7862bce8..ace76867217 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -135,6 +135,13 @@ impl<'ld> TDocument for GeckoDocument<'ld> { #[derive(Clone, Copy)] pub struct GeckoShadowRoot<'lr>(pub &'lr structs::ShadowRoot); +impl<'lr> PartialEq for GeckoShadowRoot<'lr> { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.0 as *const _ == other.0 as *const _ + } +} + impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> { type ConcreteNode = GeckoNode<'lr>; @@ -164,6 +171,7 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> { let author_styles = AuthorStyles::<GeckoStyleSheet>::from_ffi(author_styles); + debug_assert!(!author_styles.stylesheets.dirty()); debug_assert!( author_styles.quirks_mode == self.as_node().owner_doc().quirks_mode() || author_styles.stylesheets.is_empty() @@ -1040,29 +1048,6 @@ impl<'le> TElement for GeckoElement<'le> { self.before_or_after_pseudo(/* is_before = */ false) } - /// Ensure this accurately represents the rules that an element may ever - /// match, even in the native anonymous content case. - fn style_scope(&self) -> Self::ConcreteNode { - if self.implemented_pseudo_element().is_some() { - return self.closest_non_native_anonymous_ancestor().unwrap().style_scope(); - } - - if self.is_in_native_anonymous_subtree() { - return self.as_node().owner_doc().as_node(); - } - - if self.xbl_binding().is_some() || self.shadow_root().is_some() { - return self.as_node(); - } - - if let Some(parent) = self.xbl_binding_parent() { - return parent.as_node(); - } - - self.as_node().owner_doc().as_node() - } - - #[inline] fn is_html_element(&self) -> bool { self.namespace_id() == (structs::root::kNameSpaceID_XHTML as i32) @@ -1108,8 +1093,16 @@ impl<'le> TElement for GeckoElement<'le> { unsafe { slots._base.mContainingShadow.mRawPtr.as_ref().map(GeckoShadowRoot) } } - /// Execute `f` for each anonymous content child element (apart from - /// ::before and ::after) whose originating element is `self`. + fn has_same_xbl_proto_binding_as(&self, other: Self) -> bool { + match (self.xbl_binding(), other.xbl_binding()) { + (None, None) => true, + (Some(a), Some(b)) => { + a.0.mPrototypeBinding == b.0.mPrototypeBinding + } + _ => false, + } + } + fn each_anonymous_content_child<F>(&self, mut f: F) where F: FnMut(Self), @@ -1830,13 +1823,22 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { #[inline] fn parent_element(&self) -> Option<Self> { - // FIXME(emilio): This will need to jump across if the parent node is a - // shadow root to get the shadow host. let parent_node = self.as_node().parent_node(); parent_node.and_then(|n| n.as_element()) } #[inline] + fn parent_node_is_shadow_root(&self) -> bool { + self.as_node().parent_node().map_or(false, |p| p.is_shadow_root()) + } + + #[inline] + fn containing_shadow_host(&self) -> Option<Self> { + let shadow = self.containing_shadow()?; + Some(shadow.host()) + } + + #[inline] fn pseudo_element_originating_element(&self) -> Option<Self> { debug_assert!(self.implemented_pseudo_element().is_some()); self.closest_non_native_anonymous_ancestor() diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs index 3499b13e310..e3e9a9c691e 100644 --- a/components/style/gecko_string_cache/mod.rs +++ b/components/style/gecko_string_cache/mod.rs @@ -99,7 +99,9 @@ impl WeakAtom { /// Clone this atom, bumping the refcount if the atom is not static. #[inline] pub fn clone(&self) -> Atom { - Atom::from(self.as_ptr()) + unsafe { + Atom::from_raw(self.as_ptr()) + } } /// Get the atom hash. @@ -267,15 +269,25 @@ impl Atom { /// /// Right now it's only used by the atom macro, and ideally it should keep /// that way, now we have sugar for is_static, creating atoms using - /// Atom::from should involve almost no overhead. + /// Atom::from_raw should involve almost no overhead. #[inline] - unsafe fn from_static(ptr: *mut nsStaticAtom) -> Self { + pub unsafe fn from_static(ptr: *mut nsStaticAtom) -> Self { let atom = Atom(ptr as *mut WeakAtom); debug_assert!(atom.is_static(), "Called from_static for a non-static atom!"); atom } + /// Creates an atom from an atom pointer. + #[inline(always)] + pub unsafe fn from_raw(ptr: *mut nsAtom) -> Self { + let atom = Atom(ptr as *mut WeakAtom); + if !atom.is_static() { + Gecko_AddRefAtom(ptr); + } + atom + } + /// Creates an atom from a dynamic atom pointer that has already had AddRef /// called on it. #[inline] @@ -308,7 +320,9 @@ impl Hash for WeakAtom { impl Clone for Atom { #[inline(always)] fn clone(&self) -> Atom { - Atom::from(self.as_ptr()) + unsafe { + Atom::from_raw(self.as_ptr()) + } } } @@ -388,28 +402,4 @@ impl From<String> for Atom { } } -impl From<*mut nsAtom> for Atom { - #[inline] - fn from(ptr: *mut nsAtom) -> Atom { - assert!(!ptr.is_null()); - unsafe { - let ret = Atom(WeakAtom::new(ptr)); - if !ret.is_static() { - Gecko_AddRefAtom(ptr); - } - ret - } - } -} - -impl From<*mut nsStaticAtom> for Atom { - #[inline] - fn from(ptr: *mut nsStaticAtom) -> Atom { - assert!(!ptr.is_null()); - unsafe { - Atom::from_static(ptr) - } - } -} - malloc_size_of_is_0!(Atom); diff --git a/components/style/invalidation/element/element_wrapper.rs b/components/style/invalidation/element/element_wrapper.rs index 5483c275697..29da4d7cb2f 100644 --- a/components/style/invalidation/element/element_wrapper.rs +++ b/components/style/invalidation/element/element_wrapper.rs @@ -271,28 +271,37 @@ where } fn parent_element(&self) -> Option<Self> { - self.element.parent_element() - .map(|e| ElementWrapper::new(e, self.snapshot_map)) + let parent = self.element.parent_element()?; + Some(Self::new(parent, self.snapshot_map)) + } + + fn parent_node_is_shadow_root(&self) -> bool { + self.element.parent_node_is_shadow_root() + } + + fn containing_shadow_host(&self) -> Option<Self> { + let host = self.element.containing_shadow_host()?; + Some(Self::new(host, self.snapshot_map)) } fn first_child_element(&self) -> Option<Self> { - self.element.first_child_element() - .map(|e| ElementWrapper::new(e, self.snapshot_map)) + let child = self.element.first_child_element()?; + Some(Self::new(child, self.snapshot_map)) } fn last_child_element(&self) -> Option<Self> { - self.element.last_child_element() - .map(|e| ElementWrapper::new(e, self.snapshot_map)) + let child = self.element.last_child_element()?; + Some(Self::new(child, self.snapshot_map)) } fn prev_sibling_element(&self) -> Option<Self> { - self.element.prev_sibling_element() - .map(|e| ElementWrapper::new(e, self.snapshot_map)) + let sibling = self.element.prev_sibling_element()?; + Some(Self::new(sibling, self.snapshot_map)) } fn next_sibling_element(&self) -> Option<Self> { - self.element.next_sibling_element() - .map(|e| ElementWrapper::new(e, self.snapshot_map)) + let sibling = self.element.next_sibling_element()?; + Some(Self::new(sibling, self.snapshot_map)) } #[inline] diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 5c3de4a501e..50280b8e306 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -78,7 +78,7 @@ pub mod style_structs { pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData; #[repr(C)] -pub struct ComputedValues(::gecko_bindings::structs::mozilla::ServoStyleContext); +pub struct ComputedValues(::gecko_bindings::structs::mozilla::ComputedStyle); impl ComputedValues { pub fn new( @@ -126,17 +126,17 @@ impl ComputedValues { pub fn pseudo(&self) -> Option<PseudoElement> { use string_cache::Atom; - let atom = (self.0)._base.mPseudoTag.mRawPtr; + let atom = (self.0).mPseudoTag.mRawPtr; if atom.is_null() { return None; } - let atom = Atom::from(atom); + let atom = unsafe { Atom::from_raw(atom) }; PseudoElement::from_atom(&atom) } fn get_pseudo_type(&self) -> CSSPseudoElementType { - let bits = (self.0)._base.mBits; + let bits = (self.0).mBits; let our_type = bits >> NS_STYLE_CONTEXT_TYPE_SHIFT; unsafe { transmute(our_type as u8) } } @@ -167,7 +167,7 @@ impl ComputedValues { impl Drop for ComputedValues { fn drop(&mut self) { unsafe { - bindings::Gecko_ServoStyleContext_Destroy(&mut self.0); + bindings::Gecko_ComputedStyle_Destroy(&mut self.0); } } } @@ -197,7 +197,7 @@ impl Clone for ComputedValuesInner { } type PseudoInfo = (*mut structs::nsAtom, structs::CSSPseudoElementType); -type ParentStyleContextInfo<'a> = Option< &'a ComputedValues>; +type ParentComputedStyleInfo<'a> = Option< &'a ComputedValues>; impl ComputedValuesInner { pub fn new(custom_properties: Option<Arc<CustomPropertiesMap>>, @@ -224,7 +224,7 @@ impl ComputedValuesInner { fn to_outer( self, pres_context: RawGeckoPresContextBorrowed, - parent: ParentStyleContextInfo, + parent: ParentComputedStyleInfo, info: Option<PseudoInfo> ) -> Arc<ComputedValues> { let (tag, ty) = if let Some(info) = info { @@ -239,13 +239,13 @@ impl ComputedValuesInner { unsafe fn to_outer_helper( self, pres_context: bindings::RawGeckoPresContextBorrowed, - parent: ParentStyleContextInfo, + parent: ParentComputedStyleInfo, pseudo_ty: structs::CSSPseudoElementType, pseudo_tag: *mut structs::nsAtom ) -> Arc<ComputedValues> { let arc = { let arc: Arc<ComputedValues> = Arc::new(uninitialized()); - bindings::Gecko_ServoStyleContext_Init(&arc.0 as *const _ as *mut _, + bindings::Gecko_ComputedStyle_Init(&arc.0 as *const _ as *mut _, parent, pres_context, &self, pseudo_ty, pseudo_tag); // We're simulating a move by having C++ do a memcpy and then forgetting @@ -3248,12 +3248,15 @@ fn static_assert() { use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties; use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable; use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN; + use Atom; let property = self.gecko.mTransitions[index].mProperty; if property == eCSSProperty_UNKNOWN || property == eCSSPropertyExtra_variable { let atom = self.gecko.mTransitions[index].mUnknownProperty.mRawPtr; debug_assert!(!atom.is_null()); - TransitionProperty::Unsupported(CustomIdent(atom.into())) + TransitionProperty::Unsupported(CustomIdent(unsafe{ + Atom::from_raw(atom) + })) } else if property == eCSSPropertyExtra_no_properties { // Actually, we don't expect TransitionProperty::Unsupported also represents "none", // but if the caller wants to convert it, it is fine. Please use it carefully. @@ -3343,13 +3346,13 @@ fn static_assert() { pub fn animation_name_at(&self, index: usize) -> longhands::animation_name::computed_value::SingleComputedValue { use properties::longhands::animation_name::single_value::SpecifiedValue as AnimationName; + use Atom; let atom = self.gecko.mAnimations[index].mName.mRawPtr; if atom == atom!("").as_ptr() { - AnimationName(None) - } else { - AnimationName(Some(KeyframesName::from_atom(atom.into()))) + return AnimationName(None) } + AnimationName(Some(KeyframesName::from_atom(unsafe { Atom::from_raw(atom) }))) } pub fn copy_animation_name_from(&mut self, other: &Self) { self.gecko.mAnimationNameCount = other.gecko.mAnimationNameCount; @@ -3549,16 +3552,19 @@ fn static_assert() { use properties::longhands::will_change::computed_value::T; use gecko_bindings::structs::nsAtom; use values::CustomIdent; + use Atom; if self.gecko.mWillChange.len() == 0 { - T::Auto - } else { - let custom_idents: Vec<CustomIdent> = self.gecko.mWillChange.iter().map(|gecko_atom| { - CustomIdent((gecko_atom.mRawPtr as *mut nsAtom).into()) - }).collect(); - - T::AnimateableFeatures(custom_idents.into_boxed_slice()) + return T::Auto } + + let custom_idents: Vec<CustomIdent> = self.gecko.mWillChange.iter().map(|gecko_atom| { + unsafe { + CustomIdent(Atom::from_raw(gecko_atom.mRawPtr as *mut nsAtom)) + } + }).collect(); + + T::AnimateableFeatures(custom_idents.into_boxed_slice()) } <% impl_shape_source("shape_outside", "mShapeOutside") %> @@ -4707,29 +4713,29 @@ fn static_assert() { ${impl_simple_type_with_conversion("text_emphasis_position")} - pub fn set_text_emphasis_style(&mut self, v: longhands::text_emphasis_style::computed_value::T) { - use properties::longhands::text_emphasis_style::computed_value::T; - use properties::longhands::text_emphasis_style::{FillMode, ShapeKeyword}; + pub fn set_text_emphasis_style(&mut self, v: values::computed::TextEmphasisStyle) { + use values::computed::TextEmphasisStyle; + use values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword}; self.clear_text_emphasis_style_if_string(); let (te, s) = match v { - T::None => (structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE, ""), - T::Keyword(ref keyword) => { + TextEmphasisStyle::None => (structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE, ""), + TextEmphasisStyle::Keyword(ref keyword) => { let fill = match keyword.fill { - FillMode::Filled => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED, - FillMode::Open => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN, + TextEmphasisFillMode::Filled => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED, + TextEmphasisFillMode::Open => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN, }; let shape = match keyword.shape { - ShapeKeyword::Dot => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT, - ShapeKeyword::Circle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE, - ShapeKeyword::DoubleCircle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE, - ShapeKeyword::Triangle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE, - ShapeKeyword::Sesame => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME, + TextEmphasisShapeKeyword::Dot => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT, + TextEmphasisShapeKeyword::Circle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE, + TextEmphasisShapeKeyword::DoubleCircle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE, + TextEmphasisShapeKeyword::Triangle => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE, + TextEmphasisShapeKeyword::Sesame => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME, }; (shape | fill, keyword.shape.char(keyword.fill)) }, - T::String(ref s) => { + TextEmphasisStyle::String(ref s) => { (structs::NS_STYLE_TEXT_EMPHASIS_STYLE_STRING, &**s) }, }; @@ -4750,34 +4756,35 @@ fn static_assert() { self.copy_text_emphasis_style_from(other) } - pub fn clone_text_emphasis_style(&self) -> longhands::text_emphasis_style::computed_value::T { - use properties::longhands::text_emphasis_style::computed_value::{T, KeywordValue}; - use properties::longhands::text_emphasis_style::{FillMode, ShapeKeyword}; + pub fn clone_text_emphasis_style(&self) -> values::computed::TextEmphasisStyle { + use values::computed::TextEmphasisStyle; + use values::computed::text::TextEmphasisKeywordValue; + use values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword}; if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE as u8 { - return T::None; + return TextEmphasisStyle::None; } if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_STRING as u8 { - return T::String(self.gecko.mTextEmphasisStyleString.to_string()); + return TextEmphasisStyle::String(self.gecko.mTextEmphasisStyleString.to_string()); } let fill = self.gecko.mTextEmphasisStyle & structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN as u8 == 0; - let fill = if fill { FillMode::Filled } else { FillMode::Open }; + let fill = if fill { TextEmphasisFillMode::Filled } else { TextEmphasisFillMode::Open }; let shape = match self.gecko.mTextEmphasisStyle as u32 & !structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN { - structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT => ShapeKeyword::Dot, - structs::NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE => ShapeKeyword::Circle, - structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE => ShapeKeyword::DoubleCircle, - structs::NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE => ShapeKeyword::Triangle, - structs::NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME => ShapeKeyword::Sesame, + structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOT => TextEmphasisShapeKeyword::Dot, + structs::NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE => TextEmphasisShapeKeyword::Circle, + structs::NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE => TextEmphasisShapeKeyword::DoubleCircle, + structs::NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE => TextEmphasisShapeKeyword::Triangle, + structs::NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME => TextEmphasisShapeKeyword::Sesame, _ => panic!("Unexpected value in style struct for text-emphasis-style property") }; - T::Keyword(KeywordValue { fill, shape }) + TextEmphasisStyle::Keyword(TextEmphasisKeywordValue { fill, shape }) } ${impl_non_negative_length('_webkit_text_stroke_width', diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index b25b88cbcad..9e9c27ee72b 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -195,166 +195,16 @@ ${helpers.predefined_type( spec="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property", )} -<%helpers:longhand name="text-emphasis-style" products="gecko" boxed="True" - animation_value_type="discrete" - spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-style"> - use computed_values::writing_mode::T as WritingMode; - use unicode_segmentation::UnicodeSegmentation; - - pub mod computed_value { - #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] - #[cfg_attr(feature = "servo", derive(ToComputedValue))] - pub enum T { - Keyword(KeywordValue), - None, - String(String), - } - - #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] - pub struct KeywordValue { - pub fill: super::FillMode, - pub shape: super::ShapeKeyword, - } - } - - #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] - pub enum SpecifiedValue { - Keyword(KeywordValue), - None, - String(String), - } - - #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] - pub enum KeywordValue { - Fill(FillMode), - Shape(ShapeKeyword), - FillAndShape(FillMode, ShapeKeyword), - } - - impl KeywordValue { - fn fill(&self) -> Option<FillMode> { - match *self { - KeywordValue::Fill(fill) | - KeywordValue::FillAndShape(fill, _) => Some(fill), - _ => None, - } - } - - fn shape(&self) -> Option<ShapeKeyword> { - match *self { - KeywordValue::Shape(shape) | - KeywordValue::FillAndShape(_, shape) => Some(shape), - _ => None, - } - } - } - - #[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, ToCss)] - pub enum FillMode { - Filled, - Open, - } - - #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)] - pub enum ShapeKeyword { - Dot, - Circle, - DoubleCircle, - Triangle, - Sesame, - } - - impl ShapeKeyword { - pub fn char(&self, fill: FillMode) -> &str { - let fill = fill == FillMode::Filled; - match *self { - ShapeKeyword::Dot => if fill { "\u{2022}" } else { "\u{25e6}" }, - ShapeKeyword::Circle => if fill { "\u{25cf}" } else { "\u{25cb}" }, - ShapeKeyword::DoubleCircle => if fill { "\u{25c9}" } else { "\u{25ce}" }, - ShapeKeyword::Triangle => if fill { "\u{25b2}" } else { "\u{25b3}" }, - ShapeKeyword::Sesame => if fill { "\u{fe45}" } else { "\u{fe46}" }, - } - } - } - - #[inline] - pub fn get_initial_value() -> computed_value::T { - computed_value::T::None - } - - #[inline] - pub fn get_initial_specified_value() -> SpecifiedValue { - SpecifiedValue::None - } - - impl ToComputedValue for SpecifiedValue { - type ComputedValue = computed_value::T; - - #[inline] - fn to_computed_value(&self, context: &Context) -> computed_value::T { - match *self { - SpecifiedValue::Keyword(ref keyword) => { - let default_shape = if context.style().get_inheritedbox() - .clone_writing_mode() == WritingMode::HorizontalTb { - ShapeKeyword::Circle - } else { - ShapeKeyword::Sesame - }; - computed_value::T::Keyword(computed_value::KeywordValue { - fill: keyword.fill().unwrap_or(FillMode::Filled), - shape: keyword.shape().unwrap_or(default_shape), - }) - }, - SpecifiedValue::None => computed_value::T::None, - SpecifiedValue::String(ref s) => { - // Passing `true` to iterate over extended grapheme clusters, following - // recommendation at http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries - let string = s.graphemes(true).next().unwrap_or("").to_string(); - computed_value::T::String(string) - } - } - } - #[inline] - fn from_computed_value(computed: &computed_value::T) -> Self { - match *computed { - computed_value::T::Keyword(ref keyword) => - SpecifiedValue::Keyword(KeywordValue::FillAndShape(keyword.fill,keyword.shape)), - computed_value::T::None => SpecifiedValue::None, - computed_value::T::String(ref string) => SpecifiedValue::String(string.clone()) - } - } - } - - pub fn parse<'i, 't>( - _context: &ParserContext, - input: &mut Parser<'i, 't>, - ) -> Result<SpecifiedValue, ParseError<'i>> { - if input.try(|input| input.expect_ident_matching("none")).is_ok() { - return Ok(SpecifiedValue::None); - } - - if let Ok(s) = input.try(|i| i.expect_string().map(|s| s.as_ref().to_owned())) { - // Handle <string> - return Ok(SpecifiedValue::String(s)); - } - - // Handle a pair of keywords - let mut shape = input.try(ShapeKeyword::parse).ok(); - let fill = input.try(FillMode::parse).ok(); - if shape.is_none() { - shape = input.try(ShapeKeyword::parse).ok(); - } - - // At least one of shape or fill must be handled - let keyword_value = match (fill, shape) { - (Some(fill), Some(shape)) => KeywordValue::FillAndShape(fill, shape), - (Some(fill), None) => KeywordValue::Fill(fill), - (None, Some(shape)) => KeywordValue::Shape(shape), - _ => return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)), - }; - Ok(SpecifiedValue::Keyword(keyword_value)) - } -</%helpers:longhand> +${helpers.predefined_type( + "text-emphasis-style", + "TextEmphasisStyle", + None, + initial_specified_value="SpecifiedValue::None", + products="gecko", + boxed=True, + animation_value_type="discrete", + spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-style", +)} <%helpers:longhand name="text-emphasis-position" animation_value_type="discrete" products="gecko" spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-position"> diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 283e8dd1fec..8c2376ecf85 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1645,6 +1645,12 @@ impl PropertyId { } } + /// Returns true if the property is a shorthand or shorthand alias. + #[inline] + pub fn is_shorthand(&self) -> bool { + self.as_shorthand().is_ok() + } + /// Given this property id, get it either as a shorthand or as a /// `PropertyDeclarationId`. pub fn as_shorthand(&self) -> Result<ShorthandId, PropertyDeclarationId> { @@ -2416,10 +2422,11 @@ pub struct ComputedValuesInner { pub struct ComputedValues { /// The actual computed values /// - /// In Gecko the outer ComputedValues is actually a style context, - /// whereas ComputedValuesInner is the core set of computed values. + /// In Gecko the outer ComputedValues is actually a ComputedStyle, whereas + /// ComputedValuesInner is the core set of computed values. /// - /// We maintain this distinction in servo to reduce the amount of special casing. + /// We maintain this distinction in servo to reduce the amount of special + /// casing. inner: ComputedValuesInner, } diff --git a/components/style/properties/shorthand/position.mako.rs b/components/style/properties/shorthand/position.mako.rs index 53e4edbc500..971f74ddb8f 100644 --- a/components/style/properties/shorthand/position.mako.rs +++ b/components/style/properties/shorthand/position.mako.rs @@ -722,8 +722,10 @@ } } - pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<Longhands, ParseError<'i>> { + pub fn parse_value<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<Longhands, ParseError<'i>> { let align = AlignItems::parse(context, input)?; if align.has_extra_flags() { return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)); @@ -742,13 +744,18 @@ impl<'a> ToCss for LonghandsToSerialize<'a> { fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write { - if self.align_items.0 == self.justify_items.0 { - self.align_items.to_css(dest) - } else { - self.align_items.to_css(dest)?; + if self.align_items.has_extra_flags() || + self.justify_items.has_extra_flags() { + return Ok(()); + } + + self.align_items.to_css(dest)?; + if self.align_items.0 != self.justify_items.0 { dest.write_str(" ")?; - self.justify_items.to_css(dest) + self.justify_items.to_css(dest)?; } + + Ok(()) } } </%helpers:shorthand> diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 08d3401cebd..dd2e4f20c9f 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -308,6 +308,20 @@ pub enum NonTSPseudoClass { Visited, } +impl ::selectors::parser::NonTSPseudoClass for NonTSPseudoClass { + type Impl = SelectorImpl; + + #[inline] + fn is_host(&self) -> bool { + false + } + + #[inline] + fn is_active_or_hover(&self) -> bool { + matches!(*self, NonTSPseudoClass::Active | NonTSPseudoClass::Hover) + } +} + impl ToCss for NonTSPseudoClass { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { use self::NonTSPseudoClass::*; @@ -423,20 +437,17 @@ impl ::selectors::SelectorImpl for SelectorImpl { type NamespaceUrl = Namespace; type BorrowedLocalName = LocalName; type BorrowedNamespaceUrl = Namespace; - - #[inline] - fn is_active_or_hover(pseudo_class: &Self::NonTSPseudoClass) -> bool { - matches!(*pseudo_class, NonTSPseudoClass::Active | - NonTSPseudoClass::Hover) - } } impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { type Impl = SelectorImpl; type Error = StyleParseErrorKind<'i>; - fn parse_non_ts_pseudo_class(&self, location: SourceLocation, name: CowRcStr<'i>) - -> Result<NonTSPseudoClass, ParseError<'i>> { + fn parse_non_ts_pseudo_class( + &self, + location: SourceLocation, + name: CowRcStr<'i>, + ) -> Result<NonTSPseudoClass, ParseError<'i>> { use self::NonTSPseudoClass::*; let pseudo_class = match_ignore_ascii_case! { &name, "active" => Active, @@ -468,10 +479,11 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { Ok(pseudo_class) } - fn parse_non_ts_functional_pseudo_class<'t>(&self, - name: CowRcStr<'i>, - parser: &mut CssParser<'i, 't>) - -> Result<NonTSPseudoClass, ParseError<'i>> { + fn parse_non_ts_functional_pseudo_class<'t>( + &self, + name: CowRcStr<'i>, + parser: &mut CssParser<'i, 't>, + ) -> Result<NonTSPseudoClass, ParseError<'i>> { use self::NonTSPseudoClass::*; let pseudo_class = match_ignore_ascii_case!{ &name, "lang" => { @@ -489,8 +501,11 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { Ok(pseudo_class) } - fn parse_pseudo_element(&self, location: SourceLocation, name: CowRcStr<'i>) - -> Result<PseudoElement, ParseError<'i>> { + fn parse_pseudo_element( + &self, + location: SourceLocation, + name: CowRcStr<'i>, + ) -> Result<PseudoElement, ParseError<'i>> { use self::PseudoElement::*; let pseudo_element = match_ignore_ascii_case! { &name, "before" => Before, diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index 6b3bbb9bccc..ae35d734b91 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -667,8 +667,7 @@ impl<E: TElement> StyleSharingCache<E> { } // We do not ignore visited state here, because Gecko needs to store - // extra bits on visited style contexts, so these contexts cannot be - // shared. + // extra bits on visited styles, so these contexts cannot be shared. if target.element.state() != candidate.state() { trace!("Miss: User and Author State"); return None; @@ -679,12 +678,28 @@ impl<E: TElement> StyleSharingCache<E> { return None; } - // Note that in the XBL case, we should be able to assert that the - // scopes are different, since two elements with different XBL bindings - // need to necessarily have different style (and thus children of them - // would never pass the parent check). - if target.element.style_scope() != candidate.element.style_scope() { - trace!("Miss: Different style scopes"); + // If two elements belong to different shadow trees, different rules may + // apply to them, from the respective trees. + if target.element.containing_shadow() != candidate.element.containing_shadow() { + trace!("Miss: Different containing shadow roots"); + return None; + } + + // Note that in theory we shouldn't need this XBL check. However, XBL is + // absolutely broken in all sorts of ways. + // + // A style change that changes which XBL binding applies to an element + // arrives there, with the element still having the old prototype + // binding attached. And thus we try to match revalidation selectors + // with the old XBL binding, because we can't look at the new ones of + // course. And that causes us to revalidate with the wrong selectors and + // hit assertions. + // + // Other than this, we don't need anything else like the containing XBL + // binding parent or what not, since two elements with different XBL + // bindings will necessarily end up with different style. + if !target.element.has_same_xbl_proto_binding_as(candidate.element) { + trace!("Miss: Different proto bindings"); return None; } @@ -695,7 +710,9 @@ impl<E: TElement> StyleSharingCache<E> { // shadow root, they could match different rules, due to the slot being // assigned to yet another slot in another shadow root. if target.element.assigned_slot() != candidate.element.assigned_slot() { - trace!("Miss: Different style scopes"); + // TODO(emilio): We could have a look at whether the shadow roots + // actually have slotted rules and such. + trace!("Miss: Different assigned slots"); return None; } diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 7a637dcf842..565e46807e9 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -598,7 +598,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { /// into the cascade. /// /// When comparing to Gecko, this is similar to the work done by - /// `nsStyleContext::ApplyStyleFixups`, plus some parts of + /// `ComputedStyle::ApplyStyleFixups`, plus some parts of /// `nsStyleSet::GetContext`. pub fn adjust<E>( &mut self, diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index fbff5501882..ab8114f422d 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -263,7 +263,7 @@ where Self { entries: vec![], data_validity: DataValidity::Valid, - dirty: true, + dirty: false, } } } diff --git a/components/style/stylesheets/document_rule.rs b/components/style/stylesheets/document_rule.rs index 3edfbbb6362..ad2c9d86219 100644 --- a/components/style/stylesheets/document_rule.rs +++ b/components/style/stylesheets/document_rule.rs @@ -6,7 +6,7 @@ //! initially in CSS Conditional Rules Module Level 3, @document has been postponed to the level 4. //! We implement the prefixed `@-moz-document`. -use cssparser::{Parser, Token, SourceLocation}; +use cssparser::{Parser, SourceLocation}; #[cfg(feature = "gecko")] use malloc_size_of::{MallocSizeOfOps, MallocUnconditionalShallowSizeOf}; use media_queries::Device; @@ -103,13 +103,8 @@ macro_rules! parse_quoted_or_unquoted_string { $input.parse_nested_block(|input| { let start = input.position(); input.parse_entirely(|input| { - let location = input.current_source_location(); - match *input.next()? { - Token::QuotedString(ref value) => { - Ok($url_matching_function(value.as_ref().to_owned())) - }, - ref t => Err(location.new_unexpected_token_error(t.clone())), - } + let string = input.expect_string()?; + Ok($url_matching_function(string.as_ref().to_owned())) }).or_else(|_: ParseError| { while let Ok(_) = input.next() {} Ok($url_matching_function(input.slice_from(start).to_string())) @@ -120,21 +115,26 @@ macro_rules! parse_quoted_or_unquoted_string { impl UrlMatchingFunction { /// Parse a URL matching function for a`@document` rule's condition. - pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<UrlMatchingFunction, ParseError<'i>> { + pub fn parse<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<Self, ParseError<'i>> { if input.try(|input| input.expect_function_matching("url-prefix")).is_ok() { - parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::UrlPrefix) - } else if input.try(|input| input.expect_function_matching("domain")).is_ok() { - parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::Domain) - } else if input.try(|input| input.expect_function_matching("regexp")).is_ok() { - input.parse_nested_block(|input| { + return parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::UrlPrefix) + } + + if input.try(|input| input.expect_function_matching("domain")).is_ok() { + return parse_quoted_or_unquoted_string!(input, UrlMatchingFunction::Domain) + } + + if input.try(|input| input.expect_function_matching("regexp")).is_ok() { + return input.parse_nested_block(|input| { Ok(UrlMatchingFunction::Regexp(input.expect_string()?.as_ref().to_owned())) - }) - } else if let Ok(url) = input.try(|input| CssUrl::parse(context, input)) { - Ok(UrlMatchingFunction::Url(url)) - } else { - Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)) + }); } + + let url = CssUrl::parse(context, input)?; + Ok(UrlMatchingFunction::Url(url)) } #[cfg(feature = "gecko")] @@ -182,16 +182,63 @@ pub struct DocumentCondition(#[css(iterable)] Vec<UrlMatchingFunction>); impl DocumentCondition { /// Parse a document condition. - pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result<Self, ParseError<'i>> { - input.parse_comma_separated(|input| UrlMatchingFunction::parse(context, input)) - .map(DocumentCondition) + pub fn parse<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<Self, ParseError<'i>> { + let conditions = input.parse_comma_separated(|input| { + UrlMatchingFunction::parse(context, input) + })?; + + let condition = DocumentCondition(conditions); + if !condition.allowed_in(context) { + return Err(input.new_custom_error( + StyleParseErrorKind::UnsupportedAtRule("-moz-document".into()) + )) + } + Ok(condition) } /// Evaluate a document condition. pub fn evaluate(&self, device: &Device) -> bool { - self.0.iter().any(|ref url_matching_function| + self.0.iter().any(|url_matching_function| { url_matching_function.evaluate(device) - ) + }) + } + + #[cfg(feature = "servo")] + fn allowed_in(&self, _: &ParserContext) -> bool { + false + } + + #[cfg(feature = "gecko")] + fn allowed_in(&self, context: &ParserContext) -> bool { + use gecko_bindings::structs; + use stylesheets::Origin; + + if context.stylesheet_origin != Origin::Author { + return true; + } + + if unsafe { structs::StylePrefs_sMozDocumentEnabledInContent } { + return true; + } + + if !unsafe { structs::StylePrefs_sMozDocumentURLPrefixHackEnabled } { + return false; + } + + // Allow a single url-prefix() for compatibility. + // + // See bug 1446470 and dependencies. + if self.0.len() != 1 { + return false; + } + + // NOTE(emilio): This technically allows url-prefix("") too, but... + match self.0[0] { + UrlMatchingFunction::UrlPrefix(ref prefix) => prefix.is_empty(), + _ => false + } } } diff --git a/components/style/stylesheets/keyframes_rule.rs b/components/style/stylesheets/keyframes_rule.rs index 266d953cd99..302ac36e46b 100644 --- a/components/style/stylesheets/keyframes_rule.rs +++ b/components/style/stylesheets/keyframes_rule.rs @@ -5,7 +5,7 @@ //! Keyframes: https://drafts.csswg.org/css-animations/#keyframes use cssparser::{AtRuleParser, Parser, QualifiedRuleParser, RuleListParser, ParserInput, CowRcStr}; -use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule, SourceLocation}; +use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule, SourceLocation, Token}; use error_reporting::{NullReporter, ContextualParseError, ParseErrorReporter}; use parser::{ParserContext, ParserErrorContext}; use properties::{DeclarationSource, Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId}; @@ -126,20 +126,21 @@ impl KeyframePercentage { } fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<KeyframePercentage, ParseError<'i>> { - let percentage = if input.try(|input| input.expect_ident_matching("from")).is_ok() { - KeyframePercentage::new(0.) - } else if input.try(|input| input.expect_ident_matching("to")).is_ok() { - KeyframePercentage::new(1.) - } else { - let percentage = input.expect_percentage()?; - if percentage >= 0. && percentage <= 1. { - KeyframePercentage::new(percentage) - } else { - return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)); - } - }; - - Ok(percentage) + let token = input.next()?.clone(); + match token { + Token::Ident(ref identifier) if identifier.as_ref().eq_ignore_ascii_case("from") => { + Ok(KeyframePercentage::new(0.)) + }, + Token::Ident(ref identifier) if identifier.as_ref().eq_ignore_ascii_case("to") => { + Ok(KeyframePercentage::new(1.)) + }, + Token::Percentage { unit_value: percentage, .. } if percentage >= 0. && percentage <= 1. => { + Ok(KeyframePercentage::new(percentage)) + }, + _ => { + Err(input.new_unexpected_token_error(token)) + }, + } } } diff --git a/components/style/stylesheets/rule_parser.rs b/components/style/stylesheets/rule_parser.rs index 5bc3fb8f050..714a0730882 100644 --- a/components/style/stylesheets/rule_parser.rs +++ b/components/style/stylesheets/rule_parser.rs @@ -422,19 +422,6 @@ impl<'a, 'b, 'i, R: ParseErrorReporter> AtRuleParser<'i> for NestedRuleParser<'a )) } - #[cfg(feature = "gecko")] - { - use gecko_bindings::structs; - - if self.stylesheet_origin == Origin::Author && - unsafe { !structs::StylePrefs_sMozDocumentEnabledInContent } - { - return Err(input.new_custom_error( - StyleParseErrorKind::UnsupportedAtRule(name.clone()) - )) - } - } - let cond = DocumentCondition::parse(self.context, input)?; Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond, location))) }, diff --git a/components/style/stylist.rs b/components/style/stylist.rs index b5cb97b6719..4666869af04 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -1636,7 +1636,7 @@ impl ExtraStyleData { guard: &SharedRwLockReadGuard, rule: &Arc<Locked<CounterStyleRule>>, ) { - let name = rule.read_with(guard).mName.mRawPtr.into(); + let name = unsafe { Atom::from_raw(rule.read_with(guard).mName.mRawPtr) }; self.counter_styles.insert(name, rule.clone()); } diff --git a/components/style/values/animated/mod.rs b/components/style/values/animated/mod.rs index ad81a4ecc4a..9e0653d8a00 100644 --- a/components/style/values/animated/mod.rs +++ b/components/style/values/animated/mod.rs @@ -35,6 +35,9 @@ pub mod effects; /// /// If the two values are not similar, an error is returned unless a fallback /// function has been specified through `#[animate(fallback)]`. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition. pub trait Animate: Sized { /// Animate a value towards another one, given an animation procedure. fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>; @@ -78,6 +81,9 @@ pub trait ToAnimatedValue { /// /// If a variant is annotated with `#[animation(error)]`, the corresponding /// `match` arm is not generated. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition. pub trait ToAnimatedZero: Sized { /// Returns a value that, when added with an underlying value, will produce the underlying /// value. This is used for SMIL animation's "by-animation" where SMIL first interpolates from diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index ff16e328826..d095079f467 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -75,7 +75,7 @@ pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth}; pub use self::svg::MozContextProperties; pub use self::table::XSpan; pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize}; -pub use self::text::{TextAlign, TextOverflow, WordSpacing}; +pub use self::text::{TextAlign, TextEmphasisStyle, TextOverflow, WordSpacing}; pub use self::time::Time; pub use self::transform::{Rotate, Scale, TimingFunction, Transform, TransformOperation}; pub use self::transform::{TransformOrigin, TransformStyle, Translate}; @@ -293,8 +293,7 @@ impl<'a, 'cx, 'cx_a: 'cx, S: ToComputedValue + 'a> Iterator for ComputedVecIter< /// /// This trait is derivable with `#[derive(ToComputedValue)]`. The derived /// implementation just calls `ToComputedValue::to_computed_value` on each field -/// of the passed value, or `Clone::clone` if the field is annotated with -/// `#[compute(clone)]`. The deriving code assumes that if the type isn't +/// of the passed value. The deriving code assumes that if the type isn't /// generic, then the trait can be implemented as simple `Clone::clone` calls, /// this means that a manual implementation with `ComputedValue = Self` is bogus /// if it returns anything else than a clone. diff --git a/components/style/values/computed/percentage.rs b/components/style/values/computed/percentage.rs index 842019f03c8..4992151a1b8 100644 --- a/components/style/values/computed/percentage.rs +++ b/components/style/values/computed/percentage.rs @@ -11,7 +11,7 @@ use values::{CSSFloat, serialize_percentage}; /// A computed percentage. #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Default, MallocSizeOf)] -#[derive(PartialEq, PartialOrd, ToAnimatedZero)] +#[derive(PartialEq, PartialOrd, ToAnimatedZero, ToComputedValue)] pub struct Percentage(pub CSSFloat); impl Percentage { diff --git a/components/style/values/computed/text.rs b/components/style/values/computed/text.rs index 011477ca781..bbef98ae4bd 100644 --- a/components/style/values/computed/text.rs +++ b/components/style/values/computed/text.rs @@ -15,7 +15,7 @@ use values::generics::text::InitialLetter as GenericInitialLetter; use values::generics::text::LineHeight as GenericLineHeight; use values::generics::text::MozTabSize as GenericMozTabSize; use values::generics::text::Spacing; -use values::specified::text::{TextOverflowSide, TextDecorationLine}; +use values::specified::text::{TextDecorationLine, TextEmphasisFillMode, TextEmphasisShapeKeyword, TextOverflowSide}; pub use values::specified::TextAlignKeyword as TextAlign; @@ -151,3 +151,23 @@ impl TextDecorationsInEffect { /// A specified value for the `-moz-tab-size` property. pub type MozTabSize = GenericMozTabSize<NonNegativeNumber, NonNegativeLength>; + +/// computed value for the text-emphasis-style property +#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] +pub enum TextEmphasisStyle { + /// Keyword value for the text-emphasis-style property (`filled` `open`) + Keyword(TextEmphasisKeywordValue), + /// `none` + None, + /// String (will be used only first grapheme cluster) for the text-emphasis-style property + String(String), +} + +/// Keyword value for the text-emphasis-style property +#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] +pub struct TextEmphasisKeywordValue { + /// fill for the text-emphasis-style property + pub fill: TextEmphasisFillMode, + /// shape for the text-emphasis-style property + pub shape: TextEmphasisShapeKeyword, +} diff --git a/components/style/values/distance.rs b/components/style/values/distance.rs index f17b9931dda..5f84f17caad 100644 --- a/components/style/values/distance.rs +++ b/components/style/values/distance.rs @@ -21,6 +21,10 @@ use std::ops::Add; /// /// If the two values are not similar, an error is returned unless a fallback /// function has been specified through `#[distance(fallback)]`. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition, trait bounds for +/// fields can be opted into with `#[distance(field_bound)]` on the field. pub trait ComputeSquaredDistance { /// Computes the squared distance between two animatable values. fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>; diff --git a/components/style/values/generics/basic_shape.rs b/components/style/values/generics/basic_shape.rs index ef9eac14ec7..8c798b468ae 100644 --- a/components/style/values/generics/basic_shape.rs +++ b/components/style/values/generics/basic_shape.rs @@ -43,6 +43,7 @@ pub enum ShapeBox { /// A shape source, for some reference box. #[allow(missing_docs)] +#[animation(no_bound(ImageOrUrl))] #[derive(Animate, Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)] pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> { #[animation(error)] diff --git a/components/style/values/generics/grid.rs b/components/style/values/generics/grid.rs index cc3256df7ab..cafc4672a81 100644 --- a/components/style/values/generics/grid.rs +++ b/components/style/values/generics/grid.rs @@ -388,7 +388,6 @@ pub struct TrackRepeat<L, I> { /// If there's no `<line-names>`, then it's represented by an empty vector. /// For N `<track-size>` values, there will be N+1 `<line-names>`, and so this vector's /// length is always one value more than that of the `<track-size>`. - #[compute(clone)] pub line_names: Box<[Box<[CustomIdent]>]>, /// `<track-size>` values. pub track_sizes: Vec<TrackSize<L>>, @@ -667,7 +666,7 @@ pub enum GridTemplateComponent<L, I> { /// `none` value. None, /// The grid `<track-list>` - TrackList(TrackList<L, I>), + TrackList(#[compute(field_bound)] TrackList<L, I>), /// A `subgrid <line-name-list>?` Subgrid(LineNameList), } diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs index 7f02fdec4f4..ca041d5ed9d 100644 --- a/components/style/values/generics/image.rs +++ b/components/style/values/generics/image.rs @@ -42,10 +42,8 @@ pub struct Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, /// The color stops and interpolation hints. pub items: Vec<GradientItem<Color, LengthOrPercentage>>, /// True if this is a repeating gradient. - #[compute(clone)] pub repeating: bool, /// Compatibility mode. - #[compute(clone)] pub compat_mode: CompatMode, } diff --git a/components/style/values/generics/svg.rs b/components/style/values/generics/svg.rs index 6d9928ec1af..a856633ff47 100644 --- a/components/style/values/generics/svg.rs +++ b/components/style/values/generics/svg.rs @@ -15,6 +15,7 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance}; /// An SVG paint value /// /// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint> +#[animation(no_bound(UrlPaintServer))] #[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq)] #[derive(ToAnimatedValue, ToComputedValue, ToCss)] pub struct SVGPaint<ColorType, UrlPaintServer> { @@ -29,6 +30,7 @@ pub struct SVGPaint<ColorType, UrlPaintServer> { /// Whereas the spec only allows PaintServer /// to have a fallback, Gecko lets the context /// properties have a fallback as well. +#[animation(no_bound(UrlPaintServer))] #[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq)] #[derive(ToAnimatedValue, ToAnimatedZero, ToComputedValue, ToCss)] pub enum SVGPaintKind<ColorType, UrlPaintServer> { @@ -203,7 +205,11 @@ pub enum SVGLength<LengthType> { pub enum SVGStrokeDashArray<LengthType> { /// `[ <length> | <percentage> | <number> ]#` #[css(comma)] - Values(#[css(if_empty = "none", iterable)] Vec<LengthType>), + Values( + #[css(if_empty = "none", iterable)] + #[distance(field_bound)] + Vec<LengthType>, + ), /// `context-value` ContextValue, } diff --git a/components/style/values/generics/transform.rs b/components/style/values/generics/transform.rs index 1d96c9e9d84..b80bc8b14f4 100644 --- a/components/style/values/generics/transform.rs +++ b/components/style/values/generics/transform.rs @@ -247,7 +247,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage> #[allow(missing_docs)] #[css(comma, function = "interpolatematrix")] InterpolateMatrix { - #[compute(ignore_bound)] from_list: Transform< TransformOperation< Angle, @@ -257,7 +256,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage> LengthOrPercentage, >, >, - #[compute(ignore_bound)] to_list: Transform< TransformOperation< Angle, @@ -267,14 +265,12 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage> LengthOrPercentage, >, >, - #[compute(clone)] progress: computed::Percentage, }, /// A intermediate type for accumulation of mismatched transform lists. #[allow(missing_docs)] #[css(comma, function = "accumulatematrix")] AccumulateMatrix { - #[compute(ignore_bound)] from_list: Transform< TransformOperation< Angle, @@ -284,7 +280,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage> LengthOrPercentage, >, >, - #[compute(ignore_bound)] to_list: Transform< TransformOperation< Angle, diff --git a/components/style/values/specified/counters.rs b/components/style/values/specified/counters.rs index f7130a79b2f..d1d4f138f59 100644 --- a/components/style/values/specified/counters.rs +++ b/components/style/values/specified/counters.rs @@ -76,9 +76,22 @@ fn parse_counters<'i, 't>( #[cfg(feature = "servo")] type CounterStyleType = ListStyleType; + #[cfg(feature = "gecko")] type CounterStyleType = CounterStyleOrNone; +#[cfg(feature = "servo")] +#[inline] +fn is_decimal(counter_type: &CounterStyleType) -> bool { + *counter_type == ListStyleType::Decimal +} + +#[cfg(feature = "gecko")] +#[inline] +fn is_decimal(counter_type: &CounterStyleType) -> bool { + *counter_type == CounterStyleOrNone::decimal() +} + /// The specified value for the `content` property. /// /// https://drafts.csswg.org/css-content/#propdef-content @@ -102,10 +115,10 @@ pub enum ContentItem { String(Box<str>), /// `counter(name, style)`. #[css(comma, function)] - Counter(CustomIdent, CounterStyleType), + Counter(CustomIdent, #[css(skip_if = "is_decimal")] CounterStyleType), /// `counters(name, separator, style)`. #[css(comma, function)] - Counters(CustomIdent, Box<str>, CounterStyleType), + Counters(CustomIdent, Box<str>, #[css(skip_if = "is_decimal")] CounterStyleType), /// `open-quote`. OpenQuote, /// `close-quote`. diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index f0703699eaf..16d4c512995 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -71,7 +71,7 @@ pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind}; pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth}; pub use self::svg::MozContextProperties; pub use self::table::XSpan; -pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign}; +pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign, TextEmphasisStyle}; pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing}; pub use self::time::Time; pub use self::transform::{Rotate, Scale, TimingFunction, Transform}; @@ -377,7 +377,7 @@ impl ToComputedValue for Opacity { } } -/// An specified `<integer>`, optionally coming from a `calc()` expression. +/// A specified `<integer>`, optionally coming from a `calc()` expression. /// /// <https://drafts.csswg.org/css-values/#integers> #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, PartialOrd)] diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs index 1c18c833784..fcb15650110 100644 --- a/components/style/values/specified/text.rs +++ b/components/style/values/specified/text.rs @@ -6,11 +6,15 @@ use cssparser::{Parser, Token}; use parser::{Parse, ParserContext}; +use properties::longhands::writing_mode::computed_value::T as SpecifiedWritingMode; use selectors::parser::SelectorParseErrorKind; use std::fmt::{self, Write}; use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss}; +use unicode_segmentation::UnicodeSegmentation; use values::computed::{Context, ToComputedValue}; use values::computed::text::LineHeight as ComputedLineHeight; +use values::computed::text::TextEmphasisKeywordValue as ComputedTextEmphasisKeywordValue; +use values::computed::text::TextEmphasisStyle as ComputedTextEmphasisStyle; use values::computed::text::TextOverflow as ComputedTextOverflow; use values::generics::text::InitialLetter as GenericInitialLetter; use values::generics::text::LineHeight as GenericLineHeight; @@ -420,7 +424,6 @@ pub enum TextAlign { /// unlike other values. #[cfg(feature = "gecko")] MozCenterOrInherit, - } impl Parse for TextAlign { @@ -515,6 +518,154 @@ impl ToComputedValue for TextAlign { } } +/// Specified value of text-emphasis-style property. +#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] +pub enum TextEmphasisStyle { + /// <fill> <shape> + Keyword(TextEmphasisKeywordValue), + /// `none` + None, + /// String (will be used only first grapheme cluster) for the text-emphasis-style property + String(String), +} + +/// Keyword value for the text-emphasis-style property +#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] +pub enum TextEmphasisKeywordValue { + /// <fill> + Fill(TextEmphasisFillMode), + /// <shape> + Shape(TextEmphasisShapeKeyword), + /// <fill> <shape> + FillAndShape(TextEmphasisFillMode, TextEmphasisShapeKeyword), +} + +impl TextEmphasisKeywordValue { + fn fill(&self) -> Option<TextEmphasisFillMode> { + match *self { + TextEmphasisKeywordValue::Fill(fill) | + TextEmphasisKeywordValue::FillAndShape(fill, _) => Some(fill), + _ => None, + } + } + + fn shape(&self) -> Option<TextEmphasisShapeKeyword> { + match *self { + TextEmphasisKeywordValue::Shape(shape) | + TextEmphasisKeywordValue::FillAndShape(_, shape) => Some(shape), + _ => None, + } + } +} + +/// Fill mode for the text-emphasis-style property +#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, ToCss)] +pub enum TextEmphasisFillMode { + /// `filled` + Filled, + /// `open` + Open, +} + +/// Shape keyword for the text-emphasis-style property +#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)] +pub enum TextEmphasisShapeKeyword { + /// `dot` + Dot, + /// `circle` + Circle, + /// `double-circle` + DoubleCircle, + /// `triangle` + Triangle, + /// `sesame` + Sesame, +} + +impl TextEmphasisShapeKeyword { + /// converts fill mode to a unicode char + pub fn char(&self, fill: TextEmphasisFillMode) -> &str { + let fill = fill == TextEmphasisFillMode::Filled; + match *self { + TextEmphasisShapeKeyword::Dot => if fill { "\u{2022}" } else { "\u{25e6}" }, + TextEmphasisShapeKeyword::Circle => if fill { "\u{25cf}" } else { "\u{25cb}" }, + TextEmphasisShapeKeyword::DoubleCircle => if fill { "\u{25c9}" } else { "\u{25ce}" }, + TextEmphasisShapeKeyword::Triangle => if fill { "\u{25b2}" } else { "\u{25b3}" }, + TextEmphasisShapeKeyword::Sesame => if fill { "\u{fe45}" } else { "\u{fe46}" }, + } + } +} + +impl ToComputedValue for TextEmphasisStyle { + type ComputedValue = ComputedTextEmphasisStyle; + + #[inline] + fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { + match *self { + TextEmphasisStyle::Keyword(ref keyword) => { + let default_shape = if context.style().get_inheritedbox() + .clone_writing_mode() == SpecifiedWritingMode::HorizontalTb { + TextEmphasisShapeKeyword::Circle + } else { + TextEmphasisShapeKeyword::Sesame + }; + ComputedTextEmphasisStyle::Keyword(ComputedTextEmphasisKeywordValue { + fill: keyword.fill().unwrap_or(TextEmphasisFillMode::Filled), + shape: keyword.shape().unwrap_or(default_shape), + }) + }, + TextEmphasisStyle::None => ComputedTextEmphasisStyle::None, + TextEmphasisStyle::String(ref s) => { + // Passing `true` to iterate over extended grapheme clusters, following + // recommendation at http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries + let string = s.graphemes(true).next().unwrap_or("").to_string(); + ComputedTextEmphasisStyle::String(string) + } + } + } + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + match *computed { + ComputedTextEmphasisStyle::Keyword(ref keyword) => + TextEmphasisStyle::Keyword(TextEmphasisKeywordValue::FillAndShape(keyword.fill, keyword.shape)), + ComputedTextEmphasisStyle::None => TextEmphasisStyle::None, + ComputedTextEmphasisStyle::String(ref string) => TextEmphasisStyle::String(string.clone()) + } + } +} + +impl Parse for TextEmphasisStyle { + fn parse<'i, 't>( + _context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result<Self, ParseError<'i>> { + if input.try(|input| input.expect_ident_matching("none")).is_ok() { + return Ok(TextEmphasisStyle::None); + } + + if let Ok(s) = input.try(|i| i.expect_string().map(|s| s.as_ref().to_owned())) { + // Handle <string> + return Ok(TextEmphasisStyle::String(s)); + } + + // Handle a pair of keywords + let mut shape = input.try(TextEmphasisShapeKeyword::parse).ok(); + let fill = input.try(TextEmphasisFillMode::parse).ok(); + if shape.is_none() { + shape = input.try(TextEmphasisShapeKeyword::parse).ok(); + } + + // At least one of shape or fill must be handled + let keyword_value = match (fill, shape) { + (Some(fill), Some(shape)) => TextEmphasisKeywordValue::FillAndShape(fill, shape), + (Some(fill), None) => TextEmphasisKeywordValue::Fill(fill), + (None, Some(shape)) => TextEmphasisKeywordValue::Shape(shape), + _ => return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)), + }; + Ok(TextEmphasisStyle::Keyword(keyword_value)) + } +} + /// A specified value for the `-moz-tab-size` property. pub type MozTabSize = GenericMozTabSize<NonNegativeNumber, NonNegativeLength>; diff --git a/components/style_derive/animate.rs b/components/style_derive/animate.rs index 912f7dbc9f2..e54f1819c99 100644 --- a/components/style_derive/animate.rs +++ b/components/style_derive/animate.rs @@ -2,23 +2,31 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use cg::{self, WhereClause}; +use cg; +use darling::util::IdentList; use quote::Tokens; use syn::{DeriveInput, Path}; use synstructure::{Structure, VariantInfo}; -pub fn derive(input: DeriveInput) -> Tokens { - let name = &input.ident; - let trait_path = parse_quote!(values::animated::Animate); - let (impl_generics, ty_generics, mut where_clause) = - cg::trait_parts(&input, &trait_path); +pub fn derive(mut input: DeriveInput) -> Tokens { + let animation_input_attrs = cg::parse_input_attrs::<AnimationInputAttrs>(&input); + let no_bound = animation_input_attrs.no_bound.unwrap_or_default(); + let mut where_clause = input.generics.where_clause.take(); + for param in input.generics.type_params() { + if !no_bound.contains(¶m.ident) { + cg::add_predicate( + &mut where_clause, + parse_quote!(#param: ::values::animated::Animate), + ); + } + } + input.generics.where_clause = where_clause; - let input_attrs = cg::parse_input_attrs::<AnimateInputAttrs>(&input); let s = Structure::new(&input); let mut append_error_clause = s.variants().len() > 1; let mut match_body = s.variants().iter().fold(quote!(), |body, variant| { - let arm = match derive_variant_arm(variant, &mut where_clause) { + let arm = match derive_variant_arm(variant) { Ok(arm) => arm, Err(()) => { append_error_clause = true; @@ -29,6 +37,7 @@ pub fn derive(input: DeriveInput) -> Tokens { }); if append_error_clause { + let input_attrs = cg::parse_input_attrs::<AnimateInputAttrs>(&input); if let Some(fallback) = input_attrs.fallback { match_body.append_all(quote! { (this, other) => #fallback(this, other, procedure) @@ -38,6 +47,9 @@ pub fn derive(input: DeriveInput) -> Tokens { } } + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + quote! { impl #impl_generics ::values::animated::Animate for #name #ty_generics #where_clause { #[allow(unused_variables, unused_imports)] @@ -55,10 +67,7 @@ pub fn derive(input: DeriveInput) -> Tokens { } } -fn derive_variant_arm( - variant: &VariantInfo, - where_clause: &mut WhereClause, -) -> Result<Tokens, ()> { +fn derive_variant_arm(variant: &VariantInfo) -> Result<Tokens, ()> { let variant_attrs = cg::parse_variant_attrs::<AnimationVariantAttrs>(&variant.ast()); if variant_attrs.error { return Err(()); @@ -78,7 +87,6 @@ fn derive_variant_arm( let #result = ::std::clone::Clone::clone(#this); } } else { - where_clause.add_trait_bound(&result.ast().ty); quote! { let #result = ::values::animated::Animate::animate(#this, #other, procedure)?; @@ -100,9 +108,18 @@ struct AnimateInputAttrs { } #[darling(attributes(animation), default)] +#[derive(Default, FromDeriveInput)] +pub struct AnimationInputAttrs { + pub no_bound: Option<IdentList>, +} + +#[darling(attributes(animation), default)] #[derive(Default, FromVariant)] pub struct AnimationVariantAttrs { pub error: bool, + // Only here because of structs, where the struct definition acts as a + // variant itself. + pub no_bound: Option<IdentList>, } #[darling(attributes(animation), default)] diff --git a/components/style_derive/cg.rs b/components/style_derive/cg.rs index 364fc63af13..ff391c79180 100644 --- a/components/style_derive/cg.rs +++ b/components/style_derive/cg.rs @@ -3,84 +3,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use darling::{FromDeriveInput, FromField, FromVariant}; -use quote::{ToTokens, Tokens}; -use std::collections::HashSet; +use quote::Tokens; use syn::{self, AngleBracketedGenericArguments, Binding, DeriveInput, Field}; -use syn::{GenericArgument, GenericParam, Ident, ImplGenerics, Path}; -use syn::{PathArguments, PathSegment, QSelf, Type, TypeArray, TypeGenerics}; +use syn::{GenericArgument, GenericParam, Ident, Path}; +use syn::{PathArguments, PathSegment, QSelf, Type, TypeArray}; use syn::{TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple}; use syn::{Variant, WherePredicate}; -use syn::visit::{self, Visit}; use synstructure::{self, BindingInfo, BindStyle, VariantAst, VariantInfo}; -pub struct WhereClause<'input, 'path> { - pub inner: Option<syn::WhereClause>, - pub params: Vec<&'input TypeParam>, - trait_path: &'path Path, - trait_output: Option<Ident>, - bounded_types: HashSet<Type>, -} - -impl<'input, 'path> ToTokens for WhereClause<'input, 'path> { - fn to_tokens(&self, tokens: &mut Tokens) { - self.inner.to_tokens(tokens); - } -} - -impl<'input, 'path> WhereClause<'input, 'path> { - pub fn add_trait_bound(&mut self, ty: &Type) { - let trait_path = self.trait_path; - let mut found = self.trait_output.map(|_| HashSet::new()); - if self.bounded_types.contains(&ty) { - return; - } - if !is_parameterized(&ty, &self.params, found.as_mut()) { - return; - } - self.bounded_types.insert(ty.clone()); - - let output = if let Some(output) = self.trait_output { - output - } else { - add_predicate(&mut self.inner, where_predicate(ty.clone(), trait_path, None)); - return; - }; - - if let Type::Path(syn::TypePath { ref path, .. }) = *ty { - if path_to_ident(path).is_some() { - add_predicate(&mut self.inner, where_predicate(ty.clone(), trait_path, None)); - return; - } - } - - let output_type = map_type_params(ty, &self.params, &mut |ident| { - let ty = Type::Path(syn::TypePath { qself: None, path: ident.clone().into() }); - fmap_output_type(ty, trait_path, output) - }); - - let pred = where_predicate( - ty.clone(), - trait_path, - Some((output, output_type)), - ); - - add_predicate(&mut self.inner, pred); - - if let Some(found) = found { - for ident in found { - let ty = Type::Path(syn::TypePath { qself: None, path: ident.into() }); - if !self.bounded_types.contains(&ty) { - self.bounded_types.insert(ty.clone()); - add_predicate( - &mut self.inner, - where_predicate(ty, trait_path, None), - ); - }; - } - } - } -} - pub fn add_predicate( where_clause: &mut Option<syn::WhereClause>, pred: WherePredicate, @@ -111,22 +41,12 @@ where }) } -fn fmap_output_type( - ty: Type, +pub fn fmap_trait_output( + input: &DeriveInput, trait_path: &Path, trait_output: Ident, -) -> Type { - parse_quote!(<#ty as ::#trait_path>::#trait_output) -} - -pub fn fmap_trait_parts<'input, 'path>( - input: &'input DeriveInput, - trait_path: &'path Path, - trait_output: Ident, -) -> (ImplGenerics<'input>, TypeGenerics<'input>, WhereClause<'input, 'path>, Path) { - let (impl_generics, ty_generics, mut where_clause) = trait_parts(input, trait_path); - where_clause.trait_output = Some(trait_output); - let output_ty = PathSegment { +) -> Path { + let segment = PathSegment { ident: input.ident.clone(), arguments: PathArguments::AngleBracketed(AngleBracketedGenericArguments { args: input.generics.params.iter().map(|arg| { @@ -135,11 +55,7 @@ pub fn fmap_trait_parts<'input, 'path>( &GenericParam::Type(ref data) => { let ident = data.ident; GenericArgument::Type( - fmap_output_type( - parse_quote!(#ident), - trait_path, - trait_output - ) + parse_quote!(<#ident as ::#trait_path>::#trait_output), ) }, ref arg => panic!("arguments {:?} cannot be mapped yet", arg) @@ -151,37 +67,7 @@ pub fn fmap_trait_parts<'input, 'path>( }) }; - (impl_generics, ty_generics, where_clause, output_ty.into()) -} - -pub fn is_parameterized( - ty: &Type, - params: &[&TypeParam], - found: Option<&mut HashSet<Ident>>, -) -> bool { - struct IsParameterized<'a, 'b> { - params: &'a [&'a TypeParam], - has_free: bool, - found: Option<&'b mut HashSet<Ident>>, - } - - impl<'a, 'b, 'ast> Visit<'ast> for IsParameterized<'a, 'b> { - fn visit_path(&mut self, path: &'ast Path) { - if let Some(ident) = path_to_ident(path) { - if self.params.iter().any(|param| param.ident == ident) { - self.has_free = true; - if let Some(ref mut found) = self.found { - found.insert(ident.clone()); - } - } - } - visit::visit_path(self, path); - } - } - - let mut visitor = IsParameterized { params, has_free: false, found }; - visitor.visit_type(ty); - visitor.has_free + segment.into() } pub fn map_type_params<F>(ty: &Type, params: &[&TypeParam], f: &mut F) -> Type @@ -329,33 +215,6 @@ pub fn ref_pattern<'a>( (v.pat(), v.bindings().iter().cloned().collect()) } -pub fn trait_parts<'input, 'path>( - input: &'input DeriveInput, - trait_path: &'path Path, -) -> (ImplGenerics<'input>, TypeGenerics<'input>, WhereClause<'input, 'path>) { - let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - let where_clause = WhereClause { - inner: where_clause.cloned(), - params: input.generics.type_params().into_iter().collect::<Vec<&TypeParam>>(), - trait_path, - trait_output: None, - bounded_types: HashSet::new() - }; - (impl_generics, ty_generics, where_clause) -} - -fn trait_ref(path: &Path, output: Option<(Ident, Type)>) -> Path { - let segments = path.segments.iter().collect::<Vec<&PathSegment>>(); - let (name, parent) = segments.split_last().unwrap(); - - let last_segment: PathSegment = if let Some((param, ty)) = output { - parse_quote!(#name<#param = #ty>) - } else { - parse_quote!(#name) - }; - parse_quote!(::#(#parent::)*#last_segment) -} - pub fn value<'a>( variant: &'a VariantInfo, prefix: &str, @@ -366,15 +225,6 @@ pub fn value<'a>( (v.pat(), v.bindings().iter().cloned().collect()) } -pub fn where_predicate( - bounded_ty: Type, - trait_path: &Path, - trait_output: Option<(Ident, Type)>, -) -> WherePredicate { - let trait_ref = trait_ref(trait_path, trait_output); - parse_quote!(#bounded_ty: #trait_ref) -} - /// Transforms "FooBar" to "foo-bar". /// /// If the first Camel segment is "Moz", "Webkit", or "Servo", the result string diff --git a/components/style_derive/compute_squared_distance.rs b/components/style_derive/compute_squared_distance.rs index 6254340e358..07408bbcddb 100644 --- a/components/style_derive/compute_squared_distance.rs +++ b/components/style_derive/compute_squared_distance.rs @@ -2,52 +2,71 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use animate::AnimationVariantAttrs; +use animate::{AnimationInputAttrs, AnimationVariantAttrs}; use cg; use quote::Tokens; use syn::{DeriveInput, Path}; use synstructure; -pub fn derive(input: DeriveInput) -> Tokens { - let name = &input.ident; - let trait_path = parse_quote!(values::distance::ComputeSquaredDistance); - let (impl_generics, ty_generics, mut where_clause) = - cg::trait_parts(&input, &trait_path); +pub fn derive(mut input: DeriveInput) -> Tokens { + let animation_input_attrs = cg::parse_input_attrs::<AnimationInputAttrs>(&input); + let no_bound = animation_input_attrs.no_bound.unwrap_or_default(); + let mut where_clause = input.generics.where_clause.take(); + for param in input.generics.type_params() { + if !no_bound.contains(¶m.ident) { + cg::add_predicate( + &mut where_clause, + parse_quote!(#param: ::values::distance::ComputeSquaredDistance), + ); + } + } - let input_attrs = cg::parse_input_attrs::<DistanceInputAttrs>(&input); - let s = synstructure::Structure::new(&input); - let mut append_error_clause = s.variants().len() > 1; + let (mut match_body, append_error_clause) = { + let s = synstructure::Structure::new(&input); + let mut append_error_clause = s.variants().len() > 1; - let mut match_body = s.variants().iter().fold(quote!(), |body, variant| { - let attrs = cg::parse_variant_attrs::<AnimationVariantAttrs>(&variant.ast()); - if attrs.error { - append_error_clause = true; - return body; - } + let match_body = s.variants().iter().fold(quote!(), |body, variant| { + let attrs = cg::parse_variant_attrs::<AnimationVariantAttrs>(&variant.ast()); + if attrs.error { + append_error_clause = true; + return body; + } - let (this_pattern, this_info) = cg::ref_pattern(&variant, "this"); - let (other_pattern, other_info) = cg::ref_pattern(&variant, "other"); - let sum = if this_info.is_empty() { - quote! { ::values::distance::SquaredDistance::from_sqrt(0.) } - } else { - let mut sum = quote!(); - sum.append_separated(this_info.iter().zip(&other_info).map(|(this, other)| { - where_clause.add_trait_bound(&this.ast().ty); - quote! { - ::values::distance::ComputeSquaredDistance::compute_squared_distance(#this, #other)? + let (this_pattern, this_info) = cg::ref_pattern(&variant, "this"); + let (other_pattern, other_info) = cg::ref_pattern(&variant, "other"); + let sum = if this_info.is_empty() { + quote! { ::values::distance::SquaredDistance::from_sqrt(0.) } + } else { + let mut sum = quote!(); + sum.append_separated(this_info.iter().zip(&other_info).map(|(this, other)| { + let field_attrs = cg::parse_field_attrs::<DistanceFieldAttrs>(&this.ast()); + if field_attrs.field_bound { + let ty = &this.ast().ty; + cg::add_predicate( + &mut where_clause, + parse_quote!(#ty: ::values::distance::ComputeSquaredDistance), + ); + } + quote! { + ::values::distance::ComputeSquaredDistance::compute_squared_distance(#this, #other)? + } + }), quote!(+)); + sum + }; + quote! { + #body + (&#this_pattern, &#other_pattern) => { + Ok(#sum) } - }), quote!(+)); - sum - }; - quote! { - #body - (&#this_pattern, &#other_pattern) => { - Ok(#sum) } - } - }); + }); + + (match_body, append_error_clause) + }; + input.generics.where_clause = where_clause; if append_error_clause { + let input_attrs = cg::parse_input_attrs::<DistanceInputAttrs>(&input); if let Some(fallback) = input_attrs.fallback { match_body.append_all(quote! { (this, other) => #fallback(this, other) @@ -57,6 +76,9 @@ pub fn derive(input: DeriveInput) -> Tokens { } } + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + quote! { impl #impl_generics ::values::distance::ComputeSquaredDistance for #name #ty_generics #where_clause { #[allow(unused_variables, unused_imports)] @@ -78,3 +100,9 @@ pub fn derive(input: DeriveInput) -> Tokens { struct DistanceInputAttrs { fallback: Option<Path>, } + +#[darling(attributes(distance), default)] +#[derive(Default, FromField)] +struct DistanceFieldAttrs { + field_bound: bool, +} diff --git a/components/style_derive/lib.rs b/components/style_derive/lib.rs index e414a3bd3f2..e9d799fe9a9 100644 --- a/components/style_derive/lib.rs +++ b/components/style_derive/lib.rs @@ -45,7 +45,7 @@ pub fn derive_parse(stream: TokenStream) -> TokenStream { parse::derive(input).into() } -#[proc_macro_derive(ToAnimatedZero, attributes(animation))] +#[proc_macro_derive(ToAnimatedZero, attributes(animation, zero))] pub fn derive_to_animated_zero(stream: TokenStream) -> TokenStream { let input = syn::parse(stream).unwrap(); to_animated_zero::derive(input).into() diff --git a/components/style_derive/to_animated_value.rs b/components/style_derive/to_animated_value.rs index 5d9cdbc0138..a7378b70145 100644 --- a/components/style_derive/to_animated_value.rs +++ b/components/style_derive/to_animated_value.rs @@ -4,23 +4,34 @@ use cg; use quote; -use syn::{self, Ident}; +use syn::DeriveInput; use synstructure::BindStyle; -pub fn derive(input: syn::DeriveInput) -> quote::Tokens { - let name = &input.ident; - let trait_path = parse_quote!(values::animated::ToAnimatedValue); - let (impl_generics, ty_generics, mut where_clause, animated_value_type) = - cg::fmap_trait_parts(&input, &trait_path, Ident::from("AnimatedValue")); +pub fn derive(mut input: DeriveInput) -> quote::Tokens { + let mut where_clause = input.generics.where_clause.take(); + for param in input.generics.type_params() { + cg::add_predicate( + &mut where_clause, + parse_quote!(#param: ::values::animated::ToAnimatedValue), + ); + } let to_body = cg::fmap_match(&input, BindStyle::Move, |binding| { - where_clause.add_trait_bound(&binding.ast().ty); quote!(::values::animated::ToAnimatedValue::to_animated_value(#binding)) }); let from_body = cg::fmap_match(&input, BindStyle::Move, |binding| { quote!(::values::animated::ToAnimatedValue::from_animated_value(#binding)) }); + input.generics.where_clause = where_clause; + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + let animated_value_type = cg::fmap_trait_output( + &input, + &parse_quote!(values::animated::ToAnimatedValue), + "AnimatedValue".into(), + ); + quote! { impl #impl_generics ::values::animated::ToAnimatedValue for #name #ty_generics #where_clause { type AnimatedValue = #animated_value_type; diff --git a/components/style_derive/to_animated_zero.rs b/components/style_derive/to_animated_zero.rs index 8094e46874d..9ee786f7ec8 100644 --- a/components/style_derive/to_animated_zero.rs +++ b/components/style_derive/to_animated_zero.rs @@ -2,20 +2,26 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use animate::{AnimationVariantAttrs, AnimationFieldAttrs}; +use animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs}; use cg; use quote; use syn; use synstructure; -pub fn derive(input: syn::DeriveInput) -> quote::Tokens { - let name = &input.ident; - let trait_path = parse_quote!(values::animated::ToAnimatedZero); - let (impl_generics, ty_generics, mut where_clause) = - cg::trait_parts(&input, &trait_path); +pub fn derive(mut input: syn::DeriveInput) -> quote::Tokens { + let animation_input_attrs = cg::parse_input_attrs::<AnimationInputAttrs>(&input); + let no_bound = animation_input_attrs.no_bound.unwrap_or_default(); + let mut where_clause = input.generics.where_clause.take(); + for param in input.generics.type_params() { + if !no_bound.contains(¶m.ident) { + cg::add_predicate( + &mut where_clause, + parse_quote!(#param: ::values::animated::ToAnimatedZero), + ); + } + } - let s = synstructure::Structure::new(&input); - let to_body = s.each_variant(|variant| { + let to_body = synstructure::Structure::new(&input).each_variant(|variant| { let attrs = cg::parse_variant_attrs::<AnimationVariantAttrs>(&variant.ast()); if attrs.error { return Some(quote! { Err(()) }); @@ -26,21 +32,10 @@ pub fn derive(input: syn::DeriveInput) -> quote::Tokens { computations.append_all(bindings_pairs.map(|(binding, mapped_binding)| { let field_attrs = cg::parse_field_attrs::<AnimationFieldAttrs>(&binding.ast()); if field_attrs.constant { - if cg::is_parameterized(&binding.ast().ty, &where_clause.params, None) { - cg::add_predicate( - &mut where_clause.inner, - cg::where_predicate( - binding.ast().ty.clone(), - &parse_quote!(std::clone::Clone), - None, - ), - ); - } quote! { let #mapped_binding = ::std::clone::Clone::clone(#binding); } } else { - where_clause.add_trait_bound(&binding.ast().ty); quote! { let #mapped_binding = ::values::animated::ToAnimatedZero::to_animated_zero(#binding)?; @@ -50,6 +45,10 @@ pub fn derive(input: syn::DeriveInput) -> quote::Tokens { computations.append_all(quote! { Ok(#mapped) }); Some(computations) }); + input.generics.where_clause = where_clause; + + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); quote! { impl #impl_generics ::values::animated::ToAnimatedZero for #name #ty_generics #where_clause { diff --git a/components/style_derive/to_computed_value.rs b/components/style_derive/to_computed_value.rs index 1a64faa480d..9b7544ffbb8 100644 --- a/components/style_derive/to_computed_value.rs +++ b/components/style_derive/to_computed_value.rs @@ -4,21 +4,59 @@ use cg; use quote::Tokens; -use syn::{Ident, DeriveInput}; +use syn::DeriveInput; use synstructure::BindStyle; -pub fn derive(input: DeriveInput) -> Tokens { +pub fn derive(mut input: DeriveInput) -> Tokens { + let mut where_clause = input.generics.where_clause.take(); + let (to_body, from_body) = { + let params = input.generics.type_params().collect::<Vec<_>>(); + for param in ¶ms { + cg::add_predicate( + &mut where_clause, + parse_quote!(#param: ::values::computed::ToComputedValue), + ); + } + + let to_body = cg::fmap_match(&input, BindStyle::Ref, |binding| { + let attrs = cg::parse_field_attrs::<ComputedValueAttrs>(&binding.ast()); + if attrs.field_bound { + let ty = &binding.ast().ty; + + let output_type = cg::map_type_params(ty, ¶ms, &mut |ident| { + parse_quote!(<#ident as ::values::computed::ToComputedValue>::ComputedValue) + }); + + cg::add_predicate( + &mut where_clause, + parse_quote!( + #ty: ::values::computed::ToComputedValue<ComputedValue = #output_type> + ), + ); + } + quote! { + ::values::computed::ToComputedValue::to_computed_value(#binding, context) + } + }); + let from_body = cg::fmap_match(&input, BindStyle::Ref, |binding| { + quote! { + ::values::computed::ToComputedValue::from_computed_value(#binding) + } + }); + + (to_body, from_body) + }; + + input.generics.where_clause = where_clause; let name = &input.ident; - let trait_path = parse_quote!(values::computed::ToComputedValue); - let (impl_generics, ty_generics, mut where_clause, computed_value_type) = - cg::fmap_trait_parts(&input, &trait_path, Ident::from("ComputedValue")); + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); - if input.generics.params.is_empty() { + if input.generics.type_params().next().is_none() { return quote! { impl #impl_generics ::values::computed::ToComputedValue for #name #ty_generics #where_clause { - type ComputedValue = #computed_value_type; + type ComputedValue = Self; #[inline] fn to_computed_value( @@ -36,39 +74,11 @@ pub fn derive(input: DeriveInput) -> Tokens { } } - let to_body = cg::fmap_match(&input, BindStyle::Ref, |binding| { - let attrs = cg::parse_field_attrs::<ComputedValueAttrs>(&binding.ast()); - if attrs.clone { - if cg::is_parameterized(&binding.ast().ty, &where_clause.params, None) { - cg::add_predicate( - &mut where_clause.inner, - cg::where_predicate( - binding.ast().ty.clone(), - &parse_quote!(std::clone::Clone), - None, - ), - ); - } - quote! { ::std::clone::Clone::clone(#binding) } - } else { - if !attrs.ignore_bound { - where_clause.add_trait_bound(&binding.ast().ty); - } - quote! { - ::values::computed::ToComputedValue::to_computed_value(#binding, context) - } - } - }); - let from_body = cg::fmap_match(&input, BindStyle::Ref, |binding| { - let attrs = cg::parse_field_attrs::<ComputedValueAttrs>(&binding.ast()); - if attrs.clone { - quote! { ::std::clone::Clone::clone(#binding) } - } else { - quote! { - ::values::computed::ToComputedValue::from_computed_value(#binding) - } - } - }); + let computed_value_type = cg::fmap_trait_output( + &input, + &parse_quote!(values::computed::ToComputedValue), + "ComputedValue".into(), + ); quote! { impl #impl_generics ::values::computed::ToComputedValue for #name #ty_generics #where_clause { @@ -95,6 +105,5 @@ pub fn derive(input: DeriveInput) -> Tokens { #[darling(attributes(compute), default)] #[derive(Default, FromField)] struct ComputedValueAttrs { - clone: bool, - ignore_bound: bool, + field_bound: bool, } diff --git a/components/url/Cargo.toml b/components/url/Cargo.toml index 67c9dd3ef89..cbd96488918 100644 --- a/components/url/Cargo.toml +++ b/components/url/Cargo.toml @@ -16,4 +16,4 @@ serde = {version = "1.0"} servo_rand = {path = "../rand"} url = "1.2" url_serde = {version = "0.2"} -uuid = {version = "0.5.0", features = ["v4", "serde"]} +uuid = {version = "0.6.0", features = ["v4", "serde"]} diff --git a/components/url/origin.rs b/components/url/origin.rs index a9f851f8d5f..14a1cb921e6 100644 --- a/components/url/origin.rs +++ b/components/url/origin.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use servo_rand; -use servo_rand::Rng; use std::cell::RefCell; use std::rc::Rc; use url::{Host, Origin}; @@ -43,7 +42,7 @@ impl ImmutableOrigin { /// Creates a new opaque origin that is only equal to itself. pub fn new_opaque() -> ImmutableOrigin { - ImmutableOrigin::Opaque(OpaqueOrigin(servo_rand::thread_rng().gen())) + ImmutableOrigin::Opaque(OpaqueOrigin(servo_rand::random_uuid())) } pub fn scheme(&self) -> Option<&str> { diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index d6f571d601f..dbca178d48d 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -15,7 +15,7 @@ cookie = "0.10" euclid = "0.17" hyper = "0.10" image = "0.18" -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3.5" msg = {path = "../msg"} net_traits = {path = "../net_traits"} @@ -25,5 +25,5 @@ script_traits = {path = "../script_traits"} servo_config = {path = "../config"} servo_url = {path = "../url"} url = "1.2" -uuid = {version = "0.5", features = ["v4"]} +uuid = {version = "0.6", features = ["v4"]} webdriver = "0.33" diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 0a77762994e..f660690a96c 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -27,7 +27,7 @@ extern crate webdriver; mod keys; -use euclid::Size2D; +use euclid::TypedSize2D; use hyper::method::Method::{self, Post}; use image::{DynamicImage, ImageFormat, RgbImage}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; @@ -418,7 +418,7 @@ impl Handler { Nullable::Value(v) => v, Nullable::Null => 0, }; - let size = Size2D::new(width as u32, height as u32); + let size = TypedSize2D::new(width as u32, height as u32); let top_level_browsing_context_id = self.session()?.top_level_browsing_context_id; let cmd_msg = WebDriverCommandMsg::SetWindowSize(top_level_browsing_context_id, size, sender.clone()); diff --git a/components/webvr/Cargo.toml b/components/webvr/Cargo.toml index 7a9e25c2045..c220d2dde5d 100644 --- a/components/webvr/Cargo.toml +++ b/components/webvr/Cargo.toml @@ -16,7 +16,7 @@ oculusvr = ['rust-webvr/oculusvr'] [dependencies] canvas_traits = {path = "../canvas_traits"} euclid = "0.17" -ipc-channel = "0.9" +ipc-channel = "0.10" log = "0.3" msg = {path = "../msg"} rust-webvr = {version = "0.9", features = ["openvr"]} diff --git a/components/webvr_traits/Cargo.toml b/components/webvr_traits/Cargo.toml index 2582d2a3e4b..19a2879db38 100644 --- a/components/webvr_traits/Cargo.toml +++ b/components/webvr_traits/Cargo.toml @@ -10,7 +10,7 @@ name = "webvr_traits" path = "lib.rs" [dependencies] -ipc-channel = "0.9" +ipc-channel = "0.10" msg = {path = "../msg"} rust-webvr-api = {version = "0.9", features = ["serde-serialization"]} serde = "1.0" diff --git a/docs/components/style.md b/docs/components/style.md index 1aa1e08d89e..9590dd8fd08 100644 --- a/docs/components/style.md +++ b/docs/components/style.md @@ -139,7 +139,7 @@ that you didn't find it here so it can be added :) [stylo]: https://public.etherpad-mozilla.org/p/stylo [selector-impl]: http://doc.servo.org/selectors/parser/trait.SelectorImpl.html [selector-impl-ext]: http://doc.servo.org/style/selector_parser/trait.SelectorImplExt.html -[servo-selector-impl]: http://doc.servo.org/style/servo_selector_parser/struct.SelectorImpl.html +[servo-selector-impl]: http://doc.servo.org/style/servo/selector_parser/struct.SelectorImpl.html [tree-structural-pseudo-classes]: https://www.w3.org/TR/selectors4/#structural-pseudos [style-dom-traits]: http://doc.servo.org/style/dom/index.html [layout-wrapper]: http://doc.servo.org/layout/wrapper/index.html @@ -149,9 +149,9 @@ that you didn't find it here so it can be added :) [mdn-pseudo-after]: https://developer.mozilla.org/en/docs/Web/CSS/::after [mdn-pseudo-selection]: https://developer.mozilla.org/en/docs/Web/CSS/::selection [stylist]: http://doc.servo.org/style/stylist/struct.Stylist.html -[selectors-selectormap]: http://doc.servo.org/selectors/matching/struct.SelectorMap.html -[selectors-rule]: http://doc.servo.org/selectors/matching/struct.Rule.html -[per-pseudo-selectormap]: http://doc.servo.org/style/stylist/struct.PerPseudoElementSelectorMap.html +[selectors-selectormap]: http://doc.servo.org/style/selector_map/struct.SelectorMap.html +[selectors-rule]: http://doc.servo.org/style/stylist/struct.Rule.html +[per-pseudo-selectormap]: http://doc.servo.org/style/selector_parser/struct.PerPseudoElementMap.html [per-origin-selectormap]: http://doc.servo.org/style/stylist/struct.PerOriginSelectorMap.html [docs-pipeline]: https://github.com/servo/servo/blob/master/docs/glossary.md#pipeline [properties-module]: http://doc.servo.org/style/properties/index.html diff --git a/etc/ci/buildbot_steps.yml b/etc/ci/buildbot_steps.yml index a08fb2ad5b9..12ba8a4b876 100644 --- a/etc/ci/buildbot_steps.yml +++ b/etc/ci/buildbot_steps.yml @@ -45,6 +45,7 @@ mac-dev-unit: - ./mach clean-cargo-cache --keep 3 --force - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --dev - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach test-unit + - python ./etc/memory_reports_over_time.py --test - ./mach package --dev - ./mach build-geckolib - bash ./etc/ci/lockfile_changed.sh @@ -109,6 +110,7 @@ linux-dev: - ./mach test-tidy --no-progress --self-test - ./mach build --dev - ./mach test-unit + - python ./etc/memory_reports_over_time.py --test - ./mach package --dev - ./mach build --dev --no-default-features --features default-except-unstable - ./mach build-geckolib diff --git a/etc/ci/manifest_changed.sh b/etc/ci/manifest_changed.sh index 1da26c66bca..19accbfb3a2 100755 --- a/etc/ci/manifest_changed.sh +++ b/etc/ci/manifest_changed.sh @@ -8,20 +8,4 @@ set -o errexit set -o nounset set -o pipefail -echo "About to update manifest." - -# We shouldn't need any binary at all to update the manifests. -# Adding "SKIP_TESTS" to skip tests, it doesn't really skip the tests. -# It will run "run_wpt" with "'test_list': ['SKIP_TESTS']", -# and then pass it into wptrunner, which won't be able to find any tests named -# "SKIP_TESTS", and thus won't run any. -# Adding "--binary=" to skip looking for a compiled servo binary. -./mach test-wpt --manifest-update --binary= SKIP_TESTS - -echo "Updated manifest; about to check if any changes were made to it." -echo "If a diff is present, please run './mach update-manifest' \ -and commit the change." - -diff="$(git diff -- tests/*/MANIFEST.json)" -echo "${diff}" -[[ -z "${diff}" ]] +./mach update-manifest --check-clean diff --git a/etc/ci/update-wpt-checkout b/etc/ci/update-wpt-checkout index c6495e51c40..8da094bf5ab 100755 --- a/etc/ci/update-wpt-checkout +++ b/etc/ci/update-wpt-checkout @@ -41,7 +41,7 @@ function unsafe_pull_from_upstream() { fi # Update the manifest to include the new changes. - ./mach update-manifest --release || return 3 + ./mach update-manifest || return 3 # Amend the existing commit with the new changes from updating the manifest. git commit -a --amend --no-edit || return 4 diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index dbe35b2aab6..5a8188df2de 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -38,9 +38,6 @@ cp apis.html ../../target/doc/servo/ echo "Copied apis.html." cd ../.. -# Clean up the traces of the current doc build. -./etc/ci/clean_build_artifacts.sh - echo "Starting ghp-import." ghp-import -n target/doc echo "Finished ghp-import." @@ -48,3 +45,6 @@ git push -qf \ "https://${TOKEN}@github.com/servo/doc.servo.org.git" gh-pages \ &>/dev/null echo "Finished git push." + +# Clean up the traces of the current doc build. +./etc/ci/clean_build_artifacts.sh diff --git a/etc/memory_reports_over_time.py b/etc/memory_reports_over_time.py index 44a969d2d57..af3a052165a 100644 --- a/etc/memory_reports_over_time.py +++ b/etc/memory_reports_over_time.py @@ -28,7 +28,8 @@ def extract_memory_reports(lines): elif line == 'End memory reports\n': in_report = False elif in_report: - report_lines[-1].append(line.strip()) + if line.startswith('|'): + report_lines[-1].append(line.strip()) return (report_lines, times) @@ -72,6 +73,17 @@ def transform_report_for_test(report): return transformed +def test_extract_memory_reports(): + input = ["Begin memory reports", + "|", + " 154.56 MiB -- explicit\n", + "| 107.88 MiB -- system-heap-unclassified\n", + "End memory reports\n"] + expected = ([['|', '| 107.88 MiB -- system-heap-unclassified']], ['reports']) + assert(extract_memory_reports(input) == expected) + return 0 + + def test(): input = '''| | 23.89 MiB -- explicit @@ -105,6 +117,7 @@ def test(): assert(sorted(transformed.keys()) == sorted(expected.keys())) for k, v in transformed.items(): assert(v == expected[k]) + test_extract_memory_reports() return 0 diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml index 135882583c5..0af92e74dc1 100644 --- a/ports/geckolib/Cargo.toml +++ b/ports/geckolib/Cargo.toml @@ -22,7 +22,7 @@ libc = "0.2" log = {version = "0.3.5", features = ["release_max_level_info"]} malloc_size_of = {path = "../../components/malloc_size_of"} nsstring = {path = "../../support/gecko/nsstring"} -parking_lot = "0.4" +parking_lot = "0.5" selectors = {path = "../../components/selectors"} servo_arc = {path = "../../components/servo_arc"} smallvec = "0.6" diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 8e0ee71738b..3381da47e0b 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -53,10 +53,11 @@ use style::gecko_bindings::bindings::{RawServoSelectorListBorrowed, RawServoSele use style::gecko_bindings::bindings::{RawServoSourceSizeListBorrowedOrNull, RawServoSourceSizeListOwned}; use style::gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetBorrowedOrNull, RawServoStyleSetOwned}; use style::gecko_bindings::bindings::{RawServoStyleSheetContentsBorrowed, ServoComputedDataBorrowed}; -use style::gecko_bindings::bindings::{RawServoStyleSheetContentsStrong, ServoStyleContextBorrowed}; +use style::gecko_bindings::bindings::{RawServoStyleSheetContentsStrong, ComputedStyleBorrowed}; use style::gecko_bindings::bindings::{RawServoSupportsRule, RawServoSupportsRuleBorrowed}; use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong}; use style::gecko_bindings::bindings::{nsACString, nsAString, nsCSSPropertyIDSetBorrowedMut}; +use style::gecko_bindings::bindings::ComputedStyleBorrowedOrNull; use style::gecko_bindings::bindings::Gecko_AddPropertyToSet; use style::gecko_bindings::bindings::Gecko_AppendPropertyValuePair; use style::gecko_bindings::bindings::Gecko_ConstructFontFeatureValueSet; @@ -81,7 +82,6 @@ use style::gecko_bindings::bindings::RawServoAnimationValueTableBorrowed; use style::gecko_bindings::bindings::RawServoDeclarationBlockBorrowedOrNull; use style::gecko_bindings::bindings::RawServoStyleRuleBorrowed; use style::gecko_bindings::bindings::RawServoStyleSet; -use style::gecko_bindings::bindings::ServoStyleContextBorrowedOrNull; use style::gecko_bindings::bindings::nsCSSValueBorrowedMut; use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t; use style::gecko_bindings::bindings::nsTimingFunctionBorrowed; @@ -89,7 +89,7 @@ use style::gecko_bindings::bindings::nsTimingFunctionBorrowedMut; use style::gecko_bindings::structs; use style::gecko_bindings::structs::{CallerType, CSSPseudoElementType, CompositeOperation}; use style::gecko_bindings::structs::{Loader, LoaderReusableStyleSheets}; -use style::gecko_bindings::structs::{RawServoStyleRule, ServoStyleContextStrong, RustString}; +use style::gecko_bindings::structs::{RawServoStyleRule, ComputedStyleStrong, RustString}; use style::gecko_bindings::structs::{ServoStyleSheet, SheetLoadData, SheetParsingMode, nsAtom, nsCSSPropertyID}; use style::gecko_bindings::structs::{nsCSSFontDesc, nsCSSFontFaceRule, nsCSSCounterStyleRule}; use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint, PropertyValuePair}; @@ -833,9 +833,9 @@ fn resolve_rules_for_element_with_context<'a>( pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement( raw_style_set: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, snapshots: *const ServoElementSnapshotTable, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { debug_assert!(!snapshots.is_null()); let computed_values = unsafe { ArcBorrow::from_ref(computed_values) }; @@ -872,14 +872,14 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement( pub extern "C" fn Servo_StyleSet_GetComputedValuesByAddingAnimation( raw_style_set: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, snapshots: *const ServoElementSnapshotTable, animation_value: RawServoAnimationValueBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { debug_assert!(!snapshots.is_null()); let computed_values = unsafe { ArcBorrow::from_ref(computed_values) }; let rules = match computed_values.rules { - None => return ServoStyleContextStrong::null(), + None => return ComputedStyleStrong::null(), Some(ref rules) => rules, }; @@ -900,7 +900,7 @@ pub extern "C" fn Servo_StyleSet_GetComputedValuesByAddingAnimation( let element = GeckoElement(element); if element.borrow_data().is_none() { - return ServoStyleContextStrong::null(); + return ComputedStyleStrong::null(); } let shared = create_shared_context(&global_style_data, @@ -919,7 +919,7 @@ pub extern "C" fn Servo_StyleSet_GetComputedValuesByAddingAnimation( #[no_mangle] pub extern "C" fn Servo_ComputedValues_ExtractAnimationValue( - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, property_id: nsCSSPropertyID, ) -> RawServoAnimationValueStrong { let property = match LonghandId::from_nscsspropertyid(property_id) { @@ -934,6 +934,23 @@ pub extern "C" fn Servo_ComputedValues_ExtractAnimationValue( } #[no_mangle] +pub unsafe extern "C" fn Servo_Property_IsShorthand( + prop_name: *const nsACString, + found: *mut bool +) -> bool { + let prop_id = PropertyId::parse(prop_name.as_ref().unwrap().as_str_unchecked()); + let prop_id = match prop_id { + Ok(ref p) if p.enabled_for_all_content() => p, + _ => { + *found = false; + return false; + } + }; + *found = true; + prop_id.is_shorthand() +} + +#[no_mangle] pub extern "C" fn Servo_Property_IsAnimatable(property: nsCSSPropertyID) -> bool { use style::properties::animated_properties; animated_properties::nscsspropertyid_is_animatable(property) @@ -996,7 +1013,7 @@ pub extern "C" fn Servo_Element_HasPrimaryComputedValues(element: RawGeckoElemen #[no_mangle] pub extern "C" fn Servo_Element_GetPrimaryComputedValues( element: RawGeckoElementBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let element = GeckoElement(element); let data = element.borrow_data().expect("Getting CVs on unstyled element"); data.styles.primary().clone().into() @@ -1016,7 +1033,7 @@ pub extern "C" fn Servo_Element_HasPseudoComputedValues( pub extern "C" fn Servo_Element_GetPseudoComputedValues( element: RawGeckoElementBorrowed, index: usize, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let element = GeckoElement(element); let data = element.borrow_data().expect("Getting CVs that aren't present"); data.styles.pseudos.as_array()[index].as_ref().expect("Getting CVs that aren't present") @@ -2020,9 +2037,9 @@ pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowe } #[no_mangle] -pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsAtom) { +pub unsafe extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsAtom) { write_locked_arc(rule, |rule: &mut KeyframesRule| { - rule.name = KeyframesName::Ident(CustomIdent(unsafe { Atom::from_addrefed(name) })); + rule.name = KeyframesName::Ident(CustomIdent(Atom::from_addrefed(name))); }) } @@ -2167,16 +2184,16 @@ pub extern "C" fn Servo_FontFeatureValuesRule_GetValueText( } #[no_mangle] -pub extern "C" fn Servo_ComputedValues_GetForAnonymousBox( - parent_style_or_null: ServoStyleContextBorrowedOrNull, +pub unsafe extern "C" fn Servo_ComputedValues_GetForAnonymousBox( + parent_style_or_null: ComputedStyleBorrowedOrNull, pseudo_tag: *mut nsAtom, raw_data: RawServoStyleSetBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); let guards = StylesheetGuards::same(&guard); let data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut(); - let atom = Atom::from(pseudo_tag); + let atom = Atom::from_raw(pseudo_tag); let pseudo = PseudoElement::from_anon_box_atom(&atom) .expect("Not an anon box pseudo?"); @@ -2226,9 +2243,9 @@ pub extern "C" fn Servo_ResolvePseudoStyle( element: RawGeckoElementBorrowed, pseudo_type: CSSPseudoElementType, is_probe: bool, - inherited_style: ServoStyleContextBorrowedOrNull, + inherited_style: ComputedStyleBorrowedOrNull, raw_data: RawServoStyleSetBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let element = GeckoElement(element); let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); @@ -2300,10 +2317,10 @@ fn debug_atom_array(atoms: &AtomArray) -> String { pub extern "C" fn Servo_ComputedValues_ResolveXULTreePseudoStyle( element: RawGeckoElementBorrowed, pseudo_tag: *mut nsAtom, - inherited_style: ServoStyleContextBorrowed, + inherited_style: ComputedStyleBorrowed, input_word: *const AtomArray, raw_data: RawServoStyleSetBorrowed -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let element = GeckoElement(element); let data = element.borrow_data() .expect("Calling ResolveXULTreePseudoStyle on unstyled element?"); @@ -2345,7 +2362,7 @@ pub extern "C" fn Servo_ComputedValues_ResolveXULTreePseudoStyle( #[no_mangle] pub extern "C" fn Servo_SetExplicitStyle( element: RawGeckoElementBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, ) { let element = GeckoElement(element); debug!("Servo_SetExplicitStyle: {:?}", element); @@ -2358,7 +2375,7 @@ pub extern "C" fn Servo_SetExplicitStyle( #[no_mangle] pub extern "C" fn Servo_HasAuthorSpecifiedRules( - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, element: RawGeckoElementBorrowed, pseudo_type: CSSPseudoElementType, rule_type_mask: u32, @@ -2478,16 +2495,16 @@ fn get_pseudo_style( } #[no_mangle] -pub extern "C" fn Servo_ComputedValues_Inherit( +pub unsafe extern "C" fn Servo_ComputedValues_Inherit( raw_data: RawServoStyleSetBorrowed, pseudo_tag: *mut nsAtom, - parent_style_context: ServoStyleContextBorrowedOrNull, + parent_style_context: ComputedStyleBorrowedOrNull, target: structs::InheritTarget -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); let for_text = target == structs::InheritTarget::Text; - let atom = Atom::from(pseudo_tag); + let atom = Atom::from_raw(pseudo_tag); let pseudo = PseudoElement::from_anon_box_atom(&atom) .expect("Not an anon-box? Gah!"); @@ -2505,7 +2522,7 @@ pub extern "C" fn Servo_ComputedValues_Inherit( } #[no_mangle] -pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ServoStyleContextBorrowed) -> u64 { +pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ComputedStyleBorrowed) -> u64 { use style::properties::computed_value_flags::ComputedValueFlags; // FIXME(emilio): We could do this more efficiently I'm quite sure. let flags = values.flags; @@ -2533,7 +2550,7 @@ pub extern "C" fn Servo_ComputedValues_GetStyleBits(values: ServoStyleContextBor #[no_mangle] pub extern "C" fn Servo_ComputedValues_SpecifiesAnimationsOrTransitions( - values: ServoStyleContextBorrowed, + values: ComputedStyleBorrowed, ) -> bool { let b = values.get_box(); b.specifies_animations() || b.specifies_transitions() @@ -2549,7 +2566,7 @@ pub extern "C" fn Servo_ComputedValues_EqualCustomProperties( #[no_mangle] pub extern "C" fn Servo_ComputedValues_GetStyleRuleList( - values: ServoStyleContextBorrowed, + values: ComputedStyleBorrowed, rules: RawGeckoServoStyleRuleListBorrowedMut, ) { let rule_node = match values.rules { @@ -2822,7 +2839,7 @@ pub extern "C" fn Servo_DeclarationBlock_GetCssText(declarations: RawServoDeclar pub extern "C" fn Servo_DeclarationBlock_SerializeOneValue( declarations: RawServoDeclarationBlockBorrowed, property_id: nsCSSPropertyID, buffer: *mut nsAString, - computed_values: ServoStyleContextBorrowedOrNull, + computed_values: ComputedStyleBorrowedOrNull, custom_properties: RawServoDeclarationBlockBorrowedOrNull, ) { let property_id = get_property_id_from_nscsspropertyid!(property_id, ()); @@ -3210,7 +3227,7 @@ pub extern "C" fn Servo_DeclarationBlock_PropertyIsSet( } #[no_mangle] -pub extern "C" fn Servo_DeclarationBlock_SetIdentStringValue( +pub unsafe extern "C" fn Servo_DeclarationBlock_SetIdentStringValue( declarations: RawServoDeclarationBlockBorrowed, property: nsCSSPropertyID, value: *mut nsAtom, @@ -3220,7 +3237,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetIdentStringValue( let long = get_longhand_from_id!(property); let prop = match_wrap_declared! { long, - XLang => Lang(Atom::from(value)), + XLang => Lang(Atom::from_raw(value)), }; write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| { decls.push(prop, Importance::Normal, DeclarationSource::CssOm); @@ -3665,7 +3682,7 @@ pub extern "C" fn Servo_TakeChangeHint( pub extern "C" fn Servo_ResolveStyle( element: RawGeckoElementBorrowed, _raw_data: RawServoStyleSetBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let element = GeckoElement(element); debug!("Servo_ResolveStyle: {:?}", element); let data = @@ -3683,7 +3700,7 @@ pub extern "C" fn Servo_ResolveStyleLazily( rule_inclusion: StyleRuleInclusion, snapshots: *const ServoElementSnapshotTable, raw_data: RawServoStyleSetBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { debug_assert!(!snapshots.is_null()); let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); @@ -3758,13 +3775,13 @@ pub extern "C" fn Servo_ResolveStyleLazily( #[no_mangle] pub extern "C" fn Servo_ReparentStyle( - style_to_reparent: ServoStyleContextBorrowed, - parent_style: ServoStyleContextBorrowed, - parent_style_ignoring_first_line: ServoStyleContextBorrowed, - layout_parent_style: ServoStyleContextBorrowed, + style_to_reparent: ComputedStyleBorrowed, + parent_style: ComputedStyleBorrowed, + parent_style_ignoring_first_line: ComputedStyleBorrowed, + layout_parent_style: ComputedStyleBorrowed, element: RawGeckoElementBorrowedOrNull, raw_data: RawServoStyleSetBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); @@ -3874,7 +3891,7 @@ impl<'a> Iterator for PrioritizedPropertyIter<'a> { pub extern "C" fn Servo_GetComputedKeyframeValues( keyframes: RawGeckoKeyframeListBorrowed, element: RawGeckoElementBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, raw_data: RawServoStyleSetBorrowed, computed_keyframes: RawGeckoComputedKeyframeValuesListBorrowedMut ) { @@ -3984,7 +4001,7 @@ pub extern "C" fn Servo_GetComputedKeyframeValues( pub extern "C" fn Servo_GetAnimationValues( declarations: RawServoDeclarationBlockBorrowed, element: RawGeckoElementBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, raw_data: RawServoStyleSetBorrowed, animation_values: RawGeckoServoAnimationValueListBorrowedMut, ) { @@ -4027,7 +4044,7 @@ pub extern "C" fn Servo_GetAnimationValues( pub extern "C" fn Servo_AnimationValue_Compute( element: RawGeckoElementBorrowed, declarations: RawServoDeclarationBlockBorrowed, - style: ServoStyleContextBorrowed, + style: ComputedStyleBorrowed, raw_data: RawServoStyleSetBorrowed, ) -> RawServoAnimationValueStrong { let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); @@ -4138,7 +4155,7 @@ fn fill_in_missing_keyframe_values( } #[no_mangle] -pub extern "C" fn Servo_StyleSet_GetKeyframesForName( +pub unsafe extern "C" fn Servo_StyleSet_GetKeyframesForName( raw_data: RawServoStyleSetBorrowed, name: *mut nsAtom, inherited_timing_function: nsTimingFunctionBorrowed, @@ -4148,7 +4165,7 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName( "keyframes should be initially empty"); let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); - let name = Atom::from(name); + let name = Atom::from_raw(name); let animation = match data.stylist.get_animation(&name) { Some(animation) => animation, @@ -4183,11 +4200,11 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName( // Look for an existing keyframe with the same offset and timing // function or else add a new keyframe at the beginning of the keyframe // array. - let keyframe = unsafe { - Gecko_GetOrCreateKeyframeAtStart(keyframes, - step.start_percentage.0 as f32, - &timing_function) - }; + let keyframe = Gecko_GetOrCreateKeyframeAtStart( + keyframes, + step.start_percentage.0 as f32, + &timing_function, + ); match step.value { KeyframesStepValue::ComputedValues => { @@ -4197,12 +4214,10 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName( // animation should be set to the underlying computed value for // that keyframe. for property in animation.properties_changed.iter() { - unsafe { - Gecko_AppendPropertyValuePair( - &mut (*keyframe).mPropertyValues, - property.to_nscsspropertyid(), - ); - } + Gecko_AppendPropertyValuePair( + &mut (*keyframe).mPropertyValues, + property.to_nscsspropertyid(), + ); } if current_offset == 0.0 { has_complete_initial_keyframe = true; @@ -4249,23 +4264,19 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName( continue; } - let pair = unsafe { - Gecko_AppendPropertyValuePair( - &mut (*keyframe).mPropertyValues, - id.to_nscsspropertyid(), - ) - }; + let pair = Gecko_AppendPropertyValuePair( + &mut (*keyframe).mPropertyValues, + id.to_nscsspropertyid(), + ); - unsafe { - (*pair).mServoDeclarationBlock.set_arc_leaky( - Arc::new(global_style_data.shared_lock.wrap( - PropertyDeclarationBlock::with_one( - declaration.clone(), - Importance::Normal, - ) - )) - ); - } + (*pair).mServoDeclarationBlock.set_arc_leaky( + Arc::new(global_style_data.shared_lock.wrap( + PropertyDeclarationBlock::with_one( + declaration.clone(), + Importance::Normal, + ) + )) + ); if current_offset == 0.0 { properties_set_at_start.insert(id); @@ -4276,19 +4287,14 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName( } if custom_properties.any_normal() { - let pair = unsafe { - Gecko_AppendPropertyValuePair( - &mut (*keyframe).mPropertyValues, - nsCSSPropertyID::eCSSPropertyExtra_variable, - ) - }; - - unsafe { - (*pair).mServoDeclarationBlock.set_arc_leaky(Arc::new( - global_style_data.shared_lock.wrap(custom_properties) - )); - } + let pair = Gecko_AppendPropertyValuePair( + &mut (*keyframe).mPropertyValues, + nsCSSPropertyID::eCSSPropertyExtra_variable, + ); + (*pair).mServoDeclarationBlock.set_arc_leaky(Arc::new( + global_style_data.shared_lock.wrap(custom_properties) + )); } }, } @@ -4402,9 +4408,9 @@ pub extern "C" fn Servo_StyleSet_BuildFontFeatureValueSet( #[no_mangle] pub extern "C" fn Servo_StyleSet_ResolveForDeclarations( raw_data: RawServoStyleSetBorrowed, - parent_style_context: ServoStyleContextBorrowedOrNull, + parent_style_context: ComputedStyleBorrowedOrNull, declarations: RawServoDeclarationBlockBorrowed, -) -> ServoStyleContextStrong { +) -> ComputedStyleStrong { let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); @@ -4498,8 +4504,8 @@ pub extern "C" fn Servo_StyleSet_HasDocumentStateDependency( } #[no_mangle] -pub extern "C" fn Servo_GetCustomPropertyValue( - computed_values: ServoStyleContextBorrowed, +pub unsafe extern "C" fn Servo_GetCustomPropertyValue( + computed_values: ComputedStyleBorrowed, name: *const nsAString, value: *mut nsAString, ) -> bool { @@ -4508,18 +4514,18 @@ pub extern "C" fn Servo_GetCustomPropertyValue( None => return false, }; - let name = unsafe { Atom::from(&*name) }; + let name = Atom::from(&*name); let computed_value = match custom_properties.get(&name) { Some(v) => v, None => return false, }; - computed_value.to_css(&mut CssWriter::new(unsafe { value.as_mut().unwrap() })).unwrap(); + computed_value.to_css(&mut CssWriter::new(&mut *value)).unwrap(); true } #[no_mangle] -pub extern "C" fn Servo_GetCustomPropertiesCount(computed_values: ServoStyleContextBorrowed) -> u32 { +pub extern "C" fn Servo_GetCustomPropertiesCount(computed_values: ComputedStyleBorrowed) -> u32 { match computed_values.custom_properties() { Some(p) => p.len() as u32, None => 0, @@ -4528,7 +4534,7 @@ pub extern "C" fn Servo_GetCustomPropertiesCount(computed_values: ServoStyleCont #[no_mangle] pub extern "C" fn Servo_GetCustomPropertyNameAt( - computed_values: ServoStyleContextBorrowed, + computed_values: ComputedStyleBorrowed, index: u32, name: *mut nsAString, ) -> bool { diff --git a/ports/servo/Cargo.toml b/ports/servo/Cargo.toml index f08f59b7afe..4f42def7c53 100644 --- a/ports/servo/Cargo.toml +++ b/ports/servo/Cargo.toml @@ -13,6 +13,15 @@ path = "main.rs" test = false bench = false +[target.'cfg(windows)'.build-dependencies] +winres = "0.1" + +[package.metadata.winres] +FileDescription = "Servo" +LegalCopyright = "© The Servo Project Developers" +OriginalFilename = "servo.exe" +ProductName = "Servo" + [features] default = ["unstable", "default-except-unstable"] default-except-unstable = ["webdriver", "max_log_level"] @@ -34,14 +43,13 @@ glutin = "0.13" libservo = {path = "../../components/servo"} log = "0.3.5" msg = {path = "../../components/msg"} -net_traits = {path = "../../components/net_traits"} script_traits = {path = "../../components/script_traits"} servo_geometry = {path = "../../components/geometry"} servo_config = {path = "../../components/config"} -servo_url = {path = "../../components/url"} style_traits = {path = "../../components/style_traits"} tinyfiledialogs = "3.0" webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} +winit = "0.11.2" [target.'cfg(not(target_os = "android"))'.dependencies] sig = "0.1" diff --git a/ports/servo/browser.rs b/ports/servo/browser.rs new file mode 100644 index 00000000000..0231cb131b7 --- /dev/null +++ b/ports/servo/browser.rs @@ -0,0 +1,313 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use compositing::compositor_thread::EmbedderMsg; +use compositing::windowing::{WebRenderDebugOption, WindowEvent}; +use euclid::{TypedPoint2D, TypedVector2D}; +use glutin_app::keyutils::{CMD_OR_CONTROL, CMD_OR_ALT}; +use glutin_app::window::{Window, LINE_HEIGHT}; +use msg::constellation_msg::{Key, TopLevelBrowsingContextId as BrowserId}; +use msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection}; +use script_traits::TouchEventType; +use servo::net_traits::pub_domains::is_reg_domain; +use servo::servo_url::ServoUrl; +use servo_config::prefs::PREFS; +use std::mem; +use std::rc::Rc; +use tinyfiledialogs; +use webrender_api::ScrollLocation; + +pub struct Browser { + current_url: Option<ServoUrl>, + /// id of the top level browsing context. It is unique as tabs + /// are not supported yet. None until created. + browser_id: Option<BrowserId>, + + title: Option<String>, + status: Option<String>, + favicon: Option<ServoUrl>, + loading_state: Option<LoadingState>, + window: Rc<Window>, + event_queue: Vec<WindowEvent>, + shutdown_requested: bool, +} + +enum LoadingState { + Connecting, + Loading, + Loaded, +} + +impl Browser { + pub fn new(window: Rc<Window>) -> Browser { + Browser { + title: None, + current_url: None, + browser_id: None, + status: None, + favicon: None, + loading_state: None, + window: window, + event_queue: Vec::new(), + shutdown_requested: false, + } + } + + pub fn get_events(&mut self) -> Vec<WindowEvent> { + mem::replace(&mut self.event_queue, Vec::new()) + } + + pub fn set_browser_id(&mut self, browser_id: BrowserId) { + self.browser_id = Some(browser_id); + } + + pub fn handle_window_events(&mut self, events: Vec<WindowEvent>) { + for event in events { + match event { + WindowEvent::KeyEvent(ch, key, state, mods) => { + self.handle_key_from_window(ch, key, state, mods); + }, + event => { + self.event_queue.push(event); + } + } + } + } + + pub fn shutdown_requested(&self) -> bool { + self.shutdown_requested + } + + /// Handle key events before sending them to Servo. + fn handle_key_from_window(&mut self, ch: Option<char>, key: Key, state: KeyState, mods: KeyModifiers) { + match (mods, ch, key) { + (CMD_OR_CONTROL, Some('r'), _) => { + if let Some(id) = self.browser_id { + self.event_queue.push(WindowEvent::Reload(id)); + } + } + (CMD_OR_CONTROL, Some('l'), _) => { + if let Some(id) = self.browser_id { + let url: String = if let Some(ref current_url) = self.current_url { + current_url.to_string() + } else { + String::from("") + }; + let title = "URL or search query"; + if let Some(input) = tinyfiledialogs::input_box(title, title, &url) { + if let Some(url) = sanitize_url(&input) { + self.event_queue.push(WindowEvent::LoadUrl(id, url)); + } + } + } + } + (CMD_OR_CONTROL, Some('q'), _) => { + self.event_queue.push(WindowEvent::Quit); + } + (_, Some('3'), _) => if mods ^ KeyModifiers::CONTROL == KeyModifiers::SHIFT { + self.event_queue.push(WindowEvent::CaptureWebRender); + } + (KeyModifiers::CONTROL, None, Key::F10) => { + let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::RenderTargetDebug); + self.event_queue.push(event); + } + (KeyModifiers::CONTROL, None, Key::F11) => { + let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::TextureCacheDebug); + self.event_queue.push(event); + } + (KeyModifiers::CONTROL, None, Key::F12) => { + let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::Profiler); + self.event_queue.push(event); + } + (CMD_OR_ALT, None, Key::Right) | (KeyModifiers::NONE, None, Key::NavigateForward) => { + if let Some(id) = self.browser_id { + let event = WindowEvent::Navigation(id, TraversalDirection::Forward(1)); + self.event_queue.push(event); + } + } + (CMD_OR_ALT, None, Key::Left) | (KeyModifiers::NONE, None, Key::NavigateBackward) => { + if let Some(id) = self.browser_id { + let event = WindowEvent::Navigation(id, TraversalDirection::Back(1)); + self.event_queue.push(event); + } + } + (KeyModifiers::NONE, None, Key::Escape) => { + self.event_queue.push(WindowEvent::Quit); + } + _ => { + let event = self.platform_handle_key(key, mods); + self.event_queue.push(event.unwrap_or(WindowEvent::KeyEvent(ch, key, state, mods))); + } + } + + } + + #[cfg(not(target_os = "win"))] + fn platform_handle_key(&self, key: Key, mods: KeyModifiers) -> Option<WindowEvent> { + match (mods, key, self.browser_id) { + (CMD_OR_CONTROL, Key::LeftBracket, Some(id)) => { + Some(WindowEvent::Navigation(id, TraversalDirection::Back(1))) + } + (CMD_OR_CONTROL, Key::RightBracket, Some(id)) => { + Some(WindowEvent::Navigation(id, TraversalDirection::Forward(1))) + } + _ => None + } + } + + #[cfg(target_os = "win")] + fn platform_handle_key(&self, key: Key, mods: KeyModifiers) -> Option<WindowEvent> { + None + } + + /// Handle key events after they have been handled by Servo. + fn handle_key_from_servo(&mut self, _: Option<BrowserId>, ch: Option<char>, + key: Key, _: KeyState, mods: KeyModifiers) { + match (mods, ch, key) { + (_, Some('+'), _) => { + if mods & !KeyModifiers::SHIFT == CMD_OR_CONTROL { + self.event_queue.push(WindowEvent::Zoom(1.1)); + } else if mods & !KeyModifiers::SHIFT == CMD_OR_CONTROL | KeyModifiers::ALT { + self.event_queue.push(WindowEvent::PinchZoom(1.1)); + } + } + (CMD_OR_CONTROL, Some('-'), _) => { + self.event_queue.push(WindowEvent::Zoom(1.0 / 1.1)); + } + (_, Some('-'), _) if mods == CMD_OR_CONTROL | KeyModifiers::ALT => { + self.event_queue.push(WindowEvent::PinchZoom(1.0 / 1.1)); + } + (CMD_OR_CONTROL, Some('0'), _) => { + self.event_queue.push(WindowEvent::ResetZoom); + } + + (KeyModifiers::NONE, None, Key::PageDown) => { + let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0, + -self.window.page_height() + 2.0 * LINE_HEIGHT)); + self.scroll_window_from_key(scroll_location, TouchEventType::Move); + } + (KeyModifiers::NONE, None, Key::PageUp) => { + let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0, + self.window.page_height() - 2.0 * LINE_HEIGHT)); + self.scroll_window_from_key(scroll_location, TouchEventType::Move); + } + + (KeyModifiers::NONE, None, Key::Home) => { + self.scroll_window_from_key(ScrollLocation::Start, TouchEventType::Move); + } + + (KeyModifiers::NONE, None, Key::End) => { + self.scroll_window_from_key(ScrollLocation::End, TouchEventType::Move); + } + + (KeyModifiers::NONE, None, Key::Up) => { + self.scroll_window_from_key(ScrollLocation::Delta(TypedVector2D::new(0.0, 3.0 * LINE_HEIGHT)), + TouchEventType::Move); + } + (KeyModifiers::NONE, None, Key::Down) => { + self.scroll_window_from_key(ScrollLocation::Delta(TypedVector2D::new(0.0, -3.0 * LINE_HEIGHT)), + TouchEventType::Move); + } + (KeyModifiers::NONE, None, Key::Left) => { + self.scroll_window_from_key(ScrollLocation::Delta(TypedVector2D::new(LINE_HEIGHT, 0.0)), + TouchEventType::Move); + } + (KeyModifiers::NONE, None, Key::Right) => { + self.scroll_window_from_key(ScrollLocation::Delta(TypedVector2D::new(-LINE_HEIGHT, 0.0)), + TouchEventType::Move); + } + + _ => { + } + } + } + + fn scroll_window_from_key(&mut self, scroll_location: ScrollLocation, phase: TouchEventType) { + let event = WindowEvent::Scroll(scroll_location, TypedPoint2D::zero(), phase); + self.event_queue.push(event); + } + + pub fn handle_servo_events(&mut self, events: Vec<EmbedderMsg>) { + for event in events { + match event { + EmbedderMsg::Status(_browser_id, status) => { + self.status = status; + }, + EmbedderMsg::ChangePageTitle(_browser_id, title) => { + self.title = title; + + let fallback_title: String = if let Some(ref current_url) = self.current_url { + current_url.to_string() + } else { + String::from("Untitled") + }; + let title = match self.title { + Some(ref title) if title.len() > 0 => &**title, + _ => &fallback_title, + }; + let title = format!("{} - Servo", title); + self.window.set_title(&title); + } + EmbedderMsg::MoveTo(_browser_id, point) => { + self.window.set_position(point); + } + EmbedderMsg::ResizeTo(_browser_id, size) => { + self.window.set_inner_size(size); + } + EmbedderMsg::AllowNavigation(_browser_id, _url, response_chan) => { + if let Err(e) = response_chan.send(true) { + warn!("Failed to send allow_navigation() response: {}", e); + }; + } + EmbedderMsg::KeyEvent(browser_id, ch, key, state, modified) => { + self.handle_key_from_servo(browser_id, ch, key, state, modified); + } + EmbedderMsg::SetCursor(cursor) => { + self.window.set_cursor(cursor); + } + EmbedderMsg::NewFavicon(_browser_id, url) => { + self.favicon = Some(url); + } + EmbedderMsg::HeadParsed(_browser_id, ) => { + self.loading_state = Some(LoadingState::Loading); + } + EmbedderMsg::HistoryChanged(_browser_id, entries, current) => { + self.current_url = Some(entries[current].url.clone()); + } + EmbedderMsg::SetFullscreenState(_browser_id, state) => { + self.window.set_fullscreen(state); + } + EmbedderMsg::LoadStart(_browser_id) => { + self.loading_state = Some(LoadingState::Connecting); + } + EmbedderMsg::LoadComplete(_browser_id) => { + self.loading_state = Some(LoadingState::Loaded); + } + EmbedderMsg::Shutdown => { + self.shutdown_requested = true; + }, + EmbedderMsg::Panic(_browser_id, _reason, _backtrace) => { + } + } + } + } + +} + +fn sanitize_url(request: &str) -> Option<ServoUrl> { + let request = request.trim(); + ServoUrl::parse(&request).ok() + .or_else(|| { + if request.contains('/') || is_reg_domain(request) { + ServoUrl::parse(&format!("http://{}", request)).ok() + } else { + None + } + }).or_else(|| { + PREFS.get("shell.searchpage").as_string().and_then(|s: &str| { + let url = s.replace("%s", request); + ServoUrl::parse(&url).ok() + }) + }) +} diff --git a/ports/servo/build.rs b/ports/servo/build.rs index 860617cdaf2..63558909169 100644 --- a/ports/servo/build.rs +++ b/ports/servo/build.rs @@ -2,6 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#[cfg(windows)] +extern crate winres; + use std::env; use std::path::Path; use std::process; @@ -13,6 +16,14 @@ fn main() { if target.contains("android") { android_main() } + + #[cfg(windows)] + { + let mut res = winres::WindowsResource::new(); + res.set_icon("../../resources/Servo.ico"); + res.set_manifest_file("platform/windows/servo.exe.manifest"); + res.compile().unwrap(); + } } fn android_main() { diff --git a/ports/servo/glutin_app/keyutils.rs b/ports/servo/glutin_app/keyutils.rs new file mode 100644 index 00000000000..bce62893cde --- /dev/null +++ b/ports/servo/glutin_app/keyutils.rs @@ -0,0 +1,352 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use msg::constellation_msg::{self, Key, KeyModifiers}; +use winit::{self, VirtualKeyCode}; + +bitflags! { + pub struct GlutinKeyModifiers: u8 { + const LEFT_CONTROL = 1; + const RIGHT_CONTROL = 2; + const LEFT_SHIFT = 4; + const RIGHT_SHIFT = 8; + const LEFT_ALT = 16; + const RIGHT_ALT = 32; + const LEFT_SUPER = 64; + const RIGHT_SUPER = 128; + } +} + +// Some shortcuts use Cmd on Mac and Control on other systems. +#[cfg(target_os = "macos")] +pub const CMD_OR_CONTROL: KeyModifiers = KeyModifiers::SUPER; +#[cfg(not(target_os = "macos"))] +pub const CMD_OR_CONTROL: KeyModifiers = KeyModifiers::CONTROL; + +// Some shortcuts use Cmd on Mac and Alt on other systems. +#[cfg(target_os = "macos")] +pub const CMD_OR_ALT: KeyModifiers = KeyModifiers::SUPER; +#[cfg(not(target_os = "macos"))] +pub const CMD_OR_ALT: KeyModifiers = KeyModifiers::ALT; + +pub fn char_to_script_key(c: char) -> Option<constellation_msg::Key> { + match c { + ' ' => Some(Key::Space), + '"' => Some(Key::Apostrophe), + '\'' => Some(Key::Apostrophe), + '<' => Some(Key::Comma), + ',' => Some(Key::Comma), + '_' => Some(Key::Minus), + '-' => Some(Key::Minus), + '>' => Some(Key::Period), + '.' => Some(Key::Period), + '?' => Some(Key::Slash), + '/' => Some(Key::Slash), + '~' => Some(Key::GraveAccent), + '`' => Some(Key::GraveAccent), + ')' => Some(Key::Num0), + '0' => Some(Key::Num0), + '!' => Some(Key::Num1), + '1' => Some(Key::Num1), + '@' => Some(Key::Num2), + '2' => Some(Key::Num2), + '#' => Some(Key::Num3), + '3' => Some(Key::Num3), + '$' => Some(Key::Num4), + '4' => Some(Key::Num4), + '%' => Some(Key::Num5), + '5' => Some(Key::Num5), + '^' => Some(Key::Num6), + '6' => Some(Key::Num6), + '&' => Some(Key::Num7), + '7' => Some(Key::Num7), + '*' => Some(Key::Num8), + '8' => Some(Key::Num8), + '(' => Some(Key::Num9), + '9' => Some(Key::Num9), + ':' => Some(Key::Semicolon), + ';' => Some(Key::Semicolon), + '+' => Some(Key::Equal), + '=' => Some(Key::Equal), + 'A' => Some(Key::A), + 'a' => Some(Key::A), + 'B' => Some(Key::B), + 'b' => Some(Key::B), + 'C' => Some(Key::C), + 'c' => Some(Key::C), + 'D' => Some(Key::D), + 'd' => Some(Key::D), + 'E' => Some(Key::E), + 'e' => Some(Key::E), + 'F' => Some(Key::F), + 'f' => Some(Key::F), + 'G' => Some(Key::G), + 'g' => Some(Key::G), + 'H' => Some(Key::H), + 'h' => Some(Key::H), + 'I' => Some(Key::I), + 'i' => Some(Key::I), + 'J' => Some(Key::J), + 'j' => Some(Key::J), + 'K' => Some(Key::K), + 'k' => Some(Key::K), + 'L' => Some(Key::L), + 'l' => Some(Key::L), + 'M' => Some(Key::M), + 'm' => Some(Key::M), + 'N' => Some(Key::N), + 'n' => Some(Key::N), + 'O' => Some(Key::O), + 'o' => Some(Key::O), + 'P' => Some(Key::P), + 'p' => Some(Key::P), + 'Q' => Some(Key::Q), + 'q' => Some(Key::Q), + 'R' => Some(Key::R), + 'r' => Some(Key::R), + 'S' => Some(Key::S), + 's' => Some(Key::S), + 'T' => Some(Key::T), + 't' => Some(Key::T), + 'U' => Some(Key::U), + 'u' => Some(Key::U), + 'V' => Some(Key::V), + 'v' => Some(Key::V), + 'W' => Some(Key::W), + 'w' => Some(Key::W), + 'X' => Some(Key::X), + 'x' => Some(Key::X), + 'Y' => Some(Key::Y), + 'y' => Some(Key::Y), + 'Z' => Some(Key::Z), + 'z' => Some(Key::Z), + '{' => Some(Key::LeftBracket), + '[' => Some(Key::LeftBracket), + '|' => Some(Key::Backslash), + '\\' => Some(Key::Backslash), + '}' => Some(Key::RightBracket), + ']' => Some(Key::RightBracket), + _ => None + } +} + +pub fn glutin_key_to_script_key(key: winit::VirtualKeyCode) -> Result<constellation_msg::Key, ()> { + // TODO(negge): add more key mappings + match key { + VirtualKeyCode::A => Ok(Key::A), + VirtualKeyCode::B => Ok(Key::B), + VirtualKeyCode::C => Ok(Key::C), + VirtualKeyCode::D => Ok(Key::D), + VirtualKeyCode::E => Ok(Key::E), + VirtualKeyCode::F => Ok(Key::F), + VirtualKeyCode::G => Ok(Key::G), + VirtualKeyCode::H => Ok(Key::H), + VirtualKeyCode::I => Ok(Key::I), + VirtualKeyCode::J => Ok(Key::J), + VirtualKeyCode::K => Ok(Key::K), + VirtualKeyCode::L => Ok(Key::L), + VirtualKeyCode::M => Ok(Key::M), + VirtualKeyCode::N => Ok(Key::N), + VirtualKeyCode::O => Ok(Key::O), + VirtualKeyCode::P => Ok(Key::P), + VirtualKeyCode::Q => Ok(Key::Q), + VirtualKeyCode::R => Ok(Key::R), + VirtualKeyCode::S => Ok(Key::S), + VirtualKeyCode::T => Ok(Key::T), + VirtualKeyCode::U => Ok(Key::U), + VirtualKeyCode::V => Ok(Key::V), + VirtualKeyCode::W => Ok(Key::W), + VirtualKeyCode::X => Ok(Key::X), + VirtualKeyCode::Y => Ok(Key::Y), + VirtualKeyCode::Z => Ok(Key::Z), + + VirtualKeyCode::Numpad0 => Ok(Key::Kp0), + VirtualKeyCode::Numpad1 => Ok(Key::Kp1), + VirtualKeyCode::Numpad2 => Ok(Key::Kp2), + VirtualKeyCode::Numpad3 => Ok(Key::Kp3), + VirtualKeyCode::Numpad4 => Ok(Key::Kp4), + VirtualKeyCode::Numpad5 => Ok(Key::Kp5), + VirtualKeyCode::Numpad6 => Ok(Key::Kp6), + VirtualKeyCode::Numpad7 => Ok(Key::Kp7), + VirtualKeyCode::Numpad8 => Ok(Key::Kp8), + VirtualKeyCode::Numpad9 => Ok(Key::Kp9), + + VirtualKeyCode::Key0 => Ok(Key::Num0), + VirtualKeyCode::Key1 => Ok(Key::Num1), + VirtualKeyCode::Key2 => Ok(Key::Num2), + VirtualKeyCode::Key3 => Ok(Key::Num3), + VirtualKeyCode::Key4 => Ok(Key::Num4), + VirtualKeyCode::Key5 => Ok(Key::Num5), + VirtualKeyCode::Key6 => Ok(Key::Num6), + VirtualKeyCode::Key7 => Ok(Key::Num7), + VirtualKeyCode::Key8 => Ok(Key::Num8), + VirtualKeyCode::Key9 => Ok(Key::Num9), + + VirtualKeyCode::Return => Ok(Key::Enter), + VirtualKeyCode::Space => Ok(Key::Space), + VirtualKeyCode::Escape => Ok(Key::Escape), + VirtualKeyCode::Equals => Ok(Key::Equal), + VirtualKeyCode::Minus => Ok(Key::Minus), + VirtualKeyCode::Back => Ok(Key::Backspace), + VirtualKeyCode::PageDown => Ok(Key::PageDown), + VirtualKeyCode::PageUp => Ok(Key::PageUp), + + VirtualKeyCode::Insert => Ok(Key::Insert), + VirtualKeyCode::Home => Ok(Key::Home), + VirtualKeyCode::Delete => Ok(Key::Delete), + VirtualKeyCode::End => Ok(Key::End), + + VirtualKeyCode::Left => Ok(Key::Left), + VirtualKeyCode::Up => Ok(Key::Up), + VirtualKeyCode::Right => Ok(Key::Right), + VirtualKeyCode::Down => Ok(Key::Down), + + VirtualKeyCode::LShift => Ok(Key::LeftShift), + VirtualKeyCode::LControl => Ok(Key::LeftControl), + VirtualKeyCode::LAlt => Ok(Key::LeftAlt), + VirtualKeyCode::LWin => Ok(Key::LeftSuper), + VirtualKeyCode::RShift => Ok(Key::RightShift), + VirtualKeyCode::RControl => Ok(Key::RightControl), + VirtualKeyCode::RAlt => Ok(Key::RightAlt), + VirtualKeyCode::RWin => Ok(Key::RightSuper), + + VirtualKeyCode::Apostrophe => Ok(Key::Apostrophe), + VirtualKeyCode::Backslash => Ok(Key::Backslash), + VirtualKeyCode::Comma => Ok(Key::Comma), + VirtualKeyCode::Grave => Ok(Key::GraveAccent), + VirtualKeyCode::LBracket => Ok(Key::LeftBracket), + VirtualKeyCode::Period => Ok(Key::Period), + VirtualKeyCode::RBracket => Ok(Key::RightBracket), + VirtualKeyCode::Semicolon => Ok(Key::Semicolon), + VirtualKeyCode::Slash => Ok(Key::Slash), + VirtualKeyCode::Tab => Ok(Key::Tab), + VirtualKeyCode::Subtract => Ok(Key::Minus), + + VirtualKeyCode::F1 => Ok(Key::F1), + VirtualKeyCode::F2 => Ok(Key::F2), + VirtualKeyCode::F3 => Ok(Key::F3), + VirtualKeyCode::F4 => Ok(Key::F4), + VirtualKeyCode::F5 => Ok(Key::F5), + VirtualKeyCode::F6 => Ok(Key::F6), + VirtualKeyCode::F7 => Ok(Key::F7), + VirtualKeyCode::F8 => Ok(Key::F8), + VirtualKeyCode::F9 => Ok(Key::F9), + VirtualKeyCode::F10 => Ok(Key::F10), + VirtualKeyCode::F11 => Ok(Key::F11), + VirtualKeyCode::F12 => Ok(Key::F12), + + VirtualKeyCode::NavigateBackward => Ok(Key::NavigateBackward), + VirtualKeyCode::NavigateForward => Ok(Key::NavigateForward), + _ => Err(()), + } +} + +pub fn glutin_mods_to_script_mods(modifiers: GlutinKeyModifiers) -> constellation_msg::KeyModifiers { + let mut result = constellation_msg::KeyModifiers::empty(); + if modifiers.intersects(GlutinKeyModifiers::LEFT_SHIFT | GlutinKeyModifiers::RIGHT_SHIFT) { + result.insert(KeyModifiers::SHIFT); + } + if modifiers.intersects(GlutinKeyModifiers::LEFT_CONTROL | GlutinKeyModifiers::RIGHT_CONTROL) { + result.insert(KeyModifiers::CONTROL); + } + if modifiers.intersects(GlutinKeyModifiers::LEFT_ALT | GlutinKeyModifiers::RIGHT_ALT) { + result.insert(KeyModifiers::ALT); + } + if modifiers.intersects(GlutinKeyModifiers::LEFT_SUPER | GlutinKeyModifiers::RIGHT_SUPER) { + result.insert(KeyModifiers::SUPER); + } + result +} + +pub fn is_printable(key_code: VirtualKeyCode) -> bool { + use winit::VirtualKeyCode::*; + match key_code { + Escape | + F1 | + F2 | + F3 | + F4 | + F5 | + F6 | + F7 | + F8 | + F9 | + F10 | + F11 | + F12 | + F13 | + F14 | + F15 | + Snapshot | + Scroll | + Pause | + Insert | + Home | + Delete | + End | + PageDown | + PageUp | + Left | + Up | + Right | + Down | + Back | + LAlt | + LControl | + LMenu | + LShift | + LWin | + Mail | + MediaSelect | + MediaStop | + Mute | + MyComputer | + NavigateForward | + NavigateBackward | + NextTrack | + NoConvert | + PlayPause | + Power | + PrevTrack | + RAlt | + RControl | + RMenu | + RShift | + RWin | + Sleep | + Stop | + VolumeDown | + VolumeUp | + Wake | + WebBack | + WebFavorites | + WebForward | + WebHome | + WebRefresh | + WebSearch | + WebStop => false, + _ => true, + } +} + +/// Detect if given char is default ignorable in unicode +/// http://www.unicode.org/L2/L2002/02368-default-ignorable.pdf +pub fn is_identifier_ignorable(ch: &char) -> bool { + match *ch { + '\u{0000}'...'\u{0008}' | '\u{000E}'...'\u{001F}' | + '\u{007F}'...'\u{0084}' | '\u{0086}'...'\u{009F}' | + '\u{06DD}' | '\u{070F}' | + '\u{180B}'...'\u{180D}' | '\u{180E}' | + '\u{200C}'...'\u{200F}' | + '\u{202A}'...'\u{202E}' | '\u{2060}'...'\u{2063}' | + '\u{2064}'...'\u{2069}' | '\u{206A}'...'\u{206F}' | + '\u{FE00}'...'\u{FE0F}' | '\u{FEFF}' | + '\u{FFF0}'...'\u{FFF8}' | '\u{FFF9}'...'\u{FFFB}' | + '\u{1D173}'...'\u{1D17A}' | '\u{E0000}' | + '\u{E0001}' | + '\u{E0002}'...'\u{E001F}' | '\u{E0020}'...'\u{E007F}' | + '\u{E0080}'...'\u{E0FFF}' => true, + _ => false + } +} diff --git a/ports/servo/glutin_app/mod.rs b/ports/servo/glutin_app/mod.rs index 5ea843f1911..a7e8ac8f5e8 100644 --- a/ports/servo/glutin_app/mod.rs +++ b/ports/servo/glutin_app/mod.rs @@ -4,6 +4,7 @@ //! A simple application that uses glutin to open a window for Servo to display in. +pub mod keyutils; pub mod window; use servo_config::opts; diff --git a/ports/servo/glutin_app/window.rs b/ports/servo/glutin_app/window.rs index faf1b3e3b02..624ed0d5f1f 100644 --- a/ports/servo/glutin_app/window.rs +++ b/ports/servo/glutin_app/window.rs @@ -6,28 +6,18 @@ use compositing::compositor_thread::EventLoopWaker; use compositing::windowing::{AnimationState, MouseWindowEvent, WindowEvent}; -use compositing::windowing::{WebRenderDebugOption, WindowMethods}; -use euclid::{Point2D, Size2D, TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D}; +use compositing::windowing::{EmbedderCoordinates, WindowMethods}; +use euclid::{Length, TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D}; #[cfg(target_os = "windows")] use gdi32; use gleam::gl; -use glutin; -use glutin::{Api, ElementState, Event, GlContext, GlRequest, MouseButton, MouseScrollDelta, VirtualKeyCode}; -use glutin::TouchPhase; -#[cfg(target_os = "macos")] -use glutin::os::macos::{ActivationPolicy, WindowBuilderExt}; -use msg::constellation_msg::{self, Key, TopLevelBrowsingContextId as BrowserId}; -use msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection}; -use net_traits::net_error_list::NetError; -use net_traits::pub_domains::is_reg_domain; +use glutin::{self, Api, GlContext, GlRequest}; +use msg::constellation_msg::{Key, KeyState}; #[cfg(any(target_os = "linux", target_os = "macos"))] use osmesa_sys; -use script_traits::{LoadData, TouchEventType}; -use servo::ipc_channel::ipc::IpcSender; +use script_traits::TouchEventType; use servo_config::opts; -use servo_config::prefs::PREFS; use servo_geometry::DeviceIndependentPixel; -use servo_url::ServoUrl; use std::cell::{Cell, RefCell}; #[cfg(any(target_os = "linux", target_os = "macos"))] use std::ffi::CString; @@ -40,45 +30,25 @@ use std::thread; use std::time; use style_traits::DevicePixel; use style_traits::cursor::CursorKind; -use tinyfiledialogs; +use super::keyutils::{self, GlutinKeyModifiers}; #[cfg(target_os = "windows")] use user32; -use webrender_api::{DeviceUintRect, DeviceUintSize, ScrollLocation}; +use webrender_api::{DeviceIntPoint, DeviceUintRect, DeviceUintSize, ScrollLocation}; #[cfg(target_os = "windows")] use winapi; - -bitflags! { - struct GlutinKeyModifiers: u8 { - const LEFT_CONTROL = 1; - const RIGHT_CONTROL = 2; - const LEFT_SHIFT = 4; - const RIGHT_SHIFT = 8; - const LEFT_ALT = 16; - const RIGHT_ALT = 32; - const LEFT_SUPER = 64; - const RIGHT_SUPER = 128; - } -} - -// Some shortcuts use Cmd on Mac and Control on other systems. +use winit; +use winit::{ElementState, Event, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode}; #[cfg(target_os = "macos")] -const CMD_OR_CONTROL: KeyModifiers = KeyModifiers::SUPER; -#[cfg(not(target_os = "macos"))] -const CMD_OR_CONTROL: KeyModifiers = KeyModifiers::CONTROL; +use winit::os::macos::{ActivationPolicy, WindowBuilderExt}; -// Some shortcuts use Cmd on Mac and Alt on other systems. -#[cfg(target_os = "macos")] -const CMD_OR_ALT: KeyModifiers = KeyModifiers::SUPER; -#[cfg(not(target_os = "macos"))] -const CMD_OR_ALT: KeyModifiers = KeyModifiers::ALT; // This should vary by zoom level and maybe actual text size (focused or under cursor) -const LINE_HEIGHT: f32 = 38.0; +pub const LINE_HEIGHT: f32 = 38.0; const MULTISAMPLES: u16 = 16; #[cfg(target_os = "macos")] -fn builder_with_platform_options(mut builder: glutin::WindowBuilder) -> glutin::WindowBuilder { +fn builder_with_platform_options(mut builder: winit::WindowBuilder) -> winit::WindowBuilder { if opts::get().headless || opts::get().output_file.is_some() { // Prevent the window from showing in Dock.app, stealing focus, // or appearing at all when running in headless mode or generating an @@ -89,7 +59,7 @@ fn builder_with_platform_options(mut builder: glutin::WindowBuilder) -> glutin:: } #[cfg(not(target_os = "macos"))] -fn builder_with_platform_options(builder: glutin::WindowBuilder) -> glutin::WindowBuilder { +fn builder_with_platform_options(builder: winit::WindowBuilder) -> winit::WindowBuilder { builder } @@ -168,34 +138,23 @@ impl HeadlessContext { } enum WindowKind { - Window(glutin::GlWindow, RefCell<glutin::EventsLoop>), + Window(glutin::GlWindow, RefCell<winit::EventsLoop>), Headless(HeadlessContext), } /// The type of a window. pub struct Window { kind: WindowKind, - screen_size: Size2D<u32>, + screen_size: TypedSize2D<u32, DeviceIndependentPixel>, inner_size: Cell<TypedSize2D<u32, DeviceIndependentPixel>>, - - mouse_down_button: Cell<Option<glutin::MouseButton>>, - mouse_down_point: Cell<Point2D<i32>>, + mouse_down_button: Cell<Option<winit::MouseButton>>, + mouse_down_point: Cell<TypedPoint2D<i32, DevicePixel>>, event_queue: RefCell<Vec<WindowEvent>>, - - /// id of the top level browsing context. It is unique as tabs - /// are not supported yet. None until created. - browser_id: Cell<Option<BrowserId>>, - - mouse_pos: Cell<Point2D<i32>>, + mouse_pos: Cell<TypedPoint2D<i32, DevicePixel>>, key_modifiers: Cell<GlutinKeyModifiers>, - current_url: RefCell<Option<ServoUrl>>, - - last_pressed_key: Cell<Option<constellation_msg::Key>>, - + last_pressed_key: Cell<Option<Key>>, animation_state: Cell<AnimationState>, - fullscreen: Cell<bool>, - gl: Rc<gl::Gl>, suspended: Cell<bool>, } @@ -214,15 +173,9 @@ fn window_creation_scale_factor() -> TypedScale<f32, DeviceIndependentPixel, Dev impl Window { - pub fn set_browser_id(&self, browser_id: BrowserId) { - self.browser_id.set(Some(browser_id)); - } - pub fn new(is_foreground: bool, window_size: TypedSize2D<u32, DeviceIndependentPixel>) -> Rc<Window> { - let win_size: TypedSize2D<u32, DevicePixel> = - (window_size.to_f32() * window_creation_scale_factor()) - .to_usize().cast().expect("Window size should fit in u32"); + let win_size: DeviceUintSize = (window_size.to_f32() * window_creation_scale_factor()).to_u32(); let width = win_size.to_untyped().width; let height = win_size.to_untyped().height; @@ -235,12 +188,12 @@ impl Window { let screen_size; let inner_size; let window_kind = if opts::get().headless { - screen_size = Size2D::new(width, height); + screen_size = TypedSize2D::new(width, height); inner_size = TypedSize2D::new(width, height); WindowKind::Headless(HeadlessContext::new(width, height)) } else { - let events_loop = glutin::EventsLoop::new(); - let mut window_builder = glutin::WindowBuilder::new() + let events_loop = winit::EventsLoop::new(); + let mut window_builder = winit::WindowBuilder::new() .with_title("Servo".to_string()) .with_decorations(!opts::get().no_native_titlebar) .with_transparency(opts::get().no_native_titlebar) @@ -266,7 +219,7 @@ impl Window { } let (screen_width, screen_height) = events_loop.get_primary_monitor().get_dimensions(); - screen_size = Size2D::new(screen_width, screen_height); + screen_size = TypedSize2D::new(screen_width, screen_height); // TODO(ajeffrey): can this fail? let (width, height) = glutin_window.get_inner_size().expect("Failed to get window inner size."); inner_size = TypedSize2D::new(width, height); @@ -314,13 +267,10 @@ impl Window { kind: window_kind, event_queue: RefCell::new(vec!()), mouse_down_button: Cell::new(None), - mouse_down_point: Cell::new(Point2D::new(0, 0)), + mouse_down_point: Cell::new(TypedPoint2D::new(0, 0)), - browser_id: Cell::new(None), - - mouse_pos: Cell::new(Point2D::new(0, 0)), + mouse_pos: Cell::new(TypedPoint2D::new(0, 0)), key_modifiers: Cell::new(GlutinKeyModifiers::empty()), - current_url: RefCell::new(None), last_pressed_key: Cell::new(None), gl: gl.clone(), @@ -336,6 +286,107 @@ impl Window { Rc::new(window) } + pub fn get_events(&self) -> Vec<WindowEvent> { + mem::replace(&mut *self.event_queue.borrow_mut(), Vec::new()) + } + + pub fn page_height(&self) -> f32 { + let dpr = self.hidpi_factor(); + match self.kind { + WindowKind::Window(ref window, _) => { + let (_, height) = window.get_inner_size().expect("Failed to get window inner size."); + height as f32 * dpr.get() + }, + WindowKind::Headless(ref context) => { + context.height as f32 * dpr.get() + } + } + } + + pub fn set_title(&self, title: &str) { + if let WindowKind::Window(ref window, _) = self.kind { + window.set_title(title); + } + } + + pub fn set_inner_size(&self, size: DeviceUintSize) { + if let WindowKind::Window(ref window, _) = self.kind { + let size = size.to_f32() / self.hidpi_factor(); + window.set_inner_size(size.width as u32, size.height as u32) + } + } + + pub fn set_position(&self, point: DeviceIntPoint) { + if let WindowKind::Window(ref window, _) = self.kind { + let point = point.to_f32() / self.hidpi_factor(); + window.set_position(point.x as i32, point.y as i32) + } + } + + pub fn set_fullscreen(&self, state: bool) { + match self.kind { + WindowKind::Window(ref window, ..) => { + if self.fullscreen.get() != state { + window.set_fullscreen(None); + } + }, + WindowKind::Headless(..) => {} + } + self.fullscreen.set(state); + } + + fn is_animating(&self) -> bool { + self.animation_state.get() == AnimationState::Animating && !self.suspended.get() + } + + pub fn run<T>(&self, mut servo_callback: T) where T: FnMut() -> bool { + match self.kind { + WindowKind::Window(_, ref events_loop) => { + let mut stop = false; + loop { + if self.is_animating() { + // We block on compositing (servo_callback ends up calling swap_buffers) + events_loop.borrow_mut().poll_events(|e| { + self.glutin_event_to_servo_event(e); + }); + stop = servo_callback(); + } else { + // We block on glutin's event loop (window events) + events_loop.borrow_mut().run_forever(|e| { + self.glutin_event_to_servo_event(e); + if !self.event_queue.borrow().is_empty() { + if !self.suspended.get() { + stop = servo_callback(); + } + } + if stop || self.is_animating() { + winit::ControlFlow::Break + } else { + winit::ControlFlow::Continue + } + }); + } + if stop { + break; + } + } + } + WindowKind::Headless(..) => { + loop { + // Sleep the main thread to avoid using 100% CPU + // This can be done better, see comments in #18777 + if self.event_queue.borrow().is_empty() { + thread::sleep(time::Duration::from_millis(5)); + } + let stop = servo_callback(); + if stop { + break; + } + } + } + } + } + #[cfg(not(any(target_arch = "arm", target_arch = "aarch64")))] fn gl_version() -> GlRequest { return GlRequest::Specific(Api::OpenGl, (3, 2)); @@ -347,14 +398,17 @@ impl Window { } fn handle_received_character(&self, ch: char) { - let modifiers = Window::glutin_mods_to_script_mods(self.key_modifiers.get()); + let modifiers = keyutils::glutin_mods_to_script_mods(self.key_modifiers.get()); + if keyutils::is_identifier_ignorable(&ch) { + return + } if let Some(last_pressed_key) = self.last_pressed_key.get() { let event = WindowEvent::KeyEvent(Some(ch), last_pressed_key, KeyState::Pressed, modifiers); self.event_queue.borrow_mut().push(event); } else { // Only send the character if we can print it (by ignoring characters like backspace) if !ch.is_control() { - match Window::char_to_script_key(ch) { + match keyutils::char_to_script_key(ch) { Some(key) => { let event = WindowEvent::KeyEvent(Some(ch), key, @@ -386,69 +440,77 @@ impl Window { fn handle_keyboard_input(&self, element_state: ElementState, virtual_key_code: VirtualKeyCode) { self.toggle_keyboard_modifiers(virtual_key_code); - if let Ok(key) = Window::glutin_key_to_script_key(virtual_key_code) { + if let Ok(key) = keyutils::glutin_key_to_script_key(virtual_key_code) { let state = match element_state { ElementState::Pressed => KeyState::Pressed, ElementState::Released => KeyState::Released, }; if element_state == ElementState::Pressed { - if is_printable(virtual_key_code) { + if keyutils::is_printable(virtual_key_code) { self.last_pressed_key.set(Some(key)); } } - let modifiers = Window::glutin_mods_to_script_mods(self.key_modifiers.get()); + let modifiers = keyutils::glutin_mods_to_script_mods(self.key_modifiers.get()); self.event_queue.borrow_mut().push(WindowEvent::KeyEvent(None, key, state, modifiers)); } } - fn handle_window_event(&self, event: glutin::Event) { + fn glutin_event_to_servo_event(&self, event: winit::Event) { match event { Event::WindowEvent { - event: glutin::WindowEvent::ReceivedCharacter(ch), + event: winit::WindowEvent::ReceivedCharacter(ch), .. } => self.handle_received_character(ch), Event::WindowEvent { - event: glutin::WindowEvent::KeyboardInput { - input: glutin::KeyboardInput { + event: winit::WindowEvent::KeyboardInput { + input: winit::KeyboardInput { state, virtual_keycode: Some(virtual_keycode), .. }, .. }, .. } => self.handle_keyboard_input(state, virtual_keycode), Event::WindowEvent { - event: glutin::WindowEvent::MouseInput { + event: winit::WindowEvent::MouseInput { state, button, .. }, .. } => { if button == MouseButton::Left || button == MouseButton::Right { - let mouse_pos = self.mouse_pos.get(); - self.handle_mouse(button, state, mouse_pos.x, mouse_pos.y); + self.handle_mouse(button, state, self.mouse_pos.get()); } }, Event::WindowEvent { - event: glutin::WindowEvent::CursorMoved { + event: winit::WindowEvent::CursorMoved { position: (x, y), .. }, .. } => { - self.mouse_pos.set(Point2D::new(x as i32, y as i32)); + self.mouse_pos.set(TypedPoint2D::new(x as i32, y as i32)); self.event_queue.borrow_mut().push( WindowEvent::MouseWindowMoveEventClass(TypedPoint2D::new(x as f32, y as f32))); } Event::WindowEvent { - event: glutin::WindowEvent::MouseWheel { delta, phase, .. }, + event: winit::WindowEvent::MouseWheel { delta, phase, .. }, .. } => { - let (dx, dy) = match delta { + let (mut dx, mut dy) = match delta { MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT), MouseScrollDelta::PixelDelta(dx, dy) => (dx, dy), }; + // Scroll events snap to the major axis of movement, with vertical + // preferred over horizontal. + if dy.abs() >= dx.abs() { + dx = 0.0; + } else { + dy = 0.0; + } + let scroll_location = ScrollLocation::Delta(TypedVector2D::new(dx, dy)); let phase = glutin_phase_to_touch_event_type(phase); - self.scroll_window(scroll_location, phase); + let event = WindowEvent::Scroll(scroll_location, self.mouse_pos.get(), phase); + self.event_queue.borrow_mut().push(event); }, Event::WindowEvent { - event: glutin::WindowEvent::Touch(touch), + event: winit::WindowEvent::Touch(touch), .. } => { use script_traits::TouchId; @@ -459,17 +521,17 @@ impl Window { self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point)); } Event::WindowEvent { - event: glutin::WindowEvent::Refresh, + event: winit::WindowEvent::Refresh, .. } => self.event_queue.borrow_mut().push(WindowEvent::Refresh), Event::WindowEvent { - event: glutin::WindowEvent::Closed, + event: winit::WindowEvent::Closed, .. } => { self.event_queue.borrow_mut().push(WindowEvent::Quit); } Event::WindowEvent { - event: glutin::WindowEvent::Resized(width, height), + event: winit::WindowEvent::Resized(width, height), .. } => { // width and height are DevicePixel. @@ -479,7 +541,7 @@ impl Window { } // window.set_inner_size() takes DeviceIndependentPixel. let new_size = TypedSize2D::new(width as f32, height as f32); - let new_size = (new_size / self.hidpi_factor()).cast().expect("Window size should fit in u32"); + let new_size = (new_size / self.hidpi_factor()).to_u32(); if self.inner_size.get() != new_size { self.inner_size.set(new_size); self.event_queue.borrow_mut().push(WindowEvent::Resize); @@ -504,49 +566,30 @@ impl Window { self.key_modifiers.set(modifiers); } - /// Helper function to send a scroll event. - fn scroll_window(&self, mut scroll_location: ScrollLocation, phase: TouchEventType) { - // Scroll events snap to the major axis of movement, with vertical - // preferred over horizontal. - if let ScrollLocation::Delta(ref mut delta) = scroll_location { - if delta.y.abs() >= delta.x.abs() { - delta.x = 0.0; - } else { - delta.y = 0.0; - } - } - - let mouse_pos = self.mouse_pos.get(); - let event = WindowEvent::Scroll(scroll_location, - TypedPoint2D::new(mouse_pos.x as i32, mouse_pos.y as i32), - phase); - self.event_queue.borrow_mut().push(event); - } - /// Helper function to handle a click - fn handle_mouse(&self, button: glutin::MouseButton, action: glutin::ElementState, x: i32, y: i32) { + fn handle_mouse(&self, button: winit::MouseButton, + action: winit::ElementState, + coords: TypedPoint2D<i32, DevicePixel>) { use script_traits::MouseButton; - // FIXME(tkuehn): max pixel dist should be based on pixel density - let max_pixel_dist = 10f64; + let max_pixel_dist = 10.0 * self.hidpi_factor().get(); let event = match action { ElementState::Pressed => { - self.mouse_down_point.set(Point2D::new(x, y)); + self.mouse_down_point.set(coords); self.mouse_down_button.set(Some(button)); - MouseWindowEvent::MouseDown(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32)) + MouseWindowEvent::MouseDown(MouseButton::Left, coords.to_f32()) } ElementState::Released => { - let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left, - TypedPoint2D::new(x as f32, y as f32)); + let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left, coords.to_f32()); match self.mouse_down_button.get() { None => mouse_up_event, Some(but) if button == but => { - let pixel_dist = self.mouse_down_point.get() - Point2D::new(x, y); + let pixel_dist = self.mouse_down_point.get() - coords; let pixel_dist = ((pixel_dist.x * pixel_dist.x + - pixel_dist.y * pixel_dist.y) as f64).sqrt(); + pixel_dist.y * pixel_dist.y) as f32).sqrt(); if pixel_dist < max_pixel_dist { self.event_queue.borrow_mut().push(WindowEvent::MouseWindowEventClass(mouse_up_event)); - MouseWindowEvent::Click(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32)) + MouseWindowEvent::Click(MouseButton::Left, coords.to_f32()) } else { mouse_up_event } @@ -558,441 +601,18 @@ impl Window { self.event_queue.borrow_mut().push(WindowEvent::MouseWindowEventClass(event)); } - pub fn get_events(&self) -> Vec<WindowEvent> { - mem::replace(&mut *self.event_queue.borrow_mut(), Vec::new()) - } - - fn is_animating(&self) -> bool { - self.animation_state.get() == AnimationState::Animating && !self.suspended.get() - } - - pub fn run<T>(&self, mut servo_callback: T) where T: FnMut() -> bool { - match self.kind { - WindowKind::Window(_, ref events_loop) => { - let mut stop = false; - loop { - if self.is_animating() { - // We block on compositing (servo_callback ends up calling swap_buffers) - events_loop.borrow_mut().poll_events(|e| { - self.handle_window_event(e); - }); - stop = servo_callback(); - } else { - // We block on glutin's event loop (window events) - events_loop.borrow_mut().run_forever(|e| { - self.handle_window_event(e); - if !self.event_queue.borrow().is_empty() { - if !self.suspended.get() { - stop = servo_callback(); - } - } - if stop || self.is_animating() { - glutin::ControlFlow::Break - } else { - glutin::ControlFlow::Continue - } - }); - } - if stop { - break; - } - } - } - WindowKind::Headless(..) => { - loop { - // Sleep the main thread to avoid using 100% CPU - // This can be done better, see comments in #18777 - if self.event_queue.borrow().is_empty() { - thread::sleep(time::Duration::from_millis(5)); - } - let stop = servo_callback(); - if stop { - break; - } - } - } - } - } - - fn char_to_script_key(c: char) -> Option<constellation_msg::Key> { - match c { - ' ' => Some(Key::Space), - '"' => Some(Key::Apostrophe), - '\'' => Some(Key::Apostrophe), - '<' => Some(Key::Comma), - ',' => Some(Key::Comma), - '_' => Some(Key::Minus), - '-' => Some(Key::Minus), - '>' => Some(Key::Period), - '.' => Some(Key::Period), - '?' => Some(Key::Slash), - '/' => Some(Key::Slash), - '~' => Some(Key::GraveAccent), - '`' => Some(Key::GraveAccent), - ')' => Some(Key::Num0), - '0' => Some(Key::Num0), - '!' => Some(Key::Num1), - '1' => Some(Key::Num1), - '@' => Some(Key::Num2), - '2' => Some(Key::Num2), - '#' => Some(Key::Num3), - '3' => Some(Key::Num3), - '$' => Some(Key::Num4), - '4' => Some(Key::Num4), - '%' => Some(Key::Num5), - '5' => Some(Key::Num5), - '^' => Some(Key::Num6), - '6' => Some(Key::Num6), - '&' => Some(Key::Num7), - '7' => Some(Key::Num7), - '*' => Some(Key::Num8), - '8' => Some(Key::Num8), - '(' => Some(Key::Num9), - '9' => Some(Key::Num9), - ':' => Some(Key::Semicolon), - ';' => Some(Key::Semicolon), - '+' => Some(Key::Equal), - '=' => Some(Key::Equal), - 'A' => Some(Key::A), - 'a' => Some(Key::A), - 'B' => Some(Key::B), - 'b' => Some(Key::B), - 'C' => Some(Key::C), - 'c' => Some(Key::C), - 'D' => Some(Key::D), - 'd' => Some(Key::D), - 'E' => Some(Key::E), - 'e' => Some(Key::E), - 'F' => Some(Key::F), - 'f' => Some(Key::F), - 'G' => Some(Key::G), - 'g' => Some(Key::G), - 'H' => Some(Key::H), - 'h' => Some(Key::H), - 'I' => Some(Key::I), - 'i' => Some(Key::I), - 'J' => Some(Key::J), - 'j' => Some(Key::J), - 'K' => Some(Key::K), - 'k' => Some(Key::K), - 'L' => Some(Key::L), - 'l' => Some(Key::L), - 'M' => Some(Key::M), - 'm' => Some(Key::M), - 'N' => Some(Key::N), - 'n' => Some(Key::N), - 'O' => Some(Key::O), - 'o' => Some(Key::O), - 'P' => Some(Key::P), - 'p' => Some(Key::P), - 'Q' => Some(Key::Q), - 'q' => Some(Key::Q), - 'R' => Some(Key::R), - 'r' => Some(Key::R), - 'S' => Some(Key::S), - 's' => Some(Key::S), - 'T' => Some(Key::T), - 't' => Some(Key::T), - 'U' => Some(Key::U), - 'u' => Some(Key::U), - 'V' => Some(Key::V), - 'v' => Some(Key::V), - 'W' => Some(Key::W), - 'w' => Some(Key::W), - 'X' => Some(Key::X), - 'x' => Some(Key::X), - 'Y' => Some(Key::Y), - 'y' => Some(Key::Y), - 'Z' => Some(Key::Z), - 'z' => Some(Key::Z), - '{' => Some(Key::LeftBracket), - '[' => Some(Key::LeftBracket), - '|' => Some(Key::Backslash), - '\\' => Some(Key::Backslash), - '}' => Some(Key::RightBracket), - ']' => Some(Key::RightBracket), - _ => None - } - } - - fn glutin_key_to_script_key(key: glutin::VirtualKeyCode) -> Result<constellation_msg::Key, ()> { - // TODO(negge): add more key mappings - match key { - VirtualKeyCode::A => Ok(Key::A), - VirtualKeyCode::B => Ok(Key::B), - VirtualKeyCode::C => Ok(Key::C), - VirtualKeyCode::D => Ok(Key::D), - VirtualKeyCode::E => Ok(Key::E), - VirtualKeyCode::F => Ok(Key::F), - VirtualKeyCode::G => Ok(Key::G), - VirtualKeyCode::H => Ok(Key::H), - VirtualKeyCode::I => Ok(Key::I), - VirtualKeyCode::J => Ok(Key::J), - VirtualKeyCode::K => Ok(Key::K), - VirtualKeyCode::L => Ok(Key::L), - VirtualKeyCode::M => Ok(Key::M), - VirtualKeyCode::N => Ok(Key::N), - VirtualKeyCode::O => Ok(Key::O), - VirtualKeyCode::P => Ok(Key::P), - VirtualKeyCode::Q => Ok(Key::Q), - VirtualKeyCode::R => Ok(Key::R), - VirtualKeyCode::S => Ok(Key::S), - VirtualKeyCode::T => Ok(Key::T), - VirtualKeyCode::U => Ok(Key::U), - VirtualKeyCode::V => Ok(Key::V), - VirtualKeyCode::W => Ok(Key::W), - VirtualKeyCode::X => Ok(Key::X), - VirtualKeyCode::Y => Ok(Key::Y), - VirtualKeyCode::Z => Ok(Key::Z), - - VirtualKeyCode::Numpad0 => Ok(Key::Kp0), - VirtualKeyCode::Numpad1 => Ok(Key::Kp1), - VirtualKeyCode::Numpad2 => Ok(Key::Kp2), - VirtualKeyCode::Numpad3 => Ok(Key::Kp3), - VirtualKeyCode::Numpad4 => Ok(Key::Kp4), - VirtualKeyCode::Numpad5 => Ok(Key::Kp5), - VirtualKeyCode::Numpad6 => Ok(Key::Kp6), - VirtualKeyCode::Numpad7 => Ok(Key::Kp7), - VirtualKeyCode::Numpad8 => Ok(Key::Kp8), - VirtualKeyCode::Numpad9 => Ok(Key::Kp9), - - VirtualKeyCode::Key0 => Ok(Key::Num0), - VirtualKeyCode::Key1 => Ok(Key::Num1), - VirtualKeyCode::Key2 => Ok(Key::Num2), - VirtualKeyCode::Key3 => Ok(Key::Num3), - VirtualKeyCode::Key4 => Ok(Key::Num4), - VirtualKeyCode::Key5 => Ok(Key::Num5), - VirtualKeyCode::Key6 => Ok(Key::Num6), - VirtualKeyCode::Key7 => Ok(Key::Num7), - VirtualKeyCode::Key8 => Ok(Key::Num8), - VirtualKeyCode::Key9 => Ok(Key::Num9), - - VirtualKeyCode::Return => Ok(Key::Enter), - VirtualKeyCode::Space => Ok(Key::Space), - VirtualKeyCode::Escape => Ok(Key::Escape), - VirtualKeyCode::Equals => Ok(Key::Equal), - VirtualKeyCode::Minus => Ok(Key::Minus), - VirtualKeyCode::Back => Ok(Key::Backspace), - VirtualKeyCode::PageDown => Ok(Key::PageDown), - VirtualKeyCode::PageUp => Ok(Key::PageUp), - - VirtualKeyCode::Insert => Ok(Key::Insert), - VirtualKeyCode::Home => Ok(Key::Home), - VirtualKeyCode::Delete => Ok(Key::Delete), - VirtualKeyCode::End => Ok(Key::End), - - VirtualKeyCode::Left => Ok(Key::Left), - VirtualKeyCode::Up => Ok(Key::Up), - VirtualKeyCode::Right => Ok(Key::Right), - VirtualKeyCode::Down => Ok(Key::Down), - - VirtualKeyCode::LShift => Ok(Key::LeftShift), - VirtualKeyCode::LControl => Ok(Key::LeftControl), - VirtualKeyCode::LAlt => Ok(Key::LeftAlt), - VirtualKeyCode::LWin => Ok(Key::LeftSuper), - VirtualKeyCode::RShift => Ok(Key::RightShift), - VirtualKeyCode::RControl => Ok(Key::RightControl), - VirtualKeyCode::RAlt => Ok(Key::RightAlt), - VirtualKeyCode::RWin => Ok(Key::RightSuper), - - VirtualKeyCode::Apostrophe => Ok(Key::Apostrophe), - VirtualKeyCode::Backslash => Ok(Key::Backslash), - VirtualKeyCode::Comma => Ok(Key::Comma), - VirtualKeyCode::Grave => Ok(Key::GraveAccent), - VirtualKeyCode::LBracket => Ok(Key::LeftBracket), - VirtualKeyCode::Period => Ok(Key::Period), - VirtualKeyCode::RBracket => Ok(Key::RightBracket), - VirtualKeyCode::Semicolon => Ok(Key::Semicolon), - VirtualKeyCode::Slash => Ok(Key::Slash), - VirtualKeyCode::Tab => Ok(Key::Tab), - VirtualKeyCode::Subtract => Ok(Key::Minus), - - VirtualKeyCode::F1 => Ok(Key::F1), - VirtualKeyCode::F2 => Ok(Key::F2), - VirtualKeyCode::F3 => Ok(Key::F3), - VirtualKeyCode::F4 => Ok(Key::F4), - VirtualKeyCode::F5 => Ok(Key::F5), - VirtualKeyCode::F6 => Ok(Key::F6), - VirtualKeyCode::F7 => Ok(Key::F7), - VirtualKeyCode::F8 => Ok(Key::F8), - VirtualKeyCode::F9 => Ok(Key::F9), - VirtualKeyCode::F10 => Ok(Key::F10), - VirtualKeyCode::F11 => Ok(Key::F11), - VirtualKeyCode::F12 => Ok(Key::F12), - - VirtualKeyCode::NavigateBackward => Ok(Key::NavigateBackward), - VirtualKeyCode::NavigateForward => Ok(Key::NavigateForward), - _ => Err(()), - } - } - - fn glutin_mods_to_script_mods(modifiers: GlutinKeyModifiers) -> constellation_msg::KeyModifiers { - let mut result = constellation_msg::KeyModifiers::empty(); - if modifiers.intersects(GlutinKeyModifiers::LEFT_SHIFT | GlutinKeyModifiers::RIGHT_SHIFT) { - result.insert(KeyModifiers::SHIFT); - } - if modifiers.intersects(GlutinKeyModifiers::LEFT_CONTROL | GlutinKeyModifiers::RIGHT_CONTROL) { - result.insert(KeyModifiers::CONTROL); - } - if modifiers.intersects(GlutinKeyModifiers::LEFT_ALT | GlutinKeyModifiers::RIGHT_ALT) { - result.insert(KeyModifiers::ALT); - } - if modifiers.intersects(GlutinKeyModifiers::LEFT_SUPER | GlutinKeyModifiers::RIGHT_SUPER) { - result.insert(KeyModifiers::SUPER); - } - result - } - - #[cfg(not(target_os = "win"))] - fn platform_handle_key(&self, key: Key, mods: constellation_msg::KeyModifiers, browser_id: BrowserId) { - match (mods, key) { - (CMD_OR_CONTROL, Key::LeftBracket) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Back(1)); - self.event_queue.borrow_mut().push(event); - } - (CMD_OR_CONTROL, Key::RightBracket) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Forward(1)); - self.event_queue.borrow_mut().push(event); - } - _ => {} - } - } - - #[cfg(target_os = "win")] - fn platform_handle_key(&self, key: Key, mods: constellation_msg::KeyModifiers, browser_id: BrowserId) { - } -} - -impl WindowMethods for Window { - fn gl(&self) -> Rc<gl::Gl> { - self.gl.clone() - } - - fn framebuffer_size(&self) -> DeviceUintSize { - (self.inner_size.get().to_f32() * self.hidpi_factor()).to_usize().cast().expect("Window size should fit in u32") - } - - fn window_rect(&self) -> DeviceUintRect { - let size = self.framebuffer_size(); - let origin = TypedPoint2D::zero(); - DeviceUintRect::new(origin, size) - } - - fn size(&self) -> TypedSize2D<f32, DeviceIndependentPixel> { - self.inner_size.get().to_f32() - } - - fn client_window(&self, _: BrowserId) -> (Size2D<u32>, Point2D<i32>) { - match self.kind { - WindowKind::Window(ref window, ..) => { - // TODO(ajeffrey): can this fail? - let (width, height) = window.get_outer_size().expect("Failed to get window outer size."); - let size = Size2D::new(width, height); - // TODO(ajeffrey): can this fail? - let (x, y) = window.get_position().expect("Failed to get window position."); - let origin = Point2D::new(x as i32, y as i32); - (size, origin) - } - WindowKind::Headless(ref context) => { - let size = TypedSize2D::new(context.width, context.height); - (size, Point2D::zero()) - } - } - - } - - fn screen_size(&self, _: BrowserId) -> Size2D<u32> { - self.screen_size - } - - fn screen_avail_size(&self, browser_id: BrowserId) -> Size2D<u32> { - // FIXME: Glutin doesn't have API for available size. Fallback to screen size - self.screen_size(browser_id) - } - - fn set_animation_state(&self, state: AnimationState) { - self.animation_state.set(state); - } - - fn set_inner_size(&self, _: BrowserId, size: Size2D<u32>) { - match self.kind { - WindowKind::Window(ref window, ..) => { - window.set_inner_size(size.width as u32, size.height as u32) - } - WindowKind::Headless(..) => {} - } - } - - fn set_position(&self, _: BrowserId, point: Point2D<i32>) { - match self.kind { - WindowKind::Window(ref window, ..) => { - window.set_position(point.x, point.y) - } - WindowKind::Headless(..) => {} - } - } - - fn set_fullscreen_state(&self, _: BrowserId, state: bool) { - match self.kind { - WindowKind::Window(ref window, ..) => { - if self.fullscreen.get() != state { - window.set_fullscreen(None); - } - }, - WindowKind::Headless(..) => {} - } - self.fullscreen.set(state); - } - - fn present(&self) { - match self.kind { - WindowKind::Window(ref window, ..) => { - if let Err(err) = window.swap_buffers() { - warn!("Failed to swap window buffers ({}).", err); - } - } - WindowKind::Headless(..) => {} - } - } - - fn create_event_loop_waker(&self) -> Box<EventLoopWaker> { - struct GlutinEventLoopWaker { - proxy: Option<Arc<glutin::EventsLoopProxy>>, - } - impl GlutinEventLoopWaker { - fn new(window: &Window) -> GlutinEventLoopWaker { - let proxy = match window.kind { - WindowKind::Window(_, ref events_loop) => { - Some(Arc::new(events_loop.borrow().create_proxy())) - }, - WindowKind::Headless(..) => { - None - } - }; - GlutinEventLoopWaker { proxy } - } - } - impl EventLoopWaker for GlutinEventLoopWaker { - fn wake(&self) { - // kick the OS event loop awake. - if let Some(ref proxy) = self.proxy { - if let Err(err) = proxy.wakeup() { - warn!("Failed to wake up event loop ({}).", err); - } - } - } - fn clone(&self) -> Box<EventLoopWaker + Send> { - Box::new(GlutinEventLoopWaker { - proxy: self.proxy.clone(), - }) + fn hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> { + match opts::get().device_pixels_per_px { + Some(device_pixels_per_px) => TypedScale::new(device_pixels_per_px), + None => match opts::get().output_file { + Some(_) => TypedScale::new(1.0), + None => self.platform_hidpi_factor() } } - - Box::new(GlutinEventLoopWaker::new(&self)) } #[cfg(not(target_os = "windows"))] - fn hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> { + fn platform_hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> { match self.kind { WindowKind::Window(ref window, ..) => { TypedScale::new(window.hidpi_factor()) @@ -1004,64 +624,17 @@ impl WindowMethods for Window { } #[cfg(target_os = "windows")] - fn hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> { + fn platform_hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> { let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) }; let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) }; TypedScale::new(ppi as f32 / 96.0) } - fn set_page_title(&self, _: BrowserId, title: Option<String>) { - match self.kind { - WindowKind::Window(ref window, ..) => { - let fallback_title: String = if let Some(ref current_url) = *self.current_url.borrow() { - current_url.to_string() - } else { - String::from("Untitled") - }; - - let title = match title { - Some(ref title) if title.len() > 0 => &**title, - _ => &fallback_title, - }; - let title = format!("{} - Servo", title); - window.set_title(&title); - } - WindowKind::Headless(..) => {} - } - } - - fn status(&self, _: BrowserId, _: Option<String>) { - } - - fn load_start(&self, _: BrowserId) { - } - - fn load_end(&self, _: BrowserId) { - if opts::get().no_native_titlebar { - match self.kind { - WindowKind::Window(ref window, ..) => { - window.show(); - } - WindowKind::Headless(..) => {} - } - } - } - - fn history_changed(&self, _: BrowserId, history: Vec<LoadData>, current: usize) { - *self.current_url.borrow_mut() = Some(history[current].url.clone()); - } - - fn load_error(&self, _: BrowserId, _: NetError, _: String) { - } - - fn head_parsed(&self, _: BrowserId) { - } - /// Has no effect on Android. - fn set_cursor(&self, cursor: CursorKind) { + pub fn set_cursor(&self, cursor: CursorKind) { match self.kind { WindowKind::Window(ref window, ..) => { - use glutin::MouseCursor; + use winit::MouseCursor; let glutin_cursor = match cursor { CursorKind::Auto => MouseCursor::Default, @@ -1106,159 +679,110 @@ impl WindowMethods for Window { WindowKind::Headless(..) => {} } } +} - fn set_favicon(&self, _: BrowserId, _: ServoUrl) { - } - - fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool { - true +impl WindowMethods for Window { + fn gl(&self) -> Rc<gl::Gl> { + self.gl.clone() } - /// Helper function to handle keyboard events. - fn handle_key(&self, _: Option<BrowserId>, ch: Option<char>, key: Key, mods: constellation_msg::KeyModifiers) { - let browser_id = match self.browser_id.get() { - Some(id) => id, - None => { unreachable!("Can't get keys without a browser"); } - }; - match (mods, ch, key) { - (_, Some('+'), _) => { - if mods & !KeyModifiers::SHIFT == CMD_OR_CONTROL { - self.event_queue.borrow_mut().push(WindowEvent::Zoom(1.1)); - } else if mods & !KeyModifiers::SHIFT == CMD_OR_CONTROL | KeyModifiers::ALT { - self.event_queue.borrow_mut().push(WindowEvent::PinchZoom(1.1)); + fn get_coordinates(&self) -> EmbedderCoordinates { + let dpr = self.hidpi_factor(); + match self.kind { + WindowKind::Window(ref window, _) => { + // TODO(ajeffrey): can this fail? + let (width, height) = window.get_outer_size().expect("Failed to get window outer size."); + let (x, y) = window.get_position().unwrap_or((0, 0)); + let win_size = (TypedSize2D::new(width as f32, height as f32) * dpr).to_u32(); + let win_origin = (TypedPoint2D::new(x as f32, y as f32) * dpr).to_i32(); + let screen = (self.screen_size.to_f32() * dpr).to_u32(); + + let (width, height) = window.get_inner_size().expect("Failed to get window inner size."); + let inner_size = (TypedSize2D::new(width as f32, height as f32) * dpr).to_u32(); + + let viewport = DeviceUintRect::new(TypedPoint2D::zero(), inner_size); + + EmbedderCoordinates { + viewport: viewport, + framebuffer: inner_size, + window: (win_size, win_origin), + screen: screen, + // FIXME: Glutin doesn't have API for available size. Fallback to screen size + screen_avail: screen, + hidpi_factor: dpr, } - } - (CMD_OR_CONTROL, Some('-'), _) => { - self.event_queue.borrow_mut().push(WindowEvent::Zoom(1.0 / 1.1)); - } - (_, Some('-'), _) if mods == CMD_OR_CONTROL | KeyModifiers::ALT => { - self.event_queue.borrow_mut().push(WindowEvent::PinchZoom(1.0 / 1.1)); - } - (CMD_OR_CONTROL, Some('0'), _) => { - self.event_queue.borrow_mut().push(WindowEvent::ResetZoom); - } - - (KeyModifiers::NONE, None, Key::NavigateForward) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Forward(1)); - self.event_queue.borrow_mut().push(event); - } - (KeyModifiers::NONE, None, Key::NavigateBackward) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Back(1)); - self.event_queue.borrow_mut().push(event); - } - - (KeyModifiers::NONE, None, Key::Escape) => { - if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() { - self.event_queue.borrow_mut().push(WindowEvent::Quit); + }, + WindowKind::Headless(ref context) => { + let size = (TypedSize2D::new(context.width, context.height).to_f32() * dpr).to_u32(); + EmbedderCoordinates { + viewport: DeviceUintRect::new(TypedPoint2D::zero(), size), + framebuffer: size, + window: (size, TypedPoint2D::zero()), + screen: size, + screen_avail: size, + hidpi_factor: dpr, } } + } + } - (CMD_OR_ALT, None, Key::Right) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Forward(1)); - self.event_queue.borrow_mut().push(event); - } - (CMD_OR_ALT, None, Key::Left) => { - let event = WindowEvent::Navigation(browser_id, TraversalDirection::Back(1)); - self.event_queue.borrow_mut().push(event); - } - - (KeyModifiers::NONE, None, Key::PageDown) => { - let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0, - -self.framebuffer_size() - .to_f32() - .to_untyped() - .height + 2.0 * LINE_HEIGHT)); - self.scroll_window(scroll_location, - TouchEventType::Move); - } - (KeyModifiers::NONE, None, Key::PageUp) => { - let scroll_location = ScrollLocation::Delta(TypedVector2D::new(0.0, - self.framebuffer_size() - .to_f32() - .to_untyped() - .height - 2.0 * LINE_HEIGHT)); - self.scroll_window(scroll_location, - TouchEventType::Move); - } - - (KeyModifiers::NONE, None, Key::Home) => { - self.scroll_window(ScrollLocation::Start, TouchEventType::Move); - } - - (KeyModifiers::NONE, None, Key::End) => { - self.scroll_window(ScrollLocation::End, TouchEventType::Move); - } - - (KeyModifiers::NONE, None, Key::Up) => { - self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(0.0, 3.0 * LINE_HEIGHT)), - TouchEventType::Move); - } - (KeyModifiers::NONE, None, Key::Down) => { - self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(0.0, -3.0 * LINE_HEIGHT)), - TouchEventType::Move); - } - (KeyModifiers::NONE, None, Key::Left) => { - self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(LINE_HEIGHT, 0.0)), TouchEventType::Move); - } - (KeyModifiers::NONE, None, Key::Right) => { - self.scroll_window(ScrollLocation::Delta(TypedVector2D::new(-LINE_HEIGHT, 0.0)), TouchEventType::Move); - } - (CMD_OR_CONTROL, Some('r'), _) => { - if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() { - self.event_queue.borrow_mut().push(WindowEvent::Reload(browser_id)); + fn present(&self) { + match self.kind { + WindowKind::Window(ref window, ..) => { + if let Err(err) = window.swap_buffers() { + warn!("Failed to swap window buffers ({}).", err); } } - (CMD_OR_CONTROL, Some('l'), _) => { - if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() { - let url: String = if let Some(ref url) = *self.current_url.borrow() { - url.to_string() - } else { - String::from("") - }; - let title = "URL or search query"; - if let Some(input) = tinyfiledialogs::input_box(title, title, &url) { - if let Some(url) = sanitize_url(&input) { - self.event_queue.borrow_mut().push(WindowEvent::LoadUrl(browser_id, url)); - } + WindowKind::Headless(..) => {} + } + } + + fn create_event_loop_waker(&self) -> Box<EventLoopWaker> { + struct GlutinEventLoopWaker { + proxy: Option<Arc<winit::EventsLoopProxy>>, + } + impl GlutinEventLoopWaker { + fn new(window: &Window) -> GlutinEventLoopWaker { + let proxy = match window.kind { + WindowKind::Window(_, ref events_loop) => { + Some(Arc::new(events_loop.borrow().create_proxy())) + }, + WindowKind::Headless(..) => { + None } - } + }; + GlutinEventLoopWaker { proxy } } - (CMD_OR_CONTROL, Some('q'), _) => { - if let Some(true) = PREFS.get("shell.builtin-key-shortcuts.enabled").as_boolean() { - self.event_queue.borrow_mut().push(WindowEvent::Quit); + } + impl EventLoopWaker for GlutinEventLoopWaker { + fn wake(&self) { + // kick the OS event loop awake. + if let Some(ref proxy) = self.proxy { + if let Err(err) = proxy.wakeup() { + warn!("Failed to wake up event loop ({}).", err); + } } } - (KeyModifiers::CONTROL, None, Key::F10) => { - let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::RenderTargetDebug); - self.event_queue.borrow_mut().push(event); - } - (KeyModifiers::CONTROL, None, Key::F11) => { - let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::TextureCacheDebug); - self.event_queue.borrow_mut().push(event); - } - (KeyModifiers::CONTROL, None, Key::F12) => { - let event = WindowEvent::ToggleWebRenderDebug(WebRenderDebugOption::Profiler); - self.event_queue.borrow_mut().push(event); - } - - _ => { - self.platform_handle_key(key, mods, browser_id); + fn clone(&self) -> Box<EventLoopWaker + Send> { + Box::new(GlutinEventLoopWaker { + proxy: self.proxy.clone(), + }) } } + + Box::new(GlutinEventLoopWaker::new(&self)) } - fn allow_navigation(&self, _: BrowserId, _: ServoUrl, response_chan: IpcSender<bool>) { - if let Err(e) = response_chan.send(true) { - warn!("Failed to send allow_navigation() response: {}", e); - }; + fn set_animation_state(&self, state: AnimationState) { + self.animation_state.set(state); } - fn supports_clipboard(&self) -> bool { + fn prepare_for_composite(&self, _width: Length<u32, DevicePixel>, _height: Length<u32, DevicePixel>) -> bool { true } - fn handle_panic(&self, _: BrowserId, _reason: String, _backtrace: Option<String>) { - // Nothing to do here yet. The crash has already been reported on the console. + fn supports_clipboard(&self) -> bool { + true } } @@ -1270,91 +794,3 @@ fn glutin_phase_to_touch_event_type(phase: TouchPhase) -> TouchEventType { TouchPhase::Cancelled => TouchEventType::Cancel, } } - -fn is_printable(key_code: VirtualKeyCode) -> bool { - use glutin::VirtualKeyCode::*; - match key_code { - Escape | - F1 | - F2 | - F3 | - F4 | - F5 | - F6 | - F7 | - F8 | - F9 | - F10 | - F11 | - F12 | - F13 | - F14 | - F15 | - Snapshot | - Scroll | - Pause | - Insert | - Home | - Delete | - End | - PageDown | - PageUp | - Left | - Up | - Right | - Down | - Back | - LAlt | - LControl | - LMenu | - LShift | - LWin | - Mail | - MediaSelect | - MediaStop | - Mute | - MyComputer | - NavigateForward | - NavigateBackward | - NextTrack | - NoConvert | - PlayPause | - Power | - PrevTrack | - RAlt | - RControl | - RMenu | - RShift | - RWin | - Sleep | - Stop | - VolumeDown | - VolumeUp | - Wake | - WebBack | - WebFavorites | - WebForward | - WebHome | - WebRefresh | - WebSearch | - WebStop => false, - _ => true, - } -} - -fn sanitize_url(request: &str) -> Option<ServoUrl> { - let request = request.trim(); - ServoUrl::parse(&request).ok() - .or_else(|| { - if request.contains('/') || is_reg_domain(request) { - ServoUrl::parse(&format!("http://{}", request)).ok() - } else { - None - } - }).or_else(|| { - PREFS.get("shell.searchpage").as_string().and_then(|s: &str| { - let url = s.replace("%s", request); - ServoUrl::parse(&url).ok() - }) - }) -} diff --git a/ports/servo/main.rs b/ports/servo/main.rs index 774a418d757..5401ef9130d 100644 --- a/ports/servo/main.rs +++ b/ports/servo/main.rs @@ -29,19 +29,18 @@ extern crate glutin; // The window backed by glutin #[macro_use] extern crate log; extern crate msg; -extern crate net_traits; #[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys; extern crate script_traits; extern crate servo; extern crate servo_config; extern crate servo_geometry; -extern crate servo_url; #[cfg(all(feature = "unstable", not(target_os = "android")))] #[macro_use] extern crate sig; extern crate style_traits; extern crate tinyfiledialogs; extern crate webrender_api; +extern crate winit; #[cfg(target_os = "windows")] extern crate winapi; #[cfg(target_os = "windows")] extern crate user32; @@ -62,6 +61,8 @@ use std::panic; use std::process; use std::thread; +mod browser; + pub mod platform { #[cfg(target_os = "macos")] pub use platform::macos::deinit; @@ -162,6 +163,8 @@ fn main() { let window = glutin_app::create_window(); + let mut browser = browser::Browser::new(window.clone()); + // If the url is not provided, we fallback to the homepage in PREFS, // or a blank page in case the homepage is not set either. let cwd = env::current_dir().unwrap(); @@ -177,22 +180,40 @@ fn main() { let (sender, receiver) = ipc::channel().unwrap(); servo.handle_events(vec![WindowEvent::NewBrowser(target_url, sender)]); let browser_id = receiver.recv().unwrap(); - window.set_browser_id(browser_id); + browser.set_browser_id(browser_id); servo.handle_events(vec![WindowEvent::SelectBrowser(browser_id)]); servo.setup_logging(); window.run(|| { - let events = window.get_events(); - let need_resize = events.iter().any(|e| match *e { + let win_events = window.get_events(); + + // FIXME: this could be handled by Servo. We don't need + // a repaint_synchronously function exposed. + let need_resize = win_events.iter().any(|e| match *e { WindowEvent::Resize => true, - _ => false + _ => false, }); - let stop = !servo.handle_events(events); + + browser.handle_window_events(win_events); + + let mut servo_events = servo.get_events(); + loop { + browser.handle_servo_events(servo_events); + servo.handle_events(browser.get_events()); + if browser.shutdown_requested() { + return true; + } + servo_events = servo.get_events(); + if servo_events.is_empty() { + break; + } + } + if need_resize { servo.repaint_synchronously(); } - stop + false }); servo.deinit(); diff --git a/components/servo/servo.exe.manifest b/ports/servo/platform/windows/servo.exe.manifest index 198d8d51709..23b2abe1b72 100644 --- a/components/servo/servo.exe.manifest +++ b/ports/servo/platform/windows/servo.exe.manifest @@ -17,8 +17,7 @@ <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> - <dpiAware>true</dpiAware> + <dpiAware>true</dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly> - diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 967e8c35509..f1ed3f885fa 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -354,9 +354,6 @@ class MachCommands(CommandBase): if status == 0: if sys.platform == "win32": servo_exe_dir = path.join(base_path, "debug" if dev else "release") - # On windows, copy in our manifest - shutil.copy(path.join(self.get_top_dir(), "components", "servo", "servo.exe.manifest"), - servo_exe_dir) msvc_x64 = "64" if "x86_64" in (target or host_triple()) else "" # on msvc builds, use editbin to change the subsystem to windows, but only diff --git a/python/servo/command_base.py b/python/servo/command_base.py index c6111d72bba..a200fa05f24 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -402,8 +402,7 @@ class CommandBase(object): # Will alow us to fetch the relevant builds from the nightly repository os_prefix = "linux" if is_windows(): - print("The nightly flag is not supported on windows yet.") - sys.exit(1) + os_prefix = "windows-msvc" if is_macosx(): print("The nightly flag is not supported on mac yet.") sys.exit(1) @@ -428,10 +427,13 @@ class CommandBase(object): sys.exit(1) nightly_target_directory = path.join(self.context.topdir, "target") + # ':' is not an authorized character for a file name on Windows + # make sure the OS specific separator is used + target_file_path = file_to_download.replace(':', '-').split('/') + destination_file = os.path.join( + nightly_target_directory, os.path.join(*target_file_path)) # Once extracted, the nightly folder name is the tar name without the extension # (eg /foo/bar/baz.tar.gz extracts to /foo/bar/baz) - destination_file = path.join( - nightly_target_directory, file_to_download) destination_folder = os.path.splitext(destination_file)[0] nightlies_folder = path.join( nightly_target_directory, 'nightly', os_prefix) @@ -457,11 +459,20 @@ class CommandBase(object): print("The nightly file {} has already been extracted.".format( destination_folder)) else: - print("Extracting to {}...".format(destination_folder)) - with tarfile.open(os.path.join(nightlies_folder, destination_file), "r") as tar: - tar.extractall(destination_folder) - - return path.join(destination_folder, "servo", "servo") + print("Extracting to {} ...".format(destination_folder)) + if is_windows(): + command = 'msiexec /a {} /qn TARGETDIR={}'.format( + os.path.join(nightlies_folder, destination_file), destination_folder) + if subprocess.call(command, stdout=PIPE, stderr=PIPE) != 0: + print("Could not extract the nightly executable from the msi package.") + sys.exit(1) + else: + with tarfile.open(os.path.join(nightlies_folder, destination_file), "r") as tar: + tar.extractall(destination_folder) + bin_folder = path.join(destination_folder, "servo") + if is_windows(): + bin_folder = path.join(destination_folder, "PFiles", "Mozilla research", "Servo Tech Demo") + return path.join(bin_folder, "servo{}".format(BIN_SUFFIX)) def build_env(self, hosts_file_path=None, target=None, is_build=False, geckolib=False, test_unit=False): """Return an extended environment dictionary.""" diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 2a2f2f74d8c..8fb97e9eb70 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -317,7 +317,6 @@ class PackageCommands(CommandBase): dir_to_resources = path.join(dir_to_temp_servo, 'resources') shutil.copytree(path.join(dir_to_root, 'resources'), dir_to_resources) shutil.copy(binary_path, dir_to_temp_servo) - shutil.copy("{}.manifest".format(binary_path), dir_to_temp_servo) copy_windows_dependencies(target_dir, dir_to_temp_servo) change_prefs(dir_to_resources, "windows") diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 8ed67964bab..cac5531d8f4 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -77,6 +77,19 @@ def create_parser_wpt(): return parser +def create_parser_manifest_update(): + import manifestupdate + return manifestupdate.create_parser() + + +def run_update(topdir, check_clean=False, rebuild=False, **kwargs): + import manifestupdate + from wptrunner import wptlogging + logger = wptlogging.setup(kwargs, {"mach": sys.stdout}) + wpt_dir = os.path.abspath(os.path.join(topdir, 'tests', 'wpt')) + manifestupdate.update(logger, wpt_dir, check_clean, rebuild) + + @CommandProvider class MachCommands(CommandBase): DEFAULT_RENDER_MODE = "cpu" @@ -429,11 +442,9 @@ class MachCommands(CommandBase): @Command('update-manifest', description='Run test-wpt --manifest-update SKIP_TESTS to regenerate MANIFEST.json', category='testing', - parser=create_parser_wpt) + parser=create_parser_manifest_update) def update_manifest(self, **kwargs): - kwargs['test_list'].append(str('SKIP_TESTS')) - kwargs['manifest_update'] = True - return self.test_wpt(**kwargs) + return run_update(self.context.topdir, **kwargs) @Command('update-wpt', description='Update the web platform tests', diff --git a/resources/prefs.json b/resources/prefs.json index 5d21c38b10a..4d8aa2b85db 100644 --- a/resources/prefs.json +++ b/resources/prefs.json @@ -63,7 +63,6 @@ "network.http-cache.disabled": false, "network.mime.sniff": false, "session-history.max-length": 20, - "shell.builtin-key-shortcuts.enabled": true, "shell.homepage": "https://servo.org", "shell.keep_screen_on.enabled": false, "shell.native-orientation": "both", diff --git a/servo-tidy.toml b/servo-tidy.toml index ad2f4460b8e..0bb2b9117fd 100644 --- a/servo-tidy.toml +++ b/servo-tidy.toml @@ -29,6 +29,7 @@ rand = [ "tempfile", "uuid", "ws", + "rand", ] num = [ "chrono", @@ -44,6 +45,7 @@ packages = [ "quote", "unicode-xid", "log", + "rand" ] # Files that are ignored for all tidy and lint checks. files = [ diff --git a/support/rust-task_info/Cargo.toml b/support/rust-task_info/Cargo.toml index b65a569a21a..ea6852ffb3e 100644 --- a/support/rust-task_info/Cargo.toml +++ b/support/rust-task_info/Cargo.toml @@ -8,4 +8,4 @@ license = "MPL-2.0" build = "build.rs" [build-dependencies] -gcc = "0.3.4" +cc = "1.0" diff --git a/support/rust-task_info/build.rs b/support/rust-task_info/build.rs index b7461713a09..e20f2723a80 100644 --- a/support/rust-task_info/build.rs +++ b/support/rust-task_info/build.rs @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -extern crate gcc; +extern crate cc; fn main() { - let mut cfg = gcc::Config::new(); - cfg.file("src/task_info.c"); - cfg.compile("libtask_info.a"); + cc::Build::new() + .file("src/task_info.c") + .compile("libtask_info.a"); } diff --git a/support/windows/Servo.wxs.mako b/support/windows/Servo.wxs.mako index a2a62ccb581..69cd69a4a1b 100644 --- a/support/windows/Servo.wxs.mako +++ b/support/windows/Servo.wxs.mako @@ -36,8 +36,7 @@ Directory="ProgramMenuDir" Name="Servo Tech Demo" WorkingDirectory="INSTALLDIR" - Icon="Servo.ico" - IconIndex="0" + Icon="servo.exe" Advertise="yes"/> </File> ${include_dependencies()} @@ -70,7 +69,7 @@ <ComponentRef Id="ProgramMenuDir"/> </Feature> - <Icon Id="Servo.ico" SourceFile="${windowize(resources_path)}\Servo.ico"/> + <Icon Id="servo.exe" SourceFile="${windowize(exe_path)}\servo.exe"/> </Product> </Wix> <%! diff --git a/tests/html/pair_iterable_perf.html b/tests/html/pair_iterable_perf.html new file mode 100644 index 00000000000..f4fefc6ba68 --- /dev/null +++ b/tests/html/pair_iterable_perf.html @@ -0,0 +1,44 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Value and pair iterable bindings</title> +<script> + // Requires passing --pref=dom.testbinding.enabled to Servo binary + function collect(iter) { + var collection = []; + for (element of iter) { + collection.push(element); + } + return collection; + } + + function measure_time(func) { + var start = performance.now(); + func(); + var stop = performance.now(); + + return (stop - start) / 1000.0; + }; + + const ENTRY_COUNT = 10000; + const RUN_COUNT = 10; + + var benchMe = function() { + var t = new TestBindingPairIterable(); + + for (var i = 0; i < ENTRY_COUNT; i++) { + t.add(i.toString(), i); + } + + var result = collect(t.entries()); + }; + + var avg = 0; + for (var i = 0; i < RUN_COUNT; i++) { + var time = measure_time(benchMe); + avg += time; + } + avg /= RUN_COUNT; + + console.log('Average running time across ' + RUN_COUNT + ' runs: ' + avg); + +</script> diff --git a/tests/unit/metrics/Cargo.toml b/tests/unit/metrics/Cargo.toml index f6ed97887a2..7ab518b8bea 100644 --- a/tests/unit/metrics/Cargo.toml +++ b/tests/unit/metrics/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] gfx = {path = "../../../components/gfx"} gfx_traits = {path = "../../../components/gfx_traits"} -ipc-channel = "0.9" +ipc-channel = "0.10" metrics = {path = "../../../components/metrics"} msg = {path = "../../../components/msg"} net_traits = {path = "../../../components/net_traits"} diff --git a/tests/unit/profile/Cargo.toml b/tests/unit/profile/Cargo.toml index 026593d80fa..d3feb410884 100644 --- a/tests/unit/profile/Cargo.toml +++ b/tests/unit/profile/Cargo.toml @@ -10,9 +10,11 @@ path = "lib.rs" doctest = false [dependencies] -ipc-channel = "0.9" +ipc-channel = "0.10" profile = {path = "../../../components/profile"} profile_traits = {path = "../../../components/profile_traits"} # Work around https://github.com/alexcrichton/jemallocator/issues/19 servo_allocator = {path = "../../../components/allocator"} +servo_config = {path = "../../../components/config"} + diff --git a/tests/unit/profile/lib.rs b/tests/unit/profile/lib.rs index 2b97cd68cb3..a67e211ad7b 100644 --- a/tests/unit/profile/lib.rs +++ b/tests/unit/profile/lib.rs @@ -8,5 +8,6 @@ extern crate ipc_channel; extern crate profile; extern crate profile_traits; extern crate servo_allocator; +extern crate servo_config; mod time; diff --git a/tests/unit/profile/time.rs b/tests/unit/profile/time.rs index 911f1cf95c0..19d3a19ee5d 100644 --- a/tests/unit/profile/time.rs +++ b/tests/unit/profile/time.rs @@ -4,7 +4,11 @@ use ipc_channel::ipc; use profile::time; -use profile_traits::time::ProfilerMsg; +use profile_traits::ipc as ProfiledIpc; +use profile_traits::time::{ProfilerCategory, ProfilerData, ProfilerMsg}; +use servo_config::opts::OutputOptions; +use std::thread; +use std::time::Duration; #[test] fn time_profiler_smoke_test() { @@ -37,6 +41,29 @@ fn time_profiler_stats_test() { assert_eq!(13.2599, odd_max); } +#[test] +fn channel_profiler_test() { + let chan = time::Profiler::create(&Some(OutputOptions::Stdout(5.0)), None); + let (profiled_sender, profiled_receiver) = ProfiledIpc::channel(chan.clone()).unwrap(); + thread::spawn(move || { + thread::sleep(Duration::from_secs(2)); + profiled_sender.send(43).unwrap(); + }); + + let val_profile_receiver = profiled_receiver.recv().unwrap(); + assert_eq!(val_profile_receiver, 43); + + let (sender, receiver) = ipc::channel().unwrap(); + chan.send(ProfilerMsg::Get((ProfilerCategory::IpcReceiver, None), sender.clone())); + + match receiver.recv().unwrap() { + // asserts that the time spent in the sleeping thread is more than 1500 milliseconds + ProfilerData::Record(time_data) => assert!(time_data[0] > 1.5e3), + ProfilerData::NoRecords => assert!(false), + }; + +} + #[cfg(debug_assertions)] #[test] #[should_panic] diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index 8b5d5cca98d..23778c73f93 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -15,7 +15,7 @@ app_units = "0.6" cssparser = "0.23.0" euclid = "0.17" html5ever = "0.22" -parking_lot = "0.4" +parking_lot = "0.5" rayon = "1" serde_json = "1.0" selectors = {path = "../../../components/selectors"} diff --git a/tests/wpt/include.ini b/tests/wpt/include.ini index 9daccd9d3f0..9f50400d217 100644 --- a/tests/wpt/include.ini +++ b/tests/wpt/include.ini @@ -71,6 +71,8 @@ skip: true skip: false [fullscreen] skip: false +[gamepad] + skip: false [hr-time] skip: false [html] @@ -103,6 +105,8 @@ skip: true skip: false [webgl] skip: false +[webvr] + skip: false [WebIDL] skip: false [websockets] diff --git a/tests/wpt/manifestupdate.py b/tests/wpt/manifestupdate.py new file mode 100644 index 00000000000..f2e5887b78c --- /dev/null +++ b/tests/wpt/manifestupdate.py @@ -0,0 +1,157 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +import argparse +import imp +import os +import sys +from collections import defaultdict + +from mozlog.structured import commandline +from wptrunner.wptcommandline import get_test_paths, set_from_config + +manifest = None + + +def do_delayed_imports(wpt_dir): + global manifest + sys.path.insert(0, os.path.join(wpt_dir, "tools", "manifest")) + import manifest # noqa + + +def create_parser(): + p = argparse.ArgumentParser() + p.add_argument("--check-clean", action="store_true", + help="Check that updating the manifest doesn't lead to any changes") + p.add_argument("--rebuild", action="store_true", + help="Rebuild the manifest from scratch") + commandline.add_logging_group(p) + + return p + + +def update(logger, wpt_dir, check_clean=True, rebuild=False): + localpaths = imp.load_source("localpaths", # noqa + os.path.join(wpt_dir, "web-platform-tests", "tools", "localpaths.py")) + kwargs = {"config": os.path.join(wpt_dir, "config.ini"), + "manifest_path": os.path.join(wpt_dir, "metadata"), + "tests_root": None, + "metadata_root": None} + + set_from_config(kwargs) + config = kwargs["config"] + test_paths = get_test_paths(config) + + do_delayed_imports(wpt_dir) + + if check_clean: + return _check_clean(logger, test_paths) + + return _update(logger, test_paths, rebuild) + + +def _update(logger, test_paths, rebuild): + for url_base, paths in test_paths.iteritems(): + manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json") + if rebuild: + m = manifest.manifest.Manifest(url_base) + else: + m = manifest.manifest.load(paths["tests_path"], manifest_path) + manifest.update.update(paths["tests_path"], m, working_copy=True) + manifest.manifest.write(m, manifest_path) + return 0 + + +def _check_clean(logger, test_paths): + manifests_by_path = {} + rv = 0 + for url_base, paths in test_paths.iteritems(): + tests_path = paths["tests_path"] + manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json") + old_manifest = manifest.manifest.load(tests_path, manifest_path) + new_manifest = manifest.manifest.Manifest.from_json(tests_path, + old_manifest.to_json()) + manifest.update.update(tests_path, new_manifest, working_copy=True) + manifests_by_path[manifest_path] = (old_manifest, new_manifest) + + for manifest_path, (old_manifest, new_manifest) in manifests_by_path.iteritems(): + if not diff_manifests(logger, manifest_path, old_manifest, new_manifest): + rv = 1 + if rv: + logger.error("Manifest %s is outdated, use |./mach update-manifest| to fix." % manifest_path) + + return rv + + +def diff_manifests(logger, manifest_path, old_manifest, new_manifest): + """Lint the differences between old and new versions of a + manifest. Differences are considered significant (and so produce + lint errors) if they produce a meaningful difference in the actual + tests run. + + :param logger: mozlog logger to use for output + :param manifest_path: Path to the manifest being linted + :param old_manifest: Manifest object representing the initial manifest + :param new_manifest: Manifest object representing the updated manifest + """ + logger.info("Diffing old and new manifests %s" % manifest_path) + old_items, new_items = defaultdict(set), defaultdict(set) + for manifest, items in [(old_manifest, old_items), + (new_manifest, new_items)]: + for test_type, path, tests in manifest: + for test in tests: + test_id = [test.id] + test_id.extend(tuple(item) if isinstance(item, list) else item + for item in test.meta_key()) + if hasattr(test, "references"): + test_id.extend(tuple(item) for item in test.references) + test_id = tuple(test_id) + items[path].add((test_type, test_id)) + + old_paths = set(old_items.iterkeys()) + new_paths = set(new_items.iterkeys()) + + added_paths = new_paths - old_paths + deleted_paths = old_paths - new_paths + + common_paths = new_paths & old_paths + + clean = True + + for path in added_paths: + clean = False + log_error(logger, manifest_path, "%s in source but not in manifest." % path) + for path in deleted_paths: + clean = False + log_error(logger, manifest_path, "%s in manifest but removed from source." % path) + + for path in common_paths: + old_tests = old_items[path] + new_tests = new_items[path] + added_tests = new_tests - old_tests + removed_tests = old_tests - new_tests + if added_tests or removed_tests: + clean = False + log_error(logger, manifest_path, "%s changed test types or metadata" % path) + + if clean: + # Manifest currently has some list vs tuple inconsistencies that break + # a simple equality comparison. + new_paths = {(key, value[0], value[1]) + for (key, value) in new_manifest.to_json()["paths"].iteritems()} + old_paths = {(key, value[0], value[1]) + for (key, value) in old_manifest.to_json()["paths"].iteritems()} + if old_paths != new_paths: + logger.warning("Manifest %s contains correct tests but file hashes changed." % manifest_path) # noqa + clean = False + + return clean + + +def log_error(logger, manifest_path, msg): + logger.lint_error(path=manifest_path, + message=msg, + lineno=0, + source="", + linter="wpt-manifest") diff --git a/tests/wpt/metadata/FileAPI/blob/Blob-constructor.html.ini b/tests/wpt/metadata/FileAPI/blob/Blob-constructor.html.ini index 193d306bf54..6d64e867664 100644 --- a/tests/wpt/metadata/FileAPI/blob/Blob-constructor.html.ini +++ b/tests/wpt/metadata/FileAPI/blob/Blob-constructor.html.ini @@ -4,34 +4,10 @@ expected: FAIL bug: https://github.com/servo/rust-mozjs/issues/269 - [ArrayBuffer elements of the blobParts array should be supported.] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Passing typed arrays as elements of the blobParts array should work.] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Passing a Float64Array as element of the blobParts array should work.] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - [Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).] expected: FAIL bug: https://github.com/servo/servo/issues/7457 - [Array with two buffers] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Array with two bufferviews] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Array with mixed types] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - [options properties should be accessed in lexicographic order.] expected: FAIL diff --git a/tests/wpt/metadata/FileAPI/blob/Blob-slice.html.ini b/tests/wpt/metadata/FileAPI/blob/Blob-slice.html.ini deleted file mode 100644 index 25aa6248cf4..00000000000 --- a/tests/wpt/metadata/FileAPI/blob/Blob-slice.html.ini +++ /dev/null @@ -1,62 +0,0 @@ -[Blob-slice.html] - type: testharness - [Slicing test: slice (5,0).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (5,1).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (5,2).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (5,3).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (6,0).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (6,1).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (6,2).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (7,0).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (7,1).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (7,2).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (7,3).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (8,0).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (8,1).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (8,2).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Slicing test: slice (8,3).] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - diff --git a/tests/wpt/metadata/FileAPI/file/File-constructor.html.ini b/tests/wpt/metadata/FileAPI/file/File-constructor.html.ini index a812f00415f..36c9cb7ef39 100644 --- a/tests/wpt/metadata/FileAPI/file/File-constructor.html.ini +++ b/tests/wpt/metadata/FileAPI/file/File-constructor.html.ini @@ -1,17 +1,5 @@ [File-constructor.html] type: testharness - [ArrayBuffer fileBits] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Typed array fileBits] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Various fileBits] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - [HTMLDocument in fileBits] expected: FAIL diff --git a/tests/wpt/metadata/FileAPI/reading-data-section/Determining-Encoding.html.ini b/tests/wpt/metadata/FileAPI/reading-data-section/Determining-Encoding.html.ini deleted file mode 100644 index 1b62c9bc1e0..00000000000 --- a/tests/wpt/metadata/FileAPI/reading-data-section/Determining-Encoding.html.ini +++ /dev/null @@ -1,26 +0,0 @@ -[Determining-Encoding.html] - type: testharness - [Blob Determing Encoding with encoding argument] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Blob Determing Encoding with type attribute] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Blob Determing Encoding with UTF-8 BOM] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Blob Determing Encoding without anything implying charset.] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Blob Determing Encoding with UTF-16BE BOM] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - - [Blob Determing Encoding with UTF-16LE BOM] - expected: FAIL - bug: https://github.com/servo/servo/issues/10911 - diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 2bac0b7768c..2c1ba620819 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -10429,12 +10429,6 @@ {} ] ], - "css/css-text/word-break/word-break-normal-002.xht": [ - [ - "/css/css-text/word-break/word-break-normal-002.xht", - {} - ] - ], "css/css-transitions/transition-delay-000.html": [ [ "/css/css-transitions/transition-delay-000.html", @@ -14869,6 +14863,24 @@ {} ] ], + "payment-request/payment-request-abort-method-manual.https.html": [ + [ + "/payment-request/payment-request-abort-method-manual.https.html", + {} + ] + ], + "payment-request/payment-request-canmakepayment-method-manual.https.html": [ + [ + "/payment-request/payment-request-canmakepayment-method-manual.https.html", + {} + ] + ], + "payment-request/payment-request-show-method-manual.https.html": [ + [ + "/payment-request/payment-request-show-method-manual.https.html", + {} + ] + ], "payment-request/payment-response/complete-method-manual.https.html": [ [ "/payment-request/payment-response/complete-method-manual.https.html", @@ -14935,6 +14947,12 @@ {} ] ], + "payment-request/show-method-postmessage-manual.https.html": [ + [ + "/payment-request/show-method-postmessage-manual.https.html", + {} + ] + ], "payment-request/updateWith-method-pmi-handling-manual.https.html": [ [ "/payment-request/updateWith-method-pmi-handling-manual.https.html", @@ -47231,6 +47249,66 @@ {} ] ], + "css/CSS2/floats-clear/clear-on-child-with-margins.html": [ + [ + "/css/CSS2/floats-clear/clear-on-child-with-margins.html", + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "css/CSS2/floats-clear/clear-on-parent-and-child.html": [ + [ + "/css/CSS2/floats-clear/clear-on-parent-and-child.html", + [ + [ + "/css/reference/ref-filled-green-200px-square.html", + "==" + ] + ], + {} + ] + ], + "css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html": [ + [ + "/css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html", + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "css/CSS2/floats-clear/clear-on-parent-with-margins.html": [ + [ + "/css/CSS2/floats-clear/clear-on-parent-with-margins.html", + [ + [ + "/css/reference/ref-filled-green-200px-square.html", + "==" + ] + ], + {} + ] + ], + "css/CSS2/floats-clear/clear-on-parent.html": [ + [ + "/css/CSS2/floats-clear/clear-on-parent.html", + [ + [ + "/css/reference/ref-filled-green-200px-square.html", + "==" + ] + ], + {} + ] + ], "css/CSS2/floats-clear/clearance-006.xht": [ [ "/css/CSS2/floats-clear/clearance-006.xht", @@ -54231,6 +54309,18 @@ {} ] ], + "css/CSS2/linebox/fractional-line-height.html": [ + [ + "/css/CSS2/linebox/fractional-line-height.html", + [ + [ + "/css/reference/nothing.html", + "==" + ] + ], + {} + ] + ], "css/CSS2/linebox/inline-box-001.xht": [ [ "/css/CSS2/linebox/inline-box-001.xht", @@ -115727,6 +115817,30 @@ {} ] ], + "css/css-grid/alignment/grid-gutters-011.html": [ + [ + "/css/css-grid/alignment/grid-gutters-011.html", + [ + [ + "/css/css-grid/reference/grid-different-gutters-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-grid/alignment/grid-gutters-012.html": [ + [ + "/css/css-grid/alignment/grid-gutters-012.html", + [ + [ + "/css/css-grid/reference/grid-different-gutters-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-001.html": [ [ "/css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-001.html", @@ -119639,6 +119753,18 @@ {} ] ], + "css/css-multicol/float-and-block.html": [ + [ + "/css/css-multicol/float-and-block.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-multicol/multicol-basic-001.html": [ [ "/css/css-multicol/multicol-basic-001.html", @@ -125487,6 +125613,90 @@ {} ] ], + "css/css-scoping/shadow-disabled-sheet-001.html": [ + [ + "/css/css-scoping/shadow-disabled-sheet-001.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-fallback-dynamic-001.html": [ + [ + "/css/css-scoping/shadow-fallback-dynamic-001.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-fallback-dynamic-002.html": [ + [ + "/css/css-scoping/shadow-fallback-dynamic-002.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-fallback-dynamic-003.html": [ + [ + "/css/css-scoping/shadow-fallback-dynamic-003.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-fallback-dynamic-004.html": [ + [ + "/css/css-scoping/shadow-fallback-dynamic-004.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-fallback-dynamic-005.html": [ + [ + "/css/css-scoping/shadow-fallback-dynamic-005.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], + "css/css-scoping/shadow-root-insert-into-document.html": [ + [ + "/css/css-scoping/shadow-root-insert-into-document.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], "css/css-scoping/slotted-with-pseudo-element.html": [ [ "/css/css-scoping/slotted-with-pseudo-element.html", @@ -125499,6 +125709,18 @@ {} ] ], + "css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html": [ + [ + "/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html", + [ + [ + "/css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-shapes/shape-outside/shape-box/shape-outside-box-002.html": [ [ "/css/css-shapes/shape-outside/shape-box/shape-outside-box-002.html", @@ -130515,18 +130737,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-013.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-013.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-014.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-014.html", @@ -130935,18 +131145,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-048.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-048.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-049.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-049.html", @@ -131367,18 +131565,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-118.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-118.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-119.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-119.html", @@ -131799,18 +131985,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-154.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-154.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-155.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-155.html", @@ -132207,18 +132381,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-216.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-216.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-217.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-217.html", @@ -132303,18 +132465,6 @@ {} ] ], - "css/css-text/i18n/css3-text-line-break-opclns-224.html": [ - [ - "/css/css-text/i18n/css3-text-line-break-opclns-224.html", - [ - [ - "/css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html", - "==" - ] - ], - {} - ] - ], "css/css-text/i18n/css3-text-line-break-opclns-225.html": [ [ "/css/css-text/i18n/css3-text-line-break-opclns-225.html", @@ -132447,18 +132597,6 @@ {} ] ], - "css/css-text/line-break/line-break-normal-025.xht": [ - [ - "/css/css-text/line-break/line-break-normal-025.xht", - [ - [ - "/css/css-text/line-break/reference/line-break-normal-025-ref.xht", - "==" - ] - ], - {} - ] - ], "css/css-text/line-break/line-break-strict-011.xht": [ [ "/css/css-text/line-break/line-break-strict-011.xht", @@ -132567,30 +132705,6 @@ {} ] ], - "css/css-text/line-break/line-break-strict-018a.xht": [ - [ - "/css/css-text/line-break/line-break-strict-018a.xht", - [ - [ - "/css/css-text/line-break/reference/line-break-strict-018a-ref.xht", - "==" - ] - ], - {} - ] - ], - "css/css-text/line-break/line-break-strict-018b.xht": [ - [ - "/css/css-text/line-break/line-break-strict-018b.xht", - [ - [ - "/css/css-text/line-break/reference/line-break-strict-018b-ref.xht", - "==" - ] - ], - {} - ] - ], "css/css-text/line-breaking/line-breaking-001.html": [ [ "/css/css-text/line-breaking/line-breaking-001.html", @@ -132723,6 +132837,18 @@ {} ] ], + "css/css-text/line-breaking/line-breaking-012.html": [ + [ + "/css/css-text/line-breaking/line-breaking-012.html", + [ + [ + "/css/css-text/line-breaking/reference/line-breaking-012-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-text/line-breaking/line-breaking-ic-001.html": [ [ "/css/css-text/line-breaking/line-breaking-ic-001.html", @@ -159079,6 +159205,102 @@ {} ] ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html": [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html", + [ + [ + "/css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-writing-modes/svg-aliasing-001.html": [ [ "/css/css-writing-modes/svg-aliasing-001.html", @@ -180999,6 +181221,18 @@ {} ] ], + "svg/extensibility/foreignObject/stacking-context.html": [ + [ + "/svg/extensibility/foreignObject/stacking-context.html", + [ + [ + "/svg/extensibility/foreignObject/stacking-context-expected.html", + "==" + ] + ], + {} + ] + ], "svg/foreignobject/position-svg-root-in-foreign-object.html": [ [ "/svg/foreignobject/position-svg-root-in-foreign-object.html", @@ -190256,6 +190490,21 @@ {} ] ], + "client-hints/accept_ch.http.html.headers": [ + [ + {} + ] + ], + "client-hints/accept_ch.sub.https.html.headers": [ + [ + {} + ] + ], + "client-hints/echo_client_hints_received.py": [ + [ + {} + ] + ], "clipboard-apis/OWNERS": [ [ {} @@ -199616,11 +199865,6 @@ {} ] ], - "conformance-checkers/html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/a/href/scheme-trailing-cr-novalid.html": [ [ {} @@ -199996,11 +200240,6 @@ {} ] ], - "conformance-checkers/html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/area/href/scheme-trailing-cr-novalid.html": [ [ {} @@ -200361,11 +200600,6 @@ {} ] ], - "conformance-checkers/html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/audio/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -201021,11 +201255,6 @@ {} ] ], - "conformance-checkers/html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/base/href/scheme-javascript-single-slash-isvalid.html": [ [ {} @@ -201491,11 +201720,6 @@ {} ] ], - "conformance-checkers/html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/blockquote/cite/scheme-trailing-cr-novalid.html": [ [ {} @@ -201851,11 +202075,6 @@ {} ] ], - "conformance-checkers/html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/button/formaction/scheme-trailing-cr-novalid.html": [ [ {} @@ -202221,11 +202440,6 @@ {} ] ], - "conformance-checkers/html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/del/cite/scheme-trailing-cr-novalid.html": [ [ {} @@ -203236,11 +203450,6 @@ {} ] ], - "conformance-checkers/html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/embed/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -203596,11 +203805,6 @@ {} ] ], - "conformance-checkers/html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/form/action/scheme-trailing-cr-novalid.html": [ [ {} @@ -204036,11 +204240,6 @@ {} ] ], - "conformance-checkers/html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/iframe/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -204386,11 +204585,6 @@ {} ] ], - "conformance-checkers/html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/img/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -204761,11 +204955,6 @@ {} ] ], - "conformance-checkers/html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/input/type-image-formaction/scheme-trailing-cr-novalid.html": [ [ {} @@ -205101,11 +205290,6 @@ {} ] ], - "conformance-checkers/html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/input/type-image-src/scheme-trailing-cr-novalid.html": [ [ {} @@ -205441,11 +205625,6 @@ {} ] ], - "conformance-checkers/html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/input/type-submit-formaction/scheme-trailing-cr-novalid.html": [ [ {} @@ -205821,11 +206000,6 @@ {} ] ], - "conformance-checkers/html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/input/type-url-value/scheme-schemeless-relative-novalid.html": [ [ {} @@ -206161,11 +206335,6 @@ {} ] ], - "conformance-checkers/html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/ins/cite/scheme-trailing-cr-novalid.html": [ [ {} @@ -207051,11 +207220,6 @@ {} ] ], - "conformance-checkers/html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/link/href/scheme-trailing-cr-novalid.html": [ [ {} @@ -207431,11 +207595,6 @@ {} ] ], - "conformance-checkers/html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/object/data/scheme-trailing-cr-novalid.html": [ [ {} @@ -208826,11 +208985,6 @@ {} ] ], - "conformance-checkers/html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/q/cite/scheme-trailing-cr-novalid.html": [ [ {} @@ -209206,11 +209360,6 @@ {} ] ], - "conformance-checkers/html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/script/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -209571,11 +209720,6 @@ {} ] ], - "conformance-checkers/html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/source/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -210046,11 +210190,6 @@ {} ] ], - "conformance-checkers/html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/track/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -210421,11 +210560,6 @@ {} ] ], - "conformance-checkers/html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/video/poster/scheme-trailing-cr-novalid.html": [ [ {} @@ -210751,11 +210885,6 @@ {} ] ], - "conformance-checkers/html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/video/src/scheme-trailing-cr-novalid.html": [ [ {} @@ -211351,11 +211480,6 @@ {} ] ], - "conformance-checkers/html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/microdata/itemid/scheme-trailing-cr-novalid.html": [ [ {} @@ -211716,11 +211840,6 @@ {} ] ], - "conformance-checkers/html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/microdata/itemtype/scheme-schemeless-relative-novalid.html": [ [ {} @@ -213646,6 +213765,311 @@ {} ] ], + "cookies/http-state/resources/cookie-http-state-template.js": [ + [ + {} + ] + ], + "cookies/http-state/resources/cookie-setter.py": [ + [ + {} + ] + ], + "cookies/http-state/resources/debugging-single-test.html.py-str": [ + [ + {} + ] + ], + "cookies/http-state/resources/iframe-content-pushing.js": [ + [ + {} + ] + ], + "cookies/http-state/resources/iframe-expectation-doc.html.py-str": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0001-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0001-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0002-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0002-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0003-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0003-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0004-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0004-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0005-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0005-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0006-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0006-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0007-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0007-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0008-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0008-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0009-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0009-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0010-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0010-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0011-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0011-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0012-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0012-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0013-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0013-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0014-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0014-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0015-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0015-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0016-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0016-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0017-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0017-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0018-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0018-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0019-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0019-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0020-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0020-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0021-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0021-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0022-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0022-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0023-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0023-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0024-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0024-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0025-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0025-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0026-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0026-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0027-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0027-test": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0028-expected": [ + [ + {} + ] + ], + "cookies/http-state/resources/test-files/0028-test": [ + [ + {} + ] + ], "cookies/resources/echo-cookie.html": [ [ {} @@ -214921,6 +215345,16 @@ {} ] ], + "css/CSS2/backgrounds/support/cat-128.png": [ + [ + {} + ] + ], + "css/CSS2/backgrounds/support/cat-830.png": [ + [ + {} + ] + ], "css/CSS2/backgrounds/support/cat.png": [ [ {} @@ -235616,6 +236050,11 @@ {} ] ], + "css/css-align/OWNERS": [ + [ + {} + ] + ], "css/css-align/content-distribution/place-content-shorthand-007-ref.html": [ [ {} @@ -247216,6 +247655,11 @@ {} ] ], + "css/css-grid/abspos/support/grid.css": [ + [ + {} + ] + ], "css/css-grid/alignment/support/100x100-green.png": [ [ {} @@ -247236,6 +247680,11 @@ {} ] ], + "css/css-grid/grid-definition/support/grid.css": [ + [ + {} + ] + ], "css/css-grid/grid-definition/support/testing-utils.js": [ [ {} @@ -247281,6 +247730,16 @@ {} ] ], + "css/css-grid/grid-items/support/grid.css": [ + [ + {} + ] + ], + "css/css-grid/grid-model/support/grid.css": [ + [ + {} + ] + ], "css/css-grid/reference/display-grid-ref.html": [ [ {} @@ -247371,11 +247830,6 @@ {} ] ], - "css/css-grid/support/grid.css": [ - [ - {} - ] - ], "css/css-grid/test-plan/index.html": [ [ {} @@ -250476,6 +250930,11 @@ {} ] ], + "css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html": [ + [ + {} + ] + ], "css/css-shapes/shape-outside/shape-box/reference/shape-outside-box-001-ref.html": [ [ {} @@ -252846,11 +253305,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-014-ref.html": [ [ {} @@ -253021,11 +253475,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-049-ref.html": [ [ {} @@ -253201,11 +253650,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-119-ref.html": [ [ {} @@ -253381,11 +253825,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-155-ref.html": [ [ {} @@ -253551,11 +253990,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-217-ref.html": [ [ {} @@ -253591,11 +254025,6 @@ {} ] ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html": [ - [ - {} - ] - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-225-ref.html": [ [ {} @@ -253751,11 +254180,6 @@ {} ] ], - "css/css-text/line-break/reference/line-break-normal-025-ref.xht": [ - [ - {} - ] - ], "css/css-text/line-break/reference/line-break-strict-011-ref.xht": [ [ {} @@ -253801,17 +254225,12 @@ {} ] ], - "css/css-text/line-break/reference/line-break-strict-018a-ref.xht": [ - [ - {} - ] - ], - "css/css-text/line-break/reference/line-break-strict-018b-ref.xht": [ + "css/css-text/line-breaking/reference/line-breaking-001-ref.html": [ [ {} ] ], - "css/css-text/line-breaking/reference/line-breaking-001-ref.html": [ + "css/css-text/line-breaking/reference/line-breaking-012-ref.html": [ [ {} ] @@ -254776,11 +255195,6 @@ {} ] ], - "css/css-text/word-break/reference/word-break-normal-002-ref.xht": [ - [ - {} - ] - ], "css/css-text/word-break/reference/word-break-normal-ar-ref-000.html": [ [ {} @@ -259891,6 +260305,36 @@ {} ] ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html": [ + [ + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html": [ + [ + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html": [ + [ + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html": [ + [ + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html": [ + [ + {} + ] + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html": [ + [ + {} + ] + ], "css/css-writing-modes/support/100x100-lime.png": [ [ {} @@ -263826,6 +264270,11 @@ {} ] ], + "css/support/blue32x32.ico": [ + [ + {} + ] + ], "css/support/c-red.css": [ [ {} @@ -264611,16 +265060,6 @@ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-32x32.png": [ - [ - {} - ] - ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-37x37.png": [ - [ - {} - ] - ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-attachment-fixed-inside-transform-1-ref.html": [ [ {} @@ -264746,62 +265185,72 @@ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/border.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/reftest.list": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reftest.list": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-32x32.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bl.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-37x37.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bo.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/border.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-br.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bl.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ct.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bo.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-le.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-br.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ri.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ct.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tl.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-le.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-to.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ri.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tr.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tl.png": [ [ {} ] ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-to.png": [ + [ + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tr.png": [ + [ + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule.png": [ [ {} ] @@ -268561,6 +269010,11 @@ {} ] ], + "docs/assets/gh-fork-ribbon.scss": [ + [ + {} + ] + ], "docs/assets/main.scss": [ [ {} @@ -270616,6 +271070,11 @@ {} ] ], + "entries-api/README.md": [ + [ + {} + ] + ], "entries-api/support.js": [ [ {} @@ -270781,6 +271240,26 @@ {} ] ], + "feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers": [ + [ + {} + ] + ], + "feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers": [ + [ + {} + ] + ], "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html.sub.headers": [ [ {} @@ -272326,6 +272805,21 @@ {} ] ], + "generic-sensor/OWNERS": [ + [ + {} + ] + ], + "generic-sensor/generic-sensor-feature-policy-test.sub.js": [ + [ + {} + ] + ], + "generic-sensor/generic-sensor-tests.js": [ + [ + {} + ] + ], "geolocation-API/OWNERS": [ [ {} @@ -279436,11 +279930,6 @@ {} ] ], - "html/infrastructure/common-dom-interfaces/collections/domstringlist.idl": [ - [ - {} - ] - ], "html/infrastructure/common-dom-interfaces/domstringmap/.gitkeep": [ [ {} @@ -281601,6 +282090,11 @@ {} ] ], + "html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html": [ + [ + {} + ] + ], "html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html": [ [ {} @@ -281746,6 +282240,11 @@ {} ] ], + "html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js": [ + [ + {} + ] + ], "html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html": [ [ {} @@ -281981,6 +282480,11 @@ {} ] ], + "html/semantics/forms/form-submission-0/resources/file-submission.py": [ + [ + {} + ] + ], "html/semantics/forms/introduction-1/.gitkeep": [ [ {} @@ -284741,6 +285245,11 @@ {} ] ], + "interfaces/css-font-loading.idl": [ + [ + {} + ] + ], "interfaces/css-typed-om.idl": [ [ {} @@ -284766,6 +285275,11 @@ {} ] ], + "interfaces/encoding.idl": [ + [ + {} + ] + ], "interfaces/encrypted-media.idl": [ [ {} @@ -284776,6 +285290,11 @@ {} ] ], + "interfaces/feature-policy.idl": [ + [ + {} + ] + ], "interfaces/fullscreen.idl": [ [ {} @@ -284896,6 +285415,11 @@ {} ] ], + "interfaces/webaudio.idl": [ + [ + {} + ] + ], "interfaces/webauthn.idl": [ [ {} @@ -284916,6 +285440,11 @@ {} ] ], + "interfaces/webvtt.idl": [ + [ + {} + ] + ], "interfaces/webxr.idl": [ [ {} @@ -285766,6 +286295,46 @@ {} ] ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.headers": [ + [ + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.headers": [ + [ + {} + ] + ], "mixed-content/fetch-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ [ {} @@ -286656,6 +287225,11 @@ {} ] ], + "payment-request/show-method-postmessage-iframe.html": [ + [ + {} + ] + ], "performance-timeline/OWNERS": [ [ {} @@ -289691,11 +290265,21 @@ {} ] ], + "resource-timing/resources/empty.py": [ + [ + {} + ] + ], "resource-timing/resources/empty_script.js": [ [ {} ] ], + "resource-timing/resources/eventsource.py": [ + [ + {} + ] + ], "resource-timing/resources/fake_responses.html": [ [ {} @@ -289766,6 +290350,11 @@ {} ] ], + "resource-timing/resources/multi_redirect.py": [ + [ + {} + ] + ], "resource-timing/resources/nested.css": [ [ {} @@ -289926,21 +290515,6 @@ {} ] ], - "sensors/OWNERS": [ - [ - {} - ] - ], - "sensors/generic-sensor-feature-policy-test.sub.js": [ - [ - {} - ] - ], - "sensors/generic-sensor-tests.js": [ - [ - {} - ] - ], "server-timing/resources/blue.png": [ [ {} @@ -290856,6 +291430,11 @@ {} ] ], + "service-workers/cache-storage/script-tests/cache-abort.js": [ + [ + {} + ] + ], "service-workers/cache-storage/script-tests/cache-add.js": [ [ {} @@ -292436,11 +293015,6 @@ {} ] ], - "staticrange/OWNERS": [ - [ - {} - ] - ], "storage/OWNERS": [ [ {} @@ -293006,6 +293580,11 @@ {} ] ], + "svg/extensibility/foreignObject/stacking-context-expected.html": [ + [ + {} + ] + ], "svg/foreignobject/position-svg-root-in-foreign-object-ref.html": [ [ {} @@ -294011,6 +294590,16 @@ {} ] ], + "web-animations/resources/timing-tests.js": [ + [ + {} + ] + ], + "web-animations/resources/timing-utils.js": [ + [ + {} + ] + ], "web-animations/resources/xhr-doc.py": [ [ {} @@ -294201,6 +294790,11 @@ {} ] ], + "webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js": [ + [ + {} + ] + ], "webaudio/the-audio-api/the-audioworklet-interface/processors/one-pole-processor.js": [ [ {} @@ -302839,6 +303433,12 @@ {} ] ], + "FileAPI/FileReader/workers.html": [ + [ + "/FileAPI/FileReader/workers.html", + {} + ] + ], "FileAPI/FileReaderSync.worker.js": [ [ "/FileAPI/FileReaderSync.worker.html", @@ -304909,15 +305509,13 @@ {} ] ], - "IndexedDB/interfaces.html": [ + "IndexedDB/interfaces.any.js": [ [ - "/IndexedDB/interfaces.html", + "/IndexedDB/interfaces.any.html", {} - ] - ], - "IndexedDB/interfaces.worker.js": [ + ], [ - "/IndexedDB/interfaces.worker.html", + "/IndexedDB/interfaces.any.worker.html", {} ] ], @@ -306139,6 +306737,12 @@ {} ] ], + "apng/supported-in-source-type.html": [ + [ + "/apng/supported-in-source-type.html", + {} + ] + ], "audio-output/HTMLMediaElement-sinkId-idl.html": [ [ "/audio-output/HTMLMediaElement-sinkId-idl.html", @@ -307639,6 +308243,18 @@ {} ] ], + "client-hints/accept_ch.http.html": [ + [ + "/client-hints/accept_ch.http.html", + {} + ] + ], + "client-hints/accept_ch.sub.https.html": [ + [ + "/client-hints/accept_ch.sub.https.html", + {} + ] + ], "clipboard-apis/async-interfaces.https.html": [ [ "/clipboard-apis/async-interfaces.https.html", @@ -310061,6 +310677,30 @@ {} ] ], + "cookie-store/cookieStore_event_arguments.tenative.window.js": [ + [ + "/cookie-store/cookieStore_event_arguments.tenative.window.html", + {} + ] + ], + "cookie-store/cookieStore_event_basic.tentative.window.js": [ + [ + "/cookie-store/cookieStore_event_basic.tentative.window.html", + {} + ] + ], + "cookie-store/cookieStore_event_delete.tenative.window.js": [ + [ + "/cookie-store/cookieStore_event_delete.tenative.window.html", + {} + ] + ], + "cookie-store/cookieStore_event_overwrite.tentative.window.js": [ + [ + "/cookie-store/cookieStore_event_overwrite.tentative.window.html", + {} + ] + ], "cookie-store/cookieStore_getAll_arguments.tentative.window.js": [ [ "/cookie-store/cookieStore_getAll_arguments.tentative.window.html", @@ -310519,6 +311159,12 @@ {} ] ], + "cookies/http-state/all-tests.html": [ + [ + "/cookies/http-state/all-tests.html", + {} + ] + ], "cookies/meta-blocked.html": [ [ "/cookies/meta-blocked.html", @@ -310749,6 +311395,18 @@ {} ] ], + "css/CSS2/normal-flow/unresolvable-max-height.html": [ + [ + "/css/CSS2/normal-flow/unresolvable-max-height.html", + {} + ] + ], + "css/CSS2/normal-flow/unresolvable-min-height.html": [ + [ + "/css/CSS2/normal-flow/unresolvable-min-height.html", + {} + ] + ], "css/compositing/mix-blend-mode/mix-blend-mode-creates-stacking-context.html": [ [ "/css/compositing/mix-blend-mode/mix-blend-mode-creates-stacking-context.html", @@ -311869,6 +312527,18 @@ {} ] ], + "css/css-font-loading/idlharness.https.html": [ + [ + "/css/css-font-loading/idlharness.https.html", + {} + ] + ], + "css/css-fonts/calc-in-font-variation-settings.html": [ + [ + "/css/css-fonts/calc-in-font-variation-settings.html", + {} + ] + ], "css/css-fonts/font-display/font-display-failure-fallback.html": [ [ "/css/css-fonts/font-display/font-display-failure-fallback.html", @@ -313057,6 +313727,54 @@ {} ] ], + "css/css-grid/grid-items/grid-items-minimum-width-001.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-001.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-002.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-002.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html", + {} + ] + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html": [ + [ + "/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html", + {} + ] + ], "css/css-grid/grid-items/grid-minimum-size-grid-items-021.html": [ [ "/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html", @@ -313357,6 +314075,54 @@ {} ] ], + "css/css-properties-values-api/register-property-syntax-parsing.html": [ + [ + "/css/css-properties-values-api/register-property-syntax-parsing.html", + {} + ] + ], + "css/css-properties-values-api/register-property.html": [ + [ + "/css/css-properties-values-api/register-property.html", + {} + ] + ], + "css/css-properties-values-api/registered-properties-inheritance.html": [ + [ + "/css/css-properties-values-api/registered-properties-inheritance.html", + {} + ] + ], + "css/css-properties-values-api/registered-property-computation.html": [ + [ + "/css/css-properties-values-api/registered-property-computation.html", + {} + ] + ], + "css/css-properties-values-api/registered-property-cssom.html": [ + [ + "/css/css-properties-values-api/registered-property-cssom.html", + {} + ] + ], + "css/css-properties-values-api/registered-property-initial.html": [ + [ + "/css/css-properties-values-api/registered-property-initial.html", + {} + ] + ], + "css/css-properties-values-api/var-reference-registered-properties-cycles.html": [ + [ + "/css/css-properties-values-api/var-reference-registered-properties-cycles.html", + {} + ] + ], + "css/css-properties-values-api/var-reference-registered-properties.html": [ + [ + "/css/css-properties-values-api/var-reference-registered-properties.html", + {} + ] + ], "css/css-pseudo/first-letter-property-whitelist.html": [ [ "/css/css-pseudo/first-letter-property-whitelist.html", @@ -313543,12 +314309,30 @@ {} ] ], + "css/css-scroll-snap/scroll-snap-type-proximity.html": [ + [ + "/css/css-scroll-snap/scroll-snap-type-proximity.html", + {} + ] + ], "css/css-scroll-snap/scrollTo-scrollBy-snaps.html": [ [ "/css/css-scroll-snap/scrollTo-scrollBy-snaps.html", {} ] ], + "css/css-scroll-snap/snap-inline-block.html": [ + [ + "/css/css-scroll-snap/snap-inline-block.html", + {} + ] + ], + "css/css-scroll-snap/snap-to-visible-areas.html": [ + [ + "/css/css-scroll-snap/snap-to-visible-areas.html", + {} + ] + ], "css/css-shapes/basic-shape-circle-ellipse-serialization.html": [ [ "/css/css-shapes/basic-shape-circle-ellipse-serialization.html", @@ -314617,6 +315401,12 @@ {} ] ], + "css/css-tables/width-distribution/td-with-subpixel-padding.html": [ + [ + "/css/css-tables/width-distribution/td-with-subpixel-padding.html", + {} + ] + ], "css/css-text-decor/text-decoration-serialization.tentative.html": [ [ "/css/css-text-decor/text-decoration-serialization.tentative.html", @@ -315943,6 +316733,12 @@ {} ] ], + "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html", + {} + ] + ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html", @@ -316033,6 +316829,24 @@ {} ] ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html", + {} + ] + ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html", + {} + ] + ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html", + {} + ] + ], "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html", @@ -316045,6 +316859,12 @@ {} ] ], + "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html", + {} + ] + ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html", @@ -316087,9 +316907,15 @@ {} ] ], - "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [ + "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html": [ + [ + "/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html", + {} + ] + ], + "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html": [ [ - "/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html", + "/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html", {} ] ], @@ -316423,6 +317249,18 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/break.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/break.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/caption-side.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/caption-side.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/caret-color.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/caret-color.html", @@ -316465,12 +317303,60 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/flex-basis.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-basis.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-direction.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-direction.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-flow.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-flow.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-grow.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-grow.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/flex.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/flex.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/float.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/float.html", {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/font-size.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/font-size.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/font-style.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/font-style.html", @@ -316489,6 +317375,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/isolation.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/isolation.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/left.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/left.html", @@ -316525,12 +317417,60 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/object-fit.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/object-fit.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/object-position.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/object-position.html", {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-distance.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset-distance.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-path.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset-path.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-position.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset-position.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/offset.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/offset.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/opacity.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/opacity.html", @@ -316567,6 +317507,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/pointer-events.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/position.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/position.html", @@ -316585,12 +317531,30 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html", + {} + ] + ], + "css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/shape-outside.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/shape-outside.html", {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/table-layout.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/table-layout.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/text-align.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/text-align.html", @@ -316615,6 +317579,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/text-orientation.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/text-orientation.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/text-transform.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/text-transform.html", @@ -316645,6 +317615,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/vertical-align.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/vertical-align.html", @@ -316669,6 +317645,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/writing-mode.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/writing-mode.html", + {} + ] + ], "css/css-ui/box-sizing-027.html": [ [ "/css/css-ui/box-sizing-027.html", @@ -317413,6 +318395,12 @@ {} ] ], + "css/cssom-view/GetBoundingRect.html": [ + [ + "/css/cssom-view/GetBoundingRect.html", + {} + ] + ], "css/cssom-view/HTMLBody-ScrollArea_quirksmode.html": [ [ "/css/cssom-view/HTMLBody-ScrollArea_quirksmode.html", @@ -317773,12 +318761,6 @@ {} ] ], - "css/cssom/GetBoundingRect.html": [ - [ - "/css/cssom/GetBoundingRect.html", - {} - ] - ], "css/cssom/MediaList.html": [ [ "/css/cssom/MediaList.html", @@ -317803,6 +318785,24 @@ {} ] ], + "css/cssom/computed-style-002.html": [ + [ + "/css/cssom/computed-style-002.html", + {} + ] + ], + "css/cssom/computed-style-003.html": [ + [ + "/css/cssom/computed-style-003.html", + {} + ] + ], + "css/cssom/computed-style-004.html": [ + [ + "/css/cssom/computed-style-004.html", + {} + ] + ], "css/cssom/css-style-attr-decl-block.html": [ [ "/css/cssom/css-style-attr-decl-block.html", @@ -317893,6 +318893,12 @@ {} ] ], + "css/cssom/getComputedStyle-dynamic-subdoc.html": [ + [ + "/css/cssom/getComputedStyle-dynamic-subdoc.html", + {} + ] + ], "css/cssom/getComputedStyle-pseudo.html": [ [ "/css/cssom/getComputedStyle-pseudo.html", @@ -321077,6 +322083,12 @@ {} ] ], + "domxpath/document.tentative.html": [ + [ + "/domxpath/document.tentative.html", + {} + ] + ], "domxpath/evaluator-constructor.html": [ [ "/domxpath/evaluator-constructor.html", @@ -322999,6 +324011,12 @@ {} ] ], + "eventsource/dedicated-worker/eventsource-close2.htm": [ + [ + "/eventsource/dedicated-worker/eventsource-close2.htm", + {} + ] + ], "eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm": [ [ "/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm", @@ -323411,6 +324429,30 @@ {} ] ], + "feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html": [ + [ + "/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html": [ + [ + "/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html", + {} + ] + ], + "feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html": [ + [ + "/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html", + {} + ] + ], "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html": [ [ "/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html", @@ -323453,6 +324495,16 @@ {} ] ], + "feature-policy/interfaces.any.js": [ + [ + "/feature-policy/interfaces.any.html", + {} + ], + [ + "/feature-policy/interfaces.any.worker.html", + {} + ] + ], "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [ [ "/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html", @@ -324435,6 +325487,12 @@ {} ] ], + "fetch/api/response/response-error-from-stream.html": [ + [ + "/fetch/api/response/response-error-from-stream.html", + {} + ] + ], "fetch/api/response/response-error.html": [ [ "/fetch/api/response/response-error.html", @@ -324757,6 +325815,18 @@ {} ] ], + "generic-sensor/SensorErrorEvent-constructor.https.html": [ + [ + "/generic-sensor/SensorErrorEvent-constructor.https.html", + {} + ] + ], + "generic-sensor/idlharness.https.html": [ + [ + "/generic-sensor/idlharness.https.html", + {} + ] + ], "geolocation-API/PositionOptions.https.html": [ [ "/geolocation-API/PositionOptions.https.html", @@ -324853,6 +325923,12 @@ {} ] ], + "geolocation-sensor/GeolocationSensor_read.https.html": [ + [ + "/geolocation-sensor/GeolocationSensor_read.https.html", + {} + ] + ], "geolocation-sensor/idlharness.https.html": [ [ "/geolocation-sensor/idlharness.https.html", @@ -327671,6 +328747,12 @@ {} ] ], + "html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js": [ + [ + "/html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.html", + {} + ] + ], "html/dom/elements/elements-in-the-dom/historical.html": [ [ "/html/dom/elements/elements-in-the-dom/historical.html", @@ -328285,6 +329367,12 @@ {} ] ], + "html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js": [ + [ + "/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.html", + {} + ] + ], "html/infrastructure/terminology/plugins/text-plain.html": [ [ "/html/infrastructure/terminology/plugins/text-plain.html", @@ -331301,6 +332389,30 @@ {} ] ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html": [ + [ + "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html", + {} + ] + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html": [ + [ + "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html", + {} + ] + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html": [ + [ + "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html", + {} + ] + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html": [ + [ + "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html", + {} + ] + ], "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html": [ [ "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html", @@ -331973,6 +333085,12 @@ } ] ], + "html/semantics/forms/form-submission-0/submit-file.sub.html": [ + [ + "/html/semantics/forms/form-submission-0/submit-file.sub.html", + {} + ] + ], "html/semantics/forms/form-submission-0/url-encoded.html": [ [ "/html/semantics/forms/form-submission-0/url-encoded.html", @@ -335271,6 +336389,12 @@ {} ] ], + "html/syntax/parsing/html-integration-point.html": [ + [ + "/html/syntax/parsing/html-integration-point.html", + {} + ] + ], "html/syntax/parsing/html5lib_adoption01.html": [ [ "/html/syntax/parsing/html5lib_adoption01.html?run_type=uri", @@ -337265,6 +338389,14 @@ {} ] ], + "infrastructure/testdriver/click.html": [ + [ + "/infrastructure/testdriver/click.html", + { + "testdriver": true + } + ] + ], "innerText/getter.html": [ [ "/innerText/getter.html", @@ -338551,6 +339683,120 @@ {} ] ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html", + {} + ] + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + [ + "/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html", + {} + ] + ], + "mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + [ + "/mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html", + {} + ] + ], + "mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + [ + "/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html", + {} + ] + ], "mixed-content/fetch-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ [ "/mixed-content/fetch-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html", @@ -341269,6 +342515,18 @@ {} ] ], + "offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html": [ + [ + "/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html", + {} + ] + ], + "offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w.html": [ + [ + "/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w.html", + {} + ] + ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html": [ [ "/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html", @@ -348313,18 +349571,6 @@ {} ] ], - "offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.html": [ - [ - "/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.html", - {} - ] - ], - "offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.w.html": [ - [ - "/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.w.html", - {} - ] - ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.getcontext.html": [ [ "/offscreen-canvas/the-offscreen-canvas/offscreencanvas.getcontext.html", @@ -349283,18 +350529,6 @@ {} ] ], - "payment-request/payment-request-abort-method.https.html": [ - [ - "/payment-request/payment-request-abort-method.https.html", - {} - ] - ], - "payment-request/payment-request-canmakepayment-method.https.html": [ - [ - "/payment-request/payment-request-canmakepayment-method.https.html", - {} - ] - ], "payment-request/payment-request-constructor-crash.https.html": [ [ "/payment-request/payment-request-constructor-crash.https.html", @@ -358067,6 +359301,12 @@ {} ] ], + "resource-timing/resource_TAO_cross_origin_redirect_chain.html": [ + [ + "/resource-timing/resource_TAO_cross_origin_redirect_chain.html", + {} + ] + ], "resource-timing/resource_TAO_match_origin.htm": [ [ "/resource-timing/resource_TAO_match_origin.htm", @@ -358145,12 +359385,6 @@ {} ] ], - "resource-timing/resource_frame_initiator_type.html": [ - [ - "/resource-timing/resource_frame_initiator_type.html", - {} - ] - ], "resource-timing/resource_ignore_data_url.html": [ [ "/resource-timing/resource_ignore_data_url.html", @@ -358229,6 +359463,12 @@ {} ] ], + "resource-timing/resource_timing_cross_origin_redirect_chain.html": [ + [ + "/resource-timing/resource_timing_cross_origin_redirect_chain.html", + {} + ] + ], "resource-timing/resource_timing_same_origin_redirect.html": [ [ "/resource-timing/resource_timing_same_origin_redirect.html", @@ -358607,18 +359847,6 @@ {} ] ], - "sensors/SensorErrorEvent-constructor.https.html": [ - [ - "/sensors/SensorErrorEvent-constructor.https.html", - {} - ] - ], - "sensors/idlharness.https.html": [ - [ - "/sensors/idlharness.https.html", - {} - ] - ], "server-timing/cross_origin.html": [ [ "/server-timing/cross_origin.html", @@ -358645,6 +359873,12 @@ } ] ], + "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/serviceworker/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ [ "/service-workers/cache-storage/serviceworker/cache-add.https.html", @@ -358723,6 +359957,12 @@ {} ] ], + "service-workers/cache-storage/window/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/window/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/window/cache-add.https.html": [ [ "/service-workers/cache-storage/window/cache-add.https.html", @@ -358803,6 +360043,12 @@ } ] ], + "service-workers/cache-storage/worker/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/worker/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/worker/cache-add.https.html": [ [ "/service-workers/cache-storage/worker/cache-add.https.html", @@ -360485,12 +361731,6 @@ {} ] ], - "staticrange/idlharness.html": [ - [ - "/staticrange/idlharness.html", - {} - ] - ], "storage/estimate-indexeddb-worker.https.html": [ [ "/storage/estimate-indexeddb-worker.https.html", @@ -361889,6 +363129,12 @@ {} ] ], + "svg/extensibility/foreignObject/containing-block.html": [ + [ + "/svg/extensibility/foreignObject/containing-block.html", + {} + ] + ], "svg/extensibility/foreignObject/properties.svg": [ [ "/svg/extensibility/foreignObject/properties.svg", @@ -363119,63 +364365,15 @@ {} ] ], - "web-animations/interfaces/AnimationEffectTiming/delay.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/delay.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/direction.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/direction.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/duration.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/duration.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/easing.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/easing.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/endDelay.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/endDelay.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/fill.html": [ + "web-animations/interfaces/AnimationEffect/getComputedTiming.html": [ [ - "/web-animations/interfaces/AnimationEffectTiming/fill.html", + "/web-animations/interfaces/AnimationEffect/getComputedTiming.html", {} ] ], - "web-animations/interfaces/AnimationEffectTiming/getComputedTiming.html": [ + "web-animations/interfaces/AnimationEffect/updateTiming.html": [ [ - "/web-animations/interfaces/AnimationEffectTiming/getComputedTiming.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/idlharness.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/idlharness.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/iterationStart.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/iterationStart.html", - {} - ] - ], - "web-animations/interfaces/AnimationEffectTiming/iterations.html": [ - [ - "/web-animations/interfaces/AnimationEffectTiming/iterations.html", + "/web-animations/interfaces/AnimationEffect/updateTiming.html", {} ] ], @@ -363461,6 +364659,12 @@ {} ] ], + "webaudio/idlharness.https.html": [ + [ + "/webaudio/idlharness.https.html", + {} + ] + ], "webaudio/the-audio-api/the-analysernode-interface/test-analyser-gain.html": [ [ "/webaudio/the-audio-api/the-analysernode-interface/test-analyser-gain.html", @@ -363605,6 +364809,12 @@ {} ] ], + "webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html": [ + [ + "/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html", + {} + ] + ], "webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html": [ [ "/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html", @@ -364289,6 +365499,12 @@ {} ] ], + "webmessaging/message-channels/worker.html": [ + [ + "/webmessaging/message-channels/worker.html", + {} + ] + ], "webmessaging/messageerror.html": [ [ "/webmessaging/messageerror.html", @@ -365287,6 +366503,12 @@ {} ] ], + "websockets/Create-on-worker-shutdown.html": [ + [ + "/websockets/Create-on-worker-shutdown.html", + {} + ] + ], "websockets/Create-protocol-with-space.htm": [ [ "/websockets/Create-protocol-with-space.htm", @@ -370507,6 +371729,12 @@ {} ] ], + "xhr/xmlhttprequest-closing-worker.html": [ + [ + "/xhr/xmlhttprequest-closing-worker.html", + {} + ] + ], "xhr/xmlhttprequest-eventtarget.htm": [ [ "/xhr/xmlhttprequest-eventtarget.htm", @@ -390071,7 +391299,7 @@ "support" ], "./.gitignore": [ - "c914a6a4aa7fc0ae0e948219c7949481d616d1c3", + "4c0250a2fdf8f32f9df4db278c03f0a8722a90d7", "support" ], "./.gitmodules": [ @@ -390083,7 +391311,7 @@ "support" ], "./.travis.yml": [ - "7e96c68c023309a8d50f572a9b2bc892b523358b", + "6aeadb7da2f5fa8d09762a07b3a874b306e1fc22", "support" ], "./CONTRIBUTING.md": [ @@ -390099,7 +391327,7 @@ "support" ], "./README.md": [ - "60e060b31a4f9f43f09c1b2a360902e4817014e1", + "23780fdf7eea63c82965c8d5d4d847c0b9752c7e", "support" ], "./check_stability.ini": [ @@ -390107,11 +391335,11 @@ "support" ], "./config.default.json": [ - "73b96319b21810d51a230d475b5d5fe4e1181a69", + "54422ca469a8d54fa4b8252803bb0e2c91459858", "support" ], "./lint.whitelist": [ - "f99ce1b3cf312caac08a8a8bb6a970ba00e28160", + "697da251dd64d990c1ec0603fd252ba6ea11ad26", "support" ], "./serve.py": [ @@ -394258,6 +395486,10 @@ "d352d5c6b5d1f2ada419d51bcfd9ecd9100bf892", "manual" ], + "FileAPI/FileReader/workers.html": [ + "b93f6c447184bc20cc59e895ae446ee95ebdb406", + "testharness" + ], "FileAPI/FileReaderSync.worker.js": [ "19741fbd0498bf9135408ceb6128221cbeb4e2f3", "testharness" @@ -394531,7 +395763,7 @@ "support" ], "IndexedDB/README.md": [ - "fb36fa93165978667176adeba74f97a90e871ff2", + "794f80755fc065930cb311d82f84bdaadceea423", "support" ], "IndexedDB/abort-in-initial-upgradeneeded.html": [ @@ -395734,12 +396966,8 @@ "251a828d333bdd3face9d20a2a28ddf0c0ffeb49", "testharness" ], - "IndexedDB/interfaces.html": [ - "348a7350d749c4ea11d383d1f3e07e54a9d0d377", - "testharness" - ], - "IndexedDB/interfaces.worker.js": [ - "a74350d69819f73cf9f75ac636f8793f018ba2fd", + "IndexedDB/interfaces.any.js": [ + "df07f5da63c34969a24fe43bc4268418ab0a5132", "testharness" ], "IndexedDB/interleaved-cursors-common.js": [ @@ -396939,7 +398167,7 @@ "support" ], "accelerometer/Accelerometer-disabled-by-feature-policy.https.html": [ - "5bce003a7ab3b5016011d35c715d7968c09a89a4", + "96e5a86bf78239f3aa4a79b32bb4308de0d5f60e", "testharness" ], "accelerometer/Accelerometer-disabled-by-feature-policy.https.html.headers": [ @@ -396947,15 +398175,15 @@ "support" ], "accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "df5fc463567201131aeee4f8f975e39135058aab", + "f20f89a31daf399a7946b928e8deca9651d38487", "testharness" ], "accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https.html": [ - "fbea6404a3a380b43b2f006cb1dddadcabeb666f", + "7ce8c39f0af6c932d1e6b6f75843c090f7274b80", "testharness" ], "accelerometer/Accelerometer-enabled-by-feature-policy.https.html": [ - "67193bd17d281423d7f6e84b0166b5a4c0409be3", + "dbda7cfa838c1f2d4296b545034d42f0064f331a", "testharness" ], "accelerometer/Accelerometer-enabled-by-feature-policy.https.html.headers": [ @@ -396963,7 +398191,7 @@ "support" ], "accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html": [ - "69ced186024bf92e077eccac49a66e8f86d81c96", + "b8fb07cdd23dce9690de719387b9d505382772f5", "testharness" ], "accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -396971,15 +398199,15 @@ "support" ], "accelerometer/Accelerometer.https.html": [ - "f70ee583dce5ed3019e900163d5d559d70d05fb2", + "3ff5f61b25c52142e9796f3903d7f2bcaa30314c", "testharness" ], "accelerometer/Accelerometer_insecure_context.html": [ - "b9837873e39416c65e8ac05f2049bfa406ba4264", + "82be1b9a5c6e75291fdc1aabe230af28e22823a8", "testharness" ], "accelerometer/Accelerometer_onerror-manual.https.html": [ - "c8b76601f465d0f5b26a9bc27dac503f02887448", + "c82f9595dc2582b2da40549a358da1c3fc2ff820", "manual" ], "accelerometer/LinearAccelerationSensor-shake-threshold-manual.https.html": [ @@ -397767,7 +398995,7 @@ "support" ], "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html": [ - "dcd19f8b1428bfc147a62299489e1d10f3e31795", + "9dcb093c8a052b8563d65fa6f0885650422dbf4c", "testharness" ], "ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html.headers": [ @@ -397775,15 +399003,15 @@ "support" ], "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "d1a42dfb235b17c9f7701c6b7ac9b32c1b1d385c", + "06862bb58d13bf4355cbe66cb7060c7a5ea4a750", "testharness" ], "ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html": [ - "7e13efd73ff674cb9870495df169a3ab10cf696c", + "acdf8d84bc3e8708af250d8825c93d130ade435f", "testharness" ], "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html": [ - "752da9e721c28c8a174cca05133f9ff3acbe1139", + "da2cc1cc0de186731e38512219cdfaf8357b9301", "testharness" ], "ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html.headers": [ @@ -397791,7 +399019,7 @@ "support" ], "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html": [ - "664ab1dc2e3c4026e0d890bab8e17544d58f4210", + "2a7a1dadbf5d9d05116128633598da781f5f0003", "testharness" ], "ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -397799,15 +399027,15 @@ "support" ], "ambient-light/AmbientLightSensor.https.html": [ - "49d9d753bee1b390803ba293458dccfb5b7613e1", + "86a1f84e2e034d58b2a7f6fc01880028b444c7cd", "testharness" ], "ambient-light/AmbientLightSensor_insecure_context.html": [ - "279a073382db5c79ddbee30ffe4478299a773dd3", + "f6d9e5bd6d1ce6705835f15498ddbb5a5b82fb88", "testharness" ], "ambient-light/AmbientLightSensor_onerror-manual.https.html": [ - "834b4f46f111a128c1c16c1c93d459b52dd4828d", + "fa52072d6da7987db8f67c2a6fd9b2e281f03042", "manual" ], "ambient-light/OWNERS": [ @@ -399826,6 +401054,10 @@ "b9ba0287c92e5dbda1dc207ab45e9c90e8618878", "reftest" ], + "apng/supported-in-source-type.html": [ + "32cf112fb1dcb4e7ec3c91bdf5bd6b976a1e4eac", + "testharness" + ], "audio-output/HTMLMediaElement-sinkId-idl.html": [ "8f37d8d2fc1cb9b5ad0d85234f733f534f4f0db8", "testharness" @@ -400059,7 +401291,7 @@ "testharness" ], "bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html": [ - "df68f7bf4028cf7d2f32bb291a008d562eac3cad", + "6ba1c71fa5c34f7b0321b5430fa79c75c907fc14", "testharness" ], "bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.html": [ @@ -400067,15 +401299,15 @@ "testharness" ], "bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html": [ - "ba4c6477eaa5978599e7c77d3227bc63fe6b5a3f", + "80c7782e7c2bba33e43d2661a3ba0d069b49e727", "testharness" ], "bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html": [ - "ae775a150cda67893dcace79396468134b5b8a60", + "fa068af0ac6d1629622f207b77ae95fe3f50b6cc", "testharness" ], "bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html": [ - "64c51958f8d520e9608e695ddf0115f460081f2f", + "82084e965ad35f176505631cb0b9007422bf3fd4", "testharness" ], "bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.html": [ @@ -400083,11 +401315,11 @@ "testharness" ], "bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html": [ - "67a1b69b198711e8c824529c2afe5513284e449f", + "ad2b25c264ae236332715ae92e30452c5b97954c", "testharness" ], "bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html": [ - "e0746e2c992231bac0ed213b3f9b17a863db0902", + "1132700853cbfd7fbc0772e44a407d72f710ffb5", "testharness" ], "bluetooth/characteristic/notifications/characteristic-is-removed.https.html": [ @@ -400095,7 +401327,7 @@ "testharness" ], "bluetooth/characteristic/notifications/service-is-removed.https.html": [ - "c38cba83787c54f68d57f4403a0ec0242c169035", + "f6a5be53c85a190dca81a9b425b63d77bc6c193f", "testharness" ], "bluetooth/characteristic/readValue/add-multiple-event-listeners.https.html": [ @@ -400111,7 +401343,7 @@ "testharness" ], "bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html": [ - "e775062bd01919af48f2c3e11ea2e90702b29064", + "1700dfa9ba6e1aa44d42630ef7ba61d4beeed330", "testharness" ], "bluetooth/characteristic/readValue/read-succeeds.https.html": [ @@ -400123,7 +401355,7 @@ "testharness" ], "bluetooth/characteristic/readValue/service-is-removed.https.html": [ - "1267b87396e49b063db2a7e5fe8611ef4f39845d", + "b79a74ccf33bc76e6582ee7c1e2f3c277f99ddfb", "testharness" ], "bluetooth/characteristic/service-same-from-2-characteristics.https.html": [ @@ -400135,7 +401367,7 @@ "testharness" ], "bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html": [ - "471854c3309862acd121c7ef8d115b037ec297dd", + "97f5d01743721207c5addfb9625fd3da7c0c61e3", "testharness" ], "bluetooth/characteristic/writeValue/characteristic-is-removed.https.html": [ @@ -400143,11 +401375,11 @@ "testharness" ], "bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html": [ - "2bad4acf374516e29cb5a259d29a97160917ec58", + "62b4bd66196c9c833631916761b41e973aa2a554", "testharness" ], "bluetooth/characteristic/writeValue/service-is-removed.https.html": [ - "570bba21ad98a428dd5575dc544962b8ae6a05d8", + "857ae985ba4d15bcc5d78671a7f21d990c8db9c5", "testharness" ], "bluetooth/characteristic/writeValue/write-succeeds.https.html": [ @@ -400155,7 +401387,7 @@ "testharness" ], "bluetooth/descriptor/readValue/gen-service-is-removed.https.html": [ - "c1954f13b95b9f5d0dbfd4f696aa0874e2a47c88", + "47f1bd316ae7d2637524a1b5d4436a3f11b20fd0", "testharness" ], "bluetooth/descriptor/readValue/read-succeeds.https.html": [ @@ -400163,7 +401395,7 @@ "testharness" ], "bluetooth/descriptor/writeValue/gen-service-is-removed.https.html": [ - "99c77b594dcdfa971bdf96b28c176bf2e44a98ca", + "07c2dc0a081786302040942a989cc49f6b3fa3ca", "testharness" ], "bluetooth/device/gattserverdisconnected-event/disconnected.https.html": [ @@ -400355,7 +401587,7 @@ "testharness" ], "bluetooth/resources/bluetooth-helpers.js": [ - "1944dc57df774ad737179dd22fb3cc9de842bc21", + "9d2b233c511627f6a4fe93bdaf16ba28c4a6ead9", "support" ], "bluetooth/resources/health-thermometer-iframe.html": [ @@ -400367,7 +401599,7 @@ "support" ], "bluetooth/script-tests/characteristic/characteristic-is-removed.js": [ - "a82d6a1761e402906aa89a790166bccf1dd0a2c2", + "7b7cd34d4c480e62fcde4667f50212cbae7f7b07", "support" ], "bluetooth/script-tests/characteristic/descriptor-get-same-object.js": [ @@ -400375,11 +401607,11 @@ "support" ], "bluetooth/script-tests/characteristic/service-is-removed.js": [ - "c4703192b632d2bc63609b717d5f7829aad6168e", + "a9fa621bca75da2887835c529b40429a20ebdff8", "support" ], "bluetooth/script-tests/descriptor/service-is-removed.js": [ - "ef6afb686e14a5b77cc88f6c51c18529739fc7ea", + "d442ab654680a3f4c7eae6036f74a20f0b730351", "support" ], "bluetooth/script-tests/server/disconnect-called-before.js": [ @@ -400471,7 +401703,7 @@ "support" ], "bluetooth/script-tests/service/service-is-removed.js": [ - "209d46cebac1cf324dacb9741bbd7a320b70651c", + "ef77b77f70ac720b536882e9b48d7fe66fe4ecf4", "support" ], "bluetooth/server/connect/connection-succeeds.https.html": [ @@ -400743,7 +401975,7 @@ "testharness" ], "bluetooth/service/getCharacteristic/gen-service-is-removed.https.html": [ - "8680cb14d493830e9e5ded9d4d07a6e12e2f2fee", + "9f698f4e02985f21f772d38942d7fe9f383600f0", "testharness" ], "bluetooth/service/getCharacteristics/blocklisted-characteristics.https.html": [ @@ -400799,11 +402031,11 @@ "testharness" ], "bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html": [ - "b67765aaf66b9ac679e018014127836ae9a1753e", + "d8e4257645340adfd45f069c4cebbc3ca88f2348", "testharness" ], "bluetooth/service/getCharacteristics/gen-service-is-removed.https.html": [ - "baadfc8451547b9b1a863b222009f230fc2b032b", + "417d39a317f55a95180c806d28047c85dd959d65", "testharness" ], "clear-site-data/navigation-insecure.html": [ @@ -400842,6 +402074,26 @@ "10f5f9d409ef513edb129e0e8522aa5f74d51ce8", "support" ], + "client-hints/accept_ch.http.html": [ + "e2181077e6d378a288d4944aee8c76939aa896fe", + "testharness" + ], + "client-hints/accept_ch.http.html.headers": [ + "25cd8622db940411b0e8eb39921e6086916e4f36", + "support" + ], + "client-hints/accept_ch.sub.https.html": [ + "4e3f60751fbbc8f58bbf6fb7eadd1f334c9789ad", + "testharness" + ], + "client-hints/accept_ch.sub.https.html.headers": [ + "25cd8622db940411b0e8eb39921e6086916e4f36", + "support" + ], + "client-hints/echo_client_hints_received.py": [ + "3d3b57376cbacbd2118fe4fe07abad5bd9ad95fd", + "support" + ], "clipboard-apis/OWNERS": [ "bae753666bda85e9805a5e2fad80ba71459b8aba", "support" @@ -401167,7 +402419,7 @@ "reftest" ], "conformance-checkers/Makefile": [ - "bf1ac606bd1b1d4bfa8eca28a04c0d0f3c3fb374", + "7b6e2ee9ec808bd43d03b9f0a8054f3ac21bc583", "support" ], "conformance-checkers/OWNERS": [ @@ -408434,10 +409686,6 @@ "a2963489b57d411e3a297dce5f3176288bef06c2", "support" ], - "conformance-checkers/html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html": [ - "c87cc7f94192dac5bdb293e786dda21ab7670211", - "support" - ], "conformance-checkers/html/elements/a/href/scheme-trailing-cr-novalid.html": [ "7f8a3a727c8a39a69999abccf4439a48fcef9ddf", "support" @@ -408738,10 +409986,6 @@ "9d7d9c3a256a060e1f3ad9697b99dabaf5a5ef11", "support" ], - "conformance-checkers/html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html": [ - "b9a58f9796a69bd1ab373ce51fac310581ef92a8", - "support" - ], "conformance-checkers/html/elements/area/href/scheme-trailing-cr-novalid.html": [ "87f0fd69b35a61b401430d4ab2a476eb8001e95d", "support" @@ -409030,10 +410274,6 @@ "835aa1cd0874aad929cd10f4864ae9f4bc41c41e", "support" ], - "conformance-checkers/html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "f761d7545a155e8c20921b8f937d1d9c6f80b944", - "support" - ], "conformance-checkers/html/elements/audio/src/scheme-trailing-cr-novalid.html": [ "53c39d1e68e7f8b879b2ce8e71c4a7846ba0581a", "support" @@ -409558,10 +410798,6 @@ "ca4a49eb486e35fe308a178a685cb10f56f10215", "support" ], - "conformance-checkers/html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html": [ - "4d3cc617092ee37b57cd3c946a915fcc0215b675", - "support" - ], "conformance-checkers/html/elements/base/href/scheme-javascript-single-slash-isvalid.html": [ "ebe5c0c797e4885a1692bdd9d137d7985912358c", "support" @@ -409934,10 +411170,6 @@ "58c526075ccedfe2d8742e05381adbf4c9e7b6b3", "support" ], - "conformance-checkers/html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - "4683c04027bb7589dbc30768a6cabca3ec7caa1b", - "support" - ], "conformance-checkers/html/elements/blockquote/cite/scheme-trailing-cr-novalid.html": [ "209fdc83ff0641a4e8aa0b487ba66f80fe15a82c", "support" @@ -410222,10 +411454,6 @@ "3baf86a15eb7ec00fdf0d3ad854548ee0ed5c9c1", "support" ], - "conformance-checkers/html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - "f270c23de82d826adb21f5b41e4ce1d7febfb36a", - "support" - ], "conformance-checkers/html/elements/button/formaction/scheme-trailing-cr-novalid.html": [ "8716f9879d555aa1e2ad0451884d590d3ecc6a6e", "support" @@ -410518,10 +411746,6 @@ "4cb9b05260ec2edc707fbba9dc6772485384bc9d", "support" ], - "conformance-checkers/html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - "7acb90736a95397641fe096cc573492dc2d28c55", - "support" - ], "conformance-checkers/html/elements/del/cite/scheme-trailing-cr-novalid.html": [ "d2c8653bebb76c5e6e397aa0ec784848bef5236b", "support" @@ -411330,10 +412554,6 @@ "c3eea4347d2d2a4f369ec7995fab75ca40e5d756", "support" ], - "conformance-checkers/html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "8d8874cd4f5403f23ad664fa312d8833fd7d2c1a", - "support" - ], "conformance-checkers/html/elements/embed/src/scheme-trailing-cr-novalid.html": [ "24d3fe99fa511f0bab3dfbf8241cb43cc9596df2", "support" @@ -411618,10 +412838,6 @@ "4d009d273b624d6f8d8f84c9fe08212c7fabed32", "support" ], - "conformance-checkers/html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html": [ - "de57ad06c88bbe92dd0e0c5b73f69e74005ed6cd", - "support" - ], "conformance-checkers/html/elements/form/action/scheme-trailing-cr-novalid.html": [ "ba378c03b1e9bf7656f6240794344b8af3880644", "support" @@ -411970,10 +413186,6 @@ "048b16b426b57dc073d6e817fef48644f866bac6", "support" ], - "conformance-checkers/html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "453195be13968e1c453584082629fe47a552653b", - "support" - ], "conformance-checkers/html/elements/iframe/src/scheme-trailing-cr-novalid.html": [ "988d5b2eb69b99e6c8cd19795cfcb981a691d615", "support" @@ -412250,10 +413462,6 @@ "7e75b47d4ed363c6151bc252a52728635800c71b", "support" ], - "conformance-checkers/html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "fbe1c6587f12681950476788d82ebaef146e6ba3", - "support" - ], "conformance-checkers/html/elements/img/src/scheme-trailing-cr-novalid.html": [ "f37ba8bc9ed67e02aa235df4adcc3387f5dc3a27", "support" @@ -412550,10 +413758,6 @@ "96a34e382d5c0bafd923e70b8a22798ef141219c", "support" ], - "conformance-checkers/html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - "9849da633ac7420e6dc75445017365c15a95c1f0", - "support" - ], "conformance-checkers/html/elements/input/type-image-formaction/scheme-trailing-cr-novalid.html": [ "61da5770aca2619a89f345bf07845f22d7ca441f", "support" @@ -412822,10 +414026,6 @@ "90c89887f4cf6214c1685a3d89d0405e0f2cf1d3", "support" ], - "conformance-checkers/html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html": [ - "cc0da975515645e662203e8570143235e2ee964b", - "support" - ], "conformance-checkers/html/elements/input/type-image-src/scheme-trailing-cr-novalid.html": [ "92ead4e2773635bf02b30ca7b6527298a7da5450", "support" @@ -413094,10 +414294,6 @@ "b97b06db654cd0048cd3bca78fb3d543b7dc46c8", "support" ], - "conformance-checkers/html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html": [ - "4d396fd2ada0a3fd94d0da270262c72a27a495f7", - "support" - ], "conformance-checkers/html/elements/input/type-submit-formaction/scheme-trailing-cr-novalid.html": [ "5c3b36c97cc3f6e14b303b4af9fd3b2c1f41f937", "support" @@ -413398,10 +414594,6 @@ "627ace37c30d5ce0261fa3925362b3ec356b6701", "support" ], - "conformance-checkers/html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html": [ - "9d1a09cb48b68257ab565dda544374feddacc44a", - "support" - ], "conformance-checkers/html/elements/input/type-url-value/scheme-schemeless-relative-novalid.html": [ "a205b8b90a5c6aade8a94e5f9cd7bfefc3c238cd", "support" @@ -413670,10 +414862,6 @@ "1af0523c38bd8c2924beaf8a855bee797ffc6c99", "support" ], - "conformance-checkers/html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - "c7b990aebe7e0a340900065a74e2d2748309870f", - "support" - ], "conformance-checkers/html/elements/ins/cite/scheme-trailing-cr-novalid.html": [ "cd1a396812e899c053b9a40ac7cea9046bfc9285", "support" @@ -414382,10 +415570,6 @@ "93a9d1e31fbacf3d0db10a6e247cbd18972a444e", "support" ], - "conformance-checkers/html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html": [ - "acee5c4161f13b51f0c62ec0c6154c19580e364a", - "support" - ], "conformance-checkers/html/elements/link/href/scheme-trailing-cr-novalid.html": [ "3b09fdd690693db2a2e2cf2486f7ff8962d8dd10", "support" @@ -414686,10 +415870,6 @@ "3672a10a251c54dcffa08f33c6346b8144a603ce", "support" ], - "conformance-checkers/html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html": [ - "aa8af8d16eef341597be000fc3c88255e88347c5", - "support" - ], "conformance-checkers/html/elements/object/data/scheme-trailing-cr-novalid.html": [ "59707c995c0acda1b03d7770db6d430e398bc9fc", "support" @@ -415802,10 +416982,6 @@ "ca9a67f72f95fc3df95a5e4daa7c9b56c1195961", "support" ], - "conformance-checkers/html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html": [ - "1385fc623e6ecd83265c89ae234a622d3a78bb0f", - "support" - ], "conformance-checkers/html/elements/q/cite/scheme-trailing-cr-novalid.html": [ "d642f69189547e6c583a85401c73cf7fac8c1f37", "support" @@ -416106,10 +417282,6 @@ "5420be717fcf3b698a31b61ee572cbb5c5626959", "support" ], - "conformance-checkers/html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "216bde5c8c3e31e123f36cf3d562e01a5ee25c2e", - "support" - ], "conformance-checkers/html/elements/script/src/scheme-trailing-cr-novalid.html": [ "501df179f07045489391ffa97dc26a0afc67f121", "support" @@ -416398,10 +417570,6 @@ "ab50203cbb60e427d03349092d5676a37d3f9967", "support" ], - "conformance-checkers/html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "dbc19620a8adc82a31ac1540fb5fc3ebc289253c", - "support" - ], "conformance-checkers/html/elements/source/src/scheme-trailing-cr-novalid.html": [ "988c1a4b6e0ca0e709476ee418e7a5163ec7b58f", "support" @@ -416778,10 +417946,6 @@ "9799b8bd9f02ac6607767bd1f4919cb145a5ca09", "support" ], - "conformance-checkers/html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "1f3dbaa12e18e41072df534ef0a43af1e948a097", - "support" - ], "conformance-checkers/html/elements/track/src/scheme-trailing-cr-novalid.html": [ "bfbca1de6ea75e1fbb8a0d324f4725ddadad0834", "support" @@ -417078,10 +418242,6 @@ "ebbf02085d434ec93298875a02ec07df686c8f1a", "support" ], - "conformance-checkers/html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html": [ - "d150e2f20153cb91e20f18c0731fdedcf7c44549", - "support" - ], "conformance-checkers/html/elements/video/poster/scheme-trailing-cr-novalid.html": [ "445fb8294bc82e58ef3f74bb0b199903eb53ad99", "support" @@ -417342,10 +418502,6 @@ "c347b1ea86c63f06ec5c0ffa182995e342d9ff56", "support" ], - "conformance-checkers/html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html": [ - "a4acc813af290b89a5ea8fcba50ab2ad7ab93583", - "support" - ], "conformance-checkers/html/elements/video/src/scheme-trailing-cr-novalid.html": [ "c03e307794a2f9c1748a26ba44c32ca7a3bb5e51", "support" @@ -417822,10 +418978,6 @@ "8270105a32ee5f4856fd8887bf5edd17fc1934d4", "support" ], - "conformance-checkers/html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html": [ - "05744d8949afa1d0017fe81279ebbc8201b86323", - "support" - ], "conformance-checkers/html/microdata/itemid/scheme-trailing-cr-novalid.html": [ "3f53bb96ae1ad88296c7523edc6d2454b65750d3", "support" @@ -418114,10 +419266,6 @@ "5ff91cfc94ba9ea2d4754193ae5d8a9d9bf26212", "support" ], - "conformance-checkers/html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html": [ - "3ae8f056d8167d4e5d3a10864a22155fcbeb5184", - "support" - ], "conformance-checkers/html/microdata/itemtype/scheme-schemeless-relative-novalid.html": [ "9251707c34f0cc6fafc2c01cc21426f58cd537ff", "support" @@ -418347,7 +419495,7 @@ "support" ], "conformance-checkers/messages.json": [ - "39450ae5f07277b008e39e04b162736ec5baa2d1", + "ba6a1cf2867273360e8c9b7bb70da15bca4e15a7", "support" ], "conformance-checkers/tools/build-svg-tests.py": [ @@ -418367,7 +419515,7 @@ "support" ], "conformance-checkers/tools/url.py": [ - "550d8d52d0f6986cb6692c67cfcb951f438d672b", + "ee47cdb8f49f00b4bb9d27c85749b4e3e48271a1", "support" ], "conformance-checkers/xhtml/attributes/accesskey/003-novalid.xhtml": [ @@ -421210,6 +422358,22 @@ "f33ce9a975c759ce6da8a5caa371ca026dd537c4", "testharness" ], + "cookie-store/cookieStore_event_arguments.tenative.window.js": [ + "a61074b6062928c29a83e0f7d456fdce9e3a3d47", + "testharness" + ], + "cookie-store/cookieStore_event_basic.tentative.window.js": [ + "33faf57882e558a54d6cbf181141e03f1b3cd871", + "testharness" + ], + "cookie-store/cookieStore_event_delete.tenative.window.js": [ + "3fa86e521919eac1f89ff00f449f8c01500e170e", + "testharness" + ], + "cookie-store/cookieStore_event_overwrite.tentative.window.js": [ + "f7f3989aaaa0003693c043c582f0c78ecd1bbad0", + "testharness" + ], "cookie-store/cookieStore_getAll_arguments.tentative.window.js": [ "cf818fe92c16dfe42f0ac778f665094533d8ab10", "testharness" @@ -421343,11 +422507,11 @@ "testharness" ], "cookie-store/idlharness.tentative.html": [ - "551813353483102be5004ac6ddc325ced659f9eb", + "24a4e59e8d3c0a481c4b448bd3fb677f30d0208f", "testharness" ], "cookie-store/idlharness_serviceworker.js": [ - "b274b66237c0d83e9b8e770f6cf13fedd9a39b8f", + "aceb00f593b0447853fa70c8c971902cf02a164b", "support" ], "cookie-store/idlharness_serviceworker.tentative.https.html": [ @@ -421486,6 +422650,254 @@ "1949878db1be4093ec8d9595710f9fd8887434ba", "support" ], + "cookies/http-state/all-tests.html": [ + "4e030633623184b3e5705d312294412b96f28bf7", + "testharness" + ], + "cookies/http-state/resources/cookie-http-state-template.js": [ + "2e096943b9071f912adf4b3fec3ecae8e6b68118", + "support" + ], + "cookies/http-state/resources/cookie-setter.py": [ + "693d8ec6f340275e978db3ad9a8472c411ac733f", + "support" + ], + "cookies/http-state/resources/debugging-single-test.html.py-str": [ + "654fd1e28ddb80d348177156be6891a69151bf35", + "support" + ], + "cookies/http-state/resources/iframe-content-pushing.js": [ + "fbc5db2860aeda6f40ab030860ef0cad4269b623", + "support" + ], + "cookies/http-state/resources/iframe-expectation-doc.html.py-str": [ + "75d7f676ea34a2de323a5e21fd0311fc6af10559", + "support" + ], + "cookies/http-state/resources/test-files/0001-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0001-test": [ + "39267fb59abc334f248787ad0b90fdb335b6d978", + "support" + ], + "cookies/http-state/resources/test-files/0002-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0002-test": [ + "831c8e90ead0291ffe36a82f0ada40c9a1b39f7f", + "support" + ], + "cookies/http-state/resources/test-files/0003-expected": [ + "6e46add5a20aed330c75fc95a727647a6a62085c", + "support" + ], + "cookies/http-state/resources/test-files/0003-test": [ + "10a97fd3dd221dc3681a548e166ff81d70623d85", + "support" + ], + "cookies/http-state/resources/test-files/0004-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0004-test": [ + "ca5e6a3fef1d281d2658efbb49a1d3d93cff5383", + "support" + ], + "cookies/http-state/resources/test-files/0005-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0005-test": [ + "21f309bbef82b8f40db76d4b2c16a70d7c48fa3d", + "support" + ], + "cookies/http-state/resources/test-files/0006-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0006-test": [ + "d65ef234d4b769ded714a2954f9911c231921e08", + "support" + ], + "cookies/http-state/resources/test-files/0007-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0007-test": [ + "6781b00cb8db2d51bcdea7f3e3898d2bf71a18ad", + "support" + ], + "cookies/http-state/resources/test-files/0008-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0008-test": [ + "e144c22f6b0f015e42bc99b7ede7533f88009a79", + "support" + ], + "cookies/http-state/resources/test-files/0009-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0009-test": [ + "6cc31bc3fadd075bc3df42200559a1c384b5954c", + "support" + ], + "cookies/http-state/resources/test-files/0010-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0010-test": [ + "8938cf5aeef5a84828a41424154e23d77503a7c2", + "support" + ], + "cookies/http-state/resources/test-files/0011-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0011-test": [ + "bb5a0e5a6cb4884e4161fa3aaef85f5c889aa2c3", + "support" + ], + "cookies/http-state/resources/test-files/0012-expected": [ + "2017a6b45d4929c7f8ebbbaca36331cc11199f88", + "support" + ], + "cookies/http-state/resources/test-files/0012-test": [ + "50f6b17f8663140ef6a8da5b0b808ddb75de3ff6", + "support" + ], + "cookies/http-state/resources/test-files/0013-expected": [ + "94ac42babde7e098c5a3b1a5b967a482661d34d9", + "support" + ], + "cookies/http-state/resources/test-files/0013-test": [ + "cfbaa5ec1434f310a2307f31384c5c802a41dcee", + "support" + ], + "cookies/http-state/resources/test-files/0014-expected": [ + "63b44fb34e929499aa6e7e10107ba42bed4bf102", + "support" + ], + "cookies/http-state/resources/test-files/0014-test": [ + "1bba693282c7a6cd8a8189e42f2223f664b70bc3", + "support" + ], + "cookies/http-state/resources/test-files/0015-expected": [ + "969c588efb9bed6d834836ab8c7154615981fcaf", + "support" + ], + "cookies/http-state/resources/test-files/0015-test": [ + "44b7c98589eb8c93ffb0d4b8410f683d789c3403", + "support" + ], + "cookies/http-state/resources/test-files/0016-expected": [ + "f6871163355cbcf80d33619af177c6dc6947d2f1", + "support" + ], + "cookies/http-state/resources/test-files/0016-test": [ + "21ce5420b2802c9a2c60c7f8cd4aa82b466cd6db", + "support" + ], + "cookies/http-state/resources/test-files/0017-expected": [ + "12081e8a1edca7056df86a2abd6156790ce00318", + "support" + ], + "cookies/http-state/resources/test-files/0017-test": [ + "e7816075c82788cd1de25dec77fb7ff1929f0d74", + "support" + ], + "cookies/http-state/resources/test-files/0018-expected": [ + "fa5f92ce177b11fc1b8df81abd75cc2d7feaa591", + "support" + ], + "cookies/http-state/resources/test-files/0018-test": [ + "27baa279199e4dd31a3008e59591ea4655c925cd", + "support" + ], + "cookies/http-state/resources/test-files/0019-expected": [ + "c72660a2dea4cc06221857e79d722cd656b7c797", + "support" + ], + "cookies/http-state/resources/test-files/0019-test": [ + "c43d87e073450f63b89a8b95603fd9b2f1c78c77", + "support" + ], + "cookies/http-state/resources/test-files/0020-expected": [ + "55019e1af5182dc7641f6ea731a65781ba7f6410", + "support" + ], + "cookies/http-state/resources/test-files/0020-test": [ + "280ee9a2f25bc8b68e6120e92199e8586a4b2095", + "support" + ], + "cookies/http-state/resources/test-files/0021-expected": [ + "55019e1af5182dc7641f6ea731a65781ba7f6410", + "support" + ], + "cookies/http-state/resources/test-files/0021-test": [ + "35805d1fb83bfbf179dc6ae01d7dfc0fab959f6b", + "support" + ], + "cookies/http-state/resources/test-files/0022-expected": [ + "4241a551c571283d8a8f5077351db5dc3f068dd6", + "support" + ], + "cookies/http-state/resources/test-files/0022-test": [ + "a22c4427ded3c9ee5b3bb8abf8c2f8d035a5df04", + "support" + ], + "cookies/http-state/resources/test-files/0023-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0023-test": [ + "b0e7f6e71e828d978b9cba6b78666313db236ac9", + "support" + ], + "cookies/http-state/resources/test-files/0024-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0024-test": [ + "eb071d44c0344f5a227f2fa5eebf0111a8a49683", + "support" + ], + "cookies/http-state/resources/test-files/0025-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0025-test": [ + "36a5c1062a93f924ee4db79cd8e4caa3df38c48e", + "support" + ], + "cookies/http-state/resources/test-files/0026-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0026-test": [ + "b0e7f6e71e828d978b9cba6b78666313db236ac9", + "support" + ], + "cookies/http-state/resources/test-files/0027-expected": [ + "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "support" + ], + "cookies/http-state/resources/test-files/0027-test": [ + "d5d8e8d85183b6665438a42c14c17e56724ff0c7", + "support" + ], + "cookies/http-state/resources/test-files/0028-expected": [ + "b0e7f6e71e828d978b9cba6b78666313db236ac9", + "support" + ], + "cookies/http-state/resources/test-files/0028-test": [ + "b0e7f6e71e828d978b9cba6b78666313db236ac9", + "support" + ], "cookies/meta-blocked.html": [ "1ece2f38a340ff4ff4713ada5568281d0e1c5be2", "testharness" @@ -424203,7 +425615,7 @@ "manual" ], "css/CSS2/backgrounds/background-attachment-004.xht": [ - "ffa99116e4615792f0308b7c430efab4bc31073a", + "3586ab83a0d7b2173ec33964575b26fb00f92bc8", "manual" ], "css/CSS2/backgrounds/background-attachment-005.xht": [ @@ -426666,6 +428078,14 @@ "435db9c6ad02d80fe1545ad7fbc97d5009a32ebf", "support" ], + "css/CSS2/backgrounds/support/cat-128.png": [ + "4dd27ea01f998476c3a50fd748175af07ca3632e", + "support" + ], + "css/CSS2/backgrounds/support/cat-830.png": [ + "73e44a633f1d26b915e093a65ca53650c03b9c56", + "support" + ], "css/CSS2/backgrounds/support/cat.png": [ "461fd17b274662b88500cdf42bab7f3b79e6019d", "support" @@ -439434,6 +440854,26 @@ "3f902ea05caf3cb71e978749bd47b120d10366e2", "reftest" ], + "css/CSS2/floats-clear/clear-on-child-with-margins.html": [ + "69b04e20fa82677e4d2736bd6ec9c370147e4061", + "reftest" + ], + "css/CSS2/floats-clear/clear-on-parent-and-child.html": [ + "bbf7831640ee2aa3e29aa6695682d1e14971948b", + "reftest" + ], + "css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html": [ + "d4b2bf3b4b6761c9531859e6cedb9d08a928880f", + "reftest" + ], + "css/CSS2/floats-clear/clear-on-parent-with-margins.html": [ + "dbaee65a956a9b0dfc8b1bbb3ae70bd29bb02c6c", + "reftest" + ], + "css/CSS2/floats-clear/clear-on-parent.html": [ + "63c9122c39983b4c3a7d10f92399e746411022c3", + "reftest" + ], "css/CSS2/floats-clear/clearance-006-ref.xht": [ "2305823fd342085286fe1f5e0cdb27d7cd6fe436", "support" @@ -445542,6 +446982,10 @@ "7d267cb188014a18688e13806e095706f3f2d937", "reftest" ], + "css/CSS2/linebox/fractional-line-height.html": [ + "d883c6dbf79c1da2c7a9a2261ec19eb6fc546082", + "reftest" + ], "css/CSS2/linebox/inline-box-001-ref.xht": [ "55eee0833d9596605cb10d6bccfaedbe6f784027", "support" @@ -455294,6 +456738,14 @@ "62aae8605308e22c641111007fdc8709507d021d", "reftest" ], + "css/CSS2/normal-flow/unresolvable-max-height.html": [ + "66e736acb2edc0bd737807abf4e2ea3e9a16965d", + "testharness" + ], + "css/CSS2/normal-flow/unresolvable-min-height.html": [ + "02d5f978e4688af271ced6c90956bfc3cc995967", + "testharness" + ], "css/CSS2/normal-flow/width-001.xht": [ "c43946e15b0dd2a0635f86f7227b112d878f6c17", "reftest" @@ -480978,6 +482430,10 @@ "7390f245c6f208a1d1f1a6548d6f7f0185decedb", "visual" ], + "css/css-align/OWNERS": [ + "93058c59bbb33b95dc3ca53757a13c34994c7d3a", + "support" + ], "css/css-align/content-distribution/parse-align-content-001.html": [ "5f85c7e0760de399e2bbff0d27bcbe48b52f6ab0", "testharness" @@ -481139,7 +482595,7 @@ "testharness" ], "css/css-align/gaps/column-gap-parsing-001.html": [ - "d0b1255896cde1a3b3f2539c8533fdf65dd77f94", + "7dfb3da10a936539b53bd7692e8514cfe2142a88", "testharness" ], "css/css-align/gaps/gap-animation-001.html": [ @@ -481159,19 +482615,19 @@ "testharness" ], "css/css-align/gaps/gap-parsing-001.html": [ - "bd3a5bb6b7e4605e6f1a44f232d34c5e7d6342af", + "7eb55e0a8b04384aebfbb5a47922c5b33f93270c", "testharness" ], "css/css-align/gaps/grid-column-gap-parsing-001.html": [ - "13ce1945b50ed1c4d40f837cac8777b6b8a90066", + "6faca8cad74d38f301d9e3c210ae577d6d7355b5", "testharness" ], "css/css-align/gaps/grid-gap-parsing-001.html": [ - "441feb52cc17178d4486f92d10a1c132600788a3", + "0bc6b1cdca28b009b52b5e8b11bf97b44d7df71e", "testharness" ], "css/css-align/gaps/grid-row-gap-parsing-001.html": [ - "7302a4efd2ea5eccf65ec269175e6c15cc1771b4", + "07f8d219fb1457a1a035587f4f0bda7278a913a8", "testharness" ], "css/css-align/gaps/row-gap-animation-001.html": [ @@ -481187,7 +482643,7 @@ "testharness" ], "css/css-align/gaps/row-gap-parsing-001.html": [ - "46a9930dd28a133d1df2c9209b35716093457d5c", + "d8cecf4e1b558cb45fee82804a6407b0204b889f", "testharness" ], "css/css-align/reference/ttwf-reftest-alignContent-ref.html": [ @@ -491014,6 +492470,10 @@ "ad355c3d5220c1b938182241a8e8abe030ace699", "testharness" ], + "css/css-font-loading/idlharness.https.html": [ + "00399ffcb0ff8000e79ab4aeefdb90cabdb0fd4d", + "testharness" + ], "css/css-fonts/OWNERS": [ "4c9aabb4fac2a558b0828b50e2b06e01e43dd4b4", "support" @@ -491030,6 +492490,10 @@ "9232ad7768f5bea41d87469113b210b3c663750e", "reftest" ], + "css/css-fonts/calc-in-font-variation-settings.html": [ + "ebd68854330dd96a6cfa31c273d9b6810442497d", + "testharness" + ], "css/css-fonts/first-available-font-001-ref.html": [ "7f6bdc4dcb91cdf976631216a72ec0557234a6c2", "support" @@ -498347,11 +499811,11 @@ "testharness" ], "css/css-grid/abspos/absolute-positioning-grid-container-containing-block-001.html": [ - "f35bf44f588c631cf85021df55d34b5726ceff03", + "308d1e747e91bd4d3cbeab33f53e549d380fa716", "testharness" ], "css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html": [ - "4f65457310c6f1127c10821159a37b89caf26abd", + "8623dfe31fc392230376d52382baff1e527d84eb", "testharness" ], "css/css-grid/abspos/grid-item-absolute-positioning-dynamic-001.html": [ @@ -498363,15 +499827,15 @@ "support" ], "css/css-grid/abspos/grid-paint-positioned-children-001.html": [ - "1093709bd8e0cbbbbdc02032e1e4771cd9ab53e3", + "c79700e65dccba02c03ef54c6b1ab65b9f8bc19d", "reftest" ], "css/css-grid/abspos/grid-positioned-children-writing-modes-001-ref.html": [ - "8baf87330e4005ddb664f5fc71c972e4e1c00f40", + "27b26b1a72d83b1b870b11194ce42f6a329b885c", "support" ], "css/css-grid/abspos/grid-positioned-children-writing-modes-001.html": [ - "45d1fbeb11504621afa26f82ff0819d4c8659962", + "2d123622147a051ee3a3727ea3d029b2922973b1", "reftest" ], "css/css-grid/abspos/grid-positioned-item-dynamic-change-001.html": [ @@ -498379,31 +499843,31 @@ "reftest" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html": [ - "b15d1db43efd2b8f15aab17dbbcf3afc262baa76", + "4f909aa983223a1a8b103b6e3adc014513dbb6eb", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html": [ - "6efd2dfea5027aca510f7a92e8cec16b3fddef2d", + "9c66af91c308c50dfdb9d811357b2241a5665412", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html": [ - "d485183a7ea0bfcf92503a3e420ae68470593995", + "c3ba40cd174cb2a2588898e6643ca2a489a27c25", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html": [ - "aacc2daef0aae211a8ffa433ff6684d037afd4c8", + "60cd2f1b1a78e0be1d08ed04433e8db765dd1f90", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html": [ - "fc2cfee0c523129d8cb0bbee1685786a72031e84", + "2ba2d79cbee6c6e388c98245ccd96da9a4f186e5", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html": [ - "7408735464c2da7fa7916ee5a739518866e5b7a2", + "d78e6df343046ae4361fddac1a5c38a1d18de5a1", "testharness" ], "css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html": [ - "4c50565bb7adf5074f57da937954c3e95ee00d7a", + "5f21384b56ed7e51c55896249e6a8dc69c8c15f5", "testharness" ], "css/css-grid/abspos/grid-positioned-items-background-001-ref.html": [ @@ -498411,7 +499875,7 @@ "support" ], "css/css-grid/abspos/grid-positioned-items-background-001.html": [ - "1776e1042cf1712a86906e6e8b56faf9d80bb143", + "f4b76880ffd08a2879354d63862533532e0acb68", "reftest" ], "css/css-grid/abspos/grid-positioned-items-background-rtl-001-ref.html": [ @@ -498419,47 +499883,47 @@ "support" ], "css/css-grid/abspos/grid-positioned-items-background-rtl-001.html": [ - "581116474bdd4214f803dd7c6375104308c245e8", + "90fdc98fa243436d0dd1c83fcacfbbafe756f69f", "reftest" ], "css/css-grid/abspos/grid-positioned-items-content-alignment-001.html": [ - "d9f5abb41f8fb479c37f0d364b9cd73cb9008829", + "53bba04085d038dfb81d1f9323915a24e1bf477e", "testharness" ], "css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html": [ - "81cd5622a02ae3bdccd609d6e409241b9ba92117", + "fcce72ee35dd8d3fb7ee6be0b6f44bf025abf5a1", "testharness" ], "css/css-grid/abspos/grid-positioned-items-gaps-001.html": [ - "29cc4d5bb2a27e59907b6f2e1c32fe260cd3f4c8", + "59ad78731845efdee151a7db5f963484505e9b49", "testharness" ], "css/css-grid/abspos/grid-positioned-items-gaps-rtl-001.html": [ - "662bd6d9451786ba0da556c3049e7747f2d9d3e7", + "618bf5f6b8ca90359e9df147f201ad4ba5d84e8e", "testharness" ], "css/css-grid/abspos/grid-positioned-items-implicit-grid-001.html": [ - "dfeb40d25bf666ce73fda44e3cc5ad152cc55116", + "2666a4caa94fb56a17cc197f67a8572185b01514", "testharness" ], "css/css-grid/abspos/grid-positioned-items-implicit-grid-line-001.html": [ - "4e687882f7721dae22c1a65789fe1cfbfcfa86e2", + "1b1dee594c037e5ee8966331e8fc2d60b4e847d9", "testharness" ], "css/css-grid/abspos/grid-positioned-items-padding-001.html": [ - "9f1dfe2b066d9df4bbce276a16849de8779d8b6e", + "6cfe2450ba28b501f1421c04c274976f63ee3494", "testharness" ], "css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html": [ - "92fa645b99f912e38c55d7a8f6a8c7983e0960d8", + "4ad027f1a382a9414ce0d34826aa877d9915d458", "testharness" ], "css/css-grid/abspos/grid-positioned-items-within-grid-implicit-track-001.html": [ - "1a198448681696a8fed8c8240af0d069b34a50ad", + "cc16a7b4ffc4da30a2dc47b4bb627c40b611d425", "testharness" ], "css/css-grid/abspos/grid-sizing-positioned-items-001.html": [ - "a626f8ac567d7577d7f0a8b27c7104fda7bb7d86", + "80f385933b5380bb0e476db4f089b6064195c535", "testharness" ], "css/css-grid/abspos/orthogonal-positioned-grid-items-001-ref.html": [ @@ -498703,21 +500167,25 @@ "reftest" ], "css/css-grid/abspos/positioned-grid-items-should-not-create-implicit-tracks-001.html": [ - "7f5640648062fe8b02e98b67d48c1af1914cdab7", + "6fc9fc8a452476ae5234e67d87b06aee99b32194", "testharness" ], "css/css-grid/abspos/positioned-grid-items-should-not-take-up-space-001.html": [ - "8f048f2cfc368d45263fac24ab8e64ef6db0a163", + "02ea3621a3e3189181de74c7e1393db58d499181", "testharness" ], "css/css-grid/abspos/positioned-grid-items-sizing-001-ref.html": [ - "de3401d0edd3dbb428066d5fa85f5235d083aa18", + "5b07f605970df1d5de7e3e44e4cac3d8c7450198", "support" ], "css/css-grid/abspos/positioned-grid-items-sizing-001.html": [ - "053c2ad3fe2edfd36dc8743c01cf098af91c026c", + "831ab1249db84ddc90344f2c9fa38bbf8b5dd403", "reftest" ], + "css/css-grid/abspos/support/grid.css": [ + "6bb300b8baebf700481ea162fb7b41913fcca29c", + "support" + ], "css/css-grid/alignment/grid-alignment-implies-size-change-001.html": [ "6a98b19084f09099a83cd1e150dcc99e58967596", "testharness" @@ -499178,6 +500646,14 @@ "5ed8d7a44153cd4833f893fe53849a1e63d1a583", "reftest" ], + "css/css-grid/alignment/grid-gutters-011.html": [ + "30bb574c966324ac5377ef8f9250df4f959b9b9f", + "reftest" + ], + "css/css-grid/alignment/grid-gutters-012.html": [ + "a29614ba012488fbcd5cb53694ec483f8548077d", + "reftest" + ], "css/css-grid/alignment/grid-row-axis-alignment-positioned-items-001.html": [ "2c431631005167b724c5dcdbe0405c583d82eef6", "testharness" @@ -499623,7 +501099,7 @@ "reftest" ], "css/css-grid/grid-definition/grid-change-fit-content-argument-001.html": [ - "409d4b815307264b17581975f0f121f40946d932", + "d00e8651be933262d7f64d22f6e8ce68d23d44eb", "testharness" ], "css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html": [ @@ -499687,11 +501163,11 @@ "testharness" ], "css/css-grid/grid-definition/grid-template-columns-fit-content-001-ref.html": [ - "5f2f68b7cf046593760e6668a3d7fca58bae263e", + "f97320fd878e74ef93435ceeaf8117acde1c0e00", "support" ], "css/css-grid/grid-definition/grid-template-columns-fit-content-001.html": [ - "adffbd4b734ae719675cb5bee7fd6bc3fbde5d5b", + "f0b39f517dbf4ceb7649c99863ca3cbb44549446", "reftest" ], "css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html": [ @@ -499699,15 +501175,19 @@ "testharness" ], "css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html": [ - "0599be38ec7525b925d2c42dad8f6c09efff1612", + "fe5c6aad4b42792b63e609c9f17a1d26918e68cc", "support" ], "css/css-grid/grid-definition/grid-template-rows-fit-content-001.html": [ - "a6ea0c0330b667d86c54933875e5cfda9d3f2162", + "57659c467b0abc12fc953edd6e96a07d2f15786e", "reftest" ], + "css/css-grid/grid-definition/support/grid.css": [ + "6bb300b8baebf700481ea162fb7b41913fcca29c", + "support" + ], "css/css-grid/grid-definition/support/testing-utils.js": [ - "7d6dc5106777942ad83e6bc570368af113f32d5f", + "bda861857e383f7e77e2aded1d1c9af1340cc126", "support" ], "css/css-grid/grid-items/anonymous-grid-item-001.html": [ @@ -499854,6 +501334,38 @@ "d36bce8f5be4f39442a884386ea08062c873b73d", "reftest" ], + "css/css-grid/grid-items/grid-items-minimum-width-001.html": [ + "8eb22226f25e529fdfa1e904760dc9d9572cb8c5", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-002.html": [ + "46d62c774bdfa47a0aa11692a5b42ba032d3c35a", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html": [ + "012848f739cb0ac5aaf53de9f6137d87e52dac57", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html": [ + "e366eed5aa25cdcc88510dc70b55cfe1ebd410d4", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html": [ + "ad2a7bfe6c02682b9d8907234df2f28c7c6e825d", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html": [ + "5ef51897c6b890ac9508917bfcb5187406e0420b", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html": [ + "0295b15da5707dcd4b44cd95c66edbd19c08c1b8", + "testharness" + ], + "css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html": [ + "3d9ee014d1341bae70de86de585658f7432f76ef", + "testharness" + ], "css/css-grid/grid-items/grid-items-sizing-alignment-001-ref.html": [ "33080559b7f451958ea4785075bf6c8e4d8902eb", "support" @@ -499959,19 +501471,19 @@ "testharness" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-022.html": [ - "7a5be2e6b0adbbf048efb0cb19c35be913729ba8", + "2baacdd3bf98a6084105e70168dbe276579b226f", "testharness" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-023.html": [ - "cc51bc269d23ae345c91f91368b5a57d99a4606e", + "30f45639bea629c3db5a616a408eb6a0e5eb5f81", "testharness" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-024.html": [ - "5eb13653b1d9fe889cd6bb8423e47eed207ac69d", + "36c73749ac60f7589928e9b96a2722946de3e63c", "testharness" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-025.html": [ - "15a29d967b7e543edeebd6bb37a597741b79bf50", + "4b0da168ad2dc39fb9e057d39e566bd4dadc9553", "testharness" ], "css/css-grid/grid-items/grid-order-property-auto-placement-001.html": [ @@ -500086,6 +501598,10 @@ "928556fc1f503c821581032a2288a08f8aa07021", "support" ], + "css/css-grid/grid-items/support/grid.css": [ + "6bb300b8baebf700481ea162fb7b41913fcca29c", + "support" + ], "css/css-grid/grid-layout-properties.html": [ "d30ee96245cf3d25bffc64347a4ee60bfb2b2049", "testharness" @@ -500107,11 +501623,11 @@ "testharness" ], "css/css-grid/grid-model/grid-container-ignores-first-letter-001.html": [ - "e46492228ce6fdf83d9661c06db745e9c6689bb4", + "157c7945bc8f6e020f3e123789489269f318d91e", "testharness" ], "css/css-grid/grid-model/grid-container-ignores-first-line-001.html": [ - "8e8895681b8f7e8f5d416faedf5b081f7fc42243", + "aec98e4e7bf245637903a1f06d2e5d5519b8da66", "testharness" ], "css/css-grid/grid-model/grid-display-grid-001.html": [ @@ -500199,11 +501715,11 @@ "reftest" ], "css/css-grid/grid-model/grid-item-accepts-first-letter-001.html": [ - "bc3aa0022584b2dc6253aeb1bbca50b6b7c05f54", + "0ab0d1b9446d4ccaeba6778bdc65ef7d4adbd6a1", "testharness" ], "css/css-grid/grid-model/grid-item-accepts-first-line-001.html": [ - "0af2d39207188e1398e69f1e2d81848ba1bee2ee", + "9025d7543cfff53833f783d19b3f56333ac5fef3", "testharness" ], "css/css-grid/grid-model/grid-margins-no-collapse-001.html": [ @@ -500222,6 +501738,10 @@ "adfa657da1bb65a313894a8b5010a62d7c629c34", "reftest" ], + "css/css-grid/grid-model/support/grid.css": [ + "6bb300b8baebf700481ea162fb7b41913fcca29c", + "support" + ], "css/css-grid/implicit-grids/grid-support-grid-auto-columns-rows-001.html": [ "85a397623ccb6b2ced1450af19f0eaf3a2f6df22", "reftest" @@ -500338,10 +501858,6 @@ "feb53485e24aeaf9a5f27be5e42cc4a6fc5b8df0", "support" ], - "css/css-grid/support/grid.css": [ - "6bb300b8baebf700481ea162fb7b41913fcca29c", - "support" - ], "css/css-grid/test-plan/index.html": [ "e633dc7584fbc7bfe99177aa5dd9fbd107a2d3f5", "support" @@ -501706,6 +503222,10 @@ "43a6f9e055b908a42b5811d6ce5e48acf8c9ed08", "testharness" ], + "css/css-multicol/float-and-block.html": [ + "435614e6d5dcdbd8325687f70014bea0e3dea5f7", + "reftest" + ], "css/css-multicol/multicol-basic-001.html": [ "7cb568d75ea3fec9046ec69770fe59b8539beb02", "reftest" @@ -503914,6 +505434,38 @@ "c7b441a3a07276cad9528dd3ef7d82844d06e2d8", "support" ], + "css/css-properties-values-api/register-property-syntax-parsing.html": [ + "b065f4840b3c1deb4a2f8a59428e102f2ae11686", + "testharness" + ], + "css/css-properties-values-api/register-property.html": [ + "df61ce5dd13847deaa9b7165dd1277c1ddefb646", + "testharness" + ], + "css/css-properties-values-api/registered-properties-inheritance.html": [ + "131676bfa0733a64b679473b411ef651a9df1ab0", + "testharness" + ], + "css/css-properties-values-api/registered-property-computation.html": [ + "875acfd6e6446e4cb14fcd19fe16e83630b5fe31", + "testharness" + ], + "css/css-properties-values-api/registered-property-cssom.html": [ + "0fecf81c4089cb67107a9339ee52cd2c44cde60b", + "testharness" + ], + "css/css-properties-values-api/registered-property-initial.html": [ + "fc0b90f23ea8c8dab20baa3fecdd7d60863527b6", + "testharness" + ], + "css/css-properties-values-api/var-reference-registered-properties-cycles.html": [ + "bc061780caa0085fca5b003c1aed68c7b162eabd", + "testharness" + ], + "css/css-properties-values-api/var-reference-registered-properties.html": [ + "988badd19fd1880446db9827e3d96cb4961732a0", + "testharness" + ], "css/css-pseudo/OWNERS": [ "e196548942a4d77448f734235b3456e2a830a5a7", "support" @@ -506234,6 +507786,34 @@ "46913ea7e47811b11be898de5c3bd0a330ea6637", "testharness" ], + "css/css-scoping/shadow-disabled-sheet-001.html": [ + "3de2d23c1b3339b964ec2c009832a3207a3b9dc4", + "reftest" + ], + "css/css-scoping/shadow-fallback-dynamic-001.html": [ + "741cd9e29067a4634aa5beb6bd06afa540895d22", + "reftest" + ], + "css/css-scoping/shadow-fallback-dynamic-002.html": [ + "e9a0d8178387901404030dde1b7ae7b2842f2eca", + "reftest" + ], + "css/css-scoping/shadow-fallback-dynamic-003.html": [ + "0b75fadbaee366349576e2d6f3ca8d6a49069f66", + "reftest" + ], + "css/css-scoping/shadow-fallback-dynamic-004.html": [ + "71dcc60c4ff59690927c1575fff2eecf85ee558f", + "reftest" + ], + "css/css-scoping/shadow-fallback-dynamic-005.html": [ + "ab3c3d205e59df800ba5b4217245b83685521c31", + "reftest" + ], + "css/css-scoping/shadow-root-insert-into-document.html": [ + "2cee9fff35c9222074f4ef78dcfcb8a3e02bbc98", + "reftest" + ], "css/css-scoping/slotted-invalidation.html": [ "c500e1ceba1b293d45df5f66fd89d4a5d9ceb952", "testharness" @@ -506338,6 +507918,10 @@ "de66dba5bce15b7403e9e582d982d4e3e4aed552", "testharness" ], + "css/css-scroll-snap/scroll-snap-type-proximity.html": [ + "75bfc0b6c7686afbbf431e653ab674496ad3fe46", + "testharness" + ], "css/css-scroll-snap/scrollTo-scrollBy-snaps.html": [ "6e921f3b1c54df09d594d5e450674618eee42143", "testharness" @@ -506346,6 +507930,14 @@ "51f08f58135901b332ff43d15fbdc8d0a22f962c", "manual" ], + "css/css-scroll-snap/snap-inline-block.html": [ + "4fc646db848f597af6f4562e7b60815e9ca4ef2b", + "testharness" + ], + "css/css-scroll-snap/snap-to-visible-areas.html": [ + "dfaf8675bec557c9f2178ad48b29c803f94056b5", + "testharness" + ], "css/css-shapes/OWNERS": [ "d26aa70436055346420fd8bae6fd174daf090124", "support" @@ -506450,6 +508042,14 @@ "e5b0425ea113fc8f550639aba9e85adb626fc6c1", "testharness" ], + "css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html": [ + "aaae2c3210f797109604e85016d25467d3aa5f47", + "support" + ], + "css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html": [ + "2f33cb292183209b60437955122248438b46d209", + "reftest" + ], "css/css-shapes/shape-outside/shape-box/reference/shape-outside-box-001-ref.html": [ "b732edbc1d0920b2bb6ae2c5e7f25ec8ea15d0e0", "support" @@ -508095,7 +509695,7 @@ "reftest" ], "css/css-tables/table-model-fixup-2.html": [ - "19e3577e862601a0cf00dd4644017218c363f0db", + "57f45e21a6f9f51154f872c724856d41681857e7", "testharness" ], "css/css-tables/table-model-fixup.html": [ @@ -508274,6 +509874,10 @@ "9eeb49d2d78c3f81825de0d9e24de2a097275175", "testharness" ], + "css/css-tables/width-distribution/td-with-subpixel-padding.html": [ + "b93845c332e5153c8a28085303b165d3c96f984e", + "testharness" + ], "css/css-tables/zero-rowspan-001-ref.html": [ "b7886acdf8a380f85ebbcab0ded1e927fd509600", "support" @@ -510178,10 +511782,6 @@ "8d5809ae7986bdc493e290cc31068b478a7f4d18", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-013.html": [ - "def397265dafefa00bed7ef9b122667867244ee6", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-014.html": [ "22e41aff080c6dcc577660d36142aef3230c3feb", "reftest" @@ -510318,10 +511918,6 @@ "a2dd7fd232c02b5edb2c9dc372bd3c4e2ef9864d", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-048.html": [ - "b54e6fe470f6bccfa0802d99e2e56b093fd6b834", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-049.html": [ "fe9971b88c54ad8c06adff6eb2d674e1ffbe8e77", "reftest" @@ -510462,10 +512058,6 @@ "aaa7d66b89731d200b1f4b7091dda82c469929e3", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-118.html": [ - "2be0fd76f62c127556a749d8b159c7c29b603628", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-119.html": [ "0f093970f64ea84b1246ea4d2c5d8e60667bdafe", "reftest" @@ -510606,10 +512198,6 @@ "29f3c50088569d88a654234d89ad4370165f89e3", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-154.html": [ - "3ad85f1ae1907eb7d84fca3e72d00cf8030adbfc", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-155.html": [ "a7761d9e1602484a87506326ea69043f675a6b89", "reftest" @@ -510742,10 +512330,6 @@ "559f33d4579d496a16877f4ce02578347dbf74c1", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-216.html": [ - "a4bd3e721b66e12ec309e87649f97b7e0fbdebf9", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-217.html": [ "88de4809077f221e3f12f8a2d3b4d3d05625c27c", "reftest" @@ -510774,10 +512358,6 @@ "8dabbc687db8e345f813add7637b021b222030fc", "reftest" ], - "css/css-text/i18n/css3-text-line-break-opclns-224.html": [ - "7918d0d8ad4661fa7f7068eb0b3d0e5db647c295", - "reftest" - ], "css/css-text/i18n/css3-text-line-break-opclns-225.html": [ "4baee0c9306bd759257c53af174dfde8be54b5ee", "reftest" @@ -511814,10 +513394,6 @@ "dc4cc7e9c23a9d36c674cd0822d22b3d6119f154", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html": [ - "e80305b0df39b2df3bdc1f4876eb4433e6babcd6", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-014-ref.html": [ "d4ac1cada77f7287da48ade3857e5f68670ba98d", "support" @@ -511954,10 +513530,6 @@ "4baf979c65a0ffa4a83e65e7fdfe5f457517593f", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html": [ - "07db3b91c4798e502c9f8ee2b931d8d0d0f461ce", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-049-ref.html": [ "b612c3d8bb714d1b951f963d50e8275d1a0f27a2", "support" @@ -512098,10 +513670,6 @@ "83eaef84e9d0e3f58905b9a6f7268018e4014194", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html": [ - "df62ed8942fdb2776c0a01d9765b71a4167300e5", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-119-ref.html": [ "0140d6fce18604a51b1087c9cd1107b0b15b4b90", "support" @@ -512242,10 +513810,6 @@ "4dda7948a8ea442ca2c7e4b46b831cf3ac1fabc9", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html": [ - "cd266d86aa2de24d72f14f39ea675c18abaec31e", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-155-ref.html": [ "b311bf9cfddc1217dd1dc5a96199ca8d8d786e82", "support" @@ -512378,10 +513942,6 @@ "e9cf46fd6dfa7fb82431b243d897c81c283acd1d", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html": [ - "fbdfa9d7795fc6294e3807bc913668f4501eb8f9", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-217-ref.html": [ "9a4bb4d06e18c429ac3edab4ac263c77d08aa625", "support" @@ -512410,10 +513970,6 @@ "3d18208ca74d7809712f1e80d81e2dcb771f585e", "support" ], - "css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html": [ - "d5c3459ae7a3f98a76a969384b7377ad85800dcc", - "support" - ], "css/css-text/i18n/reference/css3-text-line-break-opclns-225-ref.html": [ "acea6f0656160271223ba2513b84a89b50a1c643", "support" @@ -512546,10 +514102,6 @@ "634018ab5c30e499c6eed93465cfb7d02e2d3f02", "reftest" ], - "css/css-text/line-break/line-break-normal-025.xht": [ - "5a41b63c46c0e0e5fbadd007177d7414fe0ac8b7", - "reftest" - ], "css/css-text/line-break/line-break-strict-011.xht": [ "deef4c827b5323ca7be4ff758b36f2a99316d5a6", "reftest" @@ -512586,14 +514138,6 @@ "f9c1ce1b514450757796500b3c53ee6e8f84e842", "reftest" ], - "css/css-text/line-break/line-break-strict-018a.xht": [ - "c262806975c9049cae9aaec4d564d1d6d52866e0", - "reftest" - ], - "css/css-text/line-break/line-break-strict-018b.xht": [ - "14de59c749d0ac55a755ce4a30ffbecfb89fced8", - "reftest" - ], "css/css-text/line-break/reference/line-break-anywhere-001-ref.html": [ "6224337b8fabfa02acd3e742a65d2c7905043648", "support" @@ -512622,10 +514166,6 @@ "51fbacefed3e99ba0d2ed0f3e962d53bc441808f", "support" ], - "css/css-text/line-break/reference/line-break-normal-025-ref.xht": [ - "505f2648f4170c7f16187cbee9409c5debc1b8ef", - "support" - ], "css/css-text/line-break/reference/line-break-strict-011-ref.xht": [ "801a813b828a2a36c67c4d3b14807cfa88a96748", "support" @@ -512662,14 +514202,6 @@ "b7666d3779f515011a3f35267e3416af80e643e3", "support" ], - "css/css-text/line-break/reference/line-break-strict-018a-ref.xht": [ - "28382a5ee66ba23081d0c3562508d7c9a057804d", - "support" - ], - "css/css-text/line-break/reference/line-break-strict-018b-ref.xht": [ - "087ae59ceba531e62b44b8eff861a0ad9ecaa192", - "support" - ], "css/css-text/line-breaking/line-breaking-001.html": [ "3eb24937c6a4d0fa50c98373bec24eb6b9575401", "reftest" @@ -512714,6 +514246,10 @@ "acb72d2a4c3d5b74e63652ea19c3ed13cf1755ea", "reftest" ], + "css/css-text/line-breaking/line-breaking-012.html": [ + "e9faec31d9058bb61a9e41ba62b1f57082ae3ee2", + "reftest" + ], "css/css-text/line-breaking/line-breaking-ic-001.html": [ "1ae52aede1788270943bb03bb44d1c391a65a0b3", "reftest" @@ -512730,6 +514266,10 @@ "06870b5369af27006026689d97b057f7816b4c3c", "support" ], + "css/css-text/line-breaking/reference/line-breaking-012-ref.html": [ + "dad351b104faeae8bc8d16632c7e57d01a0fdab7", + "support" + ], "css/css-text/line-breaking/reference/line-breaking-ic-001-ref.html": [ "7757ffc4116743ff6f98649310bf8b1bdc7027c9", "support" @@ -514362,10 +515902,6 @@ "2c693ccf4d431a5fcbc55a1184f550b152b1c498", "support" ], - "css/css-text/word-break/reference/word-break-normal-002-ref.xht": [ - "d3f4b15b3f769ccad81d4839c4c35aa93077fc04", - "support" - ], "css/css-text/word-break/reference/word-break-normal-ar-ref-000.html": [ "3022f73bbcdeb8abbc14a1081a515273dba07f9c", "support" @@ -514510,10 +516046,6 @@ "c24f0f91da19e34b3fe594e8139190b6dde59ed4", "reftest" ], - "css/css-text/word-break/word-break-normal-002.xht": [ - "f1fd11fb63896e439b9970d448861de78a986882", - "manual" - ], "css/css-text/word-break/word-break-normal-ar-000.html": [ "32204f818ee4de698be8499f33aadd2adda840d6", "reftest" @@ -520663,11 +522195,15 @@ "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html": [ - "63600cc74e62ecbaf98bf786de17362764ec947e", + "b20c888c2ecc5dc7f87a2fa7114141a86a63598d", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html": [ + "55f20761cbbe3dc27c718621d3e4d57eae041e8a", "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html": [ - "236520d8ac6199066d1e082b9860f2381ff61be6", + "d2ab852da57ca24e9675fd670a0bf3546063fa69", "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssMatrixComponent.tentative.html": [ @@ -520726,16 +522262,32 @@ "700fae462f258404f3d0b8fad290613fc1929e1d", "testharness" ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html": [ + "49fe1442d98ad498f3e0e6ce497a6f1ee6e62c31", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html": [ + "d91a7d0e8ee2cc40fa1b2747bee392a2cc2deae2", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html": [ + "592897dad11ef8c6aa6ad42b9d779421cdda1a5c", + "testharness" + ], "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html": [ - "46d36ae2dc68f3f3f1cee5d85cb5f496b7c3fa67", + "c6dc634947afd7b84a6feda270ebac6ac2fa29c7", "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html": [ - "ba012ace40e63718694a8cd91ba74039787ff666", + "89a261a071b9719cb44a03d9cdbf2e8f869b2c23", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html": [ + "b089be0bb5186c545f432b48c38abed458437129", "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html": [ - "25b5d1108e4030ad8420a271bfaa85ce68d8bf59", + "dbf9e28846ef3246dabc72ef2266871393f6187a", "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/add-two-types.tentative.html": [ @@ -520762,8 +522314,12 @@ "e19ec7ede86d52ecf29a142607de481facabcfb2", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [ - "9d855c711332b344078fc89bac6ed67091fa1ddd", + "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html": [ + "9abf1e98ec0291f305c274e24f34b15b8c334e72", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html": [ + "a59472a3897ef37e3978f803f6a36d7a893e1f95", "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssnumericvalue-multiply-two-types.tentative.html": [ @@ -520990,6 +522546,14 @@ "6fb5b014ffbbe4fe9c0019cea618a001fefdbedd", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/break.html": [ + "d23705e018072f14ceb36d364df671f7fd6a6617", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/caption-side.html": [ + "fc24cf6f0e6612646b6d8b0229ed31c2de97d763", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/caret-color.html": [ "d4139aeff755abe89ee1e04fcd34ccfba4efe91c", "testharness" @@ -521018,10 +522582,42 @@ "d7424e7fb7c27cfa31fb0e40ee9045129ed96c03", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/flex-basis.html": [ + "87f3eed7306a43a312c95fd8b525fcd5d3e167cc", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-direction.html": [ + "a27187c16080fe2daacd1c0a99657773a2b8c2d0", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-flow.html": [ + "7cc29cb60930ad904ac6a90ed6fad5673b84ed81", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-grow.html": [ + "7882699c2414306523501d253115198622a18cc9", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html": [ + "8025e8905f2547ebdad41159c1872e6c9d868458", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html": [ + "1f57e275b4c9d195e9f82ead41410f0954fdff86", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/flex.html": [ + "3bfc9c981b2131ed480f5d0bc2b90f76743e2b28", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/float.html": [ "1dfca0045c2b57f36d5165139087301ffe54c63a", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/font-size.html": [ + "bb31e5cb88492bece2c54ff106d01e789e3f08a6", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/font-style.html": [ "c4a42872dca602b71f021799d29e404cfa7ed90e", "testharness" @@ -521031,7 +522627,11 @@ "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/height.html": [ - "36b8677eb45f8555da4381e1644624df2f2060e0", + "617ec941ab1cbd02b31b8a9bb7ce6da311109476", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/isolation.html": [ + "883b36434d3e3d8fee25f0ae0fee9884b5ceef44", "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/left.html": [ @@ -521058,10 +522658,42 @@ "2a20c6818e9d71adbf3902fde74cb26136917e72", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html": [ + "43a29c4680d0f93c586f3e7d772fe64a56947d87", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/object-fit.html": [ + "9e16a0dac44abcdb6b17475c429694ec78c5ae0a", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/object-position.html": [ "c3040ca9284c50c2149dc09502fde5f20d0a4baa", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html": [ + "6f6411b7eb198d0f76ea077f80e5974b50dd5ee1", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-distance.html": [ + "57718eea1d7c224115d7a82b0a19f368354200a7", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-path.html": [ + "5822486bf8d79310965dddcb5bcbe6bf69ac89c4", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-position.html": [ + "a0e3b777d15caecaee854c3e5fb050df8c736d0a", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html": [ + "f405f78977c3521f2dfd78316b78ad2bbe61845d", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/offset.html": [ + "87b8d31906a2bf96a38e5112600fcd8970642d53", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/opacity.html": [ "3812b01e648e3b043abbd2fe82c3733309da49ad", "testharness" @@ -521086,6 +522718,10 @@ "70c2e29badef7528469bcf11e1cb7bbc6cd519ea", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/pointer-events.html": [ + "71b42cb53d950eb62309b4567d3c7bc62dd1e28e", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/position.html": [ "4e3eccee58cec470febe4cd9a9149f4b4436487e", "testharness" @@ -521095,17 +522731,29 @@ "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [ - "6b7b909fe2cf5576ea5e483a0c0ee8a2977171f6", + "7e6c530cf36cce5d7b8d02abbbefbdd4370d1be1", "support" ], "css/css-typed-om/the-stylepropertymap/properties/right.html": [ "68a2611eaf9eecb7393c2b0db0f4378ebe285f22", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html": [ + "7d4636be3e35639b915917412465b443241e95b1", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html": [ + "d37d336e4695e5055706a7822572b81b943fdbd4", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/shape-outside.html": [ "3189c7b3903d30f31836ea845aebecf599198c79", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/table-layout.html": [ + "e56449111778ad18152a42d54fc88097950f15f0", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/text-align.html": [ "88a1f5866a767c25dec2ef75728c68c5631d371f", "testharness" @@ -521122,6 +522770,10 @@ "9419ab219034d1fb732965ebd3a03934bcaddf5a", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/text-orientation.html": [ + "919ebc1fadf6e097071a0f1618afeed0849f18e6", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/text-transform.html": [ "53f0482b667f049170dcdfb5de29dedc6897d09a", "testharness" @@ -521142,6 +522794,10 @@ "b735f3ff6dba561cf2e35a8a85a8e2b93c0edc61", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html": [ + "b676714807b4fcdfd5ba7555f7c2ee3d1d9590d2", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/vertical-align.html": [ "41ae6fd66b5a0e6f3b5f154d839362a4921712cc", "testharness" @@ -521155,7 +522811,11 @@ "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/width.html": [ - "d429f7a88012179ef3d604b79b3db4aaba0ca426", + "205915eb7162e23fd5600488304dd8dfa8e51ee2", + "testharness" + ], + "css/css-typed-om/the-stylepropertymap/properties/writing-mode.html": [ + "3867e6c80011aaccb4b18efa37dea27d62dcf428", "testharness" ], "css/css-ui/OWNERS": [ @@ -523559,7 +525219,7 @@ "reftest" ], "css/css-values/calc-in-color-001.html": [ - "32a0face898f08b854ac392c75368282d718be32", + "6a88138c89c65b513310fb27e1f301ab1d652c98", "testharness" ], "css/css-values/calc-in-font-feature-settings.html": [ @@ -525827,99 +527487,99 @@ "reftest" ], "css/css-writing-modes/block-flow-direction-slr-043.xht": [ - "2572d212eb7b0ee8cf8c8e64998a9f6510fbb5c8", + "468a21488cb4ec0f053f00899e566a548e21a823", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-047.xht": [ - "8cff518b35a454ab79e535cbaa3f2681467852bf", + "05eec73fe552650ff14ca9b5e09b74968f1c8599", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-048.xht": [ - "3c4168a6b7a4394e79332fc44fd6ce2ed4bb4d05", + "43dcb63d597c67fc6b14f156c171679a3786b8d3", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-050.xht": [ - "2743c4da7bcf425c7a64eb830812e556793399ec", + "6c15357d7652f8ba6cd2ff875f6b36eb09763324", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-054.xht": [ - "02abde8b92072855802e6c62b00c2f80e879d837", + "9d57811c44d407987958dceac6ffb9a9d4b39989", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-055.xht": [ - "dcdc9e8b53066918921fcd3344cc01e63b949e57", + "efaef29e1503416ed9b28bb5e3168d8de17398cf", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-056.xht": [ - "ffc2b5d2cf95ecb2c34f87c8f5d1fac272f5dce2", + "e9a66eec637e2f341d1ad14fcdcd0de19fb6a653", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-058.xht": [ - "911b15f6f34dadc694fb616d8d407a9b8d9f6c04", + "9cccfb1b3f67046b5a983636378f702d9a41195c", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-060.xht": [ - "bbc062eab7ed6255f6003dd3854a425b3924c00f", + "83d909644b4cb17d1226d9ddbabeb7d57e9e87f1", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-062.xht": [ - "b6aad0e119a3c1c7b499f9c6bc7c995f27c67af5", + "8a8b2aab628ccf23c8ccd4af5afe2ad1b9fa62c3", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-063.xht": [ - "e0b04531c577ba0a981b8924821fae549ebd1929", + "1578a394039a7f94e50b8c77c595a9d30a4b2440", "reftest" ], "css/css-writing-modes/block-flow-direction-slr-066.xht": [ - "7ed377a5bdeea3febd2ce9dd7a9c026309fad9a5", + "c9e1b47e57e577657314b5cd0238f2af7df10528", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-042.xht": [ - "a744d2956897aa50b9cdd40c02b11095fac033d7", + "27278ea5ee212762f084cbd7611ef7e656ac78af", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-045.xht": [ - "3b6989eeb0d72be091178857e943a07d8ebd8222", + "be9b0a91886920b908e926178107931414dc53f3", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-046.xht": [ - "1538cbe4469bf4ad7a76ddbb6b8dca0bbf66b677", + "0146a4ab943bd9fb93fadb6dbefbc2b061a97ed9", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-049.xht": [ - "ebb14e798a8130602aca276ea0a38630dec8d34e", + "a26dd15a464d684d2a87482e907089b704464ef2", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-051.xht": [ - "4e09e05cf6a050eb0f14005cc30a1265cdb77965", + "0883264754854ac8ece45750d009d3a20775a060", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-052.xht": [ - "efb981070ffcf1a36b585629f9280d24a4027e1c", + "1e6b03e2b281645ebf6765bd00b3f647f3deb2aa", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-053.xht": [ - "435c9bbece00e10a9c014d83f0f98ecc9b916d33", + "124fac2b2d256a256ff30da3ff0a19aef367e937", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-057.xht": [ - "f9cf903b644bdb5bed3cd528e4c1767373608109", + "8ee56fb9e1b864628665b00aec48f6f103682727", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-059.xht": [ - "195cc7d500300a9694ff11107bb4185fec28c386", + "cc664535dce2cc996e577bc11da72d54e17e43b0", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-061.xht": [ - "1b94eba25c014f6e170f988bd6a122b923a60d74", + "d9a28ec7b30504a79411a9b1394e71fa1af106d6", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-064.xht": [ - "22f96cf894b72203395395406e8fbeeca623e3c3", + "94679f337417313d58dcc3f51c4f6c10f32fdb80", "reftest" ], "css/css-writing-modes/block-flow-direction-srl-065.xht": [ - "10c9d6885cce53c90767914e3e1e02a69ba60809", + "69eae3eebfe5f92588f04589972ac026869ed0c0", "reftest" ], "css/css-writing-modes/block-flow-direction-vlr-003.xht": [ @@ -526715,19 +528375,19 @@ "reftest" ], "css/css-writing-modes/form-controls-slr-004.xht": [ - "efba29b2412dceccd9d80b864c3083dc0ca3bab4", + "5913b5c624e76dd88b60c4483a7508d9ee1acdfd", "visual" ], "css/css-writing-modes/form-controls-slr-005.xht": [ - "f3879665cf517981289235d53183f865e7edc96d", + "f8580b2937e0723953124a5d3ad5211d193b98a8", "visual" ], "css/css-writing-modes/form-controls-srl-004.xht": [ - "33e6c1685b8e7050b0177eaf289587a370a22788", + "4add739342cfad21e3c8181f4879b0ef81969823", "visual" ], "css/css-writing-modes/form-controls-srl-005.xht": [ - "ad7e8fa2e34412a97f993bdf500bf1ab92468618", + "610192f804eaf3e8aa8ec6ffe32e373f5121182f", "visual" ], "css/css-writing-modes/form-controls-vlr-004.xht": [ @@ -526755,7 +528415,7 @@ "reftest" ], "css/css-writing-modes/full-width-003.html": [ - "a2b545c155e7d0de06558de5eb9255a06a7b623b", + "3c894f12a91dc9ec795da1d1ce9af343f4056e4f", "reftest" ], "css/css-writing-modes/height-width-inline-non-replaced-vlr-003.xht": [ @@ -526855,11 +528515,11 @@ "support" ], "css/css-writing-modes/inline-block-alignment-slr-009.xht": [ - "bb08c9b4dc7d43e21ba06ed8d627a83f3fe88195", + "f4b234caea1eb70e611105f489162a5e15c8b2ab", "reftest" ], "css/css-writing-modes/inline-block-alignment-srl-008.xht": [ - "e5a69f570eaf4ae8301497f368ca28c56ae37f64", + "752dcce21012f2160340755cf2e61e07c9af0401", "reftest" ], "css/css-writing-modes/inline-replaced-vlr-003.xht": [ @@ -526915,75 +528575,75 @@ "reftest" ], "css/css-writing-modes/line-box-direction-slr-043.xht": [ - "261b7ba2d63953ed9683203fb645c7a61d5ee69c", + "fc746d13200941edbb5768005fce9da1b6f027da", "reftest" ], "css/css-writing-modes/line-box-direction-slr-047.xht": [ - "4e79c976242cfa75a176c0cada39d01e5c78ad85", + "199beaf9ce8b56dea37c3de62d90622325b8dcc6", "reftest" ], "css/css-writing-modes/line-box-direction-slr-048.xht": [ - "68d1ea51fd4fc739b34c552d51f2fe7d1353d623", + "b3cdb4f8b8e3f6a87a0c7d0ed22c1f88e043b8b4", "reftest" ], "css/css-writing-modes/line-box-direction-slr-050.xht": [ - "e344509f83e8218038c33bc57afa4098415723c2", + "403ab8916ad7a46fcab2f89cd00341f5aba37951", "reftest" ], "css/css-writing-modes/line-box-direction-slr-053.xht": [ - "0a110aed9cf0daca3726b0e4f3f9dfaec9717531", + "ad831477dbe515ff69af28835bbf02ef52b7fd78", "reftest" ], "css/css-writing-modes/line-box-direction-slr-054.xht": [ - "d3f34a9fbcdf4829b89fe5d234f0fcdb790f69e2", + "5b40e37df4b14d673b18caf49b6585db8b929b0a", "reftest" ], "css/css-writing-modes/line-box-direction-slr-056.xht": [ - "7b4fee06564e1fbfbafd265a86169f0fed808189", + "7d22bd9249e1a57b911aeb9152005b762294aa3f", "reftest" ], "css/css-writing-modes/line-box-direction-slr-058.xht": [ - "b440c7611ba17503cf554743fcaa9b8fda4645bd", + "55b25b7f033bb947af20a050c898df46ce90fce1", "reftest" ], "css/css-writing-modes/line-box-direction-slr-060.xht": [ - "5b70316c9b4fb6966ca6be60383510c551031754", + "424ac86428fe16aab5d838593b7c3ecd2d9e2eea", "reftest" ], "css/css-writing-modes/line-box-direction-srl-042.xht": [ - "37802011406dd698ba6ca84fadafd41c80fe5219", + "3dd8e07bb61570b91c9752d86a441b48adbd73f5", "reftest" ], "css/css-writing-modes/line-box-direction-srl-045.xht": [ - "359d4e903bc5c9900afe137bf04f845c5343c58f", + "efaa79a5ef835c105167bdf77a3d706812421a23", "reftest" ], "css/css-writing-modes/line-box-direction-srl-046.xht": [ - "f9f0ab3c9c737042296d1ce42815dfd47b2ca1c2", + "cd31562a8364cf6e577c00c34919b0e5aa1ae964", "reftest" ], "css/css-writing-modes/line-box-direction-srl-049.xht": [ - "b193a9a935b1676d7589bc8c1d8970f50a60df81", + "ef4bb25f2bb85fb85a12c82a51a84523cb0d621c", "reftest" ], "css/css-writing-modes/line-box-direction-srl-051.xht": [ - "aee21a5a74b20866c88ed013246ebb9f75ff3abb", + "eebeb3a4e949de579028555257d7b9101fa766a7", "reftest" ], "css/css-writing-modes/line-box-direction-srl-052.xht": [ - "c3391087560a125cea050895827a92f2f4146dd7", + "d835e7576a419bb70f4215d87c17d8ab8fc719b5", "reftest" ], "css/css-writing-modes/line-box-direction-srl-055.xht": [ - "a3bd03f28860f8918f41fd6e265d02cf266cbd80", + "45bd2391e3aecb1dafe25e8ee8c799aaf65e5b28", "reftest" ], "css/css-writing-modes/line-box-direction-srl-057.xht": [ - "0f2ce06eaddcaea0bce8150960e7559ebb950160", + "1b7a10cb7b12ee4e86d6dc3e4cd0af1d52d2e78f", "reftest" ], "css/css-writing-modes/line-box-direction-srl-059.xht": [ - "fe8eefd194242a82cdcdc6eff35a120b64273863", + "1eb4e84ae0649a0a08cfc1b4f5bc0b58c8816046", "reftest" ], "css/css-writing-modes/line-box-direction-vlr-003.xht": [ @@ -527419,11 +529079,11 @@ "reftest" ], "css/css-writing-modes/outline-inline-slr-005.xht": [ - "288265613525071c968c1dcdf5321a316e6c7e3a", + "16186c35b27f203ebc933dd709616485ee9d9c20", "visual" ], "css/css-writing-modes/outline-inline-srl-004.xht": [ - "edd7d159627dfa8f0dd4a7f8495ad9337ab340c9", + "133ce7d9f80f6348c3b31371bca5411e059da107", "visual" ], "css/css-writing-modes/outline-inline-vlr-003.xht": [ @@ -527531,11 +529191,11 @@ "manual" ], "css/css-writing-modes/page-flow-direction-slr-005.xht": [ - "403dc532d7767e83bb95901dcb52e0f76e430c7f", + "8201313e778d8e5131309e0c9754a62bb7bcf894", "manual" ], "css/css-writing-modes/page-flow-direction-srl-004.xht": [ - "b9d1556c197d048482c80232527c837e2e4a4cf8", + "b7079a0dd1cc46e8252deff8a3b08e0915ea5a31", "manual" ], "css/css-writing-modes/percent-margin-vlr-003.xht": [ @@ -528131,19 +529791,19 @@ "visual" ], "css/css-writing-modes/row-progression-slr-023.xht": [ - "e67bf87a273fe2adf826e9c9027124223cb85467", + "521760bfe32e1bfc2847cad41374adfb3364189f", "reftest" ], "css/css-writing-modes/row-progression-slr-029.xht": [ - "ff69b7bc92bf0170456c7571377ae8f926022825", + "c0e02776d0e1197ad46fed136c030dcfc2f200cd", "reftest" ], "css/css-writing-modes/row-progression-srl-022.xht": [ - "066a4e77a127b462c0acf5605310bc55158a0855", + "cce1619834bebde3142f253f51f7213547fc2a3c", "reftest" ], "css/css-writing-modes/row-progression-srl-028.xht": [ - "f9c36aee12493a18571fb71faee27d25ce438e8f", + "69273bece274aeb003d7b2c8161c49ee0707c551", "reftest" ], "css/css-writing-modes/row-progression-vlr-003.xht": [ @@ -528159,7 +529819,7 @@ "reftest" ], "css/css-writing-modes/row-progression-vlr-009.xht": [ - "8afc2dba356e13db199c7ad74c2e3feeb0fc71db", + "f64e3c38517f2ed06ef2aceb54271ebb816dde1e", "reftest" ], "css/css-writing-modes/row-progression-vrl-002.xht": [ @@ -529018,6 +530678,62 @@ "770cfe7939de94e221926b65bccfa057ee7711f2", "reftest" ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html": [ + "dc2667e1dee2cb1c22f678aabe4d617bb4f64f69", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html": [ + "efa71c02524fa57eac92e8311b7c95befd06bda1", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html": [ + "da28e37e576350d3eec7061f0dab66d5d7d4a261", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html": [ + "109856fd1d885f7d5f8cd4a6c0db0eb8cec83dc0", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html": [ + "bea55f8e91d4ff012e7a2ce5efa70b653893c565", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html": [ + "186bbff0e10a299950a3594349115956a977d2d8", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html": [ + "663ce0026de3c61a649c77aa6ac0097940ab1a47", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html": [ + "3b68b98fd6e8be39b56d2882e0fe739d46b826d0", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html": [ + "2d4ccf4c626ead622054753ebdabadc2626483f8", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html": [ + "6d45ce1c05f792c126bd5c912f6f0232cd6a8fb9", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html": [ + "582ce006ae8576c9b44f2532fea73641a7f4ad9b", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html": [ + "a2a544c867707e4ac9715495c3ba7b6d26670818", + "support" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html": [ + "b4a0abd69a69f19ef671042ee972a7fe62675fc6", + "reftest" + ], + "css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html": [ + "2543ef7b6e41b2b0614c32167f4e0a85319dae0c", + "reftest" + ], "css/css-writing-modes/support/100x100-lime.png": [ "b02fc2d0ad1d95a2aeb6011022e63928841b183f", "support" @@ -529599,11 +531315,11 @@ "reftest" ], "css/css-writing-modes/table-column-order-slr-007.xht": [ - "ce7897d71baa58c00c3a4dea8130709d37a56c3d", + "497d991283082dbe537a50648678f95c05d5482c", "reftest" ], "css/css-writing-modes/table-column-order-srl-006.xht": [ - "82f1efc4262858013fa4446ac162b949f9a0abdd", + "19751b05f2d9f4bdbba1282e4b31cddfca4b87e0", "reftest" ], "css/css-writing-modes/table-progression-001-ref.html": [ @@ -529619,19 +531335,19 @@ "support" ], "css/css-writing-modes/table-progression-slr-001.html": [ - "136acff6e0c7e9ad1fc02b0c2ec56d86fe3b2334", + "4e103df8bfa38417fc30d883061bd53e2b9b269c", "reftest" ], "css/css-writing-modes/table-progression-slr-002.html": [ - "091e6f5ca213532c2933f54bcf3f1ce2b6e6ac14", + "601c9bfde09243ae6f228ef7c50c4e74f82a02e0", "reftest" ], "css/css-writing-modes/table-progression-srl-001.html": [ - "81bb9759b21250d322ed5b35306bc279c65dbac7", + "3d16b996d03fc8852ce293d2b74c1bc48ec468d2", "reftest" ], "css/css-writing-modes/table-progression-srl-002.html": [ - "8db7922b0c7faadfed55ae21041a7a4945b472b0", + "3f34be40a6e47e76ea05047d67a3b60015dcf664", "reftest" ], "css/css-writing-modes/table-progression-vlr-001.html": [ @@ -529815,11 +531531,11 @@ "support" ], "css/css-writing-modes/text-baseline-slr-009.xht": [ - "7d7d462fb5e26a2f735da1b9d391d3af4c82e9c4", + "d0bc650954a32ef38b4fb380e1949fe1c9744837", "reftest" ], "css/css-writing-modes/text-baseline-srl-008.xht": [ - "e69f1e570a636bd447dea014e9481096cb0d1787", + "867ac538416750661b1deb445c15485afec865d9", "reftest" ], "css/css-writing-modes/text-baseline-vlr-003.xht": [ @@ -529879,19 +531595,19 @@ "reftest" ], "css/css-writing-modes/text-combine-upright-parsing-digits-001.html": [ - "9901ba440e7856a1dba6086417a59e9a6aa2571f", + "9dccbac170af19640e3352cad5d3cdc876ea0866", "testharness" ], "css/css-writing-modes/text-combine-upright-parsing-digits-002.html": [ - "b3a3c71f86a553bc88e319e3f347e1209748fb9a", + "e7e0061bf2aa30f1d4c25b8ea75abeec8183dbab", "testharness" ], "css/css-writing-modes/text-combine-upright-parsing-invalid-001.html": [ - "ceb1e3678cc6d520bbfadae029e9c3cc06e453e4", + "399800cdad8850d9ae841fa467c73f05b2fd3b30", "testharness" ], "css/css-writing-modes/text-combine-upright-parsing-invalid-002.html": [ - "8cb9289e79cd60aec1115c086118a4d3c9834265", + "318ac1d26b5b4dfd5bf2ab8362c8ae365aea7f34", "testharness" ], "css/css-writing-modes/text-combine-upright-parsing-valid-001.html": [ @@ -529911,39 +531627,39 @@ "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits2-001.html": [ - "cac653b24b0719df3519f28cdb7e4b8a53eccd69", + "76e9b4108255781dc974e5cc774ce43bb04c7cc8", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits2-002.html": [ - "78ed12d8f5fb5437b97d21576931eec0d3719dc0", + "3fcb759c73f430c5daee90132f29ad00683db404", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits2-003.html": [ - "4326fc4517828a283b29baaedc4e7fa45e5626fc", + "878ffcd6350bead22eb02c0c1b5ed4cd674c4377", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits3-001.html": [ - "b0b97a321f310a1053873bec0912996f1e02d5bb", + "dd3a4ee60668ef908f457f53caae7f31047c5c89", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits3-002.html": [ - "3ea6cde183d478ecce31edd3ee2d752139a2b73e", + "0d8937fd353ffc6afb10d539ded1d9f749221689", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits3-003.html": [ - "dbdcf29eb97c0b9512f596abff4f314059aa5df4", + "801083d2e61aa03e0245c693309c4771faa65c90", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits4-001.html": [ - "c30132b2caf8ebb340dd38e5e4cc6d4f0121f9ff", + "79634f21871f273bc36613c8074e33bcc55ded83", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits4-002.html": [ - "e4d39c7a7edb4e10f394970439f0cca5c0c5f128", + "92af4d9107ceb541ee1f98ad55e9d2c56ce2909b", "reftest" ], "css/css-writing-modes/text-combine-upright-value-digits4-003.html": [ - "431d2e53d38c6c3800ff70c9c79bb6738b364cb7", + "ee5e7721a870291288a6e5a408ac2613871ac3c8", "reftest" ], "css/css-writing-modes/text-combine-upright-value-none-001.html": [ @@ -530119,7 +531835,7 @@ "reftest" ], "css/css-writing-modes/text-orientation-mixed-slr-015.xht": [ - "c43092d37cb60b744d80cddae4a9b274a0073e5a", + "5b03427b13a9586f7891acc84b4481e7be5d9ab4", "visual" ], "css/css-writing-modes/text-orientation-mixed-srl-016-ref.xht": [ @@ -530127,7 +531843,7 @@ "support" ], "css/css-writing-modes/text-orientation-mixed-srl-016.xht": [ - "c23b11adbb83d56d80167d3373f153a7828911a0", + "e915d9d4cf85cc76c3c2bfb23d880229144cf336", "reftest" ], "css/css-writing-modes/text-orientation-mixed-vlr-100-ref.html": [ @@ -530235,7 +531951,7 @@ "visual" ], "css/css-writing-modes/text-orientation-sideways-slr-019.xht": [ - "a044836b817181faea607eb8e776db82a70982f2", + "6402e262986377f75a9734b2ad39c89462f1e4be", "visual" ], "css/css-writing-modes/text-orientation-sideways-vlr-100-ref.html": [ @@ -530255,11 +531971,11 @@ "reftest" ], "css/css-writing-modes/text-orientation-upright-slr-017.xht": [ - "a7e63e94d73c9df28d7eaf38f7760e3c49442529", + "37048959d42607f908d704950860a82c605eae29", "visual" ], "css/css-writing-modes/text-orientation-upright-srl-018.xht": [ - "588b6ae8ca104f3e636862f6086b9fae928b069d", + "e2cc82de89c7a33c5c18c300d0671c9da96fca63", "reftest" ], "css/css-writing-modes/text-orientation-upright-vlr-100-ref.html": [ @@ -530439,31 +532155,31 @@ "reftest" ], "css/css-writing-modes/vertical-alignment-slr-029.xht": [ - "60ef4cb770927ea21ecb085b7e29b4ce02346d25", + "d0dddcd9cb5bc21b2f1566439d8ef91a1e68b214", "reftest" ], "css/css-writing-modes/vertical-alignment-slr-031.xht": [ - "c6e6346fc92b874121cf80f409a6994dc6bee3e2", + "c2253830b2060386fa7d93a8a07acf34d1895076", "reftest" ], "css/css-writing-modes/vertical-alignment-slr-033.xht": [ - "1af7bb1dbf5462ebdf16ea4b3725c8b6ee6f8866", + "1db81b80a78fbe2d8f74f156a96abf47bf1f58c8", "reftest" ], "css/css-writing-modes/vertical-alignment-slr-035.xht": [ - "219dc850c6de419c45719527b7f30ca84953e099", + "147364b7e7aa459c7c52098a9acecad7ca97e970", "reftest" ], "css/css-writing-modes/vertical-alignment-slr-037.xht": [ - "078eddfc006c52a62557cf6f4b386a9a449a4084", + "a47e91d8d292ab9521b3d2319b3032fb090778f8", "visual" ], "css/css-writing-modes/vertical-alignment-slr-039.xht": [ - "d83cf22f8ff17330a4ac17bf3f3edbd00d5de407", + "355c4cf541617219a6afdcfd0ec35df37e8f9faa", "visual" ], "css/css-writing-modes/vertical-alignment-slr-041.xht": [ - "fff37acb50ac24b0d879d99e8201a02b9c471e93", + "a81d5cefd09e9f4eb32b85b5e91f9868de5d8b8f", "reftest" ], "css/css-writing-modes/vertical-alignment-slr-049-ref.xht": [ @@ -530471,31 +532187,31 @@ "support" ], "css/css-writing-modes/vertical-alignment-srl-028.xht": [ - "584717924daf8186707532e90d19491fb9596cd6", + "3dedf0183d3549bb8d0842342b1ef7bd57f7f280", "reftest" ], "css/css-writing-modes/vertical-alignment-srl-030.xht": [ - "de4cc7b47866a44f91e6d09b82f768390278ce90", + "f32e7665116bd84b56077e5d3606ab2c9fac3c0e", "reftest" ], "css/css-writing-modes/vertical-alignment-srl-032.xht": [ - "fcb7589f869bf40448466482296a6d6b4e91bf4b", + "3db8f8bb81825a2febf310512c12f05e1c6cace0", "reftest" ], "css/css-writing-modes/vertical-alignment-srl-034.xht": [ - "d3d64bc592c7d3873af17103471d0702d7739dcb", + "81ebb41e47a0723cf5796836efcdab2f4f83decb", "reftest" ], "css/css-writing-modes/vertical-alignment-srl-036.xht": [ - "2da544bd13f70a1c3fa82373ae03f63a81a701ad", + "accf5217f77f550153cf3943f53884064f5c68b6", "visual" ], "css/css-writing-modes/vertical-alignment-srl-038.xht": [ - "6a0837aded8404f898d7730521dca7af62f06858", + "c6ccd92ac36fc7981d06ec2ab44449051bc8ad79", "visual" ], "css/css-writing-modes/vertical-alignment-srl-040.xht": [ - "856d31a7c41a2daac058193905e108f521186a4a", + "2a7490ddce4f56719debbf5e87095c24e7cb9397", "reftest" ], "css/css-writing-modes/vertical-alignment-vlr-011.xht": [ @@ -530587,7 +532303,7 @@ "reftest" ], "css/css-writing-modes/wm-propagation-body-008.xht": [ - "200b7875de084cae5d9657b123b33f3464557f6a", + "a58999e55ac7968974cca7ad14d0a218ec140458", "reftest" ], "css/css-writing-modes/wm-propagation-body-010.xht": [ @@ -530627,11 +532343,11 @@ "testharness" ], "css/css-writing-modes/writing-mode-parsing-sideways-lr-001.html": [ - "d3af3d60656357583e722c983d060c1a30e0dabf", + "e57e20399404d3ce38be885b081b916666e01ea8", "testharness" ], "css/css-writing-modes/writing-mode-parsing-sideways-rl-001.html": [ - "6434d9a2c8f70308094f9626e995b5cfcffe82a4", + "eef44aba22253a177525c039218497d00864d05d", "testharness" ], "css/css-writing-modes/writing-mode-parsing-svg1-001.html": [ @@ -530666,6 +532382,10 @@ "020d13088ba7b4b58ecb80bef3656a5a415b03ea", "testharness" ], + "css/cssom-view/GetBoundingRect.html": [ + "5017a0f369c71e3b952ba2fc555ec08f00e4359d", + "testharness" + ], "css/cssom-view/HTMLBody-ScrollArea_quirksmode.html": [ "6de6ee944522c61bc45335df91db210fd066b4f3", "testharness" @@ -531103,23 +532823,23 @@ "testharness" ], "css/cssom/CSS.html": [ - "2c55d573bbd90f5ca3e564131ae697b547e4a43c", + "fd9fd5a23066558960ea933a8dab6dec0039c649", "testharness" ], "css/cssom/CSSKeyframeRule.html": [ - "0246cf2511a18c247db1eabefec8b3590127d3ee", + "1a8e3e0ce0ab0d147efd0ae321a22441471db4ab", "testharness" ], "css/cssom/CSSKeyframesRule.html": [ - "bca997a63c1389ef6d14aac2f32ab770fbd15ec4", + "0d79c71fa08843fd830e06ffbff0ee1c5f6664d3", "testharness" ], "css/cssom/CSSNamespaceRule.html": [ - "701b19bdfa480a5e0997492094657e32ae11ea48", + "d12ac6dccba47c4fbe6cce03bb44e51b850fb07a", "testharness" ], "css/cssom/CSSRuleList.html": [ - "8d8b435c2398c7a9de5fd57584240e24b45b80bc", + "4d0b19a6e29ae7a721574e36b47985233ddc8bae", "testharness" ], "css/cssom/CSSStyleRule.html": [ @@ -531127,15 +532847,11 @@ "testharness" ], "css/cssom/CSSStyleSheet.html": [ - "f0d47464da9d30e70733f09af78f3e9f982c4406", - "testharness" - ], - "css/cssom/GetBoundingRect.html": [ - "7e5a8b25753ac970c2d192376c9dd93943b3dbb5", + "a69dbd728c19d1df95dd00f2750e0919893ce61d", "testharness" ], "css/cssom/MediaList.html": [ - "0357bff95fc870624d13ad3bf61cdfff5b2ad1cf", + "f3581dd2627cf4933c05f4cc61db1820f7587452", "testharness" ], "css/cssom/MediaList2.xhtml": [ @@ -531147,13 +532863,25 @@ "support" ], "css/cssom/StyleSheetList.html": [ - "3a0e6f64f70f863d679e537c4bfb76aaa0d3598a", + "0a1cd8ed56ac3a5b1a9556835d94fb80325199bf", "testharness" ], "css/cssom/computed-style-001.html": [ "0331a648e6b0d56f0e7365f1ff7d991ea77ce3e4", "testharness" ], + "css/cssom/computed-style-002.html": [ + "d6579788bcfaf1d4c09324ba877a26ff95d6965d", + "testharness" + ], + "css/cssom/computed-style-003.html": [ + "aece414b89e0fdea1030e4ca9011ab7d22f1b275", + "testharness" + ], + "css/cssom/computed-style-004.html": [ + "55010cf90dc7fc2ef8ec6cbd13d1ec947a823aed", + "testharness" + ], "css/cssom/css-style-attr-decl-block.html": [ "1d68a3fd1560308c0d2f3478864d84f4361e4ab9", "testharness" @@ -531179,11 +532907,11 @@ "testharness" ], "css/cssom/cssom-fontfacerule-constructors.html": [ - "c064661df74571d374f49a693f3263fcf138e670", + "4e368aa75d3840d7f819fd531c91417fd2dad63c", "testharness" ], "css/cssom/cssom-fontfacerule.html": [ - "ca5e2f162a4a0dd02f3c46e72b9e43e1b61d621a", + "b26c0a9584822f4e97d4e2f28507aa6e82a5fbd0", "testharness" ], "css/cssom/cssom-ruleTypeAndOrder.html": [ @@ -531214,12 +532942,16 @@ "c9ed57c7ef7a035c25feff4ea60547a57d727f31", "testharness" ], + "css/cssom/getComputedStyle-dynamic-subdoc.html": [ + "45d94c17f0a88877a8218135c94d331afcdf7df4", + "testharness" + ], "css/cssom/getComputedStyle-pseudo.html": [ "a2033405d6852cdeb4c3b8cf628f7c1d8f7cd1aa", "testharness" ], "css/cssom/historical.html": [ - "2c78218b89efb9bdf60cf708920be142051347c7", + "02b135e62439d775d7e8de7ca94c831a8d00e077", "testharness" ], "css/cssom/index-001.html": [ @@ -531231,7 +532963,7 @@ "testharness" ], "css/cssom/inline-style-001.html": [ - "da50f9738f161a0bb9af5a5636634346bb683fa9", + "4c58b6153eabe796749dcaf181e03d7dce2c9c07", "testharness" ], "css/cssom/insertRule-charset-no-index.html": [ @@ -531267,11 +532999,11 @@ "reftest" ], "css/cssom/medialist-interfaces-001.html": [ - "32d486ecdd41418e734be028c150b0183b8d3316", + "bae698d83d94e35d31750e0690e13c1ab5334379", "testharness" ], "css/cssom/medialist-interfaces-002.html": [ - "20d4d9e76e0331816aed5f70182dee6966e568e7", + "e04c0d3c8533660f524310350c7e71defa4888b2", "testharness" ], "css/cssom/medialist-interfaces-003.html": [ @@ -531279,11 +533011,11 @@ "testharness" ], "css/cssom/medialist-interfaces-004.html": [ - "9558544a6785ac732150b8a50bedbaf3615fa890", + "a8a6a1b9966526de2d846baf6176880353f84e1a", "testharness" ], "css/cssom/overflow-serialization.html": [ - "199039706289f577652b968706fc1251398acd1c", + "48ca70f4c20da103276e1b053ca0e4613fcc2819", "testharness" ], "css/cssom/selectorSerialize.html": [ @@ -531295,7 +533027,7 @@ "support" ], "css/cssom/selectorText-modification-restyle-001.html": [ - "ac5a5414dd849151c3ca6348c90c0f4e80a09b75", + "0391a09ae16f9e353bab57df65ba35d4372a6548", "reftest" ], "css/cssom/selectorText-modification-restyle-002.html": [ @@ -531303,7 +533035,7 @@ "testharness" ], "css/cssom/serialization-CSSDeclaration-with-important.html": [ - "ecc8b95fb2d71cacee271f4fea2fc16f35cdba57", + "ed17519b642e6e61fc9e01ef72098d5e31dbd291", "testharness" ], "css/cssom/serialize-namespaced-type-selectors.html": [ @@ -531311,11 +533043,11 @@ "testharness" ], "css/cssom/serialize-values.html": [ - "dfc69e37002cf8babc654182892c1e75f3845b58", + "53c094e381ba06f111ab8b379debaa6becb40802", "testharness" ], "css/cssom/serialize-variable-reference.html": [ - "5e83f084efc82184c3052a40bb4a061fd4a1336f", + "85a25fcb99fe433e3f71bc1b6fec92815da2704d", "testharness" ], "css/cssom/setproperty-null-undefined.html": [ @@ -531323,11 +533055,11 @@ "testharness" ], "css/cssom/shorthand-serialization.html": [ - "bd514834dbd48c267c16a4329af6fec7f6cbc081", + "0240668113cb5c280dcb76d8eabfa28d0ed9cb52", "testharness" ], "css/cssom/style-sheet-interfaces-001.html": [ - "6dbb52cd85cb3bbc711a3569e0f253d7086a43a0", + "3fbe87bc1e363bf59a84c5fbdd8b2450909c6ca1", "testharness" ], "css/cssom/style-sheet-interfaces-002.html": [ @@ -531347,7 +533079,7 @@ "support" ], "css/cssom/stylesheet-same-origin.sub.html": [ - "c8112887da9ee152a9ebe64988fd29cb2c27b9ba", + "cab23bdf8b92c8194cc71b1a8ce34155f89f42cf", "testharness" ], "css/cssom/support/1x1-green.png": [ @@ -531547,7 +533279,7 @@ "testharness" ], "css/cssom/variable-names.html": [ - "5ab67b9e86fd700a556d153898c2896448cc1759", + "0da19a40542ea2eb282bf04e6ea65d15490fc097", "testharness" ], "css/filter-effects/OWNERS": [ @@ -531811,11 +533543,11 @@ "testharness" ], "css/filter-effects/parsing/filter-parsing-invalid.html": [ - "ed49a343fbf4ebffc7c98797b21bf6fed83d5f89", + "296e73b68ea36f9070c889728723bf877ad65e23", "testharness" ], "css/filter-effects/parsing/filter-parsing-valid.html": [ - "a53c5723d7f151f94b1ecbff1e4813beca40d546", + "7c17e0cd21b0a6859dd3a38a2cd7568037bca15c", "testharness" ], "css/filter-effects/parsing/lighting-color-parsing-invalid.html": [ @@ -534378,6 +536110,10 @@ "eb78a4d12f35b4249051826ea000c53d04df80b7", "support" ], + "css/support/blue32x32.ico": [ + "a968207eb33ff204ef5af90af452e6c53f5cde76", + "support" + ], "css/support/c-red.css": [ "dc288b7aa49b57e0abf803741e78582ba5ceffdb", "support" @@ -535282,14 +537018,6 @@ "0332d163ba2a010b5a8102cf23d220342e007170", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-32x32.png": [ - "a4c3777cf587ade235c71b27144eae3f307deb05", - "support" - ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-37x37.png": [ - "fc2d8a4c94a5a7c19344d5fdeb6f2e0c97e0ea56", - "support" - ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-attachment-fixed-inside-transform-1-ref.html": [ "ac4a007e9956b008807349d6fb1a5e1d04fa70b0", "support" @@ -535299,139 +537027,139 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1-ref.html": [ - "29441a01afe2699a04c4d5ba99acd6b62dc5f96b", + "527a9e170665067a0be9c80d5a03e5e3762fb5d0", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1a.html": [ - "809a3f95a27d65858ffb02e117730bb42736fb80", + "2e63657cd77715a2592071cecfe9a8b92ee25036", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1b.html": [ - "4b52973ae50842378ad37f0e6f34446848730f25", + "bb8ecbae4c8679c8027dff5b2284a1ce02a8825c", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1c.html": [ - "de76776ca724ba92bc74aef65ea735dfcb6cad93", + "e5ce00218cb4de53c98695e461fde4666ea7e54b", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1d.html": [ - "cddb6225b1a0fba923df44c822a7e14c8dc83aec", + "07c2fd2fa564bee8fff8bcee5aea4088d4bc7a7d", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1e.html": [ - "f09086d194fd800f60e87a8a9f173eb133975c8b", + "04449b9807337732367a4433a212d9d8a1f54846", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2-ref.html": [ - "ab1bd133eac072e7653bbb7ebdfb3ad25378150f", + "8b6156e33c36a7ff6100e4083888377233b03491", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2.html": [ - "451bbbdc1feaf8518f771929f1ba4fca98ca4561", + "6130e53d76ebddd25e67dd130bd5a69fe333de70", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3-ref.html": [ - "e4ffb716a411e30f039b5b94c655b236285c7d5b", + "0ca8f34ec1bc5b92e99948479ed558cb37cde19f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3.html": [ - "229eda2d0edd98f4fa1bce52652d3df3b8e25c57", + "68966b45847d9932aad774321a99aa79f15dbf81", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4-ref.html": [ - "a50788fabe6e09abb218f6e3c273674c3f427e98", + "985c3cdcb1995fe748b42a3a6225e94ce7faf8fc", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4.html": [ - "e670e2567908a5d95ef87fbf04f2099301dd837f", + "22f985cdcdd345f826396b4d0ea7078c015f3e2a", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1-ref.html": [ - "47e4c35735316ccd63365dc393edb54b276ececd", + "74254368494287e55235f772459e658cab2c33c8", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10-ref.html": [ - "c5009e3b890996defe6a3ee814b0a7a608ccc6d1", + "bad3ec7df4823b5cf9d2f381d7786743c0bfb8b7", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10.html": [ - "e75c79b6bd7d16c785fae7b990859619af6eaaab", + "24605117651c6b311e9df101aa3c6827551c0af9", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1a.html": [ - "f445e40c43ae62f5ef6975385242d65f3db02695", + "1ae0784b38a73b2c2b19b92faffafae35df1196c", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1b.html": [ - "fe540a5c8cb4055c95f8f645eb8bea6c9946da21", + "aea0812fff497f1fc4141bfe2f751c4c558e4441", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1c.html": [ - "52aac06805eb1d1ca8e943d6377417b4a270d75d", + "0ec8242c6038ba33db9cd4f02c9436c6c5618192", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2-ref.html": [ - "1c71b2ff3a5b88eb7a18c8798d5e9cf69bd573ac", + "ab2a2362ad7df5732fb53f285daa159f77f8d68f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2.html": [ - "7dc923a3109315e7f1432a14fd9e4c0b3d2125a2", + "7bafd5d038cec1f0e0a6d6ecd90739f928330e80", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3-ref.html": [ - "64a9713b66d151cc38c5b4070686f25edb995880", + "91985eefffc425de688a42eb4fe9a79855f6b92c", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3.html": [ - "b925284a7569c7debe62aad4e06186c56c0db78a", + "c026a0a786b648048e04d6c8fd4152beecab42d5", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4-ref.html": [ - "00f9c662a419bf14b719075094f0eafd68438f3a", + "53fd4d73a06d3b7f906dbe054dd0b61beb8a95e8", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4.html": [ - "1afd9d8485833a5433ecb8477e446fc7f3d46d1d", + "ffea3f6b1d69708b1ba79727d2d19d7848aa40a3", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5-ref.html": [ - "f67b88f3603b85af58216054e430b59e758150a4", + "f17ca75bb2f1fabe52c27b6986dbf4c7fb3a13ed", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5.html": [ - "2cb368068d52b7d53978b048d254944870804a51", + "cd0db8d7606b9b0459745d6e1f9c93d0e0b68309", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6-ref.html": [ - "7dbdeeee72252e099d9dc9513c8cb52da3d7d7e4", + "43fbe2b011d9f8da86a333be7e9b0946b10e0fe8", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6.html": [ - "69565b22e71bb9eddffe2299e7436683582e584f", + "4141691fe824f2f0c21d9dbbf4c8d2bf1a808ce2", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7-ref.html": [ - "cb395895ce116f4713794b20cee7ab9ec54577fc", + "3b3af1c5e464776afc85b59c32fdae5c40378645", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7.html": [ - "0433521d9fe4bf25c70ca9ee451ba6b1fae54088", + "c4f657027339cacc6d355a6338b5ba7ce5978013", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8-ref.html": [ - "f89f01dd369b25ec2c91a28109183bedd6337259", + "22502a004c4a63eb15cf11d1f7292d285bd71560", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8.html": [ - "a33055d83e601c9dd87dea0dd10b90d352ef1330", + "33512fa18046beb077fa0ad760366531fe7d527d", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9-ref.html": [ - "8fd521061feca811081e57230d87fd35c2304d61", + "718811ef61914a35123b9286604e2d464f3207c6", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9.html": [ - "9ef2959be849cf0991173bbc6524abdd3062588e", + "171bf31322fb5dc157e3dfa3ea824c9b03e6195d", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-1-ref.html": [ @@ -535443,130 +537171,138 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1-ref.html": [ - "f8cc9afefbb7bd251d1527696d7dd75594daa552", + "8e9e7565135b1e4273524c1211940bb86e8a08f2", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1.html": [ - "e78a29aa62b300e5fe18858098ca3f2642805e3b", + "bba6c7cfcde4effa81ac66ef3e35020a2f439e82", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2-ref.html": [ - "8322ea283fc9301f9e1ce52b44d0a7b24cd7b70b", + "b335b9f6dbc3e25cc6a4b385c889863b069b2568", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2.html": [ - "feadd3b31ad8a87be53b99da7557876fe09d75a3", + "0dded85118a796ed7b9e43ba66578c90e00475eb", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1-ref.html": [ - "b3a8bb5298994b0cd82824566ac866b99f56de44", + "0ef702f13cf5607b5af8b4755c7e98ffc8a5e874", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1.html": [ - "3f70e9f26f8a06f340474f8c69f364f47fdc0c80", + "c5e61f811230553b84e033b90c61f40d7e54e70a", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2-ref.html": [ - "6247a913d89a3e839a226a50942146eb82ead6ed", + "46577524f01551c7ba69315471c5ab0284459554", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2.html": [ - "475e7e006483d5c6f81a5277e2827969f6787c34", + "a4395ef722ea661f585c9e6891d80815b1fabbfe", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3-ref.html": [ - "2b06d935850db10821b35376364cf0e5fad8c8f4", + "1d00a62b6f293c858480a082f9487d3c566e1fad", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3.html": [ - "d4cb1c010e8a040844829d5bdfdfc3ad1d91edaf", + "e8de89ada57263ca71d2e718246b27d0f3b13970", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-1.html": [ - "456d8bf49dfa526ee99fdd0a5ef70ea2b54bbf43", + "674aca752e3662bb2a4f12fa317ea472dc2a3c64", "reftest_node" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-2.html": [ - "05501bb0436ce20982acbfaab1567fbe6cc05e29", + "2b0f579ecb4e19eb9306be7ec40184af89007f25", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4.html": [ - "6a2236e94a8dea79ddc047b9aa036536af202bbd", + "a87145982556efc75e2cdd3664b850421e661caf", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-1.html": [ - "dfd17c4208a3a8acd4b33d42f321b8cbbda215e1", + "19440f14748bf8b125f23fbdb9165fa0a70c452a", "reftest_node" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-2.html": [ - "ea0a4e6162537dbf034da9b4ad73197a9379e907", + "2fa4145d8a2a85705b1ff225edd35ed0616ae77a", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5.html": [ - "60300d5a0c4877730b20adac067e62ea674f081d", + "421e6343955d359b69536f17e61b6c65ad4a51c9", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6-ref.html": [ - "48b5ceefe4bc19c56b98d473d185b0a2a17638d6", + "4bd78c1115ccd7ec9b1b33b647a3a6261991e774", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6.html": [ - "13e9f0d302a717ccb45c4ec61bf9f0f572ab1f3c", + "d944edc6f9d9c1cfa817bdd377566323ae5aab51", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7-ref.html": [ - "16883f2f5a5f8da77dc681829e2824061e4dc4fd", + "97e6b3a357ab8bd0d017d140d8c71291e044ef5e", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7.html": [ - "1c5c7ebf2367034931e4f6880f235e201d7e772d", + "250751245e07ef7b57020a8dc32735693091a69f", "reftest" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/border.png": [ - "c643564c8b6ff76e3e482414f3f722abfea4d43f", - "support" - ], "css/vendor-imports/mozilla/mozilla-central-reftests/background/reftest.list": [ "ba3f91bdf65eaa53a76efc11d870f81a23d757dd", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bl.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-32x32.png": [ + "a4c3777cf587ade235c71b27144eae3f307deb05", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-37x37.png": [ + "fc2d8a4c94a5a7c19344d5fdeb6f2e0c97e0ea56", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/border.png": [ + "c643564c8b6ff76e3e482414f3f722abfea4d43f", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bl.png": [ "fa21f62c26f5a1ff6a772031afae40c3daebaa40", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bo.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bo.png": [ "395821135fe3b785bd04f9e7f525ce9e7055fa32", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-br.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-br.png": [ "3837f10b2aff08d47df3d4e0209a1b76444197cd", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ct.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ct.png": [ "f8a79021968c8ec9d1380bb40929e9cc77c36624", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-le.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-le.png": [ "d1ca46136e35c92bb81ff226d152fdfbf8018d53", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ri.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ri.png": [ "3e8a0cd42a692ec2323d19855d7b5f244a0b0311", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tl.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tl.png": [ "3c9cc75bc85cb1490da4c9f2888d0a9ec37b1736", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-to.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-to.png": [ "d9d205f3ee9e3d49451a1fe83323acd1e7707992", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tr.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tr.png": [ "386ef7e0894851d1361ffcb73a248c43babadc81", "support" ], - "css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule.png": [ + "css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule.png": [ "f487aa4c163a64dd8ecceea982c3b225451fb3e6", "support" ], @@ -543183,7 +544919,7 @@ "testharness" ], "custom-elements/builtin-coverage.html": [ - "a33f3950860fead2c1cbe249d73394b1888facd0", + "14cda641d06979600b461a4985f36c1fbc3defc9", "testharness" ], "custom-elements/connected-callbacks.html": [ @@ -543447,7 +545183,7 @@ "support" ], "docs/_config.yml": [ - "55b531a735fbcfb21fab226717b140ba4b3f5486", + "2d80d0533330473caf490dfa1145ca76b5f42141", "support" ], "docs/_includes/footer.html": [ @@ -543459,7 +545195,7 @@ "support" ], "docs/_includes/header.html": [ - "e0306c4de5f406a7b5198d6d729ea1e14c2d91cf", + "faa044875fe2a159030203db9400ea18ed385da8", "support" ], "docs/_includes/svg/octicons/LICENSE": [ @@ -543495,11 +545231,11 @@ "support" ], "docs/_running-tests/chrome_android.md": [ - "d23a2e3446dc5f5ec4a744416fc6a5a559f18e6b", + "082b7697eed61caefcc0a280cba6cee24ff12e7d", "support" ], "docs/_running-tests/index.md": [ - "f860f2f652b8a837d3e565b896fec5eea35e267d", + "ab0156e7fea2e4e462065c458dd8aaf56298150a", "support" ], "docs/_running-tests/safari.md": [ @@ -543547,7 +545283,7 @@ "support" ], "docs/_writing-tests/reftests.md": [ - "19c5c75eb5d2a09f8ba61f94900f4e80a2d6b1bf", + "e9008d9896ba0693352309e2d16353b8bd16874f", "support" ], "docs/_writing-tests/rendering.md": [ @@ -543606,8 +545342,12 @@ "429836f3ca93ff4896eb5d942a09e7eafad1fb02", "support" ], + "docs/assets/gh-fork-ribbon.scss": [ + "03c18f74b15f335c3be32b4410bcad9ea9b77fb9", + "support" + ], "docs/assets/main.scss": [ - "a0f4501b19a64a73c1037e2843a49060c4659bc9", + "94b8f9e5bd6785428b2ccc8e6605449de8014bc0", "support" ], "docs/assets/menu.js": [ @@ -543647,7 +545387,7 @@ "support" ], "docs/introduction.md": [ - "e7d0165e5c6a8604d25f32032b2374bff6e59e02", + "ea9a85d79dbf66598ee05da17d34f9e786a3ce78", "support" ], "dom/OWNERS": [ @@ -544451,7 +546191,7 @@ "testharness" ], "dom/nodes/Element-classlist.html": [ - "10a0336430514dbbe8e837472c4476254ea8f8fc", + "e0a3126453af3e138c322ae0074d7ee73d604a8d", "testharness" ], "dom/nodes/Element-closest.html": [ @@ -545310,6 +547050,10 @@ "a4e24143c2ef4b9a8fe64a0a07bd30594025f90e", "support" ], + "domxpath/document.tentative.html": [ + "c1b93714b14b822c55d3f784e0520d91c6cc46c4", + "testharness" + ], "domxpath/evaluator-constructor.html": [ "4842d40e22e25ee72536946d785a3cd03bc6a11d", "testharness" @@ -545923,7 +547667,7 @@ "testharness" ], "encoding/idlharness.html": [ - "7f1eee3e9d3554fe49e04014501ed12bc57b89e8", + "fa520e077bce06a56406cb61bb8c150264699624", "testharness" ], "encoding/iso-2022-jp-decoder.html": [ @@ -547758,6 +549502,10 @@ "892d667b4e54cc48435f07f8a2f443b8b67f33b7", "support" ], + "entries-api/README.md": [ + "9fad3adb14acfb8c14cc320a8d704c4291d01c40", + "support" + ], "entries-api/errors-manual.html": [ "baf8ef0435c4da686a5ed5e728a22fee317c2548", "manual" @@ -547870,6 +549618,10 @@ "700107771158b22fa280f30a5a52d1aac617ff6e", "testharness" ], + "eventsource/dedicated-worker/eventsource-close2.htm": [ + "dc79b53506150f4877a36c6c0d54ccebeecf87ba", + "testharness" + ], "eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm": [ "9614ac5ce1967bbbcae6a1cc8d64465579f6410d", "testharness" @@ -548222,6 +549974,38 @@ "2ae1da8e026e63625a6168b842303cc156963ced", "support" ], + "feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html": [ + "a48c092204750e00c9aa167a9ef9d2d239445d22", + "testharness" + ], + "feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers": [ + "bfcf350d87faae8e6cf4b2beb9fee84957cac449", + "support" + ], + "feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html": [ + "7a68af16b8cb8292185997cefdfeb3be295813a7", + "testharness" + ], + "feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers": [ + "ea3519ed0612b18268c0df22a1c9472e404c2573", + "support" + ], + "feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html": [ + "a1304e1954b23cde1d017a242bad05e2d3039a6e", + "testharness" + ], + "feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers": [ + "035bf4abe912636d5bd070eb20d573cf9c464565", + "support" + ], + "feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html": [ + "aa8ef0a6f90986121f597231f5ae75b8d4b65368", + "testharness" + ], + "feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers": [ + "f20475f628a5f4a3067b8682019054e3f31c703a", + "support" + ], "feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html": [ "4d27ea669ef4362242db87a5abda1589b985bf20", "testharness" @@ -548278,6 +550062,10 @@ "f20475f628a5f4a3067b8682019054e3f31c703a", "support" ], + "feature-policy/interfaces.any.js": [ + "57e4d58d5b12e63832c1c620b271b0124469d728", + "testharness" + ], "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [ "22d155755cd7aaff8a1c40c597468066f01eb13b", "testharness" @@ -548375,7 +550163,7 @@ "support" ], "feature-policy/resources/featurepolicy.js": [ - "f6bb46c7ababec6a7902b1ed2b00a7803e0a7e1d", + "87607362a81716400d9fee10958893e7a785f74e", "support" ], "feature-policy/resources/picture-in-picture.js": [ @@ -548847,7 +550635,7 @@ "testharness" ], "fetch/api/redirect/redirect-location.js": [ - "3b48bf04659cc82462c3f33db47fd2f44f63c0c3", + "c8795b2a372e365e1b6e052d8a3309f3bfb2c143", "support" ], "fetch/api/redirect/redirect-method-worker.html": [ @@ -549051,7 +550839,7 @@ "testharness" ], "fetch/api/request/request-disturbed.html": [ - "47a1771e5ce32b63cf4b378a87c5d53ee486c246", + "62d53aaa3cefd7f76f315ab3f3aa1cd5d5a4e4a0", "testharness" ], "fetch/api/request/request-error.html": [ @@ -549231,7 +551019,11 @@ "testharness" ], "fetch/api/response/response-consume.html": [ - "936272bddf1a090267343fc7f8ab3669da98d27d", + "3e68870ad69c0121d697036886251ef652cd65a7", + "testharness" + ], + "fetch/api/response/response-error-from-stream.html": [ + "74d58d1e907f49a3b9812786d8a3467159514c64", "testharness" ], "fetch/api/response/response-error.html": [ @@ -550450,6 +552242,26 @@ "b2432e7ea263fb80be42e7eecf93a9d885c0205d", "manual" ], + "generic-sensor/OWNERS": [ + "b1349055762c7d44414c0c11fb8500d5eee9a75f", + "support" + ], + "generic-sensor/SensorErrorEvent-constructor.https.html": [ + "99bcfb42c91e084a3b847ab4bab2bad80e548540", + "testharness" + ], + "generic-sensor/generic-sensor-feature-policy-test.sub.js": [ + "c7c9c4d1c578f267cbb4241d7ea7a981be6f49ee", + "support" + ], + "generic-sensor/generic-sensor-tests.js": [ + "6364f1838215eaafd91b86690039da41d4c19cd1", + "support" + ], + "generic-sensor/idlharness.https.html": [ + "02c734b907075c8abb7504fc7e2b93730ac80a0c", + "testharness" + ], "geolocation-API/OWNERS": [ "84c4182ceed0f75ada11e63c3dfc2acc2939cbb6", "support" @@ -550511,7 +552323,7 @@ "testharness" ], "geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html": [ - "5c9b0421e10e87ce540ae89304cb06189521db28", + "91047842ea56344c005c46de7cdd27e2373ea0a1", "testharness" ], "geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html.headers": [ @@ -550519,15 +552331,15 @@ "support" ], "geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "2d21ee198d079dde55f02fda3eb7f8e8fb6dfac4", + "fb033fd0f0d891e9b6ed2b54b835f8f06364643e", "testharness" ], "geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html": [ - "2eac643f35086d5051333674f6a01a9ee524786d", + "06e4487981f8e6e062d9e9fea14d52e64b6b5035", "testharness" ], "geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html": [ - "49e7799a36358602efabfb219a93422078456111", + "e8287121361749246b874207dcffb92e459dfbec", "testharness" ], "geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html.headers": [ @@ -550535,7 +552347,7 @@ "support" ], "geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html": [ - "4ad92dcbcc737cbc14ba3bc2c19dc8f78e75d0a1", + "4222f48c8c2a932c5b65b6426bb9a0ad476ddd0c", "testharness" ], "geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -550543,17 +552355,21 @@ "support" ], "geolocation-sensor/GeolocationSensor.https.html": [ - "502b4dbd03312a2e1e0c18fb3983a077335efde6", + "c9d32faca641ec784acf9096a079d73781330216", "testharness" ], "geolocation-sensor/GeolocationSensor_insecure_context.html": [ - "f2e8f58fd7e09cfaa311c83adc4456f9463a3456", + "58fd65d3a72e6734392381fe225e3fbd7007fc06", "testharness" ], "geolocation-sensor/GeolocationSensor_onerror-manual.https.html": [ - "8c5a4e48439ff0620d6267b127a5d49f85657896", + "2b7aac7d60271e12ce71f6293405ffafb471c8c8", "manual" ], + "geolocation-sensor/GeolocationSensor_read.https.html": [ + "5a61a677b26c1c25cb46da2baa16e3a6783febee", + "testharness" + ], "geolocation-sensor/OWNERS": [ "fabf35173a8bd10c7e5ffe348dd92532199ab51a", "support" @@ -550591,7 +552407,7 @@ "manual" ], "gyroscope/Gyroscope-disabled-by-feature-policy.https.html": [ - "b7fb169e2a3de0df84a44b9775677d1a005e2446", + "bc6f85cb3506d3e3e062eef43dca88bf3a4ebe89", "testharness" ], "gyroscope/Gyroscope-disabled-by-feature-policy.https.html.headers": [ @@ -550599,15 +552415,15 @@ "support" ], "gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "0887871a9f337da76cdbf8fc0ea7a6aafa6eec37", + "cc1f4082fa420a9076f929d88268f5a1d921a44a", "testharness" ], "gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https.html": [ - "b5d7fe16df3356e7e8ea202088e63734291810f0", + "75429c87bbebd19df7b4edaddc5869c6202b3fab", "testharness" ], "gyroscope/Gyroscope-enabled-by-feature-policy.https.html": [ - "92bd0aee5d2d54b50e907155fe3a6dd5b2634021", + "5129c05f9b226650a9b7fed4841871045525bf15", "testharness" ], "gyroscope/Gyroscope-enabled-by-feature-policy.https.html.headers": [ @@ -550615,7 +552431,7 @@ "support" ], "gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html": [ - "b1af2b9e1787c1ace4619509d95e4085ac0f0fc7", + "2603bd858929ae6f84ebbe0cce34c5417ccdae06", "testharness" ], "gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -550623,15 +552439,15 @@ "support" ], "gyroscope/Gyroscope.https.html": [ - "7d30725e44905d774a0b4554b55842cba78e1462", + "504abfa42529e08576e49c3296464bcea5fe0b8a", "testharness" ], "gyroscope/Gyroscope_insecure_context.html": [ - "79688da94e1ea93646c288bdbfdb17487e846560", + "74e51a1efc06bf8180db430b418d484fc50c07f9", "testharness" ], "gyroscope/Gyroscope_onerror-manual.https.html": [ - "c89ff6361146a5d3065c2d44088b313e5560ba8d", + "1e15b883bd317ca83783864fc563794cb0f6df8e", "manual" ], "gyroscope/OWNERS": [ @@ -552935,7 +554751,7 @@ "testharness" ], "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html": [ - "caaede75e5c16cc78023ce410f48e37e612cffbb", + "6da68164fdba8986d4dd217ad48198f675e83165", "testharness" ], "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html": [ @@ -554302,6 +556118,10 @@ "a2a5acc9dfe53c7482eeaa4be3a4819238f8e120", "testharness" ], + "html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js": [ + "0f0020e1d7d8050892ef146d687178cfe8eedcd2", + "testharness" + ], "html/dom/elements-embedded.js": [ "99489e3a8ac2be0d7dcfb22f7f45c30b00511358", "support" @@ -559415,21 +561235,17 @@ "support" ], "html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html": [ - "ca8af91733f0b0704409e26f17d4a14977ce14f7", + "8e594aef8d0201565c770ec7c01e13a5f4b8042d", "testharness" ], "html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.worker.js": [ - "2e35f55a86d31d98e69ad1013c18ab1ff9d9be02", + "4effaa2678d2f99954e222ef9a743bffb029431e", "testharness" ], "html/infrastructure/common-dom-interfaces/collections/domstringlist.html": [ "b51c104271ba1cc404de0d68fd004b4e4ecb0d8c", "testharness" ], - "html/infrastructure/common-dom-interfaces/collections/domstringlist.idl": [ - "3b23d2861e3e3037ef3364781394d1b3e8371bae", - "support" - ], "html/infrastructure/common-dom-interfaces/collections/historical.html": [ "a5d4598e215e1e9322538b646a0541ba64687c3d", "testharness" @@ -559734,6 +561550,10 @@ "e0f5057cc03fe0bf0bc83587e620b623e4211da3", "testharness" ], + "html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js": [ + "03fd591d7d34f35db36742111f1aa81872775a65", + "testharness" + ], "html/infrastructure/terminology/.gitkeep": [ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" @@ -563750,6 +565570,22 @@ "fcbb80f82ca87610d00a6307da426b63f81e5a37", "testharness" ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html": [ + "a323664378c03429ad61c56fe33b34bf77732958", + "testharness" + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html": [ + "f577ac6acc2d7ae2675ecf05da028eca7d8b2a28", + "testharness" + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html": [ + "999ba6e7678f3aebf3722f11b21c778f8ddece7b", + "testharness" + ], + "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html": [ + "1702b5db173e814fe631bf23b6f6a887cca91f6a", + "testharness" + ], "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html": [ "3891c651b0153f3ea8081e6060b6af684c68e996", "testharness" @@ -563966,6 +565802,10 @@ "ec2daf6a782747ad7d983aefafd954cc7e661cf7", "support" ], + "html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html": [ + "efd4a8251362de2130cdd0d5c88c4be8eb15aa0c", + "support" + ], "html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html": [ "042bf7ad5057dee3d2243c30d5a24227e15ef121", "support" @@ -564082,6 +565922,10 @@ "f64b366c71d51ff73b6370ac2db35013a8c1cb8d", "support" ], + "html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js": [ + "508194946db6e8f892208a8b413565a4d76e6687", + "support" + ], "html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html": [ "9dd191a0b5d9c15972363e260228956f7f487c7d", "support" @@ -564638,6 +566482,10 @@ "92c8c30e186f0a94a962bb5c4be7acf0860b943e", "testharness" ], + "html/semantics/forms/form-submission-0/resources/file-submission.py": [ + "902650776538707a501367bac3f224f8feb89514", + "support" + ], "html/semantics/forms/form-submission-0/submission-checks.window.js": [ "c13ed40ca2a1988368564cb5c9dbcabee4306ceb", "testharness" @@ -564646,6 +566494,10 @@ "f73376af978f2fb89dcbd6e9092f113d90c7a3d6", "testharness" ], + "html/semantics/forms/form-submission-0/submit-file.sub.html": [ + "3a32d9a2218c9a77045b88b3ca1b1eab46e9adf0", + "testharness" + ], "html/semantics/forms/form-submission-0/url-encoded.html": [ "04568ab3b18733d4773a5020fdf0c22bdca3b210", "testharness" @@ -568746,6 +570598,10 @@ "78e72ad26b9df9b3f32f1cf00acb6eb051dc86c5", "support" ], + "html/syntax/parsing/html-integration-point.html": [ + "cd2686abb45f08150a13c887959fa0e8e26753a5", + "testharness" + ], "html/syntax/parsing/html5lib_adoption01.html": [ "90f39dae58f37f2f8d786a617fcc5804e6235ae0", "testharness" @@ -570138,6 +571994,10 @@ "1a291b68cdf6edcfc28a2ff22e294e8e8ebc0c42", "reftest" ], + "infrastructure/testdriver/click.html": [ + "afb1a08faa639bdd1ee4387069d76803c5e38d54", + "testharness" + ], "innerText/getter-tests.js": [ "e5ec1c1fd4777a1a1c25720047a955ec04c0d014", "support" @@ -570187,7 +572047,7 @@ "support" ], "interfaces/IndexedDB.idl": [ - "f367517cad717e2066ad8179df9ba5aa3b402c97", + "3df484f3207920891c278bd99ec22e4029aa039f", "support" ], "interfaces/OWNERS": [ @@ -570195,11 +572055,11 @@ "support" ], "interfaces/WebCryptoAPI.idl": [ - "87b02fc82a1b204ac59a51932e58f9369b4a77c6", + "1fa169a6badb1c21608f1e1a68075939e913603f", "support" ], "interfaces/accelerometer.idl": [ - "6132c634314380a83c8a57647447826d95448939", + "a834258dac3ad510dec10425b9f79648547e0b42", "support" ], "interfaces/ambient-light.idl": [ @@ -570219,11 +572079,15 @@ "support" ], "interfaces/cookie-store.idl": [ - "5284cfc7bbb5282d670c59ef7baaa39e166bebe9", + "0d74ef8e7681fddddfb786b75075a1dd0ddb9147", + "support" + ], + "interfaces/css-font-loading.idl": [ + "a0d53cc4e88f38cce9fd45759963e5da9a6f3dc3", "support" ], "interfaces/css-typed-om.idl": [ - "3c918afebfb20266dd4003e71a008ed19c448fbc", + "59bd8e2c3c1bf8fded9a5523b5bd3b59761eacef", "support" ], "interfaces/cssom-view.idl": [ @@ -570239,7 +572103,11 @@ "support" ], "interfaces/dom.idl": [ - "605bb139c7695e46f8657097cf2d9bc6240a2d38", + "f5881beeeaa7e990e9b889182989d6d0fb0ba8a3", + "support" + ], + "interfaces/encoding.idl": [ + "0dd77d1c6d854b0bdd003107c2385a224e1953f8", "support" ], "interfaces/encrypted-media.idl": [ @@ -570250,6 +572118,10 @@ "6bb93df3e14e49931f54eead37a009649e035bd1", "support" ], + "interfaces/feature-policy.idl": [ + "cba4a18b5a6b69c467067dc4a7ac7449f39be6a1", + "support" + ], "interfaces/fullscreen.idl": [ "fda57b55aabdc54d674851851451c6c69c514ed1", "support" @@ -570267,19 +572139,19 @@ "support" ], "interfaces/gyroscope.idl": [ - "a2aa39ac39a5ec1eff5f5023a8134b5ec387b766", + "7c37c98eb39d994a89314c45c216bcb27b51f2d1", "support" ], "interfaces/hr-time.idl": [ - "61bd84c720a00b5dfaff8a98ace54cb476a4ed18", + "db4f313176e4fdfb8efd78545079da42cbb0729b", "support" ], "interfaces/html.idl": [ - "84ed07588763a87bffbe191bf440e820f9d130ec", + "b2b35732b54cbe3406493a6c121363eccceb4f5c", "support" ], "interfaces/magnetometer.idl": [ - "78fdc6ec345a5f05e86cb104cb025689638bbe17", + "ffac480912edba82886fef6d5368092d237a0c7f", "support" ], "interfaces/mediacapture-main.idl": [ @@ -570287,7 +572159,7 @@ "support" ], "interfaces/orientation-sensor.idl": [ - "d75a765c9456c21ed2733fa89a20f3e2d0eb2131", + "1f0698a8611726b1ba724a5d7a0961e836c7b07e", "support" ], "interfaces/payment-handler.idl": [ @@ -570295,7 +572167,7 @@ "support" ], "interfaces/payment-request.idl": [ - "b61ab0da4aa0f89f4af1b7d8c5f32f2bde90fd35", + "a7700006f4af50e069f6557bc7fc5affdd0c2d11", "support" ], "interfaces/proximity.idl": [ @@ -570307,7 +572179,7 @@ "support" ], "interfaces/screen-orientation.idl": [ - "b280c2a72795d4abd55a361a0afd8adce70562dc", + "ace5a4ae79933cdfd7ecf5c3801e93f0636fe57b", "support" ], "interfaces/selection-api.idl": [ @@ -570319,7 +572191,7 @@ "support" ], "interfaces/storage.idl": [ - "fe2e879ca5662f3b1714404734fd033faf3268ec", + "7c3221be9fdf6be4965cf5aeca2063f93c2110d6", "support" ], "interfaces/touchevents.idl": [ @@ -570327,7 +572199,7 @@ "support" ], "interfaces/uievents.idl": [ - "de07cb2600834f13c49e00d6d77df5108244b3ce", + "9e107e1ac2ed7195f802291f1d3827c53468a002", "support" ], "interfaces/url.idl": [ @@ -570343,7 +572215,11 @@ "support" ], "interfaces/web-share.idl": [ - "d3ab33fa078f1b3bd4b29e174369073aab3963d5", + "21b54128664c5962c29fd708ebba3d8d90987f26", + "support" + ], + "interfaces/webaudio.idl": [ + "43a244276b9795b137c2e46c194d56dbb957635d", "support" ], "interfaces/webauthn.idl": [ @@ -570362,6 +572238,10 @@ "7b5749e1fece69552e0a8bfac7af401fac15394d", "support" ], + "interfaces/webvtt.idl": [ + "3e7ab31795b8339de3d6904f0d68dab68ca24148", + "support" + ], "interfaces/webxr.idl": [ "b1bbaa67765ce6eb20c39e6f2234912e4853e148", "support" @@ -570639,7 +572519,7 @@ "support" ], "magnetometer/Magnetometer-disabled-by-feature-policy.https.html": [ - "a050a0aff6039883d521735bff4b96e0628de20d", + "9af542095f2fcd57691c0432ef3248b04a0207a0", "testharness" ], "magnetometer/Magnetometer-disabled-by-feature-policy.https.html.headers": [ @@ -570647,15 +572527,15 @@ "support" ], "magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "0bdab54bc63a9b28b89c7be70409a9c6c7d943c5", + "47829ff5747eed99ba22e79b12ddfff288fd031e", "testharness" ], "magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https.html": [ - "22a4580c08716b0395d6a0e49679b29619e2ce35", + "3b6314e9176a24976d9d882644c30f00554eed6d", "testharness" ], "magnetometer/Magnetometer-enabled-by-feature-policy.https.html": [ - "8cc0dfc032b1f063e88ca43a0516b89ab05e057f", + "05128cdb7171ba230143e7b68b09968a484b602a", "testharness" ], "magnetometer/Magnetometer-enabled-by-feature-policy.https.html.headers": [ @@ -570663,7 +572543,7 @@ "support" ], "magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html": [ - "ac9154aca0c01825a78aad12b9ed242ec8780937", + "3240dafd2bc810dea0dc1ebc31728c86a29f2ec5", "testharness" ], "magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -570671,15 +572551,15 @@ "support" ], "magnetometer/Magnetometer.https.html": [ - "bb74316d74c488daf753ee8576761ec78db457df", + "240e7d0af55b8681f2f45ca22283634acc406325", "testharness" ], "magnetometer/Magnetometer_insecure_context.html": [ - "aef2810b55ac8672dff86b85f5d93d152b81dfe4", + "0eeb95340d7c74a0243eac8d3f004b6e06b87a92", "testharness" ], "magnetometer/Magnetometer_onerror-manual.https.html": [ - "f073df598684ce24f429d968da343812d68cb142", + "da4e6b8975beecdcae24da26920a56a652f781e4", "manual" ], "magnetometer/OWNERS": [ @@ -570703,19 +572583,19 @@ "testharness" ], "mathml/presentation-markup/fractions/frac-parameters-1.html": [ - "21ffc564f5bf999df38e265c104ddc3cc767ece3", + "043847a6c09fc388420383c1ce2c992369af299f", "testharness" ], "mathml/presentation-markup/fractions/frac-parameters-2.html": [ - "17502e5c3311cb262d4d47657f71211292a1d4b0", + "5fa05dd23cc431661ca7460781191670d54f5340", "testharness" ], "mathml/presentation-markup/operators/mo-axis-height-1.html": [ - "282c85bc036793c96972a348c8cced5b87d3f078", + "678286269101ccc22a3944c7f3fda1be95360be9", "testharness" ], "mathml/presentation-markup/radicals/root-parameters-1.html": [ - "58293790346b6f6b5ad59de9637f136aad206d20", + "03787fde52972882808119b175331e671dbb477d", "testharness" ], "mathml/presentation-markup/scripts/subsup-1.html": [ @@ -570739,7 +572619,7 @@ "testharness" ], "mathml/presentation-markup/scripts/subsup-parameters-1.html": [ - "59ca4d1cc0b773f1e57b9cc1fb45ccab6a97dd5b", + "a9198166947a3d181d21d2597d167d3962c67f6e", "testharness" ], "mathml/presentation-markup/scripts/underover-1.html": [ @@ -570747,19 +572627,19 @@ "testharness" ], "mathml/presentation-markup/scripts/underover-parameters-1.html": [ - "0bd971f6288d6a198a0d3edcd5777943e4898296", + "8da018d0029c885f8d6caf4d8ae6517430e385c5", "testharness" ], "mathml/presentation-markup/scripts/underover-parameters-2.html": [ - "19c54c65a72706e1d7f2a00fc998f4ffa3a8990c", + "56c694b6be115dc3241f9efe3e95ff8efc854896", "testharness" ], "mathml/presentation-markup/scripts/underover-parameters-3.html": [ - "97bc8e457eada46d22e8c73f69c6854d4d2ebf44", + "a597bbccde38b2273fa552be0b7bbca8372beaf1", "testharness" ], "mathml/presentation-markup/scripts/underover-parameters-4.html": [ - "609c7ff70d3c5509ca08197e38a3a1208faa093b", + "2a0978f31bae3934a18c34865a2193cc2d906bfb", "testharness" ], "mathml/presentation-markup/spaces/space-1.html": [ @@ -570775,7 +572655,7 @@ "reftest" ], "mathml/presentation-markup/tables/table-axis-height.html": [ - "0019b8c73ac46a41c078f722b854f5d4b179f9a2", + "e19346c7b5514aeb048a18ae6cb80e9f3fb76c3a", "testharness" ], "mathml/relations/css-styling/color-1-ref.html": [ @@ -570795,7 +572675,7 @@ "reftest" ], "mathml/relations/css-styling/displaystyle-1.html": [ - "ec33c536a756cf8870acaf029257f126284c7130", + "16a7750938d2cf3b33e502365fcd9a25e51ed2a9", "testharness" ], "mathml/relations/css-styling/lengths-1-ref.html": [ @@ -570815,7 +572695,7 @@ "reftest" ], "mathml/relations/css-styling/lengths-3.html": [ - "206d9a369266e8639f290545c86df7cd6ab9ebea", + "2723869ffc2e841ed40676283fd0b818240dd111", "testharness" ], "mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html": [ @@ -571763,7 +573643,7 @@ "testharness" ], "mediacapture-streams/MediaDevices-enumerateDevices.https.html": [ - "98de0987027ceccd4e6164ea6afbc08d5d70c35d", + "892229b737d157845d9b2e24170f3bc820b10036", "testharness" ], "mediacapture-streams/MediaDevices-getUserMedia.https.html": [ @@ -572026,6 +573906,114 @@ "bf977afe3f0b5daa0e899dff1d55241352125531", "testharness" ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ + "9a7a66a2fd1f04a410548b0691fa6bd07767e2ca", + "testharness" + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + "be6392b34d8a7c5e1c257d6894ed192be567a75c", + "testharness" + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html": [ + "ec9fb7ca5ee63c2c94ec1c599fda84847488ea31", + "testharness" + ], + "mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ + "838fb9e5d6c0a976f1978ff711f71b4b830fbd9c", + "testharness" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + "7d20e9e36d2288e2f52984c50531bba7eeec4c59", + "testharness" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html": [ + "c93ac7834ab5a560f476c93523430070520675fd", + "testharness" + ], + "mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html": [ + "8b95b2cf6fcdb8294ddd0eb16f999c3d312c4d49", + "testharness" + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + "d83bc79c2125bd20e741ed6ed2322a3c73e38842", + "testharness" + ], + "mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.headers": [ + "562977daf4fd9e09dc6153058804bc247cbe5354", + "support" + ], + "mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + "7244ccaed934c8892da287d89fe4418b485bcb29", + "testharness" + ], + "mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html": [ + "04cd47a9a5cb974525428323f1e81218f911df79", + "testharness" + ], + "mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + "7386bac3932ac650ce1d729091ffe5ab7bd09942", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + "1780dbdb75192b26622c7849488a058a5f2d310c", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html": [ + "ab083ef45668b3ceffa689c81546bee4786121ab", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + "7f9cd64a146504b2fc4d60f3c28ac4bee1fb51d9", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + "ee88f8fcf9442d1a887e0f998af0d065151ab1d1", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html": [ + "40880807f157570f164238eb86dc2b3a6f6e0efc", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html": [ + "94b5f5df01cde9577971f202fc28c7054c125861", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html": [ + "19709011c5d1aa274bcd4a3472db7dabc280034a", + "testharness" + ], + "mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html": [ + "85f56860a2f9bf88854ab1f732fa3e7b15995dc6", + "testharness" + ], "mixed-content/fetch-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html": [ "1b368a53bec1da5921224e4fd3ae3db4d11014d3", "testharness" @@ -572135,7 +574123,7 @@ "testharness" ], "mixed-content/generic/common.js": [ - "7eb02bdb367f618dd7848de2c64c83bb915d3bd2", + "eb29cec6e5a930521b9526ea46c6a1d747c23a79", "support" ], "mixed-content/generic/expect.py": [ @@ -572143,7 +574131,7 @@ "support" ], "mixed-content/generic/mixed-content-test-case.js": [ - "55980afcecb041ee23942c18b222b20eb8c5bea4", + "b09fc28dbbdfe1d5b7d9d06dfd5610d4572f8912", "support" ], "mixed-content/generic/sanity-checker.js": [ @@ -572855,11 +574843,11 @@ "testharness" ], "mixed-content/spec.src.json": [ - "1e46012ca5e1f0892e6c80572fa28c5358596c57", + "bdd9ba1d38e8bb484c91651bb2592ae9a688befc", "support" ], "mixed-content/spec_json.js": [ - "f3b78849f97e307c39f81cf9cebb01b367c91b79", + "817c54f14d3dabb0c8b21325b9824a8d0f439bb0", "support" ], "mixed-content/video-tag/http-csp/cross-origin-http/top-level/keep-scheme-redirect/optionally-blockable/opt-in-blocks.https.html": [ @@ -574366,6 +576354,14 @@ "aebe4c1ad096a35fce7aa8c12d7655b525b5cd2a", "testharness" ], + "offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html": [ + "4268a275ad695dfded9f6ed8de1850fafb649f95", + "testharness" + ], + "offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w.html": [ + "8466fb824c584d343ca20a52fd8d316fc2cd0d1c", + "testharness" + ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html": [ "f2e95967ca89ad85787c121f3cae4ed35e825b44", "testharness" @@ -579066,14 +581062,6 @@ "ca1cedea429efabeaaf1132b54fe45a7626f7f86", "testharness" ], - "offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.html": [ - "4268a275ad695dfded9f6ed8de1850fafb649f95", - "testharness" - ], - "offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.w.html": [ - "8466fb824c584d343ca20a52fd8d316fc2cd0d1c", - "testharness" - ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.getcontext.html": [ "2961422d4081a0fc55cb8bde62e6d33cb2877832", "testharness" @@ -579635,7 +581623,7 @@ "manual" ], "orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html": [ - "9db710ef183a7bc65e6649526defe869c5fb66e9", + "0c7657e32b46c64e5f050f04e40ccfc0dce32e47", "testharness" ], "orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html.headers": [ @@ -579643,15 +581631,15 @@ "support" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "05c28d8975c13aea8e248d2a1a5341fb146c82a5", + "71a6966fb91f8ddfe15ee690c843e4621a3b4720", "testharness" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https.html": [ - "e3679a5c3a5f1783d3311556788af9e5a18b9287", + "9bbe39e1be4a669f31f0fb3960aca22d7d159c5e", "testharness" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html": [ - "923b5167c76b8f8405c94043dae6d4312383d00e", + "9f110b8ceca3dd3ce3d2a9e2567d92a3fc6462bf", "testharness" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html.headers": [ @@ -579659,7 +581647,7 @@ "support" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html": [ - "873f248fa5c359322f6d8b143758122450c2279c", + "c4404cf0b16c4d9ad15308392ecf52caee445b86", "testharness" ], "orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -579671,19 +581659,19 @@ "support" ], "orientation-sensor/OrientationSensor.https.html": [ - "6b53127c74c55a8cf5697bc5527f36b7276e2681", + "ea9a61f9d526183071a0336e11ca844f59c284a9", "testharness" ], "orientation-sensor/OrientationSensor_insecure_context.html": [ - "4161a365bd3a72226c29049cbe46c123b8b07a04", + "eb64da888f1bedf9d5ed8b11edc1626da88b322b", "testharness" ], "orientation-sensor/OrientationSensor_onerror-manual.https.html": [ - "7d28e6caf629f82b058a33b018de34940f34916f", + "6f0eb976affc21e49f48c42c1bd9d9eb0083ee40", "manual" ], "orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html": [ - "a8178651dd87ac80268a7c9de06858a6c5ee2125", + "8c6c5f8f3bc4421f5143a3e4fab287564cf4907d", "testharness" ], "orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html.headers": [ @@ -579691,15 +581679,15 @@ "support" ], "orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html": [ - "895e2cb7837bd9cb4a8ba7b3c90f414b4d3677ea", + "34a79c9033a41c0aceab3fa6a470dd5a76f2ac81", "testharness" ], "orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https.html": [ - "745fc51713614d6082dec199e3491e001cf3396e", + "0e6260ccdaa8163b8db96516960be226a4d85ba7", "testharness" ], "orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html": [ - "bccd08cf93fddcf3c8e2dc18fe394454580f2c88", + "243b2d60d4c528a77e9cfb68fa256b35234e7346", "testharness" ], "orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html.headers": [ @@ -579707,7 +581695,7 @@ "support" ], "orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html": [ - "3ea7f029d22c4f05f99fc0cc5c4016670265cea7", + "c9f234f6508fb778fdf91277bb8950c99479979d", "testharness" ], "orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html.headers": [ @@ -579887,7 +581875,7 @@ "testharness" ], "payment-handler/interfaces.https.any.js": [ - "7910e8fa96dabaf03f1806c6faad94a640e4726c", + "66f067e3988546afc0796dcbc276b04b5a5615fc", "testharness" ], "payment-handler/manifest.json": [ @@ -580038,13 +582026,13 @@ "d269e8378f2a84ba96c981536667817e0db9e2d1", "testharness" ], - "payment-request/payment-request-abort-method.https.html": [ - "30c62af4a05a4d83cbbd1e82d0df62bae9a85e96", - "testharness" + "payment-request/payment-request-abort-method-manual.https.html": [ + "6ed75457d922671e7b2ffbf1c0d22f69bbb681e4", + "manual" ], - "payment-request/payment-request-canmakepayment-method.https.html": [ - "0d863558b996df81a36207201bbf8c649688845d", - "testharness" + "payment-request/payment-request-canmakepayment-method-manual.https.html": [ + "40e5bf0445eedb6bb78bd61fa4a468652462a14d", + "manual" ], "payment-request/payment-request-constructor-crash.https.html": [ "383d1c3f9505ee63d504bee87e13efa90ba49f3d", @@ -580090,8 +582078,12 @@ "27ecc7e10e50bf2df07f84a15972c3b913ebf32f", "testharness" ], + "payment-request/payment-request-show-method-manual.https.html": [ + "1df34a1d4ae403ef4853af6850a3f2e9521703f7", + "manual" + ], "payment-request/payment-request-show-method.https.html": [ - "1e4c792de7013839c713555a0a295bcbb9597094", + "676d99be4ce55ab42061921255657c3ab4e458ac", "testharness" ], "payment-request/payment-response/complete-method-manual.https.html": [ @@ -580154,6 +582146,14 @@ "a07f98e117bce1f040c5e62ef3acbd2ef7475338", "manual" ], + "payment-request/show-method-postmessage-iframe.html": [ + "05167546e8763cb39873de4ca8f4e8e758ba0147", + "support" + ], + "payment-request/show-method-postmessage-manual.https.html": [ + "d2be1d2872a473a48df7139ecd3804f33187ec8f", + "manual" + ], "payment-request/updateWith-method-pmi-handling-manual.https.html": [ "b473073ad106e9e0732adb6bfbed5f54d6ec3194", "manual" @@ -580683,7 +582683,7 @@ "testharness" ], "preload/download-resources.html": [ - "f4894d37e5687cdadf8aa6879cf233b8af4e84da", + "a8af59b5a58b04bfda533a314c9822b13b5c379b", "testharness" ], "preload/dynamic-adding-preload-nonce.html": [ @@ -580699,7 +582699,7 @@ "testharness" ], "preload/link-header-on-subresource.html": [ - "ea2f018b648d77b13b8010b4ebe63cdc5f846603", + "e324d7511f139f6d08c1535adfe75df579ebf747", "testharness" ], "preload/link-header-preload-delay-onload.html": [ @@ -580743,19 +582743,19 @@ "testharness" ], "preload/onload-event.html": [ - "a02dd91451d598684a91575e8b09bda81c90e43f", + "2b8bd3c576b4d264d30dd664a5057fbfb1fa3fd5", "testharness" ], "preload/preload-csp.sub.html": [ - "6b883cf98ebedfffbc66ab01db8736b3a978ba3b", + "a363e5f2447bbbcef709216d1b0bbfeec003d588", "testharness" ], "preload/preload-default-csp.sub.html": [ - "5dc342bc568e96a53d5d8c0259a4f3c32a9a6ae5", + "8b22c83cb91255a74078c643d92078695bcd4cea", "testharness" ], "preload/preload-with-type.html": [ - "ede6cb60bc1fff4f5b7740f66f039c88adb23f6f", + "5592d7d0d7495b04753d09f7e01d34358b03e22e", "testharness" ], "preload/reflected-as-value.html": [ @@ -580775,7 +582775,7 @@ "support" ], "preload/resources/dummy-preloads-subresource.css.sub.headers": [ - "74cf2e94b49905203c42c7e701bd2308997347ea", + "99175c5e06059af0e13bb3a7d40e5ed9e4a447fc", "support" ], "preload/resources/dummy.css": [ @@ -580863,7 +582863,7 @@ "testharness" ], "preload/single-download-preload.html": [ - "2b7af8e911957d6b49246a17ceb284b97981241e", + "7c11c149daba797eb7ddae3254d6166e3057e66a", "testharness" ], "presentation-api/OWNERS": [ @@ -580899,7 +582899,7 @@ "manual" ], "presentation-api/controlling-ua/PresentationRequest_error.https.html": [ - "8d8a2a77b5735cfe4dc6d0eeb3c5bdf7f13c4148", + "c1156f81c778b871e741d55eed332e441c0cda1d", "testharness" ], "presentation-api/controlling-ua/PresentationRequest_mixedcontent.https.html": [ @@ -580923,7 +582923,7 @@ "testharness" ], "presentation-api/controlling-ua/PresentationRequest_success.https.html": [ - "74cc007c2472f11bdc08410f870f270e8e4b0f4a", + "91cc64f165493d46bf3e9f0a303c9794bff78854", "testharness" ], "presentation-api/controlling-ua/common.js": [ @@ -581099,15 +583099,15 @@ "support" ], "proximity/ProximitySensor.https.html": [ - "6c4a9d4ed542136534229a20b2c15463c7170a35", + "6920751273c1220f40b5046be7ce7254a01ce72e", "testharness" ], "proximity/ProximitySensor_insecure_context.html": [ - "426dc80f29f9eff09b266d357482d1532066a27a", + "00b6ec75ae65d4ee7144e9362ccc89a3b3adb856", "testharness" ], "proximity/ProximitySensor_onerror-manual.https.html": [ - "ff682dfeb9f9dbea598455190d2c90e14d07b769", + "522cdac324519313d77aa2dd417d486f15b2511f", "manual" ], "proximity/idlharness.https.html": [ @@ -588762,6 +590762,10 @@ "9351f640380bd9a71bca28d32d724bd5f6373650", "support" ], + "resource-timing/resource_TAO_cross_origin_redirect_chain.html": [ + "0dc87677f0c60a5710a5a3c484a0cec548de49bd", + "testharness" + ], "resource-timing/resource_TAO_match_origin.htm": [ "32faacb791313be60380fa744608853b24442f42", "testharness" @@ -588814,10 +590818,6 @@ "a6cd75583f6363a83b18f1bc77d89821de344ff7", "testharness" ], - "resource-timing/resource_frame_initiator_type.html": [ - "dcea1111a2c9a40a1d3de7246a5295e84dcf08b5", - "testharness" - ], "resource-timing/resource_ignore_data_url.html": [ "f8513b4ae7cc26c07cea1c16d872e0594f05041c", "testharness" @@ -588827,7 +590827,7 @@ "testharness" ], "resource-timing/resource_initiator_types.html": [ - "70ab5e0b5d8d684fc420e9242a273e948edbb1ba", + "b05a2dfad953398d6b31f11055606f2f3694a9af", "testharness" ], "resource-timing/resource_memory_cached.sub.html": [ @@ -588870,6 +590870,10 @@ "54c0154ef223eaf288fbc247caa4df7b5c93d844", "testharness" ], + "resource-timing/resource_timing_cross_origin_redirect_chain.html": [ + "367040bd55629c2a94b70f8180e682fb80ead94e", + "testharness" + ], "resource-timing/resource_timing_same_origin_redirect.html": [ "4a108e824fb57aa563deede2da8d47f25a8ab41e", "testharness" @@ -588883,7 +590887,7 @@ "support" ], "resource-timing/resources/all_resource_types.htm": [ - "c7f698888c64e5b750fac45e22dbb85e5979b3c5", + "63a40f0ab7e27536448a7624bb632332c9d0aae4", "support" ], "resource-timing/resources/blank_page_green.htm": [ @@ -588898,10 +590902,18 @@ "51e0050cf1bdeb051d0d7ab6f23a7a2173cb40db", "support" ], + "resource-timing/resources/empty.py": [ + "3638ba60904616a2bf551fef1fb81b08db9e172f", + "support" + ], "resource-timing/resources/empty_script.js": [ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" ], + "resource-timing/resources/eventsource.py": [ + "e53940d9844b03cd06b425530e2e23e20aa31bdb", + "support" + ], "resource-timing/resources/fake_responses.html": [ "c942abc1e8c1672935ffc8ce34821891345bacb9", "support" @@ -588911,7 +590923,7 @@ "support" ], "resource-timing/resources/green_frame.htm": [ - "08f8ca19b61ab0ac68014d5b406a952669fbe104", + "710159d2dcfce2cdc2f98449ec7a516fdc739079", "support" ], "resource-timing/resources/gzip_xml.py": [ @@ -588958,6 +590970,10 @@ "f53513f6f47fd4a6d4994a4ef7d6e37d1777ea57", "support" ], + "resource-timing/resources/multi_redirect.py": [ + "01cbf570b683a8e419b5a0ff7a0681a0b2ffa838", + "support" + ], "resource-timing/resources/nested.css": [ "b89daf15601a711f6046d9e2fe1cc43ae1f0fd27", "support" @@ -589306,26 +591322,6 @@ "01ae6e757d428800555012783e290ebba575bcab", "testharness" ], - "sensors/OWNERS": [ - "b1349055762c7d44414c0c11fb8500d5eee9a75f", - "support" - ], - "sensors/SensorErrorEvent-constructor.https.html": [ - "99bcfb42c91e084a3b847ab4bab2bad80e548540", - "testharness" - ], - "sensors/generic-sensor-feature-policy-test.sub.js": [ - "c7c9c4d1c578f267cbb4241d7ea7a981be6f49ee", - "support" - ], - "sensors/generic-sensor-tests.js": [ - "0f1cea2c0d3f38220cbfdbe4f47d713214987cbd", - "support" - ], - "sensors/idlharness.https.html": [ - "02c734b907075c8abb7504fc7e2b93730ac80a0c", - "testharness" - ], "server-timing/cross_origin.html": [ "74333db517babacbb84bb20c91ccfc8b2627b934", "testharness" @@ -590074,6 +592070,10 @@ "fc315489c4d337f7cf8395beb4005be9c12da9d6", "support" ], + "service-workers/cache-storage/script-tests/cache-abort.js": [ + "7c381e34a8e1444ad82645caf05ec8cbfe8360f8", + "support" + ], "service-workers/cache-storage/script-tests/cache-add.js": [ "5807ce231254f89d9e5f2fc43955a8dda5bd865d", "support" @@ -590110,6 +592110,10 @@ "43a44ad35e90ce759de7a855f75b149b756029b4", "support" ], + "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ + "6b44436f3b2e1a463e64f3f5fc343086a295a975", + "testharness" + ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ "294e76cb7b067b17fc9a0850bdab1d6e169cc25a", "testharness" @@ -590150,6 +592154,10 @@ "ef598649e75e3c8736729d7e233982748e31eb79", "testharness" ], + "service-workers/cache-storage/window/cache-abort.https.html": [ + "2143ee1d78242bd2d055f6ea1b63a1becff657fe", + "testharness" + ], "service-workers/cache-storage/window/cache-add.https.html": [ "d2c83935c4f413fa6f9459843a9ba669deb0e8ce", "testharness" @@ -590190,6 +592198,10 @@ "dafb0d18e02c256a78188fdaf6997a1abd58b215", "testharness" ], + "service-workers/cache-storage/worker/cache-abort.https.html": [ + "d67a78e50008a587d0b349daaacafc25a18cfd5b", + "testharness" + ], "service-workers/cache-storage/worker/cache-add.https.html": [ "2cbea6be14f2f1852993be40744cac72a7fc62f6", "testharness" @@ -590731,7 +592743,7 @@ "testharness" ], "service-workers/service-worker/navigate-window.https.html": [ - "0499d4489276c2a933b79e47f1de591f467f42aa", + "4b481c60520981f5f5791344cd78d638412b4ecb", "testharness" ], "service-workers/service-worker/navigation-preload/broken-chunked-encoding.https.html": [ @@ -592746,14 +594758,6 @@ "45bfdcce349e2cb28611520b006c060347fdf58d", "testharness" ], - "staticrange/OWNERS": [ - "290c71b49f1147778f51898e114db808b4568549", - "support" - ], - "staticrange/idlharness.html": [ - "16f30a68d97edf19c5255328fd1460ac54a4c025", - "testharness" - ], "storage/OWNERS": [ "2c585ecaee5e62118d3cb98c98e12d959ebcbd50", "support" @@ -592935,7 +594939,7 @@ "testharness" ], "streams/piping/error-propagation-backward.js": [ - "e7f1bdd524056017264ba1f0d2f569c5a5bbece5", + "a9ed4065bf5512937a60f85e18ee0b4312994506", "support" ], "streams/piping/error-propagation-backward.serviceworker.https.html": [ @@ -593015,7 +595019,7 @@ "testharness" ], "streams/piping/multiple-propagation.js": [ - "8d00cd13d84d421a297bff499511d96f7b72c98c", + "a4f9df6a5da581c14aae0d489bc73972873f2b7d", "support" ], "streams/piping/multiple-propagation.serviceworker.https.html": [ @@ -593135,7 +595139,7 @@ "testharness" ], "streams/readable-byte-streams/general.js": [ - "a7262a490c4a913811c8d0c489b06a567a448fc6", + "ce3c72f3a552a6b9a42b4f37be7e6a053cad10a1", "support" ], "streams/readable-byte-streams/general.serviceworker.https.html": [ @@ -593471,7 +595475,7 @@ "testharness" ], "streams/transform-streams/errors.js": [ - "5dcd3245e4518ff59d1297e900118cf04c6cd2d8", + "607bf12f225025a006e3b898776553fa23d38597", "support" ], "streams/transform-streams/errors.serviceworker.https.html": [ @@ -593591,7 +595595,7 @@ "testharness" ], "streams/transform-streams/reentrant-strategies.js": [ - "caf6c2d53b211fdfd001858a8656dc0f0f92ce74", + "1ddadc53f6b69bda7cf015ca44e6c78f74f11111", "support" ], "streams/transform-streams/reentrant-strategies.serviceworker.https.html": [ @@ -593651,7 +595655,7 @@ "testharness" ], "streams/writable-streams/aborting.js": [ - "d5c1da21925490cb9ea134eac5435a03e84fe4f7", + "24615519115cde901b8cac1a19c23cd0d9244a17", "support" ], "streams/writable-streams/aborting.serviceworker.https.html": [ @@ -593691,7 +595695,7 @@ "testharness" ], "streams/writable-streams/bad-underlying-sinks.js": [ - "f09d495d577ff9904adbcfc4746acfd5f70860ff", + "9a9f0b9eb7a93e9809c549e983c4052648157592", "support" ], "streams/writable-streams/bad-underlying-sinks.serviceworker.https.html": [ @@ -593751,7 +595755,7 @@ "testharness" ], "streams/writable-streams/close.js": [ - "a0f0183652427bdcd049eac90eb52d1ba5e09110", + "45a448b31a40388f277ecf064339f6858f032cc1", "support" ], "streams/writable-streams/close.serviceworker.https.html": [ @@ -593851,7 +595855,7 @@ "testharness" ], "streams/writable-streams/general.js": [ - "4f07b059c3b2d90ca0c08ffe014e3e77ade70be0", + "af1848e49d119ba4e57b8354052e161ac8e80632", "support" ], "streams/writable-streams/general.serviceworker.https.html": [ @@ -593891,7 +595895,7 @@ "testharness" ], "streams/writable-streams/reentrant-strategy.js": [ - "e0fea3678e9441483cda043bff02595836a20de4", + "87a02a0d0b66c3fe571ca106379da254a4e2869f", "support" ], "streams/writable-streams/reentrant-strategy.serviceworker.https.html": [ @@ -594142,10 +596146,22 @@ "ce9e3471676d5a50b91f6b274d648b481e509223", "support" ], + "svg/extensibility/foreignObject/containing-block.html": [ + "6ed9e162526cbf37fb07c1cb7abbe79d987601c8", + "testharness" + ], "svg/extensibility/foreignObject/properties.svg": [ "974affbb2c135c9aaa7a3f27687157b5e1250a9f", "testharness" ], + "svg/extensibility/foreignObject/stacking-context-expected.html": [ + "6ea850b74b6a03554305ed95df45079bdbcb15dd", + "support" + ], + "svg/extensibility/foreignObject/stacking-context.html": [ + "ef9026d2b8b27a258c3921139c46692292377dfe", + "reftest" + ], "svg/extensibility/interfaces/foreignObject-graphics.svg": [ "16a7ef4c64dab3706120a2221dd6bec5ca8e9062", "testharness" @@ -597571,7 +599587,7 @@ "testharness" ], "user-timing/invoke_with_timing_attributes.html": [ - "c946c734573a3e8598389ae854c1d9792e96440c", + "05283be9a7230ba0c4af09fb5dac98d828bfaf2e", "testharness" ], "user-timing/invoke_with_timing_attributes.worker.js": [ @@ -597595,7 +599611,7 @@ "testharness" ], "user-timing/measure_exceptions_navigation_timing.html": [ - "e557969014be8b0ed1870e288e7f06f4b2a149a4", + "ed9d9be01e740d282ec94379bfd78aca07b56325", "testharness" ], "user-timing/measure_navigation_timing.html": [ @@ -598903,7 +600919,7 @@ "testharness" ], "web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html": [ - "bda186b311457e58c48ca5cf4619f485a41f8e2d", + "2c424570af86e1a4541d4f0a67c7693cfcac8abc", "testharness" ], "web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html": [ @@ -598919,27 +600935,27 @@ "testharness" ], "web-animations/interfaces/Animatable/animate.html": [ - "8d76a26de47494600da40e756a26de61329ff3aa", + "4cd816ad368f1dae077f601022f9b57d9cb931ae", "testharness" ], "web-animations/interfaces/Animatable/getAnimations.html": [ - "9c03f9a6410dc8463a3e3acb3b6e38c26d79b097", + "a11049c78d2ca16a9df9d0f21b3a3d0fd35e29f3", "testharness" ], "web-animations/interfaces/Animation/cancel.html": [ - "38d509e24fa224fc8b937e4a63dd1c404e72b466", + "105313dffbe7953ca6b413e860ba8b47e316e0b7", "testharness" ], "web-animations/interfaces/Animation/constructor.html": [ - "f4dc4fdca61255557ed346412e134745bce1a3ed", + "75e8dd9d9d3c96a87cec1abc2c1373537c6e0f77", "testharness" ], "web-animations/interfaces/Animation/effect.html": [ - "4445fc8bd2120fb1e212dfc6a1fcf786a531ee6f", + "db36e79cf6839cda7d6940f21afe2f56d4d9a115", "testharness" ], "web-animations/interfaces/Animation/finished.html": [ - "ffcba3379db7094455a7798e4d5972d8e52caec5", + "a944518bdd0151534f0172ac58034ac613a70249", "testharness" ], "web-animations/interfaces/Animation/id.html": [ @@ -598947,7 +600963,7 @@ "testharness" ], "web-animations/interfaces/Animation/idlharness.html": [ - "d61aa2d95ea31809a275183408e822c8c1eec87d", + "b049999bb0512bfa0c3eb8b60176eb9213d663f7", "testharness" ], "web-animations/interfaces/Animation/oncancel.html": [ @@ -598978,44 +600994,12 @@ "01f669542434f03d37e9f148a4f3135fe3122d46", "testharness" ], - "web-animations/interfaces/AnimationEffectTiming/delay.html": [ - "4de5b0a692d645961de27df67efa8257adb0a031", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/direction.html": [ - "642207ce454fb816cc47d14fbe29f65d92ddf6ed", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/duration.html": [ - "14abe09cb19080585a315115e387b85784c7d862", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/easing.html": [ - "b3ad4c78c9bce0e17db0ce780cd1260de1ce7cb0", + "web-animations/interfaces/AnimationEffect/getComputedTiming.html": [ + "e0d4ba4c0f1a5da4d126c501eca733e00adbef1a", "testharness" ], - "web-animations/interfaces/AnimationEffectTiming/endDelay.html": [ - "a8609f22672b092178c2391d7ba7ef804112bef4", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/fill.html": [ - "1cef601cde33eea3b591a0826ad52f379bb31d0d", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/getComputedTiming.html": [ - "020e9faaae05de5a25829a05558ea72672b04f63", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/idlharness.html": [ - "aa9823e5a06c76921b49aa5f5e61fd1dedfac3af", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/iterationStart.html": [ - "393b37098ab470e75b1254b53875901e705d8d1b", - "testharness" - ], - "web-animations/interfaces/AnimationEffectTiming/iterations.html": [ - "1e8bb46b5a1eef496edda32b16c856baa16e9b30", + "web-animations/interfaces/AnimationEffect/updateTiming.html": [ + "5daa5580c2d34e992f3560bf5b85419498b6c5ee", "testharness" ], "web-animations/interfaces/AnimationPlaybackEvent/constructor.html": [ @@ -599027,7 +601011,7 @@ "testharness" ], "web-animations/interfaces/Document/getAnimations.html": [ - "12fdbce3e75f5a7d7771d9337089255ef73f9712", + "7fbd5eed47955fdaeccd329f82f0884b86654784", "testharness" ], "web-animations/interfaces/Document/timeline.html": [ @@ -599047,23 +601031,23 @@ "testharness" ], "web-animations/interfaces/KeyframeEffect/constructor.html": [ - "2f6449cbf2b47ae457efb23fb52b8fd1709837ac", + "38ff2a4b64e7318fa96eb867aae7f25bed53e67b", "testharness" ], "web-animations/interfaces/KeyframeEffect/copy-constructor.html": [ - "6ef462ddc696269f132d596188ffd5e8da1e1164", + "0e3d893d7b8e438b279f087846df596256ccbe84", "testharness" ], "web-animations/interfaces/KeyframeEffect/idlharness.html": [ - "f05c9bd1cdee77ff6be143b0eb4f982c7218908b", + "ffe493133d4029820f8b27389a15157706b738e8", "testharness" ], "web-animations/interfaces/KeyframeEffect/iterationComposite.html": [ - "65cd746596a6770d1101b030769712be433bf6f3", + "c5ce17faeb355f1e9efae516d6272a88c46daa1f", "testharness" ], "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html": [ - "f54c7c0da5728f88f37a067761af7ad815fea005", + "ca5efb8556aff617bef957be315ea2fd01e756d8", "testharness" ], "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html": [ @@ -599094,12 +601078,20 @@ "08da0c81847809328bda0d6e0581711f7838916e", "support" ], + "web-animations/resources/timing-tests.js": [ + "2da06d9e7ace5947141165284697c4ea9be5b9d5", + "support" + ], + "web-animations/resources/timing-utils.js": [ + "e0918d83187c0fbdadaebb14be72c6f34f8dfc03", + "support" + ], "web-animations/resources/xhr-doc.py": [ "de68c45fc1d38a49946f9046f34031e9278a1531", "support" ], "web-animations/testcommon.js": [ - "6f3e85e7ae7786ad9ff3aaec8c6343642d2510c5", + "8f593cc9211bcc0f8f99579e8a3475528f837969", "support" ], "web-animations/timing-model/animation-effects/active-time.html": [ @@ -599115,7 +601107,7 @@ "testharness" ], "web-animations/timing-model/animation-effects/phases-and-states.html": [ - "3edd2c4bdd8409c2c12f08bc998dd8d532e0fd7d", + "b8cc580e3e8d17961ffff4b693857f6c333dd57f", "testharness" ], "web-animations/timing-model/animation-effects/simple-iteration-progress.html": [ @@ -599127,7 +601119,7 @@ "testharness" ], "web-animations/timing-model/animations/finishing-an-animation.html": [ - "4c1cf823a81e72541abcafaa08950cf87424ae55", + "afe654435332e798b3771b6ec6ca13bcca99e421", "testharness" ], "web-animations/timing-model/animations/pausing-an-animation.html": [ @@ -599151,7 +601143,7 @@ "testharness" ], "web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html": [ - "a7da92b9624750eccb9dce1d32e522fdbb65176f", + "aa5f258132490ade2dbd9485c85f749cbab293a5", "testharness" ], "web-animations/timing-model/animations/setting-the-playback-rate-of-an-animation.html": [ @@ -599163,7 +601155,7 @@ "testharness" ], "web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html": [ - "5575a251b9c265d98471e758b3cf9b218e381cba", + "f4e50b805229e0170bff67530b694ee5d6dd1f1a", "testharness" ], "web-animations/timing-model/animations/setting-the-timeline-of-an-animation.html": [ @@ -599175,7 +601167,7 @@ "testharness" ], "web-animations/timing-model/animations/updating-the-finished-state.html": [ - "59e7ed8e4eac5c9edf2526ef748b22e1877b7016", + "8eea7caf9f0bf8b9a87b5a6574a28b378054c8db", "testharness" ], "web-animations/timing-model/time-transformations/transformed-progress.html": [ @@ -599346,6 +601338,10 @@ "93068df297042344669093ce899f0230c87ebf54", "testharness" ], + "webaudio/idlharness.https.html": [ + "7876e16ea643f69315e18c3e17af0d7f95769420", + "testharness" + ], "webaudio/js/buffer-loader.js": [ "4d564eae0b3d7d1045626d1f144cd2638dba64e5", "support" @@ -599546,6 +601542,10 @@ "99284ab790c09dd7a23a6fa5022e8b08b9e3947d", "testharness" ], + "webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html": [ + "bf3ebb3a403b24078b7e8c2ff7073dcbc486bb27", + "testharness" + ], "webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html": [ "a1cd969fe32a5aca7cd90d0d0955132fd1660b9c", "testharness" @@ -599570,6 +601570,10 @@ "1561b9eede1ee15126fdd9674a6d9d63194b66c2", "support" ], + "webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js": [ + "bd6e7a669a2c445ecfd3de4dd6b48a4d84b214cc", + "support" + ], "webaudio/the-audio-api/the-audioworklet-interface/processors/one-pole-processor.js": [ "80b817db4e8d3f49e4f5fe6e97f8e687d16f3159", "support" @@ -600047,7 +602051,7 @@ "wdspec" ], "webdriver/tests/cookies/add_cookie.py": [ - "dcf93071762ea0a0cde253dcd5a54eace26619af", + "c87dc51111c10bbc29339ba0d1be85fb35ee6d6f", "wdspec" ], "webdriver/tests/cookies/delete_cookie.py": [ @@ -600087,7 +602091,7 @@ "wdspec" ], "webdriver/tests/element_retrieval/find_element_from_element.py": [ - "34f356f2579391289edb31adf5b4d4eb88ffc643", + "fa64a4164762861097f11252e8526261038ae1c5", "wdspec" ], "webdriver/tests/element_retrieval/find_elements.py": [ @@ -600095,7 +602099,7 @@ "wdspec" ], "webdriver/tests/element_retrieval/find_elements_from_element.py": [ - "b062b9f044268f0d9e092def81afae1277a91cd8", + "90be4b09a41b8ba00529a78983fbd64cdb3453ef", "wdspec" ], "webdriver/tests/element_retrieval/get_active_element.py": [ @@ -600255,7 +602259,7 @@ "support" ], "webdriver/tests/support/fixtures.py": [ - "ff5b6ca84a42c849b018b512af6987dc9e317cc5", + "f564352a1d24e685cfe96c5b6f1b986b0dedadfe", "support" ], "webdriver/tests/support/http_request.py": [ @@ -600423,7 +602427,7 @@ "testharness" ], "webmessaging/broadcastchannel/workers.html": [ - "c060739cf485439c5648a49c131353f161c24a0c", + "483e03e9528f1e80fc1b250caee46f7f256d63c1", "testharness" ], "webmessaging/event.data.sub.htm": [ @@ -600431,7 +602435,7 @@ "testharness" ], "webmessaging/event.origin.sub.htm": [ - "ef14b99d3eac8c17623f3ba531605fa2abda99d7", + "591a0bcef635d7158fe9c04fabfeea030dce9c62", "testharness" ], "webmessaging/event.ports.sub.htm": [ @@ -600474,6 +602478,10 @@ "19fc5d2f7e0f30e9d35a8606c3fb05b537ea3a82", "testharness" ], + "webmessaging/message-channels/worker.html": [ + "25778166691434e77f361a609742a170c4f787e8", + "testharness" + ], "webmessaging/messageerror.html": [ "92c5359ad64394cb2d30402204968d49227c5daf", "testharness" @@ -600507,7 +602515,7 @@ "testharness" ], "webmessaging/postMessage_asterisk_xorigin.sub.htm": [ - "d322154c452e58241091b2e5fc995d0322dfc4dd", + "0d77e50f5ccdec34f98694ddcc266a1834250266", "testharness" ], "webmessaging/postMessage_dup_transfer_objects.htm": [ @@ -600799,11 +602807,11 @@ "testharness" ], "webrtc/RTCDTMFSender-helper.js": [ - "79825a416ad8e027628e80c9e0ef1a8dca2d8ca3", + "26b5336881897c93fafd1ddf32910cf6fef16987", "support" ], "webrtc/RTCDTMFSender-insertDTMF.https.html": [ - "591337627bf4bd0e40e6a5660efa9fc1e320d89f", + "79574cff7e0500cecaf7e3ae182e89d98f49ce72", "testharness" ], "webrtc/RTCDTMFSender-ontonechange-long.https.html": [ @@ -601222,6 +603230,10 @@ "f556c52a5ba7370dfd94f57331d606b147b0932f", "testharness" ], + "websockets/Create-on-worker-shutdown.html": [ + "75112264efdc3b310f4ba2ab4517b7608aacf2f2", + "testharness" + ], "websockets/Create-protocol-with-space.htm": [ "923fd2681d86812d63347f995f91747ebec18a44", "testharness" @@ -602455,7 +604467,7 @@ "support" ], "webvr/idlharness.https.html": [ - "3505e27e1b2668010bf61f05f6b8a759cf42cece", + "ae515edc7c77c87caff8fa096a0682a12a254e83", "testharness" ], "webvr/webvr-disabled-by-feature-policy.https.sub.html": [ @@ -602607,7 +604619,7 @@ "testharness" ], "webvtt/api/interfaces.html": [ - "3b4f42db6f608d1e89d2a3fab575e05da8a3d005", + "4e54c4fd00214446cfc392f30ab85edf22b3aece", "testharness" ], "webvtt/categories.json": [ @@ -607691,7 +609703,7 @@ "testharness" ], "xhr/responsexml-document-properties.htm": [ - "3171001d9f35e2524a575d02c581c2cbe813f973", + "432b8327dbb09533bb64e8dabf72754d85c25e4f", "testharness" ], "xhr/responsexml-get-twice.htm": [ @@ -608050,6 +610062,10 @@ "a67d1876d6245fb94d60a937b633c87c51a04d21", "testharness" ], + "xhr/xmlhttprequest-closing-worker.html": [ + "2e12b49aca2dc3908837b6b419c92cb890e60e3f", + "testharness" + ], "xhr/xmlhttprequest-eventtarget.htm": [ "40c886f79399108db3ded8a23848905dcf9e0862", "testharness" diff --git a/tests/wpt/metadata/css/CSS2/floats-clear/clear-on-child-with-margins.html.ini b/tests/wpt/metadata/css/CSS2/floats-clear/clear-on-child-with-margins.html.ini new file mode 100644 index 00000000000..a7392b97207 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats-clear/clear-on-child-with-margins.html.ini @@ -0,0 +1,2 @@ +[clear-on-child-with-margins.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/calc-in-font-variation-settings.html.ini b/tests/wpt/metadata/css/css-fonts/calc-in-font-variation-settings.html.ini new file mode 100644 index 00000000000..a1fdcbd2b19 --- /dev/null +++ b/tests/wpt/metadata/css/css-fonts/calc-in-font-variation-settings.html.ini @@ -0,0 +1,4 @@ +[calc-in-font-variation-settings.html] + [calc() in font-variation-settings] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-regions/elements/canvas3d-001.html.ini b/tests/wpt/metadata/css/css-regions/elements/canvas3d-001.html.ini index e1b754989a4..cc4dc5a7b8d 100644 --- a/tests/wpt/metadata/css/css-regions/elements/canvas3d-001.html.ini +++ b/tests/wpt/metadata/css/css-regions/elements/canvas3d-001.html.ini @@ -1,3 +1,2 @@ [canvas3d-001.html] - type: reftest - disabled: https://github.com/servo/servo/issues/8766 + expected: FAIL diff --git a/tests/wpt/metadata/css/css-regions/elements/canvas3d-002.html.ini b/tests/wpt/metadata/css/css-regions/elements/canvas3d-002.html.ini index 0f98f306849..bcfb3650944 100644 --- a/tests/wpt/metadata/css/css-regions/elements/canvas3d-002.html.ini +++ b/tests/wpt/metadata/css/css-regions/elements/canvas3d-002.html.ini @@ -1,3 +1,2 @@ [canvas3d-002.html] - type: reftest - disabled: https://github.com/servo/servo/issues/8766 + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-013.html.ini b/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-013.html.ini deleted file mode 100644 index 85e6bf04a53..00000000000 --- a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-013.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[css3-text-line-break-opclns-013.html] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-048.html.ini b/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-048.html.ini deleted file mode 100644 index 8e23244fd5d..00000000000 --- a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-048.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[css3-text-line-break-opclns-048.html] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-118.html.ini b/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-118.html.ini deleted file mode 100644 index 6d35f440551..00000000000 --- a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-118.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[css3-text-line-break-opclns-118.html] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-154.html.ini b/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-154.html.ini deleted file mode 100644 index f83c4887e81..00000000000 --- a/tests/wpt/metadata/css/css-text/i18n/css3-text-line-break-opclns-154.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[css3-text-line-break-opclns-154.html] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018a.xht.ini b/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018a.xht.ini deleted file mode 100644 index 8e7e8001eed..00000000000 --- a/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018a.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[line-break-strict-018a.xht] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018b.xht.ini b/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018b.xht.ini deleted file mode 100644 index e98130a0672..00000000000 --- a/tests/wpt/metadata/css/css-text/line-break/line-break-strict-018b.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[line-break-strict-018b.xht] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/line-breaking/line-breaking-012.html.ini b/tests/wpt/metadata/css/css-text/line-breaking/line-breaking-012.html.ini new file mode 100644 index 00000000000..6fd167de2a7 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/line-breaking/line-breaking-012.html.ini @@ -0,0 +1,2 @@ +[line-breaking-012.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-normal-002.xht.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-normal-002.xht.ini deleted file mode 100644 index 5670f4380e8..00000000000 --- a/tests/wpt/metadata/css/css-text/word-break/word-break-normal-002.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[word-break-normal-002.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini deleted file mode 100644 index 26435e28b09..00000000000 --- a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[vh_not_refreshing_on_chrome.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini index 171592fc08f..6ef8bb1049f 100644 --- a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini @@ -2,3 +2,6 @@ [elementsFromPoint on the root document for points in iframe elements] expected: FAIL + [elementsFromPoint on inner documents] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/computed-style-002.html.ini b/tests/wpt/metadata/css/cssom/computed-style-002.html.ini new file mode 100644 index 00000000000..4c77eab4ebb --- /dev/null +++ b/tests/wpt/metadata/css/cssom/computed-style-002.html.ini @@ -0,0 +1,4 @@ +[computed-style-002.html] + [Check that a percent width in an iframe is resolved against iframe width for getComputedStyle.] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/computed-style-003.html.ini b/tests/wpt/metadata/css/cssom/computed-style-003.html.ini new file mode 100644 index 00000000000..380a8e3071c --- /dev/null +++ b/tests/wpt/metadata/css/cssom/computed-style-003.html.ini @@ -0,0 +1,4 @@ +[computed-style-003.html] + [CSS Test: getComputedStyle - resolved width in iframe dynamic display] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/computed-style-004.html.ini b/tests/wpt/metadata/css/cssom/computed-style-004.html.ini new file mode 100644 index 00000000000..9c24cfd9cc9 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/computed-style-004.html.ini @@ -0,0 +1,4 @@ +[computed-style-004.html] + [CSS Test: getComputedStyle - resolved width in nested iframes dynamic width] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/getComputedStyle-dynamic-subdoc.html.ini b/tests/wpt/metadata/css/cssom/getComputedStyle-dynamic-subdoc.html.ini new file mode 100644 index 00000000000..b39d7c251c5 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/getComputedStyle-dynamic-subdoc.html.ini @@ -0,0 +1,4 @@ +[getComputedStyle-dynamic-subdoc.html] + [getComputedStyle cross-doc properly reflects media query changes] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/inline-style-001.html.ini b/tests/wpt/metadata/css/cssom/inline-style-001.html.ini index 22b7ca432d6..96205b5e817 100644 --- a/tests/wpt/metadata/css/cssom/inline-style-001.html.ini +++ b/tests/wpt/metadata/css/cssom/inline-style-001.html.ini @@ -1,5 +1,6 @@ [inline-style-001.html] type: testharness + expected: TIMEOUT [CSSStyleDeclaration_accessible] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/medialist-interfaces-001.html.ini b/tests/wpt/metadata/css/cssom/medialist-interfaces-001.html.ini index 52c9d59f35a..cf6011a8f9d 100644 --- a/tests/wpt/metadata/css/cssom/medialist-interfaces-001.html.ini +++ b/tests/wpt/metadata/css/cssom/medialist-interfaces-001.html.ini @@ -12,3 +12,6 @@ [mediatest_medialist_serialize_lexicographical] expected: FAIL + [mediatest_medialist_serialize_order] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/serialize-values.html.ini b/tests/wpt/metadata/css/cssom/serialize-values.html.ini index d499a0af3df..3120a9ea8f7 100644 --- a/tests/wpt/metadata/css/cssom/serialize-values.html.ini +++ b/tests/wpt/metadata/css/cssom/serialize-values.html.ini @@ -98,9 +98,3 @@ [widows: inherit] expected: FAIL - [content: counter(par-num)] - expected: FAIL - - [content: counter(par-num, decimal)] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom/style-sheet-interfaces-001.html.ini b/tests/wpt/metadata/css/cssom/style-sheet-interfaces-001.html.ini index cba5df52390..ee311615761 100644 --- a/tests/wpt/metadata/css/cssom/style-sheet-interfaces-001.html.ini +++ b/tests/wpt/metadata/css/cssom/style-sheet-interfaces-001.html.ini @@ -1,8 +1,5 @@ [style-sheet-interfaces-001.html] type: testharness - [sheet_property] - expected: FAIL - [CSSStyleSheet_properties] expected: FAIL diff --git a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini index 13a7cbc5517..b8ca47ff7b3 100644 --- a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini +++ b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini @@ -47,3 +47,15 @@ [Serialization should round-trip after setting e.style['filter'\] = "blur(10px) url(\\"picture.svg#f\\") contrast(20) brightness(30)"] expected: FAIL + [e.style['filter'\] = "drop-shadow(rgb(4, 5, 6) 1px 2px)" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['filter'\] = "drop-shadow(rgb(4, 5, 6) 1px 2px)"] + expected: FAIL + + [e.style['filter'\] = "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['filter'\] = "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)"] + expected: FAIL + diff --git a/tests/wpt/metadata/custom-elements/parser/parser-sets-attributes-and-children.html.ini b/tests/wpt/metadata/custom-elements/parser/parser-sets-attributes-and-children.html.ini index 24282dc421e..775fd656cf1 100644 --- a/tests/wpt/metadata/custom-elements/parser/parser-sets-attributes-and-children.html.ini +++ b/tests/wpt/metadata/custom-elements/parser/parser-sets-attributes-and-children.html.ini @@ -1,4 +1,4 @@ [parser-sets-attributes-and-children.html] expected: if os == "mac": TIMEOUT - if os == "linux": TIMEOUT + if os == "linux": CRASH diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini index 41e5ae4d90e..a1bd285b66b 100644 --- a/tests/wpt/metadata/dom/interfaces.html.ini +++ b/tests/wpt/metadata/dom/interfaces.html.ini @@ -864,3 +864,60 @@ [CDATASection interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL + [AbstractRange interface: existence and properties of interface object] + expected: FAIL + + [AbstractRange interface object length] + expected: FAIL + + [AbstractRange interface object name] + expected: FAIL + + [AbstractRange interface: existence and properties of interface prototype object] + expected: FAIL + + [AbstractRange interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [AbstractRange interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [AbstractRange interface: attribute startContainer] + expected: FAIL + + [AbstractRange interface: attribute startOffset] + expected: FAIL + + [AbstractRange interface: attribute endContainer] + expected: FAIL + + [AbstractRange interface: attribute endOffset] + expected: FAIL + + [AbstractRange interface: attribute collapsed] + expected: FAIL + + [StaticRange interface: existence and properties of interface object] + expected: FAIL + + [StaticRange interface object length] + expected: FAIL + + [StaticRange interface object name] + expected: FAIL + + [StaticRange interface: existence and properties of interface prototype object] + expected: FAIL + + [StaticRange interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [StaticRange interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [Range interface: existence and properties of interface object] + expected: FAIL + + [Range interface: existence and properties of interface prototype object] + expected: FAIL + diff --git a/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini b/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini index 95c9293d995..7bfd658f072 100644 --- a/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini +++ b/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini @@ -75,3 +75,333 @@ [classList.replace("c", "a") with attribute value "c b a" (foo node)] expected: FAIL + [classList.replace("a", "b") with attribute value "a" (HTML node)] + expected: FAIL + + [classList.replace("A", "b") with attribute value "a" (HTML node)] + expected: FAIL + + [classList.replace("b", "A") with attribute value "a b" (HTML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b" (HTML node)] + expected: FAIL + + [classList.replace("d", "e") with attribute value "a b c" (HTML node)] + expected: FAIL + + [classList.replace("c", "d") with attribute value "a a a b" (HTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value null (HTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "" (HTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " " (HTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " a \\f" (HTML node)] + expected: FAIL + + [classList.replace("b", "d") with attribute value "a b c" (HTML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b c" (HTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "a b a" (HTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "a b a" (HTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value " a a b" (HTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value " a a b" (HTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (HTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (HTML node)] + expected: FAIL + + [classList.replace(null, "b") with attribute value "a null" (HTML node)] + expected: FAIL + + [classList.replace("a", null) with attribute value "a b" (HTML node)] + expected: FAIL + + [classList.replace(undefined, "b") with attribute value "a undefined" (HTML node)] + expected: FAIL + + [classList.replace("a", undefined) with attribute value "a b" (HTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "a" (XHTML node)] + expected: FAIL + + [classList.replace("A", "b") with attribute value "a" (XHTML node)] + expected: FAIL + + [classList.replace("b", "A") with attribute value "a b" (XHTML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b" (XHTML node)] + expected: FAIL + + [classList.replace("d", "e") with attribute value "a b c" (XHTML node)] + expected: FAIL + + [classList.replace("c", "d") with attribute value "a a a b" (XHTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value null (XHTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "" (XHTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " " (XHTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " a \\f" (XHTML node)] + expected: FAIL + + [classList.replace("b", "d") with attribute value "a b c" (XHTML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b c" (XHTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "a b a" (XHTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "a b a" (XHTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value " a a b" (XHTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value " a a b" (XHTML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (XHTML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (XHTML node)] + expected: FAIL + + [classList.replace(null, "b") with attribute value "a null" (XHTML node)] + expected: FAIL + + [classList.replace("a", null) with attribute value "a b" (XHTML node)] + expected: FAIL + + [classList.replace(undefined, "b") with attribute value "a undefined" (XHTML node)] + expected: FAIL + + [classList.replace("a", undefined) with attribute value "a b" (XHTML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "a" (MathML node)] + expected: FAIL + + [classList.replace("A", "b") with attribute value "a" (MathML node)] + expected: FAIL + + [classList.replace("b", "A") with attribute value "a b" (MathML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b" (MathML node)] + expected: FAIL + + [classList.replace("d", "e") with attribute value "a b c" (MathML node)] + expected: FAIL + + [classList.replace("c", "d") with attribute value "a a a b" (MathML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value null (MathML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "" (MathML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " " (MathML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " a \\f" (MathML node)] + expected: FAIL + + [classList.replace("b", "d") with attribute value "a b c" (MathML node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b c" (MathML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "a b a" (MathML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "a b a" (MathML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value " a a b" (MathML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value " a a b" (MathML node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (MathML node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (MathML node)] + expected: FAIL + + [classList.replace(null, "b") with attribute value "a null" (MathML node)] + expected: FAIL + + [classList.replace("a", null) with attribute value "a b" (MathML node)] + expected: FAIL + + [classList.replace(undefined, "b") with attribute value "a undefined" (MathML node)] + expected: FAIL + + [classList.replace("a", undefined) with attribute value "a b" (MathML node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "a" (XML node with null namespace)] + expected: FAIL + + [classList.replace("A", "b") with attribute value "a" (XML node with null namespace)] + expected: FAIL + + [classList.replace("b", "A") with attribute value "a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("d", "e") with attribute value "a b c" (XML node with null namespace)] + expected: FAIL + + [classList.replace("c", "d") with attribute value "a a a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "b") with attribute value null (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " " (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " a \\f" (XML node with null namespace)] + expected: FAIL + + [classList.replace("b", "d") with attribute value "a b c" (XML node with null namespace)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b c" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "a b a" (XML node with null namespace)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "a b a" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "c") with attribute value " a a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("b", "c") with attribute value " a a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (XML node with null namespace)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (XML node with null namespace)] + expected: FAIL + + [classList.replace(null, "b") with attribute value "a null" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", null) with attribute value "a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace(undefined, "b") with attribute value "a undefined" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", undefined) with attribute value "a b" (XML node with null namespace)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "a" (foo node)] + expected: FAIL + + [classList.replace("A", "b") with attribute value "a" (foo node)] + expected: FAIL + + [classList.replace("b", "A") with attribute value "a b" (foo node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b" (foo node)] + expected: FAIL + + [classList.replace("d", "e") with attribute value "a b c" (foo node)] + expected: FAIL + + [classList.replace("c", "d") with attribute value "a a a b" (foo node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value null (foo node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value "" (foo node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " " (foo node)] + expected: FAIL + + [classList.replace("a", "b") with attribute value " a \\f" (foo node)] + expected: FAIL + + [classList.replace("b", "d") with attribute value "a b c" (foo node)] + expected: FAIL + + [classList.replace("c", "a") with attribute value "a b c" (foo node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "a b a" (foo node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "a b a" (foo node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value " a a b" (foo node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value " a a b" (foo node)] + expected: FAIL + + [classList.replace("a", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (foo node)] + expected: FAIL + + [classList.replace("b", "c") with attribute value "\\t\\n\\f\\r a\\t\\n\\f\\r b\\t\\n\\f\\r " (foo node)] + expected: FAIL + + [classList.replace(null, "b") with attribute value "a null" (foo node)] + expected: FAIL + + [classList.replace("a", null) with attribute value "a b" (foo node)] + expected: FAIL + + [classList.replace(undefined, "b") with attribute value "a undefined" (foo node)] + expected: FAIL + + [classList.replace("a", undefined) with attribute value "a b" (foo node)] + expected: FAIL + diff --git a/tests/wpt/metadata/encoding/idlharness.html.ini b/tests/wpt/metadata/encoding/idlharness.html.ini index ed1d61cc78d..b2e98887ef9 100644 --- a/tests/wpt/metadata/encoding/idlharness.html.ini +++ b/tests/wpt/metadata/encoding/idlharness.html.ini @@ -11,3 +11,6 @@ [TextDecoder interface: new TextDecoder() must inherit property "ignoreBOM" with the proper type] expected: FAIL + [idlharness test: Encoding Living Standard API] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/api/request/request-disturbed.html.ini b/tests/wpt/metadata/fetch/api/request/request-disturbed.html.ini index 446edf226de..15cf180a2a8 100644 --- a/tests/wpt/metadata/fetch/api/request/request-disturbed.html.ini +++ b/tests/wpt/metadata/fetch/api/request/request-disturbed.html.ini @@ -21,3 +21,6 @@ [Input request used for creating new request became disturbed even if body is not used] expected: FAIL + [Check creating a new request with a new body from a disturbed request] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/api/response/response-consume.html.ini b/tests/wpt/metadata/fetch/api/response/response-consume.html.ini index 259a0f14757..de25ae08c7a 100644 --- a/tests/wpt/metadata/fetch/api/response/response-consume.html.ini +++ b/tests/wpt/metadata/fetch/api/response/response-consume.html.ini @@ -84,3 +84,6 @@ [Consume response's body: from multipart form data blob to formData] expected: FAIL + [Consume response's body: from URLSearchParams to blob] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/api/response/response-error-from-stream.html.ini b/tests/wpt/metadata/fetch/api/response/response-error-from-stream.html.ini new file mode 100644 index 00000000000..55576d655d7 --- /dev/null +++ b/tests/wpt/metadata/fetch/api/response/response-error-from-stream.html.ini @@ -0,0 +1,8 @@ +[response-error-from-stream.html] + expected: ERROR + [ReadableStreamDefaultReader Promise receives ReadableStream start() Error] + expected: FAIL + + [ReadableStreamDefaultReader Promise receives ReadableStream pull() Error] + expected: FAIL + diff --git a/tests/wpt/metadata/gamepad/__dir__.ini b/tests/wpt/metadata/gamepad/__dir__.ini new file mode 100644 index 00000000000..8d7c3380c26 --- /dev/null +++ b/tests/wpt/metadata/gamepad/__dir__.ini @@ -0,0 +1 @@ +prefs: ["dom.gamepad.enabled:true"] diff --git a/tests/wpt/metadata/gamepad/idlharness.html.ini b/tests/wpt/metadata/gamepad/idlharness.html.ini new file mode 100644 index 00000000000..6211f10656e --- /dev/null +++ b/tests/wpt/metadata/gamepad/idlharness.html.ini @@ -0,0 +1,4 @@ +[idlharness.html] + [Gamepad IDL tests] + expected: FAIL + diff --git a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js.ini b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js.ini new file mode 100644 index 00000000000..11486f7a9ab --- /dev/null +++ b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js.ini @@ -0,0 +1,4 @@ +[transfer-errors.window.html] + [Untitled] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html.ini new file mode 100644 index 00000000000..f263d01b825 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html.ini @@ -0,0 +1,5 @@ +[iframe_sandbox_block_modals-2.html] + expected: TIMEOUT + [Frames without `allow-modals` should not be able to open modal dialogs] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html.ini new file mode 100644 index 00000000000..770c94d1294 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html.ini @@ -0,0 +1,5 @@ +[iframe_sandbox_block_modals-3.html] + expected: TIMEOUT + [Frames without `allow-modals` should not be able to open modal dialogs] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html.ini new file mode 100644 index 00000000000..9be138b347f --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html.ini @@ -0,0 +1,5 @@ +[iframe_sandbox_block_modals-4.html] + expected: TIMEOUT + [Frames without `allow-modals` should not be able to open modal dialogs] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/submit-file.sub.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/submit-file.sub.html.ini new file mode 100644 index 00000000000..a2d487c0e97 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/submit-file.sub.html.ini @@ -0,0 +1,4 @@ +[submit-file.sub.html] + [Posting a File] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html.ini b/tests/wpt/metadata/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html.ini index 160398681b4..0d9db9d707d 100644 --- a/tests/wpt/metadata/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html.ini +++ b/tests/wpt/metadata/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html.ini @@ -1,10 +1,5 @@ [wbr-element.html] type: reftest - reftype: != - refurl: /html/semantics/text-level-semantics/the-wbr-element/wbr-element-notref.html - -[wbr-element.html] - type: reftest reftype: == refurl: /html/semantics/text-level-semantics/the-wbr-element/wbr-element-ref.html expected: FAIL diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync index bac04108893..bad63745dda 100644 --- a/tests/wpt/metadata/mozilla-sync +++ b/tests/wpt/metadata/mozilla-sync @@ -1,2 +1,2 @@ -local: c88dc51d03a81e9e405688ccd2baae75d61ffffd -upstream: 9ca21c6c87ccec0ff7fdb0fc896d6e9918f3e331 +local: 84ce43284cd074fec9fafc7dd23bb3d2a1013d43 +upstream: ef805cb3832c2deaf1ab8fc4f3353b65671e6f32 diff --git a/tests/wpt/metadata/websockets/Create-on-worker-shutdown.html.ini b/tests/wpt/metadata/websockets/Create-on-worker-shutdown.html.ini new file mode 100644 index 00000000000..64c1b5de121 --- /dev/null +++ b/tests/wpt/metadata/websockets/Create-on-worker-shutdown.html.ini @@ -0,0 +1,5 @@ +[Create-on-worker-shutdown.html] + expected: TIMEOUT + [WebSocket created after a worker self.close()] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webvr/__dir__.ini b/tests/wpt/metadata/webvr/__dir__.ini new file mode 100644 index 00000000000..d202f6efd61 --- /dev/null +++ b/tests/wpt/metadata/webvr/__dir__.ini @@ -0,0 +1 @@ +prefs: ["dom.gamepad.enabled:true", "dom.webvr.enabled:true"] diff --git a/tests/wpt/metadata/webvr/idlharness.https.html.ini b/tests/wpt/metadata/webvr/idlharness.https.html.ini new file mode 100644 index 00000000000..9a5d4e35979 --- /dev/null +++ b/tests/wpt/metadata/webvr/idlharness.https.html.ini @@ -0,0 +1,16 @@ +[idlharness.https.html] + [Navigator interface: operation getVRDisplays()] + expected: FAIL + + [Navigator interface: attribute activeVRDisplays] + expected: FAIL + + [Navigator interface: attribute vrEnabled] + expected: FAIL + + [VRDisplay interface: operation requestPresent([object Object\])] + expected: FAIL + + [VRDisplay interface: operation exitPresent()] + expected: FAIL + diff --git a/tests/wpt/metadata/webvr/webvr-disabled-by-feature-policy.https.sub.html.ini b/tests/wpt/metadata/webvr/webvr-disabled-by-feature-policy.https.sub.html.ini new file mode 100644 index 00000000000..a55dd4fa48d --- /dev/null +++ b/tests/wpt/metadata/webvr/webvr-disabled-by-feature-policy.https.sub.html.ini @@ -0,0 +1,11 @@ +[webvr-disabled-by-feature-policy.https.sub.html] + expected: TIMEOUT + [Feature-Policy header vr "none" disallows the top-level document.] + expected: FAIL + + [Feature-Policy header vr "none" disallows same-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header vr "none" disallows cross-origin iframes.] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini new file mode 100644 index 00000000000..f62af3274ab --- /dev/null +++ b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini @@ -0,0 +1,7 @@ +[webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html] + [Feature-Policy allow="vr" attribute allows same-origin relocation] + expected: FAIL + + [Feature-Policy allow="vr" attribute disallows cross-origin relocation] + expected: FAIL + diff --git a/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html.ini b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html.ini new file mode 100644 index 00000000000..eefc44081c1 --- /dev/null +++ b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy-attribute.https.sub.html.ini @@ -0,0 +1,7 @@ +[webvr-enabled-by-feature-policy-attribute.https.sub.html] + [Feature-Policy allow="vr" attribute allows same-origin iframe] + expected: FAIL + + [Feature-Policy allow="vr" attribute allows cross-origin iframe] + expected: FAIL + diff --git a/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy.https.sub.html.ini b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy.https.sub.html.ini new file mode 100644 index 00000000000..8a363f316bd --- /dev/null +++ b/tests/wpt/metadata/webvr/webvr-enabled-by-feature-policy.https.sub.html.ini @@ -0,0 +1,8 @@ +[webvr-enabled-by-feature-policy.https.sub.html] + expected: TIMEOUT + [Feature-Policy header vr * allows same-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header vr * allows cross-origin iframes.] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.ini b/tests/wpt/metadata/webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.ini new file mode 100644 index 00000000000..bb968ef6d8d --- /dev/null +++ b/tests/wpt/metadata/webvr/webvr-enabled-on-self-origin-by-feature-policy.https.sub.html.ini @@ -0,0 +1,8 @@ +[webvr-enabled-on-self-origin-by-feature-policy.https.sub.html] + expected: TIMEOUT + [Feature-Policy header vr "self" allows same-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header vr "self" disallows cross-origin iframes.] + expected: TIMEOUT + diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index c8778734319..c0d45b5f2f7 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -31972,6 +31972,12 @@ {} ] ], + "mozilla/codegen_unions.html": [ + [ + "/_mozilla/mozilla/codegen_unions.html", + {} + ] + ], "mozilla/collections.html": [ [ "/_mozilla/mozilla/collections.html", @@ -64751,6 +64757,10 @@ "5183977a0d29ba4d74d049c9391090e3c27264a8", "testharness" ], + "mozilla/codegen_unions.html": [ + "7f772fffb75acc92f9c949a482d387b3ed18d0ed", + "testharness" + ], "mozilla/collections.html": [ "d0bebe808ebb45b6c853f4b88e1a6ebbf9b91345", "testharness" diff --git a/tests/wpt/mozilla/meta/css/border_radius_elliptical_a.html.ini b/tests/wpt/mozilla/meta/css/border_radius_elliptical_a.html.ini index 030543a5009..ba813a41144 100644 --- a/tests/wpt/mozilla/meta/css/border_radius_elliptical_a.html.ini +++ b/tests/wpt/mozilla/meta/css/border_radius_elliptical_a.html.ini @@ -1,3 +1,2 @@ [border_radius_elliptical_a.html] - bug: https://github.com/servo/servo/issues/19271 expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/iframe/hide_after_load.html.ini b/tests/wpt/mozilla/meta/css/iframe/hide_after_load.html.ini new file mode 100644 index 00000000000..65c78fd3a4a --- /dev/null +++ b/tests/wpt/mozilla/meta/css/iframe/hide_after_load.html.ini @@ -0,0 +1,2 @@ +[hide_after_load.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-text/line-break/line-break-normal-025.xht.ini b/tests/wpt/mozilla/meta/css/text_shadow_blur_a.html.ini index 156e95be920..3ad8a9c02b5 100644 --- a/tests/wpt/metadata/css/css-text/line-break/line-break-normal-025.xht.ini +++ b/tests/wpt/mozilla/meta/css/text_shadow_blur_a.html.ini @@ -1,3 +1,3 @@ -[line-break-normal-025.xht] +[text_shadow_blur_a.html] type: reftest expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini b/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini new file mode 100644 index 00000000000..6a8744c375d --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini @@ -0,0 +1,3 @@ +[codegen_unions.html] + type: testharness + prefs: [dom.testbinding.enabled:true] diff --git a/tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini b/tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini index 43043a1b6c3..c000a50cb3b 100644 --- a/tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini +++ b/tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini @@ -1 +1 @@ -prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true] +prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true,dom.worklet.timeout_ms:5000] diff --git a/tests/wpt/mozilla/meta/mozilla/worklets/test_paint_worklet_timeout.html.ini b/tests/wpt/mozilla/meta/mozilla/worklets/test_paint_worklet_timeout.html.ini new file mode 100644 index 00000000000..b99ea5a3ee9 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/worklets/test_paint_worklet_timeout.html.ini @@ -0,0 +1,3 @@ +[test_paint_worklet_timeout.html] + type: testharness + prefs: [dom.worklet.timeout_ms:10] diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html.ini deleted file mode 100644 index 611bba421bc..00000000000 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html.ini +++ /dev/null @@ -1,8 +0,0 @@ -[element-array-buffer-delete-recreate.html] - type: testharness - [WebGL test #0: getError expected: NO_ERROR. Was INVALID_ENUM : no errors from draw] - expected: FAIL - - [WebGL test #1: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html.ini index d9821f05886..d1a71e871ac 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html.ini @@ -1,47 +1,11 @@ [drawingbuffer-hd-dpi-test.html] type: testharness - [WebGL test #5: at (28, 12) expected: 0,255,0,255 was 0,0,0,0] + [WebGL test #12: at 0, 0 expected 0,0,0,255(black) was 0,255,0,255] expected: FAIL - [WebGL test #8: gl.getError() should be 0. Was 1280.] + [WebGL test #29: at 0, 0 expected 0,0,0,255(black) was 0,255,0,255] expected: FAIL - [WebGL test #12: at 0, 0 expected 0,0,0,255(black) was 0,0,0,0] - expected: FAIL - - [WebGL test #13: at (12, 28) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - - [WebGL test #16: gl.getError() should be 0. Was 1280.] - expected: FAIL - - [WebGL test #22: at (124, 60) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - - [WebGL test #25: gl.getError() should be 0. Was 1280.] - expected: FAIL - - [WebGL test #29: at 0, 0 expected 0,0,0,255(black) was 0,0,0,0] - expected: FAIL - - [WebGL test #30: at (60, 124) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - - [WebGL test #33: gl.getError() should be 0. Was 1280.] - expected: FAIL - - [WebGL test #39: at (252, 508) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - - [WebGL test #42: gl.getError() should be 0. Was 1280.] - expected: FAIL - - [WebGL test #46: at 0, 0 expected 0,0,0,255(black) was 0,0,0,0] - expected: FAIL - - [WebGL test #47: at (508, 252) expected: 0,255,0,255 was 0,0,0,0] - expected: FAIL - - [WebGL test #50: gl.getError() should be 0. Was 1280.] + [WebGL test #46: at 0, 0 expected 0,0,0,255(black) was 0,255,0,255] expected: FAIL diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini index 17dcfea137f..1e2567027d8 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini @@ -1,4 +1,4 @@ -[long-expressions-should-not-crash.html] +[rapid-resizing.html] expected: TIMEOUT [Overall test] expected: NOTRUN diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/methods.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/methods.html.ini index e161e1d0cf8..0f3f17e39b3 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/methods.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/methods.html.ini @@ -3,15 +3,12 @@ [WebGL test #0: Property either does not exist or is not a function: getAttachedShaders] expected: FAIL - [WebGL test #1: Property either does not exist or is not a function: getFramebufferAttachmentParameter] + [WebGL test #1: Property either does not exist or is not a function: getRenderbufferParameter] expected: FAIL - [WebGL test #2: Property either does not exist or is not a function: getRenderbufferParameter] + [WebGL test #2: Property either does not exist or is not a function: getUniform] expected: FAIL - [WebGL test #3: Property either does not exist or is not a function: getUniform] - expected: FAIL - - [WebGL test #4: Property either does not exist or is not a function: isContextLost] + [WebGL test #3: Property either does not exist or is not a function: isContextLost] expected: FAIL diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini deleted file mode 100644 index 7eaba400214..00000000000 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[drawArraysOutOfBounds.html] - type: testharness - [WebGL test #0: testDrawArraysEmpty] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html.ini deleted file mode 100644 index 6172d868b20..00000000000 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[framebuffer-test.html] - type: testharness - expected: ERROR - [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini index 64503c921e5..18a9a05ee2b 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini @@ -1,3 +1,5 @@ [draw-arrays-out-of-bounds.html] type: testharness - expected: TIMEOUT + [WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawArrays(gl.TRIANGLES, 3, 2)] + expected: FAIL + diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini index aa36f7ebddf..5fb34fccbb5 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini @@ -1,6 +1,5 @@ [gl-get-calls.html] type: testharness - expected: ERROR [WebGL test #3: (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0\] <= 1) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0\] > 0) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[1\] >= 1) should be true. Threw exception TypeError: context.getParameter(...) is null] expected: FAIL @@ -46,12 +45,93 @@ [WebGL test #43: context.getParameter(context.SCISSOR_BOX)[1\] should be 0. Threw exception TypeError: context.getParameter(...) is null] expected: FAIL - [WebGL test #44: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #44: context.getParameter(context.SCISSOR_BOX)[2\] should be 2. Threw exception TypeError: context.getParameter(...) is null] expected: FAIL - [WebGL test #0: Unable to fetch WebGL rendering context for Canvas] + [WebGL test #45: context.getParameter(context.SCISSOR_BOX)[3\] should be 2. Threw exception TypeError: context.getParameter(...) is null] expected: FAIL - [WebGL test #1: context does not exist] + [WebGL test #46: context.getParameter(context.SCISSOR_BOX) is not an instance of function Int32Array() {\n [native code\]\n}] + expected: FAIL + + [WebGL test #47: context.getParameter(context.SCISSOR_TEST) should be false (of type boolean). Was null (of type object).] + expected: FAIL + + [WebGL test #85: context.getParameter(context.UNPACK_FLIP_Y_WEBGL) should be false (of type boolean). Was null (of type object).] + expected: FAIL + + [WebGL test #86: context.getParameter(context.UNPACK_PREMULTIPLY_ALPHA_WEBGL) should be false (of type boolean). Was null (of type object).] + expected: FAIL + + [WebGL test #88: context.getParameter(context.VIEWPORT) is not an instance of Int32Array] + expected: FAIL + + [WebGL test #91: context.getParameter(context.MAX_FRAGMENT_UNIFORM_VECTORS) should be >= 16. Was null (of type object).] + expected: FAIL + + [WebGL test #95: context.getParameter(context.MAX_VARYING_VECTORS) should be >= 8. Was null (of type object).] + expected: FAIL + + [WebGL test #98: context.getParameter(context.MAX_VERTEX_UNIFORM_VECTORS) should be >= 128. Was null (of type object).] + expected: FAIL + + [WebGL test #99: context.getParameter(context.MAX_VIEWPORT_DIMS)[0\] >= window.screen.width should be true. Threw exception TypeError: context.getParameter(...) is null] + expected: FAIL + + [WebGL test #100: context.getParameter(context.MAX_VIEWPORT_DIMS)[1\] >= window.screen.height should be true. Threw exception TypeError: context.getParameter(...) is null] + expected: FAIL + + [WebGL test #101: context.getParameter(context.MAX_VIEWPORT_DIMS) is not an instance of Int32Array] + expected: FAIL + + [WebGL test #173: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #182: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #191: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #200: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #209: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #218: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #227: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #236: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #245: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #254: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #263: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #272: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #281: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #290: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #299: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #308: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array] + expected: FAIL + + [WebGL test #310: context.getError() should be 0. Was 1280.] expected: FAIL diff --git a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/context/methods-2.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/context/methods-2.html.ini index 05ed89bcd6e..fa30add16ed 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/context/methods-2.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/context/methods-2.html.ini @@ -2,279 +2,276 @@ [WebGL test #0: Property either does not exist or is not a function: getAttachedShaders] expected: FAIL - [WebGL test #1: Property either does not exist or is not a function: getFramebufferAttachmentParameter] + [WebGL test #1: Property either does not exist or is not a function: getRenderbufferParameter] expected: FAIL - [WebGL test #2: Property either does not exist or is not a function: getRenderbufferParameter] + [WebGL test #2: Property either does not exist or is not a function: getUniform] expected: FAIL - [WebGL test #3: Property either does not exist or is not a function: getUniform] + [WebGL test #3: Property either does not exist or is not a function: isContextLost] expected: FAIL - [WebGL test #4: Property either does not exist or is not a function: isContextLost] + [WebGL test #4: Property either does not exist or is not a function: getBufferSubData] expected: FAIL - [WebGL test #5: Property either does not exist or is not a function: getBufferSubData] + [WebGL test #5: Property either does not exist or is not a function: copyBufferSubData] expected: FAIL - [WebGL test #6: Property either does not exist or is not a function: copyBufferSubData] + [WebGL test #6: Property either does not exist or is not a function: blitFramebuffer] expected: FAIL - [WebGL test #7: Property either does not exist or is not a function: blitFramebuffer] + [WebGL test #7: Property either does not exist or is not a function: framebufferTextureLayer] expected: FAIL - [WebGL test #8: Property either does not exist or is not a function: framebufferTextureLayer] + [WebGL test #8: Property either does not exist or is not a function: getInternalformatParameter] expected: FAIL - [WebGL test #9: Property either does not exist or is not a function: getInternalformatParameter] + [WebGL test #9: Property either does not exist or is not a function: invalidateFramebuffer] expected: FAIL - [WebGL test #10: Property either does not exist or is not a function: invalidateFramebuffer] + [WebGL test #10: Property either does not exist or is not a function: invalidateSubFramebuffer] expected: FAIL - [WebGL test #11: Property either does not exist or is not a function: invalidateSubFramebuffer] + [WebGL test #11: Property either does not exist or is not a function: readBuffer] expected: FAIL - [WebGL test #12: Property either does not exist or is not a function: readBuffer] + [WebGL test #12: Property either does not exist or is not a function: renderbufferStorageMultisample] expected: FAIL - [WebGL test #13: Property either does not exist or is not a function: renderbufferStorageMultisample] + [WebGL test #13: Property either does not exist or is not a function: texImage3D] expected: FAIL - [WebGL test #14: Property either does not exist or is not a function: texImage3D] + [WebGL test #14: Property either does not exist or is not a function: texStorage2D] expected: FAIL - [WebGL test #15: Property either does not exist or is not a function: texStorage2D] + [WebGL test #15: Property either does not exist or is not a function: texStorage3D] expected: FAIL - [WebGL test #16: Property either does not exist or is not a function: texStorage3D] + [WebGL test #16: Property either does not exist or is not a function: texSubImage3D] expected: FAIL - [WebGL test #17: Property either does not exist or is not a function: texSubImage3D] + [WebGL test #17: Property either does not exist or is not a function: copyTexSubImage3D] expected: FAIL - [WebGL test #18: Property either does not exist or is not a function: copyTexSubImage3D] + [WebGL test #18: Property either does not exist or is not a function: compressedTexImage3D] expected: FAIL - [WebGL test #19: Property either does not exist or is not a function: compressedTexImage3D] + [WebGL test #19: Property either does not exist or is not a function: compressedTexSubImage3D] expected: FAIL - [WebGL test #20: Property either does not exist or is not a function: compressedTexSubImage3D] + [WebGL test #20: Property either does not exist or is not a function: getFragDataLocation] expected: FAIL - [WebGL test #21: Property either does not exist or is not a function: getFragDataLocation] + [WebGL test #21: Property either does not exist or is not a function: uniform1ui] expected: FAIL - [WebGL test #22: Property either does not exist or is not a function: uniform1ui] + [WebGL test #22: Property either does not exist or is not a function: uniform2ui] expected: FAIL - [WebGL test #23: Property either does not exist or is not a function: uniform2ui] + [WebGL test #23: Property either does not exist or is not a function: uniform3ui] expected: FAIL - [WebGL test #24: Property either does not exist or is not a function: uniform3ui] + [WebGL test #24: Property either does not exist or is not a function: uniform4ui] expected: FAIL - [WebGL test #25: Property either does not exist or is not a function: uniform4ui] + [WebGL test #25: Property either does not exist or is not a function: uniform1uiv] expected: FAIL - [WebGL test #26: Property either does not exist or is not a function: uniform1uiv] + [WebGL test #26: Property either does not exist or is not a function: uniform2uiv] expected: FAIL - [WebGL test #27: Property either does not exist or is not a function: uniform2uiv] + [WebGL test #27: Property either does not exist or is not a function: uniform3uiv] expected: FAIL - [WebGL test #28: Property either does not exist or is not a function: uniform3uiv] + [WebGL test #28: Property either does not exist or is not a function: uniform4uiv] expected: FAIL - [WebGL test #29: Property either does not exist or is not a function: uniform4uiv] + [WebGL test #29: Property either does not exist or is not a function: uniformMatrix2x3fv] expected: FAIL - [WebGL test #30: Property either does not exist or is not a function: uniformMatrix2x3fv] + [WebGL test #30: Property either does not exist or is not a function: uniformMatrix3x2fv] expected: FAIL - [WebGL test #31: Property either does not exist or is not a function: uniformMatrix3x2fv] + [WebGL test #31: Property either does not exist or is not a function: uniformMatrix2x4fv] expected: FAIL - [WebGL test #32: Property either does not exist or is not a function: uniformMatrix2x4fv] + [WebGL test #32: Property either does not exist or is not a function: uniformMatrix4x2fv] expected: FAIL - [WebGL test #33: Property either does not exist or is not a function: uniformMatrix4x2fv] + [WebGL test #33: Property either does not exist or is not a function: uniformMatrix3x4fv] expected: FAIL - [WebGL test #34: Property either does not exist or is not a function: uniformMatrix3x4fv] + [WebGL test #34: Property either does not exist or is not a function: uniformMatrix4x3fv] expected: FAIL - [WebGL test #35: Property either does not exist or is not a function: uniformMatrix4x3fv] + [WebGL test #35: Property either does not exist or is not a function: vertexAttribI4i] expected: FAIL - [WebGL test #36: Property either does not exist or is not a function: vertexAttribI4i] + [WebGL test #36: Property either does not exist or is not a function: vertexAttribI4iv] expected: FAIL - [WebGL test #37: Property either does not exist or is not a function: vertexAttribI4iv] + [WebGL test #37: Property either does not exist or is not a function: vertexAttribI4ui] expected: FAIL - [WebGL test #38: Property either does not exist or is not a function: vertexAttribI4ui] + [WebGL test #38: Property either does not exist or is not a function: vertexAttribI4uiv] expected: FAIL - [WebGL test #39: Property either does not exist or is not a function: vertexAttribI4uiv] + [WebGL test #39: Property either does not exist or is not a function: vertexAttribIPointer] expected: FAIL - [WebGL test #40: Property either does not exist or is not a function: vertexAttribIPointer] + [WebGL test #40: Property either does not exist or is not a function: vertexAttribDivisor] expected: FAIL - [WebGL test #41: Property either does not exist or is not a function: vertexAttribDivisor] + [WebGL test #41: Property either does not exist or is not a function: drawArraysInstanced] expected: FAIL - [WebGL test #42: Property either does not exist or is not a function: drawArraysInstanced] + [WebGL test #42: Property either does not exist or is not a function: drawElementsInstanced] expected: FAIL - [WebGL test #43: Property either does not exist or is not a function: drawElementsInstanced] + [WebGL test #43: Property either does not exist or is not a function: drawRangeElements] expected: FAIL - [WebGL test #44: Property either does not exist or is not a function: drawRangeElements] + [WebGL test #44: Property either does not exist or is not a function: drawBuffers] expected: FAIL - [WebGL test #45: Property either does not exist or is not a function: drawBuffers] + [WebGL test #45: Property either does not exist or is not a function: clearBufferiv] expected: FAIL - [WebGL test #46: Property either does not exist or is not a function: clearBufferiv] + [WebGL test #46: Property either does not exist or is not a function: clearBufferuiv] expected: FAIL - [WebGL test #47: Property either does not exist or is not a function: clearBufferuiv] + [WebGL test #47: Property either does not exist or is not a function: clearBufferfv] expected: FAIL - [WebGL test #48: Property either does not exist or is not a function: clearBufferfv] + [WebGL test #48: Property either does not exist or is not a function: clearBufferfi] expected: FAIL - [WebGL test #49: Property either does not exist or is not a function: clearBufferfi] + [WebGL test #49: Property either does not exist or is not a function: createQuery] expected: FAIL - [WebGL test #50: Property either does not exist or is not a function: createQuery] + [WebGL test #50: Property either does not exist or is not a function: deleteQuery] expected: FAIL - [WebGL test #51: Property either does not exist or is not a function: deleteQuery] + [WebGL test #51: Property either does not exist or is not a function: isQuery] expected: FAIL - [WebGL test #52: Property either does not exist or is not a function: isQuery] + [WebGL test #52: Property either does not exist or is not a function: beginQuery] expected: FAIL - [WebGL test #53: Property either does not exist or is not a function: beginQuery] + [WebGL test #53: Property either does not exist or is not a function: endQuery] expected: FAIL - [WebGL test #54: Property either does not exist or is not a function: endQuery] + [WebGL test #54: Property either does not exist or is not a function: getQuery] expected: FAIL - [WebGL test #55: Property either does not exist or is not a function: getQuery] + [WebGL test #55: Property either does not exist or is not a function: getQueryParameter] expected: FAIL - [WebGL test #56: Property either does not exist or is not a function: getQueryParameter] + [WebGL test #56: Property either does not exist or is not a function: createSampler] expected: FAIL - [WebGL test #57: Property either does not exist or is not a function: createSampler] + [WebGL test #57: Property either does not exist or is not a function: deleteSampler] expected: FAIL - [WebGL test #58: Property either does not exist or is not a function: deleteSampler] + [WebGL test #58: Property either does not exist or is not a function: isSampler] expected: FAIL - [WebGL test #59: Property either does not exist or is not a function: isSampler] + [WebGL test #59: Property either does not exist or is not a function: bindSampler] expected: FAIL - [WebGL test #60: Property either does not exist or is not a function: bindSampler] + [WebGL test #60: Property either does not exist or is not a function: samplerParameteri] expected: FAIL - [WebGL test #61: Property either does not exist or is not a function: samplerParameteri] + [WebGL test #61: Property either does not exist or is not a function: samplerParameterf] expected: FAIL - [WebGL test #62: Property either does not exist or is not a function: samplerParameterf] + [WebGL test #62: Property either does not exist or is not a function: getSamplerParameter] expected: FAIL - [WebGL test #63: Property either does not exist or is not a function: getSamplerParameter] + [WebGL test #63: Property either does not exist or is not a function: fenceSync] expected: FAIL - [WebGL test #64: Property either does not exist or is not a function: fenceSync] + [WebGL test #64: Property either does not exist or is not a function: isSync] expected: FAIL - [WebGL test #65: Property either does not exist or is not a function: isSync] + [WebGL test #65: Property either does not exist or is not a function: deleteSync] expected: FAIL - [WebGL test #66: Property either does not exist or is not a function: deleteSync] + [WebGL test #66: Property either does not exist or is not a function: clientWaitSync] expected: FAIL - [WebGL test #67: Property either does not exist or is not a function: clientWaitSync] + [WebGL test #67: Property either does not exist or is not a function: waitSync] expected: FAIL - [WebGL test #68: Property either does not exist or is not a function: waitSync] + [WebGL test #68: Property either does not exist or is not a function: getSyncParameter] expected: FAIL - [WebGL test #69: Property either does not exist or is not a function: getSyncParameter] + [WebGL test #69: Property either does not exist or is not a function: createTransformFeedback] expected: FAIL - [WebGL test #70: Property either does not exist or is not a function: createTransformFeedback] + [WebGL test #70: Property either does not exist or is not a function: deleteTransformFeedback] expected: FAIL - [WebGL test #71: Property either does not exist or is not a function: deleteTransformFeedback] + [WebGL test #71: Property either does not exist or is not a function: isTransformFeedback] expected: FAIL - [WebGL test #72: Property either does not exist or is not a function: isTransformFeedback] + [WebGL test #72: Property either does not exist or is not a function: bindTransformFeedback] expected: FAIL - [WebGL test #73: Property either does not exist or is not a function: bindTransformFeedback] + [WebGL test #73: Property either does not exist or is not a function: beginTransformFeedback] expected: FAIL - [WebGL test #74: Property either does not exist or is not a function: beginTransformFeedback] + [WebGL test #74: Property either does not exist or is not a function: endTransformFeedback] expected: FAIL - [WebGL test #75: Property either does not exist or is not a function: endTransformFeedback] + [WebGL test #75: Property either does not exist or is not a function: transformFeedbackVaryings] expected: FAIL - [WebGL test #76: Property either does not exist or is not a function: transformFeedbackVaryings] + [WebGL test #76: Property either does not exist or is not a function: getTransformFeedbackVarying] expected: FAIL - [WebGL test #77: Property either does not exist or is not a function: getTransformFeedbackVarying] + [WebGL test #77: Property either does not exist or is not a function: pauseTransformFeedback] expected: FAIL - [WebGL test #78: Property either does not exist or is not a function: pauseTransformFeedback] + [WebGL test #78: Property either does not exist or is not a function: resumeTransformFeedback] expected: FAIL - [WebGL test #79: Property either does not exist or is not a function: resumeTransformFeedback] + [WebGL test #79: Property either does not exist or is not a function: bindBufferBase] expected: FAIL - [WebGL test #80: Property either does not exist or is not a function: bindBufferBase] + [WebGL test #80: Property either does not exist or is not a function: bindBufferRange] expected: FAIL - [WebGL test #81: Property either does not exist or is not a function: bindBufferRange] + [WebGL test #81: Property either does not exist or is not a function: getIndexedParameter] expected: FAIL - [WebGL test #82: Property either does not exist or is not a function: getIndexedParameter] + [WebGL test #82: Property either does not exist or is not a function: getUniformIndices] expected: FAIL - [WebGL test #83: Property either does not exist or is not a function: getUniformIndices] + [WebGL test #83: Property either does not exist or is not a function: getActiveUniforms] expected: FAIL - [WebGL test #84: Property either does not exist or is not a function: getActiveUniforms] + [WebGL test #84: Property either does not exist or is not a function: getUniformBlockIndex] expected: FAIL - [WebGL test #85: Property either does not exist or is not a function: getUniformBlockIndex] + [WebGL test #85: Property either does not exist or is not a function: getActiveUniformBlockParameter] expected: FAIL - [WebGL test #86: Property either does not exist or is not a function: getActiveUniformBlockParameter] + [WebGL test #86: Property either does not exist or is not a function: getActiveUniformBlockName] expected: FAIL - [WebGL test #87: Property either does not exist or is not a function: getActiveUniformBlockName] + [WebGL test #87: Property either does not exist or is not a function: uniformBlockBinding] expected: FAIL - [WebGL test #88: Property either does not exist or is not a function: uniformBlockBinding] + [WebGL test #88: Property either does not exist or is not a function: createVertexArray] expected: FAIL - [WebGL test #89: Property either does not exist or is not a function: createVertexArray] + [WebGL test #89: Property either does not exist or is not a function: deleteVertexArray] expected: FAIL - [WebGL test #90: Property either does not exist or is not a function: deleteVertexArray] + [WebGL test #90: Property either does not exist or is not a function: isVertexArray] expected: FAIL - [WebGL test #91: Property either does not exist or is not a function: isVertexArray] - expected: FAIL - - [WebGL test #92: Property either does not exist or is not a function: bindVertexArray] + [WebGL test #91: Property either does not exist or is not a function: bindVertexArray] expected: FAIL diff --git a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/renderbuffers/framebuffer-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/renderbuffers/framebuffer-test.html.ini index 324840c2eb5..3f29b3b4a77 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/renderbuffers/framebuffer-test.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/renderbuffers/framebuffer-test.html.ini @@ -1,5 +1,100 @@ [framebuffer-test.html] - expected: ERROR [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL + [WebGL test #1: getError expected: INVALID_ENUM. Was INVALID_OPERATION : getFramebufferAttachmentParameter(COLOR_ATTACHMENT0) on the default framebuffer.] + expected: FAIL + + [WebGL test #2: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(BACK) on the default framebuffer.] + expected: FAIL + + [WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(READ_FRAMEBUFFER).] + expected: FAIL + + [WebGL test #10: checkFramebufferStatus(READ_FRAMEBUFFER) should succeed.] + expected: FAIL + + [WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : checkFramebufferStatus(READ_FRAMEBUFFER).] + expected: FAIL + + [WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : bindFramebuffer(READ_FRAMEBUFFER).] + expected: FAIL + + [WebGL test #13: bindFramebuffer(READ_FRAMEBUFFER) should change READ_FRAMEBUFFER_BINDING.] + expected: FAIL + + [WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) with no attachment.] + expected: FAIL + + [WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferTexImage2D(READ_FRAMEBUFFER).] + expected: FAIL + + [WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferRenderbuffer(READ_FRAMEBUFFER).] + expected: FAIL + + [WebGL test #18: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) with no attachment.] + expected: FAIL + + [WebGL test #21: getError expected: NO_ERROR. Was INVALID_VALUE : framebufferTexture2D with an appropriate mipmap level.] + expected: FAIL + + [WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.] + expected: FAIL + + [WebGL test #27: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.] + expected: FAIL + + [WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.] + expected: FAIL + + [WebGL test #30: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.] + expected: FAIL + + [WebGL test #31: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.] + expected: FAIL + + [WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.] + expected: FAIL + + [WebGL test #35: gl.getFramebufferAttachmentParameter(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) should be 0 (of type number). Was null (of type object).] + expected: FAIL + + [WebGL test #36: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read framebuffer with no attachment.] + expected: FAIL + + [WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer.] + expected: FAIL + + [WebGL test #38: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer with no attachment.] + expected: FAIL + + [WebGL test #39: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.] + expected: FAIL + + [WebGL test #40: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.] + expected: FAIL + + [WebGL test #42: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.] + expected: FAIL + + [WebGL test #43: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.] + expected: FAIL + + [WebGL test #44: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.] + expected: FAIL + + [WebGL test #46: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.] + expected: FAIL + + [WebGL test #49: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on read framebuffer without depth attachment.] + expected: FAIL + + [WebGL test #52: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_RED_SIZE) on read framebuffer with no attachment.] + expected: FAIL + + [WebGL test #55: getError expected: NO_ERROR. Was INVALID_ENUM : bind read framebuffer to default (null) framebuffer.] + expected: FAIL + + [WebGL test #56: getError expected: NO_ERROR. Was INVALID_OPERATION : bind draw framebuffer to default (null) framebuffer.] + expected: FAIL + diff --git a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero.html.ini index ae5d3c11e08..8b0e61b2cd4 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero.html.ini @@ -1,7 +1,11 @@ [unwritten-output-defaults-to-zero.html] + expected: ERROR [WebGL test #1: Fail to set up the program] expected: FAIL [WebGL test #2: Fail to set up the program] expected: FAIL + [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + expected: FAIL + diff --git a/tests/wpt/mozilla/tests/mozilla/codegen_unions.html b/tests/wpt/mozilla/tests/mozilla/codegen_unions.html new file mode 100644 index 00000000000..1fff0e01c89 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/codegen_unions.html @@ -0,0 +1,21 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>WebIDL conversions are performed correctly and don't lose values</title> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<script> +test(function() { + var t = new TestBinding; + + // (DOMString or object) receiveUnionIdentity((DOMString or object) arg) + var obj = { 'some': 'key', 'num': 42 }; + assert_equals(t.receiveUnionIdentity(obj), obj); + + var str = "myString"; + assert_equals(t.receiveUnionIdentity(str), str); +}, "(DOMString or object) conversion is performed correctly"); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/.gitignore b/tests/wpt/web-platform-tests/.gitignore index 409cd2c1009..358ea4b3ff4 100644 --- a/tests/wpt/web-platform-tests/.gitignore +++ b/tests/wpt/web-platform-tests/.gitignore @@ -1,20 +1,30 @@ -*# +# Python *.py[co] +.virtualenv/ +_venv/ +.cache/ +.pytest_cache/ + +# Node +node_modules/ + +# WPT repo stuff +/MANIFEST.json + +testharness_runner.html +!/testharness_runner.html +!/tools/wptrunner/wptrunner/testharness_runner.html + +_certs +config.json + +# Various OS/editor specific files +*# *.sw[po] *~ -MANIFEST.json -!content-security-policy/support/manifest.json -!payment-handler/manifest.json \#* -_certs -.virtualenv -config.json -node_modules scratch -testharness_runner.html -webdriver/.idea +.idea/ .vscode/ .DS_Store *.rej -_venv -webdriver/.cache diff --git a/tests/wpt/web-platform-tests/.travis.yml b/tests/wpt/web-platform-tests/.travis.yml index 0a47a65f803..26df65e9827 100644 --- a/tests/wpt/web-platform-tests/.travis.yml +++ b/tests/wpt/web-platform-tests/.travis.yml @@ -12,16 +12,11 @@ addons: - www2.web-platform.test - xn--n8j6ds53lwwkrqhv28a.web-platform.test - xn--lve-6lad.web-platform.test - jwt: - secure: N9lvgkqUPtFlz6Vpa6qTPFhymEsDCsbaCsT64/hj3vlHRxK94r5+ugVJ3zm99zC0q2j1ish8yJC7mN/W4wRfBE4sAwmdxrlowxF1DDGCkaLE9i/GWW92s0fBVGJmXLh8kwNkQ31hMOsaGfHIMpeLFS7Se741te7YqsHIzmBCdQs= before_install: # This needs be sourced as it sets various env vars - . ./tools/ci/before_install.sh install: - ./tools/ci/install.sh -env: # required at the top-level for allow_failures to work below - global: - - SAUCE_USERNAME=w3c-ttwf matrix: fast_finish: true include: @@ -65,16 +60,6 @@ matrix: env: - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=chrome:dev - - os: linux - python: "2.7" - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:safari:11.0 PLATFORM='macOS 10.12' - - os: linux - python: "2.7" - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:16.16299 PLATFORM='Windows 10' - python: 2.7 env: JOB=tools_unittest TOXENV=py27 HYPOTHESIS_PROFILE=ci SCRIPT=tools/ci/ci_tools_unittest.sh - python: 3.6 @@ -102,15 +87,6 @@ matrix: - env: # exclude empty env from the top-level above allow_failures: - env: JOB=build_css SCRIPT=css/build-css-testsuites.sh - - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=chrome:dev - - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:16.16299 PLATFORM='Windows 10' - - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:safari:11.0 PLATFORM='macOS 10.12' script: - ./tools/ci/run.sh cache: diff --git a/tests/wpt/web-platform-tests/FileAPI/FileReader/workers.html b/tests/wpt/web-platform-tests/FileAPI/FileReader/workers.html new file mode 100644 index 00000000000..8e114eeaf86 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/FileReader/workers.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + +async_test(t => { + function workerCode() { + close(); + var blob = new Blob([123]); + var fr = new FileReader(); + fr.readAsText(blob); + fr.abort() + fr.readAsArrayBuffer(blob); + postMessage(true); + } + + var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); + + var w = new Worker(URL.createObjectURL(workerBlob)); + w.onmessage = function(e) { + assert_true(e.data, "FileReader created during worker shutdown."); + t.done(); + } +}, 'FileReader created after a worker self.close()'); + +</script> diff --git a/tests/wpt/web-platform-tests/IndexedDB/README.md b/tests/wpt/web-platform-tests/IndexedDB/README.md index 6b636d5f1a4..18f067b18b2 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/README.md +++ b/tests/wpt/web-platform-tests/IndexedDB/README.md @@ -1,8 +1,8 @@ This directory contains the Indexed Database API test suite. -To run the tests in this test suite within a browser, go to: <http://w3c-test.org/IndexedDB/>. +To run the tests in this test suite within a browser, go to: <https://w3c-test.org/IndexedDB/>. -The latest Editor's Draft of Indexed Database API is: <http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html>. +The latest Editor's Draft of Indexed Database API is: <https://w3c.github.io/IndexedDB/>. -The latest W3C Technical Report of Indexed Database API is: <http://www.w3.org/TR/IndexedDB/>. +The latest W3C Technical Report of Indexed Database API is: <https://www.w3.org/TR/IndexedDB/>. diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js b/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js new file mode 100644 index 00000000000..f142db45bcb --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js @@ -0,0 +1,32 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +promise_test(async t => { + const [html, dom, indexeddb] = await Promise.all([ + '/interfaces/html.idl', + '/interfaces/dom.idl', + '/interfaces/IndexedDB.idl', + ].map(url => fetch(url).then(response => response.text()))); + + const idl_array = new IdlArray(); + idl_array.add_untested_idls('interface LinkStyle {};'); // Needed by html + idl_array.add_untested_idls(html); + idl_array.add_untested_idls(dom); + idl_array.add_idls(indexeddb); + idl_array.add_objects({ + IDBCursor: [], + IDBCursorWithValue: [], + IDBDatabase: [], + IDBFactory: [self.indexedDB], + IDBIndex: [], + IDBKeyRange: [IDBKeyRange.only(0)], + IDBObjectStore: [], + IDBOpenDBRequest: [], + IDBRequest: [], + IDBTransaction: [], + IDBVersionChangeEvent: [new IDBVersionChangeEvent('')], + DOMStringList: [], + }); + + idl_array.test(); +}, 'Test driver'); diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.html b/tests/wpt/web-platform-tests/IndexedDB/interfaces.html deleted file mode 100644 index 8bffa622762..00000000000 --- a/tests/wpt/web-platform-tests/IndexedDB/interfaces.html +++ /dev/null @@ -1,61 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>IndexedDB IDL tests</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/resources/WebIDLParser.js></script> -<script src=/resources/idlharness.js></script> - -<h1>IndexedDB IDL tests</h1> -<div id=log></div> - -<script> -"use strict"; -async_test(function(t) { - var request = new XMLHttpRequest(); - request.open("GET", "/interfaces/IndexedDB.idl"); - request.send(); - request.onload = t.step_func(function() { - var idlArray = new IdlArray(); - var idls = request.responseText; - - // https://html.spec.whatwg.org/multipage/browsers.html#window - idlArray.add_untested_idls("[Global=Window, Exposed=Window] interface Window { };"); - - // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin - idlArray.add_untested_idls(`[NoInterfaceObject, Exposed=(Window,Worker)] - interface WindowOrWorkerGlobalScope {};`); - idlArray.add_untested_idls("Window implements WindowOrWorkerGlobalScope;"); - - // https://dom.spec.whatwg.org/#interface-event - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface Event { };"); - - // https://dom.spec.whatwg.org/#interface-eventtarget - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface EventTarget { };"); - - // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface DOMStringList { };"); - - // From Indexed DB: - idlArray.add_idls(idls); - - idlArray.add_objects({ - IDBCursor: [], - IDBCursorWithValue: [], - IDBDatabase: [], - IDBFactory: ["window.indexedDB"], - IDBIndex: [], - IDBKeyRange: ["IDBKeyRange.only(0)"], - IDBObjectStore: [], - IDBOpenDBRequest: [], - IDBRequest: [], - IDBTransaction: [], - IDBVersionChangeEvent: ["new IDBVersionChangeEvent('foo')"], - DOMStringList: [], - }); - - idlArray.test(); - t.done(); - }); -}); -</script> diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js b/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js deleted file mode 100644 index 547b07b8f17..00000000000 --- a/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -importScripts("/resources/testharness.js"); -importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); - -async_test(function(t) { - var request = new XMLHttpRequest(); - request.open("GET", "/interfaces/IndexedDB.idl"); - request.send(); - request.onload = t.step_func(function() { - var idlArray = new IdlArray(); - var idls = request.responseText; - - // https://html.spec.whatwg.org/multipage/workers.html#workerglobalscope - idlArray.add_untested_idls("[Exposed=Worker] interface WorkerGlobalScope {};"); - - // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin - idlArray.add_untested_idls(`[NoInterfaceObject, Exposed=(Window,Worker)] - interface WindowOrWorkerGlobalScope {};`); - idlArray.add_untested_idls("WorkerGlobalScope implements WindowOrWorkerGlobalScope;"); - - // https://dom.spec.whatwg.org/#interface-event - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface Event { };"); - - // https://dom.spec.whatwg.org/#interface-eventtarget - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface EventTarget { };"); - - // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface DOMStringList { };"); - - // From Indexed DB: - idlArray.add_idls(idls); - - idlArray.add_objects({ - IDBCursor: [], - IDBCursorWithValue: [], - IDBDatabase: [], - IDBFactory: ["self.indexedDB"], - IDBIndex: [], - IDBKeyRange: ["IDBKeyRange.only(0)"], - IDBObjectStore: [], - IDBOpenDBRequest: [], - IDBRequest: [], - IDBTransaction: [], - IDBVersionChangeEvent: ["new IDBVersionChangeEvent('foo')"], - DOMStringList: [], - }); - idlArray.test(); - t.done(); - }); -}); - -done(); diff --git a/tests/wpt/web-platform-tests/README.md b/tests/wpt/web-platform-tests/README.md index cc846b5d23e..fe02609bbf0 100644 --- a/tests/wpt/web-platform-tests/README.md +++ b/tests/wpt/web-platform-tests/README.md @@ -69,22 +69,31 @@ python wpt serve ``` This will start HTTP servers on two ports and a websockets server on -one port. By default one web server starts on port 8000 and the other +one port. By default the web servers start on ports 8000 and 8443 and the other ports are randomly-chosen free ports. Tests must be loaded from the *first* HTTP server in the output. To change the ports, copy the `config.default.json` file to `config.json` and edit the new file, replacing the part that reads: ``` -"http": [8000, "auto"] +"http": [8000, "auto"], +"https":[8443] ``` -to some port of your choice e.g. +to some ports of your choice e.g. ``` -"http": [1234, "auto"] +"http": [1234, "auto"], +"https":[5678] ``` +After your `hosts` file is configured, the servers will be locally accessible at: + +http://web-platform.test:8000/<br> +https://web-platform.test:8443/ * + +\**See [Trusting Root CA](#trusting-root-ca)* + Running Tests Automatically --------------------------- @@ -222,7 +231,7 @@ Certificates ============ By default pregenerated certificates for the web-platform.test domain -are provided in the repository. If you wish to generate new +are provided in [`tools/certs`](tools/certs). If you wish to generate new certificates for any reason it's possible to use OpenSSL when starting the server, or starting a test run, by providing the `--ssl-type=openssl` argument to the `wpt serve` or `wpt run` @@ -259,6 +268,11 @@ Then edit the JSON so that the key `ssl/openssl/base_conf_path` has a value that is the path to the OpenSSL config file (typically this will be `C:\\OpenSSL-Win32\\bin\\openssl.cfg`). +### Trusting Root CA + +To prevent browser SSL warnings when running HTTPS tests locally, the +web-platform-tests Root CA file `rootca.pem` in [tools/certs](tools/certs) +must be added as a trusted certificate in your OS/browser. Publication =========== diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-disabled-by-feature-policy.https.html index 9481f30f6b7..9476efb6a0f 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html index 809fe0b3d79..aa8ea10eb0b 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https.html index 3f53de061a1..860a027b55b 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy.https.html index dca391bab0f..889047a0703 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html index cc05a387a5b..bf458529e84 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer.https.html index 73c579c35b5..9563270fcda 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/accelerometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer_insecure_context.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer_insecure_context.html index 81b33dd514b..ff1f0832c31 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer_insecure_context.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/accelerometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Note:</h2> <ol> diff --git a/tests/wpt/web-platform-tests/accelerometer/Accelerometer_onerror-manual.https.html b/tests/wpt/web-platform-tests/accelerometer/Accelerometer_onerror-manual.https.html index ed5f190a715..f69b1b6ce5c 100644 --- a/tests/wpt/web-platform-tests/accelerometer/Accelerometer_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/accelerometer/Accelerometer_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/accelerometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html index e586a0e1211..3525320e256 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html index 33112cfe3d2..84bee557186 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html index 41a7f9a8a54..a9810128956 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html index d2cc12680db..e4ce2566bf0 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html index 7f5267d3a83..bb2c4a61841 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor.https.html index c45c7bcfa59..88bb19a96ce 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/ambient-light/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_insecure_context.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_insecure_context.html index 1b51ded1d39..9a7c91492b5 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_insecure_context.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/ambient-light/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_onerror-manual.https.html b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_onerror-manual.https.html index 130f821da3e..8bcb9082cc9 100644 --- a/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/ambient-light/AmbientLightSensor_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/ambient-light/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/apng/supported-in-source-type.html b/tests/wpt/web-platform-tests/apng/supported-in-source-type.html new file mode 100644 index 00000000000..0a4d232dcb1 --- /dev/null +++ b/tests/wpt/web-platform-tests/apng/supported-in-source-type.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Animated PNG MIME type (image/apng) is recognized by <source type></title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +function resolveUrl(relativeUrl) { + var a = document.createElement('a'); + a.href = relativeUrl; + return a.href; +} + +async_test(t => { + window.onload = t.step_func_done(() => { + let image = document.querySelector('img'); + let apngSrc = document.querySelector('source'); + assert_equals(image.currentSrc, resolveUrl(apngSrc.srcset)); + }); +}); +</script> +<picture> + <source srcset="/images/anim-gr.png" type="image/apng"> + <img src="/images/anim-gr.gif" style="visibility: hidden"> +</picture> diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html index c4c80d2e455..02aaeccb022 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptor(user_description.name), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html index 0f1b514eb32..bfb4c8dcf6a 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html @@ -17,7 +17,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptor(user_description.name), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html index 1f675c866ba..c00d4cf5783 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptors(user_description.name), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html index 835036ffd42..a29548f3656 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptors(), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html index 6e697041f39..de83400b208 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html @@ -17,7 +17,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptors(user_description.uuid), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html index 8261511e8d2..c9056dd3b3c 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html @@ -17,7 +17,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.getDescriptors(user_description.name), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/notifications/service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/notifications/service-is-removed.https.html index 58495f45663..bf389ce5286 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/notifications/service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/notifications/service-is-removed.https.html @@ -14,7 +14,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.startNotifications(), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html index f03b2817d02..a80bccfe469 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.readValue(), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/service-is-removed.https.html index 4c7db9eb78a..48f8127de83 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/service-is-removed.https.html @@ -14,7 +14,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.readValue(), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html index 50e1786fe82..d9a9594320d 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.startNotifications(), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html index 72527ac86fe..16520704630 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html @@ -17,7 +17,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.writeValue(new Uint8Array(1)), expected)), diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/service-is-removed.https.html index a6101281178..2b43bfb7c91 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/writeValue/service-is-removed.https.html @@ -14,7 +14,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.writeValue(new ArrayBuffer(1 /* length */)), diff --git a/tests/wpt/web-platform-tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html index 46744642d70..e453c806374 100644 --- a/tests/wpt/web-platform-tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html @@ -15,7 +15,6 @@ let descriptor, fake_peripheral, fake_service; bluetooth_test(() => getUserDescriptionDescriptor() .then(_ => ({descriptor, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( descriptor.readValue(), diff --git a/tests/wpt/web-platform-tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html index 849b45d3baa..acd56c3aa45 100644 --- a/tests/wpt/web-platform-tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html @@ -15,7 +15,6 @@ let descriptor, fake_peripheral, fake_service; bluetooth_test(() => getUserDescriptionDescriptor() .then(_ => ({descriptor, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( descriptor.writeValue(new ArrayBuffer(1 /* length */)), diff --git a/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-helpers.js b/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-helpers.js index 56357043ba7..7b23742fc4c 100644 --- a/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-helpers.js +++ b/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-helpers.js @@ -42,6 +42,7 @@ function performChromiumSetup() { `${prefix}/mojo_layouttest_test.mojom.js`, `${prefix}/uuid.mojom.js`, `${prefix}/fake_bluetooth.mojom.js`, + `${prefix}/fake_bluetooth_chooser.mojom.js`, `${prefix}/web-bluetooth-test.js`, ].concat(extra)) // Call setBluetoothFakeAdapter() to clean up any fake adapters left over diff --git a/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/characteristic-is-removed.js b/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/characteristic-is-removed.js index 5241ecf5d7e..8ff747c588d 100644 --- a/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/characteristic-is-removed.js +++ b/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/characteristic-is-removed.js @@ -9,7 +9,6 @@ bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(() => characteristic.getDescriptor(user_description.name)) .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e)) .then(() => fake_characteristic.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.CALLS([ diff --git a/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/service-is-removed.js b/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/service-is-removed.js index 129a6db7af3..2f5824082b1 100644 --- a/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/service-is-removed.js +++ b/tests/wpt/web-platform-tests/bluetooth/script-tests/characteristic/service-is-removed.js @@ -9,7 +9,6 @@ let characteristic, fake_peripheral, fake_service; bluetooth_test(() => getMeasurementIntervalCharacteristic() .then(_ => ({characteristic, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( characteristic.CALLS([ diff --git a/tests/wpt/web-platform-tests/bluetooth/script-tests/descriptor/service-is-removed.js b/tests/wpt/web-platform-tests/bluetooth/script-tests/descriptor/service-is-removed.js index 17309630737..5373364399e 100644 --- a/tests/wpt/web-platform-tests/bluetooth/script-tests/descriptor/service-is-removed.js +++ b/tests/wpt/web-platform-tests/bluetooth/script-tests/descriptor/service-is-removed.js @@ -7,7 +7,6 @@ let descriptor, fake_peripheral, fake_service; bluetooth_test(() => getUserDescriptionDescriptor() .then(_ => ({descriptor, fake_peripheral, fake_service} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( descriptor.CALLS([ diff --git a/tests/wpt/web-platform-tests/bluetooth/script-tests/service/service-is-removed.js b/tests/wpt/web-platform-tests/bluetooth/script-tests/service/service-is-removed.js index c1390fd88f7..aaf0f144367 100644 --- a/tests/wpt/web-platform-tests/bluetooth/script-tests/service/service-is-removed.js +++ b/tests/wpt/web-platform-tests/bluetooth/script-tests/service/service-is-removed.js @@ -8,7 +8,6 @@ let service, fake_service, fake_peripheral; bluetooth_test(() => getHealthThermometerService() .then(_ => ({service, fake_service, fake_peripheral} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( service.CALLS([ diff --git a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html index f056401cc57..391c49a0bab 100644 --- a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html @@ -16,7 +16,6 @@ let service, fake_service, fake_peripheral; bluetooth_test(() => getHealthThermometerService() .then(_ => ({service, fake_service, fake_peripheral} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( service.getCharacteristic('measurement_interval'), diff --git a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html index 71b6d77a8ef..62caaad12b5 100644 --- a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html @@ -16,7 +16,6 @@ let service, fake_service, fake_peripheral; bluetooth_test(() => getHealthThermometerService() .then(_ => ({service, fake_service, fake_peripheral} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( service.getCharacteristics('measurement_interval'), diff --git a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html index 2bd7bf7934b..4868127465a 100644 --- a/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html +++ b/tests/wpt/web-platform-tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html @@ -16,7 +16,6 @@ let service, fake_service, fake_peripheral; bluetooth_test(() => getHealthThermometerService() .then(_ => ({service, fake_service, fake_peripheral} = _)) .then(() => fake_service.remove()) - .then(() => fake_peripheral.setNextGATTDiscoveryResponse({HCI_SUCCESS})) .then(() => fake_peripheral.simulateGATTServicesChanged()) .then(() => assert_promise_rejects_with_message( service.getCharacteristics(), diff --git a/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html b/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html new file mode 100644 index 00000000000..447dd2861c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html @@ -0,0 +1,33 @@ +<html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> + +// When the response for the HTML file contains "Accept-CH" in the response +// headers, then the browser should not attach the specified client hints in +// the HTTP request headers if the response was delivered by an insecure HTTP +// server. Test this functionality by fetching an XHR from this page hosted on +// an insecure HTTP server. The response headers for this page include +// "Accept-CH: device-memory, dpr, viewport-width". +// +// echo_client_hints_received.py includes "device-memory-received", +// "dpr-received" and "viewport-width-received" in the response headers +// depending on the set of client hints it receives in the request headers. + + promise_test(t => { + return fetch("/client-hints/echo_client_hints_received.py").then(r => { + assert_equals(r.status, 200) + // Verify that the browser does not include client hints in the headers + // when fetching the XHR from an insecure HTTP server. + assert_false(r.headers.has("device-memory-received")); + assert_false(r.headers.has("dpr-received")); + assert_false(r.headers.has("viewport-width-received")); + }); +}, "Accept-CH header test"); + +</script> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html.headers b/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html.headers new file mode 100644 index 00000000000..38f4f33be8a --- /dev/null +++ b/tests/wpt/web-platform-tests/client-hints/accept_ch.http.html.headers @@ -0,0 +1 @@ +Accept-CH: device-memory, dpr, viewport-width
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html b/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html new file mode 100644 index 00000000000..68263267bd0 --- /dev/null +++ b/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html @@ -0,0 +1,32 @@ +<html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> + +// If the response for the HTML file contains "Accept-CH" in the response +// headers, then the browser should attach the specified client hints in the +// HTTP request headers. Test this functionality by fetching an +// XHR from this page. The response headers for this page include +// "Accept-CH: device-memory, dpr, viewport-width". +// +// echo_client_hints_received.py includes "device-memory-received", +// "dpr-received" and "viewport-width-received" in the response headers +// depending on the set of client hints it receives in the request headers. + + promise_test(t => { + return fetch("https://{{domains[]}}:{{ports[https][0]}}/client-hints/echo_client_hints_received.py", {"mode": "no-cors"}).then(r => { + assert_equals(r.status, 200) + // Verify that the browser includes client hints in the headers when + // fetching the XHR. + assert_true(r.headers.has("device-memory-received"), "device-memory-received"); + assert_true(r.headers.has("dpr-received"), "dpr-received"); + assert_true(r.headers.has("viewport-width-received"), "viewport-width-received"); + }); +}, "Accept-CH header test"); + +</script> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html.headers b/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html.headers new file mode 100644 index 00000000000..38f4f33be8a --- /dev/null +++ b/tests/wpt/web-platform-tests/client-hints/accept_ch.sub.https.html.headers @@ -0,0 +1 @@ +Accept-CH: device-memory, dpr, viewport-width
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/client-hints/echo_client_hints_received.py b/tests/wpt/web-platform-tests/client-hints/echo_client_hints_received.py new file mode 100644 index 00000000000..a787fed1658 --- /dev/null +++ b/tests/wpt/web-platform-tests/client-hints/echo_client_hints_received.py @@ -0,0 +1,12 @@ +def main(request, response): + """ + Simple handler that sets a response header based on if device-memory + request header was received or not. + """ + + if "device-memory" in request.headers: + response.headers.set("device-memory-received", "true") + if "dpr" in request.headers: + response.headers.set("dpr-received", "true") + if "viewport-width" in request.headers: + response.headers.set("viewport-width-received", "true")
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/config.default.json b/tests/wpt/web-platform-tests/config.default.json index 6c49b77de1c..d08d7c4a3fe 100644 --- a/tests/wpt/web-platform-tests/config.default.json +++ b/tests/wpt/web-platform-tests/config.default.json @@ -1,14 +1,14 @@ -{"host": "web-platform.test", +{"browser_host": "web-platform.test", "doc_root": null, "ws_doc_root": null, - "host_ip": null, + "server_host": null, "ports":{"http":[8000, "auto"], "https":[8443], "ws":["auto"], "wss":["auto"]}, "check_subdomains": true, "log_level":"debug", - "bind_hostname": true, + "bind_address": true, "ssl": {"type": "pregenerated", "encrypt_after_connect": false, "openssl": { diff --git a/tests/wpt/web-platform-tests/conformance-checkers/Makefile b/tests/wpt/web-platform-tests/conformance-checkers/Makefile index 161c8db7d57..879b023c6ea 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/Makefile +++ b/tests/wpt/web-platform-tests/conformance-checkers/Makefile @@ -7,7 +7,7 @@ EXPAND=expand EXPANDFLAGS= GIT=git GITFLAGS= -PYTHON=python +PYTHON=python3 PYTHONFLAGS= VNU_TEST_REPO=git@github.com:validator/tests.git ITS_REPO=git@github.com:w3c/its-2.0-testsuite-inputdata.git @@ -24,7 +24,7 @@ README.md: index.html | $(EXPAND) $(EXPANDFLAGS) > $@ messages.json: .FORCE - $(PYTHON) $(PYTHONFLAGS) -mjson.tool $@ > $@.tmp + $(PYTHON) $(PYTHONFLAGS) -mjson.tool --sort-keys $@ > $@.tmp mv $@.tmp $@ push: diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index e818ba76b54..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid href: scheme-javascript-no-slash-malformed</title> -<a href="javascript:example.com/"></a> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index bb12e65f532..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid href: scheme-javascript-no-slash-malformed</title> -<map name=foo><area href="javascript:example.com/" alt></map> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 7d37b16afcb..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<audio src="javascript:example.com/"></audio> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 16b4187b80d..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid href: scheme-javascript-no-slash-malformed</title> -<base href="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 71df3f36e1d..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid cite: scheme-javascript-no-slash-malformed</title> -<blockquote cite="javascript:example.com/"></blockquote> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 74c1cbc8872..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid formaction: scheme-javascript-no-slash-malformed</title> -<button formaction="javascript:example.com/"></button> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 4328b02e9b3..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid cite: scheme-javascript-no-slash-malformed</title> -<del cite="javascript:example.com/"></del> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 52aff9fb792..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<embed src="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index bc66953ab7d..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid action: scheme-javascript-no-slash-malformed</title> -<form action="javascript:example.com/"></form> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 6424e83c0f0..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<iframe src="javascript:example.com/"></iframe> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 00a8c885719..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<img src="javascript:example.com/" alt> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 727da488fc7..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid formaction: scheme-javascript-no-slash-malformed</title> -<input type=image alt="foo" formaction="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index f22ebf50226..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<input type=image alt="foo" src="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index fe2c0ce719c..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid formaction: scheme-javascript-no-slash-malformed</title> -<input type=submit formaction="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 73c7e6adf4d..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid value attribute: scheme-javascript-no-slash-malformed</title> -<input type=url value="javascript:example.com/"> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 267f1131ace..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid cite: scheme-javascript-no-slash-malformed</title> -<ins cite="javascript:example.com/"></ins> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 6cf49ca2367..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid href: scheme-javascript-no-slash-malformed</title> -<link href="javascript:example.com/" rel=help> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index aa277965975..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid data: scheme-javascript-no-slash-malformed</title> -<object data="javascript:example.com/"></object> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index a142b0040b2..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid cite: scheme-javascript-no-slash-malformed</title> -<q cite="javascript:example.com/"></q> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 6e85d80fee4..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<script src="javascript:example.com/"></script> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 6516b42310d..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<video><source src="javascript:example.com/"></video> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 13a633d3708..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<video><track src="javascript:example.com/"></video> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index af5c83dd2d6..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid poster: scheme-javascript-no-slash-malformed</title> -<video poster="javascript:example.com/"></video> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index adc7a878982..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid src: scheme-javascript-no-slash-malformed</title> -<video src="javascript:example.com/"></video> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 3bf1c6516a5..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid itemid: scheme-javascript-no-slash-malformed</title> -<div itemid="javascript:example.com/" itemtype="http://foo" itemscope></div> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html deleted file mode 100644 index 5110c6d35b2..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid itemtype: scheme-javascript-no-slash-malformed</title> -<div itemtype="javascript:example.com/" itemscope></div> diff --git a/tests/wpt/web-platform-tests/conformance-checkers/messages.json b/tests/wpt/web-platform-tests/conformance-checkers/messages.json index fc85b29fd1d..73e1d6910fc 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/messages.json +++ b/tests/wpt/web-platform-tests/conformance-checkers/messages.json @@ -144,7 +144,6 @@ "html/elements/a/href/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/a/href/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/a/href/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/a/href/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Unexpected token.", "html/elements/a/href/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/a/href/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/a/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -214,7 +213,6 @@ "html/elements/area/href/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/area/href/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/area/href/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/area/href/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Unexpected token.", "html/elements/area/href/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/area/href/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/area/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -284,7 +282,6 @@ "html/elements/audio/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/audio/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/audio/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/audio/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Unexpected token.", "html/elements/audio/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/audio/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/audio/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -350,7 +347,6 @@ "html/elements/base/href/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/base/href/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/base/href/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/base/href/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Unexpected token.", "html/elements/base/href/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/base/href/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/base/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -416,7 +412,6 @@ "html/elements/blockquote/cite/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/blockquote/cite/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/blockquote/cite/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/blockquote/cite/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Unexpected token.", "html/elements/blockquote/cite/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/blockquote/cite/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/blockquote/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -485,7 +480,6 @@ "html/elements/button/formaction/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/button/formaction/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/button/formaction/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/button/formaction/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Unexpected token.", "html/elements/button/formaction/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/button/formaction/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/button/formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -553,7 +547,6 @@ "html/elements/del/cite/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/del/cite/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/del/cite/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/del/cite/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Unexpected token.", "html/elements/del/cite/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/del/cite/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/del/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -749,7 +742,6 @@ "html/elements/embed/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/embed/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/embed/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/embed/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Unexpected token.", "html/elements/embed/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/embed/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/embed/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -820,7 +812,6 @@ "html/elements/form/action/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/form/action/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/form/action/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/form/action/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Unexpected token.", "html/elements/form/action/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/form/action/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/form/action/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -898,7 +889,6 @@ "html/elements/iframe/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/iframe/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/iframe/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/iframe/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Unexpected token.", "html/elements/iframe/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/iframe/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/iframe/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -966,7 +956,6 @@ "html/elements/img/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/img/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/img/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/img/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Unexpected token.", "html/elements/img/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/img/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/img/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1038,7 +1027,6 @@ "html/elements/input/type-image-formaction/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-image-formaction/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-image-formaction/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/input/type-image-formaction/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Unexpected token.", "html/elements/input/type-image-formaction/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-image-formaction/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-image-formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1105,7 +1093,6 @@ "html/elements/input/type-image-src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-image-src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-image-src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/input/type-image-src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Unexpected token.", "html/elements/input/type-image-src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-image-src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-image-src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1172,7 +1159,6 @@ "html/elements/input/type-submit-formaction/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-submit-formaction/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/input/type-submit-formaction/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/input/type-submit-formaction/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Unexpected token.", "html/elements/input/type-submit-formaction/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-submit-formaction/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-submit-formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1246,7 +1232,6 @@ "html/elements/input/type-url-value/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Expected a slash (\"/\").", "html/elements/input/type-url-value/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Expected a slash (\"/\").", "html/elements/input/type-url-value/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Expected a slash (\"/\").", - "html/elements/input/type-url-value/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Unexpected token.", "html/elements/input/type-url-value/scheme-schemeless-relative-novalid.html": "Bad value \u201c//foo/bar\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: The string \u201c//foo/bar\u201d is not an absolute URL.", "html/elements/input/type-url-value/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in scheme data: line break is not allowed.", "html/elements/input/type-url-value/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in scheme data: line break is not allowed.", @@ -1312,7 +1297,6 @@ "html/elements/ins/cite/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/ins/cite/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/ins/cite/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/ins/cite/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Unexpected token.", "html/elements/ins/cite/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/ins/cite/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/ins/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1485,7 +1469,6 @@ "html/elements/link/href/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/link/href/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/link/href/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/link/href/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Unexpected token.", "html/elements/link/href/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/link/href/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/link/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1554,7 +1537,6 @@ "html/elements/object/data/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/object/data/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/object/data/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/object/data/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Unexpected token.", "html/elements/object/data/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/object/data/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/object/data/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1822,7 +1804,6 @@ "html/elements/q/cite/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/q/cite/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/q/cite/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/q/cite/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Unexpected token.", "html/elements/q/cite/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/q/cite/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/q/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1894,7 +1875,6 @@ "html/elements/script/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/script/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/script/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/script/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Unexpected token.", "html/elements/script/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/script/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/script/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -1962,7 +1942,6 @@ "html/elements/source/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/source/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/source/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/source/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Unexpected token.", "html/elements/source/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/source/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/source/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -2049,7 +2028,6 @@ "html/elements/track/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/track/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/track/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/track/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Unexpected token.", "html/elements/track/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/track/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/track/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -2119,7 +2097,6 @@ "html/elements/video/poster/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/video/poster/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/video/poster/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/video/poster/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Unexpected token.", "html/elements/video/poster/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/video/poster/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/video/poster/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -2184,7 +2161,6 @@ "html/elements/video/src/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/video/src/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", "html/elements/video/src/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Expected a slash (\"/\").", - "html/elements/video/src/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Unexpected token.", "html/elements/video/src/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/video/src/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/elements/video/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -2272,7 +2248,6 @@ "html/microdata/itemid/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Expected a slash (\"/\").", "html/microdata/itemid/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Expected a slash (\"/\").", "html/microdata/itemid/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Expected a slash (\"/\").", - "html/microdata/itemid/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Unexpected token.", "html/microdata/itemid/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/microdata/itemid/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in scheme data: line break is not allowed.", "html/microdata/itemid/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", @@ -2344,7 +2319,6 @@ "html/microdata/itemtype/scheme-http-single-slash-novalid.html": "Bad value \u201chttp:/example.com/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Expected a slash (\"/\").", "html/microdata/itemtype/scheme-https-no-slash-novalid.html": "Bad value \u201chttps:example.com/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Expected a slash (\"/\").", "html/microdata/itemtype/scheme-https-single-slash-novalid.html": "Bad value \u201chttps:/example.com/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Expected a slash (\"/\").", - "html/microdata/itemtype/scheme-javascript-no-slash-malformed-novalid.html": "Bad value \u201cjavascript:example.com/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Unexpected token.", "html/microdata/itemtype/scheme-schemeless-relative-novalid.html": "Bad value \u201c//foo/bar\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: The string \u201c//foo/bar\u201d is not an absolute URL.", "html/microdata/itemtype/scheme-trailing-cr-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: The string \u201cfoo.com\u201d is not an absolute URL.", "html/microdata/itemtype/scheme-trailing-newline-novalid.html": "Bad value \u201ca:\nfoo.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: The string \u201cfoo.com\u201d is not an absolute URL.", diff --git a/tests/wpt/web-platform-tests/conformance-checkers/tools/url.py b/tests/wpt/web-platform-tests/conformance-checkers/tools/url.py index 1f59c025209..df31eab22af 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/tools/url.py +++ b/tests/wpt/web-platform-tests/conformance-checkers/tools/url.py @@ -17,7 +17,6 @@ invalid = { "scheme-data-single-slash": "data:/example.com/", "scheme-ftp-no-slash": "ftp:example.com/", "scheme-https-no-slash": "https:example.com/", - "scheme-javascript-no-slash-malformed": "javascript:example.com/", "userinfo-password-bad-chars": "http://&a:foo(b]c@d:2/", "userinfo-username-contains-at-sign": "http://::@c@d:2", "userinfo-backslash": "http://a\\b:c\\d@foo.com", diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_arguments.tenative.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_arguments.tenative.window.js new file mode 100644 index 00000000000..bcb698eeb0d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_arguments.tenative.window.js @@ -0,0 +1,65 @@ +'use strict'; + +test(() => { + const event = new CookieChangeEvent('change'); + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 0); + assert_equals(event.deleted.length, 0); +}, 'CookieChangeEvent construction with default arguments'); + +test(() => { + const event = new CookieChangeEvent('change', { + changed: [ + { name: 'changed-name1', value: 'changed-value1' }, + { name: 'changed-name2', value: 'changed-value2' }, + ], + }); + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 2); + assert_equals(event.changed[0].name, 'changed-name1'); + assert_equals(event.changed[0].value, 'changed-value1'); + assert_equals(event.changed[1].name, 'changed-name2'); + assert_equals(event.changed[1].value, 'changed-value2'); + assert_equals(event.deleted.length, 0); +}, 'CookieChangeEvent construction with changed cookie list'); + +test(() => { + const event = new CookieChangeEvent('change', { + deleted: [ + { name: 'deleted-name1', value: 'deleted-value1' }, + { name: 'deleted-name2', value: 'deleted-value2' }, + ], + }); + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 0); + assert_equals(event.deleted.length, 2); + assert_equals(event.deleted[0].name, 'deleted-name1'); + assert_equals(event.deleted[0].value, 'deleted-value1'); + assert_equals(event.deleted[1].name, 'deleted-name2'); + assert_equals(event.deleted[1].value, 'deleted-value2'); +}, 'CookieChangeEvent construction with deleted cookie list'); + +test(() => { + const event = new CookieChangeEvent('change', { + changed: [ + { name: 'changed-name1', value: 'changed-value1' }, + { name: 'changed-name2', value: 'changed-value2' }, + ], + deleted: [ + { name: 'deleted-name1', value: 'deleted-value1' }, + ], + }); + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 2); + assert_equals(event.changed[0].name, 'changed-name1'); + assert_equals(event.changed[0].value, 'changed-value1'); + assert_equals(event.changed[1].name, 'changed-name2'); + assert_equals(event.changed[1].value, 'changed-value2'); + assert_equals(event.deleted.length, 1); + assert_equals(event.deleted[0].name, 'deleted-name1'); + assert_equals(event.deleted[0].value, 'deleted-value1'); +}, 'CookieChangeEvent construction with changed and deleted cookie lists');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_basic.tentative.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_basic.tentative.window.js new file mode 100644 index 00000000000..306fc1e5d00 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_basic.tentative.window.js @@ -0,0 +1,29 @@ +'use strict'; + +// Workaround because add_cleanup doesn't support async functions yet. +// See https://github.com/w3c/web-platform-tests/issues/6075 +async function async_cleanup(cleanup_function) { + try { + await cleanup_function(); + } catch (e) { + // Errors in cleanup functions shouldn't result in test failures. + } +} + +promise_test(async testCase => { + const eventPromise = new Promise((resolve) => { + cookieStore.onchange = resolve; + }); + + await cookieStore.set('cookie-name', 'cookie-value'); + + const event = await eventPromise; + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 1); + assert_equals(event.changed[0].name, 'cookie-name'); + assert_equals(event.changed[0].value, 'cookie-value'); + assert_equals(event.deleted.length, 0); + + await async_cleanup(() => cookieStore.delete('cookie-name')); +}, 'cookieStore fires change event for cookie set by cookieStore.set()'); diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tenative.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tenative.window.js new file mode 100644 index 00000000000..de544491c56 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tenative.window.js @@ -0,0 +1,31 @@ +'use strict'; + +// Workaround because add_cleanup doesn't support async functions yet. +// See https://github.com/w3c/web-platform-tests/issues/6075 +async function async_cleanup(cleanup_function) { + try { + await cleanup_function(); + } catch (e) { + // Errors in cleanup functions shouldn't result in test failures. + } +} + +promise_test(async testCase => { + await cookieStore.set('cookie-name', 'cookie-value'); + + const eventPromise = new Promise((resolve) => { + cookieStore.onchange = resolve; + }); + await cookieStore.delete('cookie-name'); + const event = await eventPromise; + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.deleted.length, 1); + assert_equals(event.deleted[0].name, 'cookie-name'); + assert_equals( + event.deleted[0].value, undefined, + 'Cookie change events for deletions should not have cookie values'); + assert_equals(event.changed.length, 0); + + await async_cleanup(() => cookieStore.delete('cookie-name')); +}, 'cookieStore fires change event for cookie deleted by cookieStore.delete()');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_overwrite.tentative.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_overwrite.tentative.window.js new file mode 100644 index 00000000000..8e8c9c1dd7b --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_overwrite.tentative.window.js @@ -0,0 +1,31 @@ +'use strict'; + +// Workaround because add_cleanup doesn't support async functions yet. +// See https://github.com/w3c/web-platform-tests/issues/6075 +async function async_cleanup(cleanup_function) { + try { + await cleanup_function(); + } catch (e) { + // Errors in cleanup functions shouldn't result in test failures. + } +} + +promise_test(async testCase => { + await cookieStore.set('cookie-name', 'cookie-value'); + + const eventPromise = new Promise((resolve) => { + cookieStore.onchange = resolve; + }); + + await cookieStore.set('cookie-name', 'new-cookie-value'); + + const event = await eventPromise; + assert_true(event instanceof CookieChangeEvent); + assert_equals(event.type, 'change'); + assert_equals(event.changed.length, 1); + assert_equals(event.changed[0].name, 'cookie-name'); + assert_equals(event.changed[0].value, 'new-cookie-value'); + assert_equals(event.deleted.length, 0); + + await async_cleanup(() => cookieStore.delete('cookie-name')); +}, 'cookieStore fires change event for cookie overwritten by cookieStore.set()'); diff --git a/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.html b/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.html index 00dc29d7d49..648d567a9e9 100644 --- a/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.html +++ b/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.html @@ -21,6 +21,9 @@ promise_test(async t => { idl_array.add_untested_idls('interface LinkStyle {};'); idl_array.add_untested_idls(html); + idl_array.add_untested_idls('interface Event {};'); + idl_array.add_untested_idls('dictionary EventInit {};'); + idl_array.add_untested_idls('interface EventTarget {};'); idl_array.add_untested_idls( `[Global=ServiceWorker, Exposed=ServiceWorker] interface ServiceWorkerGlobalScope {};`); @@ -29,6 +32,7 @@ promise_test(async t => { idl_array.add_objects({ CookieStore: [self.cookieStore], + CookieChangeEvent: [new CookieChangeEvent('change')], }); idl_array.test(); }, 'Interface test'); diff --git a/tests/wpt/web-platform-tests/cookie-store/idlharness_serviceworker.js b/tests/wpt/web-platform-tests/cookie-store/idlharness_serviceworker.js index aa2e79a9de7..e2e838dc7e6 100644 --- a/tests/wpt/web-platform-tests/cookie-store/idlharness_serviceworker.js +++ b/tests/wpt/web-platform-tests/cookie-store/idlharness_serviceworker.js @@ -14,6 +14,14 @@ promise_test(async t => { const idl_array = new IdlArray(); idl_array.add_untested_idls( + `[Global=Event, Exposed=ServiceWorker] + interface Event {};`); + idl_array.add_untested_idls('dictionary EventHandler {};'); + idl_array.add_untested_idls('dictionary EventInit {};'); + idl_array.add_untested_idls( + `[Global=EventTarget, Exposed=ServiceWorker] + interface EventTarget {};`); + idl_array.add_untested_idls( `[Global=ServiceWorker, Exposed=ServiceWorker] interface ServiceWorkerGlobalScope {};`); idl_array.add_untested_idls( @@ -24,6 +32,7 @@ promise_test(async t => { idl_array.add_objects({ CookieStore: [self.cookieStore], + CookieChangeEvent: [new CookieChangeEvent('change')], }); idl_array.test(); }, 'Interface test'); diff --git a/tests/wpt/web-platform-tests/cookies/http-state/all-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/all-tests.html new file mode 100644 index 00000000000..169984de6ac --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/all-tests.html @@ -0,0 +1,59 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Tests basic cookie setting functionality</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8"> + + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="resources/cookie-http-state-template.js"></script> + </head> + <body> + <div id="log"></div> + <script> + setup({ explicit_timeout: true }); + + const TEST_CASES = [ + {file: "0001", name: "Set cookie."}, + {file: "0002", name: "Set cookie with future expiration."}, + {file: "0003", name: "Set expired cookie along with valid cookie."}, + {file: "0004", name: "Ignore cookie without key."}, + {file: "0005", name: "Set cookie with age."}, + {file: "0006", name: "Set no cookie with max-age=0."}, + {file: "0007", name: "Set cookie with version=1."}, + {file: "0008", name: "Set cookie with version=1000."}, + {file: "0009", name: "Set cookie with custom value."}, + // TODO(fhorschig): Could 0010 break when run on a HTTPS try server? + {file: "0010", name: "Dont accept 'secure' cookies over http."}, + {file: "0011", name: "Ignore separators in cookie values."}, + {file: "0012", name: "Ignore values with separators and without ';'."}, + {file: "0013", name: "Use last value for cookies with identical keys."}, + {file: "0014", name: "Keep alphabetic key order."}, + {file: "0015", name: "Keep alphabetic single-char key order."}, + {file: "0016", name: "Keep non-alphabetic key order."}, + {file: "0017", name: "Keep order if comma-separated."}, + {file: "0018", name: "Ignore keys after semicolon."}, + {file: "0019", name: "Ignore attributes after semicolon."}, + {file: "0020", name: "Ignore cookies without key and value."}, + {file: "0021", name: "Ignore cookie without key in all 'Set-Cookie'."}, + {file: "0022", name: "Set cookie without value in all 'Set-Cookie'."}, + {file: "0023", name: "Ignore cookies without '=' in all 'Set-Cookie'."}, + {file: "0024", name: "Ignore malformed cookies in all 'Set-Cookie'."}, + {file: "0025", name: "Ignore cookies with ';' in all 'Set-Cookie'."}, + {file: "0026", name: "Ignore malformed cookies in all 'Set-Cookie' v2."}, + {file: "0027", name: "Ignore malformed cookies in all 'Set-Cookie' v3."}, + // TODO(fhorschig): Ask about 0028's expectations ... should be empty? + {file: "0028", name: "[INVALID EXPECTATION] Ignore malformed cookies in all 'Set-Cookie' v4."}, + ]; + + for (const i in TEST_CASES) { + const t = TEST_CASES[i]; + promise_test(createCookieTest(t.file), + t.file + " - " + t.name, + { timeout: 3000 }); + } + + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js new file mode 100644 index 00000000000..68c5212faab --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js @@ -0,0 +1,80 @@ +const SERVER_LOCATION = "resources"; +const SERVER_SCRIPT = SERVER_LOCATION + "/cookie-setter.py"; + +function stripPrefixAndWhitespace(cookie_text) { + return cookie_text.replace(/^Cookie: /, '').replace(/^\s+|\s+$/g, ''); +} + +function getLocalResourcesPath() { + return location.pathname.replace(/[^\/]*$/, "") + SERVER_LOCATION; +} + +function getAbsoluteServerLocation() { + return getLocalResourcesPath().replace(/resources.*$/,'')+ SERVER_SCRIPT; +} + +function expireCookie(name, expiry_date, path) { + name = name || ""; + expiry_date = expiry_date || "Thu, 01 Jan 1970 00:00:00 UTC"; + path = path || getLocalResourcesPath(); + document.cookie = name + "=; expires=" + expiry_date + "; path=" + path + ";"; +} + +function CookieManager() { + this.initial_cookies = []; +} + +CookieManager.prototype.parse = document_cookies => { + this.initial_cookies = []; + document_cookies = document_cookies.replace(/^Cookie: /, ''); + if (document_cookies != "") { + this.initial_cookies = document_cookies.split(/\s*;\s*/); + } +} + +CookieManager.prototype.diffWith = document_cookies => { + this.actual_cookies = document_cookies; + for (let i in initial_cookies) { + let no_spaces_cookie_regex = + new RegExp(/\s*[\;]*\s/.source + initial_cookies[i]); + this.actual_cookies = actual_cookies.replace(no_spaces_cookie_regex, ''); + } + return this.actual_cookies; +} + +CookieManager.prototype.resetCookies = () => { + expireCookie(/*name=*/""); // If a cookie without keys was accepted, drop it. + if (this.actual_cookies == "") { + return; // There is nothing to reset here. + } + let cookies_to_delete = this.actual_cookies.split(/\s*;\s*/) + for (let i in cookies_to_delete){ + expireCookie(cookies_to_delete[i].replace(/=.*$/, "")); + // Drop cookies with same name that were set to the root path which happens + // for example due to "0010" still failing. + expireCookie(cookies_to_delete[i].replace(/=.*$/, ""), + /*expiry_date=*/null, + /*path=*/'/'); + } +} + +function createCookieTest(file) { + return t => { + const iframe = document.createElement('iframe'); + document.body.appendChild(iframe); + let diff_tool = new CookieManager(); + t.add_cleanup(diff_tool.resetCookies); + return new Promise((resolve, reject) => { + diff_tool.parse(document.cookie); + window.addEventListener("message", t.step_func(e => { + assert_true(!!e.data, "Message contains data") + resolve(e.data); + })); + iframe.src = getAbsoluteServerLocation() + "?file=" + file; + }).then((response) => { + let actual_cookies = diff_tool.diffWith(response.cookies); + let expected_cookies = stripPrefixAndWhitespace(response.expectation); + assert_equals(actual_cookies, expected_cookies); + }); + } +}; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py new file mode 100644 index 00000000000..0418f4b7630 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py @@ -0,0 +1,54 @@ +from os import path; + + +SETUP_FILE_TEMPLATE = "{}-test" +EXPECTATION_FILE_TEMPLATE = "{}-expected" +EXPECTATION_HTML_SCAFFOLD = "iframe-expectation-doc.html.py-str" +DEBUGGING_HTML_SCAFFOLD = "debugging-single-test.html.py-str" +DEFAULT_RESOURCE_DIR = path.join("cookies", "http-state", "resources") +DEFAULT_TEST_DIR = "test-files" + + +def dump_file(directory, filename): + return open(path.join(directory, filename), "r").read() + + +class CookieTestResponse(object): + def __init__(self, file, root): + super(CookieTestResponse, self).__init__() + self.__test_file = SETUP_FILE_TEMPLATE.format(file) + self.__expectation_file = EXPECTATION_FILE_TEMPLATE.format(file) + self.__resources_dir = path.join(root, DEFAULT_RESOURCE_DIR) + self.__test_files_dir = path.join(self.__resources_dir, DEFAULT_TEST_DIR) + + def cookie_setting_header(self): + return dump_file(self.__test_files_dir, self.__test_file) + + def body_with_expectation(self): + html_frame = dump_file(self.__resources_dir, EXPECTATION_HTML_SCAFFOLD) + expected_data = dump_file(self.__test_files_dir, self.__expectation_file); + return html_frame.format(**{'data' : expected_data}) + + +def main(request, response): + if "debug" in request.GET: + response.writer.write_status(200) + response.writer.end_headers() + html_frame = dump_file(path.join(request.doc_root, DEFAULT_RESOURCE_DIR), + DEBUGGING_HTML_SCAFFOLD) + test_file = html_frame % (request.GET['debug']) + response.writer.write_content(test_file) + return; + + if not "file" in request.GET: + response.writer.write_status(404) + response.writer.end_headers() + response.writer.write_content("The 'file' parameter is missing!") + return; + + cookie_response = CookieTestResponse(request.GET['file'], request.doc_root) + + response.writer.write_status(200) + response.writer.write(cookie_response.cookie_setting_header()) + response.writer.end_headers() + response.writer.write_content(cookie_response.body_with_expectation()) diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str b/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str new file mode 100644 index 00000000000..d34ff872c1d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str @@ -0,0 +1,21 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Debug single test</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8"> + + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="cookie-http-state-template.js"></script> + </head> + <body> + <div id="log"></div> + <script> + setup({ explicit_timeout: true }); + + promise_test(createCookieTest("%s"), "DEBUG", { timeout: 3000 }); + + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-content-pushing.js b/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-content-pushing.js new file mode 100644 index 00000000000..99ede2a2582 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-content-pushing.js @@ -0,0 +1,4 @@ +window.top.postMessage({ + "cookies": document.cookie, + "expectation": document.querySelector('#data').innerText +}, "*"); diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-expectation-doc.html.py-str b/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-expectation-doc.html.py-str new file mode 100644 index 00000000000..f2cf31312d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/iframe-expectation-doc.html.py-str @@ -0,0 +1,11 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Cookie Test Expectation Document</title> + </head> + <body> + <div id="data">{data}</div> + <script src="iframe-content-pushing.js"></script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-test new file mode 100644 index 00000000000..bbeb77a029c --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0001-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test new file mode 100644 index 00000000000..a3eaff03ba3 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-expected new file mode 100644 index 00000000000..78e79c2c7c1 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-expected @@ -0,0 +1 @@ +Cookie: foo2=bar2 diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-test new file mode 100644 index 00000000000..62fa1729183 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0003-test @@ -0,0 +1,2 @@ +Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2007 08:04:19 GMT +Set-Cookie: foo2=bar2; Expires=Fri, 07 Aug 2027 08:04:19 GMT diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-test new file mode 100644 index 00000000000..190260d7aba --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0004-test @@ -0,0 +1 @@ +Set-Cookie: foo diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-test new file mode 100644 index 00000000000..4de576a0d72 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0005-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; max-age=10000; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-test new file mode 100644 index 00000000000..83e41ec9baa --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0006-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; max-age=0; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-test new file mode 100644 index 00000000000..af7b6726670 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0007-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; version=1; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-test new file mode 100644 index 00000000000..02baa00dcb2 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0008-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; version=1000; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-test new file mode 100644 index 00000000000..83c83fe1725 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0009-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; customvalue=1000; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-test new file mode 100644 index 00000000000..1408056a8da --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0010-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; secure; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-test new file mode 100644 index 00000000000..ad11eab90df --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0011-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; customvalue="1000 or more"; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-expected new file mode 100644 index 00000000000..b14d4f69b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-expected @@ -0,0 +1 @@ +Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-test new file mode 100644 index 00000000000..cf9e7126e9c --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0012-test @@ -0,0 +1 @@ +Set-Cookie: foo=bar; customvalue="no trailing semicolon" diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-expected new file mode 100644 index 00000000000..266392c144e --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-expected @@ -0,0 +1 @@ +Cookie: foo=qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-test new file mode 100644 index 00000000000..f3c30abd38d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0013-test @@ -0,0 +1,2 @@ +Set-Cookie: foo=bar +Set-Cookie: foo=qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-expected new file mode 100644 index 00000000000..4b162fed7be --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-expected @@ -0,0 +1 @@ +Cookie: foo1=bar; foo2=qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-test new file mode 100644 index 00000000000..6bacc67355f --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0014-test @@ -0,0 +1,2 @@ +Set-Cookie: foo1=bar +Set-Cookie: foo2=qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-expected new file mode 100644 index 00000000000..036ac4aaf50 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-expected @@ -0,0 +1 @@ +Cookie: a=b; z=y diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-test new file mode 100644 index 00000000000..b9a3125839d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0015-test @@ -0,0 +1,2 @@ +Set-Cookie: a=b +Set-Cookie: z=y diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-expected new file mode 100644 index 00000000000..5f1a6fd3c85 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-expected @@ -0,0 +1 @@ +Cookie: z=y; a=b diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-test new file mode 100644 index 00000000000..556592812a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0016-test @@ -0,0 +1,2 @@ +Set-Cookie: z=y +Set-Cookie: a=b diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-expected new file mode 100644 index 00000000000..f3c269c1fb1 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-expected @@ -0,0 +1,2 @@ +Cookie: z=y, a=b + diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-test new file mode 100644 index 00000000000..b8984fea8e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0017-test @@ -0,0 +1 @@ +Set-Cookie: z=y, a=b diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-expected new file mode 100644 index 00000000000..0b549358d06 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-expected @@ -0,0 +1,2 @@ +Cookie: z=y + diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-test new file mode 100644 index 00000000000..630bf9ba9e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0018-test @@ -0,0 +1 @@ +Set-Cookie: z=y; foo=bar, a=b diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-expected new file mode 100644 index 00000000000..ecc95263e4e --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-expected @@ -0,0 +1 @@ +Cookie: foo=b diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-test new file mode 100644 index 00000000000..352123e97ff --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0019-test @@ -0,0 +1 @@ +Set-Cookie: foo=b;max-age=3600, c=d;path=/ diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-expected new file mode 100644 index 00000000000..a43cb004436 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-expected @@ -0,0 +1 @@ +Cookie: a=b; c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-test new file mode 100644 index 00000000000..9b35947f693 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0020-test @@ -0,0 +1,3 @@ +Set-Cookie: a=b +Set-Cookie: = +Set-Cookie: c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-expected new file mode 100644 index 00000000000..a43cb004436 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-expected @@ -0,0 +1 @@ +Cookie: a=b; c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-test new file mode 100644 index 00000000000..5781fe3be02 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0021-test @@ -0,0 +1,3 @@ +Set-Cookie: a=b +Set-Cookie: =x +Set-Cookie: c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-expected new file mode 100644 index 00000000000..5632bec87d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-expected @@ -0,0 +1 @@ +Cookie: a=b; x=; c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-test new file mode 100644 index 00000000000..70b9abf4ef0 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0022-test @@ -0,0 +1,3 @@ +Set-Cookie: a=b +Set-Cookie: x= +Set-Cookie: c=d diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-test new file mode 100644 index 00000000000..609c6680b82 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0023-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-test new file mode 100644 index 00000000000..31dd69f052d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0024-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: = diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-test new file mode 100644 index 00000000000..09f51a85bcc --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0025-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: ; bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-test new file mode 100644 index 00000000000..609c6680b82 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0026-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-expected new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-expected diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-test new file mode 100644 index 00000000000..f7f6d267bb4 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0027-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-expected new file mode 100644 index 00000000000..609c6680b82 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-expected @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-test new file mode 100644 index 00000000000..609c6680b82 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0028-test @@ -0,0 +1,2 @@ +Set-Cookie: foo +Set-Cookie: diff --git a/tests/wpt/web-platform-tests/css/CSS2/backgrounds/background-attachment-004.xht b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/background-attachment-004.xht index 9bf2fd0490b..d738fc8735c 100644 --- a/tests/wpt/web-platform-tests/css/CSS2/backgrounds/background-attachment-004.xht +++ b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/background-attachment-004.xht @@ -8,8 +8,8 @@ <meta name="flags" content="interact"/> <style type="text/css"> * { background: transparent; } - body { background: transparent url(http://www.hixie.ch/resources/images/astrophy/128) no-repeat fixed center; } - .a { background: transparent url(http://www.hixie.ch/resources/images/astrophy/830) no-repeat fixed center; height: 100px; } + body { background: transparent url(support/cat-128.png) no-repeat fixed center; } + .a { background: transparent url(support/cat-830.png) no-repeat fixed center; height: 100px; } pre { font: 100 24px/2 Arial, sans-serif; letter-spacing: 1em; word-spacing: 1.2em; margin: 1em; } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-128.png b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-128.png Binary files differnew file mode 100644 index 00000000000..a7b61bced86 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-128.png diff --git a/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-830.png b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-830.png Binary files differnew file mode 100644 index 00000000000..34c4f5b2a27 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/backgrounds/support/cat-830.png diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-child-with-margins.html b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-child-with-margins.html new file mode 100644 index 00000000000..f65f314a2f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-child-with-margins.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Child of block with clear</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property"> +<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> +<p>Test passes if there is a filled green square.</p> +<div style="position:relative; top:-20px;"> + <div style="float:left; margin-top:20px; width:50px; height:50px; background:green;"></div> + <div style="padding-top:1px;"> + <div style="margin-top:19px; width:100px; background:green;"> + <div style="clear:left; margin-top:25px; width:100px; height:50px; background:green;"></div> + </div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-and-child.html b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-and-child.html new file mode 100644 index 00000000000..d7dc26f30a8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-and-child.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>Child of block with clear</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property"> +<link rel="match" href="../../reference/ref-filled-green-200px-square.html"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="container" style="overflow:hidden; width:200px; height:200px; background:red;"> + <div style="float:left; width:10px; height:50px;"></div> + <div style="float:right; width:10px; height:100px;"></div> + <div style="clear:right;"> + <div style="clear:left; height:200px; background:green;"></div> + </div> + <div style="height:10000px;"></div> +</div> +<script> + document.getElementById("container").scrollTop = 100; +</script> diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html new file mode 100644 index 00000000000..29ecc78f455 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins-no-clearance.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>Child of block with clear</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property"> +<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> +<p>Test passes if there is a filled green square.</p> +<div style="position:relative; z-index:-1; top:-50px; width:100px; background:green;"> + <div style="float:left; width:100px; height:50px; background:white;"></div> + <div style="clear:left; margin-top:25px;"> + <div style="height:50px; margin-top:150px; background:white;"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins.html b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins.html new file mode 100644 index 00000000000..9b331d5e4ca --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent-with-margins.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>Child of block with clear</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property"> +<link rel="match" href="../../reference/ref-filled-green-200px-square.html"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="width:200px; height:200px; background:red;"> + <div style="float:left; width:200px; height:100px; background:green;"></div> + <div style="clear:left; margin-top:100px;"> + <div style="height:100px; margin-top:-1000px; background:green;"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent.html b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent.html new file mode 100644 index 00000000000..755cd788095 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats-clear/clear-on-parent.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>Child of block with clear</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property"> +<link rel="match" href="../../reference/ref-filled-green-200px-square.html"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="width:200px; height:200px; background:red;"> + <div style="float:left; width:200px; height:100px; background:green;"></div> + <div style="clear:left;"> + <div style="height:100px; background:green;"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/fractional-line-height.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/fractional-line-height.html new file mode 100644 index 00000000000..0b748072b7e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/fractional-line-height.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>Container height calculation with fractional line height and fractional child height</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#line-height" title="10.8 Line height calculations: the 'line-height' and 'vertical-align' properties"> +<link rel="match" href="../../reference/nothing.html"> +<style> + .container { float:left; overflow:auto; width:50px; } + .container > span { display:inline-block; width:10px; } +</style> +<p>There should be nothing below.</p> + +<!-- None of these should not trigger a vertical scrollbar, because the height + of the overflow:auto container is auto, so it should make room for + whatever's inside. --> + +<div class="container" style="line-height:19.75px;"> + <span style="height:100.25px;"></span> +</div> + +<div class="container" style="line-height:19.75px;"> + <span style="height:100.75px;"></span> +</div> + +<div class="container" style="line-height:19.25px;"> + <span style="height:100.25px;"></span> +</div> + +<div class="container" style="line-height:19.25px;"> + <span style="height:100.75px;"></span> +</div> diff --git a/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-max-height.html b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-max-height.html new file mode 100644 index 00000000000..8a2fbb28ac9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-max-height.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>Unresolvable percentage min-height</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#min-max-heights" title="10.7 Minimum and maximum heights: 'min-height' and 'max-height'"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<div id="container" style="width:100px; height:30000px; max-height:100%;" data-expected-height="30000"> + <div style="height:12345px;"></div> +</div> +<script> + checkLayout("#container"); +</script> diff --git a/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-min-height.html b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-min-height.html new file mode 100644 index 00000000000..5201eddb211 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/unresolvable-min-height.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Unresolvable percentage min-height</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#min-max-heights" title="10.7 Minimum and maximum heights: 'min-height' and 'max-height'"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<p>There should be a blue square below.</p> +<div id="container" style="width:100px; max-height:100px; min-height:100%; background:blue;" data-expected-height="100"> + <div style="height:300px;"></div> +</div> +<script> + checkLayout("#container"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-align/OWNERS b/tests/wpt/web-platform-tests/css/css-align/OWNERS new file mode 100644 index 00000000000..e9c4f6b9710 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-align/OWNERS @@ -0,0 +1,2 @@ +@dholbert +@emilio diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/column-gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/column-gap-parsing-001.html index f0bcea4d98d..a0a92a911e2 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/column-gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/column-gap-parsing-001.html @@ -11,6 +11,7 @@ #columnGapVw { column-gap: 2vw; } #columnGapPercent { column-gap: 15%; } #columnGapCalc { column-gap: calc(10px + 4px); } + #columnGapCalcFixedPercent { column-gap: calc(5px + 10%); } .columnGapInitial { column-gap: initial; } .columnGapInherit { column-gap: inherit; } @@ -31,6 +32,7 @@ <div id="columnGapVw"></div> <div id="columnGapPercent"></div> <div id="columnGapCalc"></div> + <div id="columnGapCalcFixedPercent"></div> <div id="columnGapInitial" class="columnGapInitial"></div> <div class="columnGapPx"> <div id="columnGapInitialPx" class="columnGapInitial"></div> @@ -83,6 +85,11 @@ }, "column-gap accepts calc()"); test( function(){ + var target = document.getElementById("columnGapCalcFixedPercent"); + assert_equals(getComputedStyle(target).columnGap, "calc(5px + 10%)"); + }, "column-gap accepts calc() mixing fixed and percentage values"); + test( + function(){ var target = document.getElementById("columnGapInitial"); assert_equals(getComputedStyle(target).columnGap, "normal"); }, "Initial column-gap is 'normal'"); diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/gap-parsing-001.html index 48856128184..0a2a9bda7c6 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/gap-parsing-001.html @@ -16,6 +16,7 @@ #gapPercent { gap: 15%; } #gapPercentTwo { gap: 15% 10%; } #gapCalc { gap: calc(10px + 4px); } + #gapCalcFixedPercent { gap: calc(5px + 10%); } #gapCalcTwo { gap: calc(10px + 4px) calc(20px - 8px); } .gapInitial { gap: initial; } .gapInherit { gap: inherit; } @@ -44,6 +45,7 @@ <div id="gapPercent"></div> <div id="gapPercentTwo"></div> <div id="gapCalc"></div> + <div id="gapCalcFixedPercent"></div> <div id="gapCalcTwo"></div> <div id="gapInitial" class="gapInitial"></div> <div class="gapPx"> @@ -137,6 +139,12 @@ }, "gap accepts calc()"); test( function(){ + var target = document.getElementById("gapCalcFixedPercent"); + assert_equals(getComputedStyle(target).rowGap, "calc(5px + 10%)"); + assert_equals(getComputedStyle(target).columnGap, "calc(5px + 10%)"); + }, "gap accepts calc() mixing fixed and percentage values"); + test( + function(){ var target = document.getElementById("gapCalcTwo"); assert_equals(getComputedStyle(target).rowGap, "14px"); assert_equals(getComputedStyle(target).columnGap, "12px"); diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001.html index a552463950c..66d81998b66 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001.html @@ -1,26 +1,27 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Box Alignment Test: column-gap parsing</title> +<title>CSS Box Alignment Test: grid-column-gap parsing</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-legacy"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> - .columnGapPx { column-gap: 12px; } - #columnGapEm { column-gap: 2em; font: 10px/1 Monospace; } - #columnGapVw { column-gap: 2vw; } - #columnGapPercent { column-gap: 15%; } - #columnGapCalc { column-gap: calc(10px + 4px); } - .columnGapInitial { column-gap: initial; } - .columnGapInherit { column-gap: inherit; } + .columnGapPx { grid-column-gap: 12px; } + #columnGapEm { grid-column-gap: 2em; font: 10px/1 Monospace; } + #columnGapVw { grid-column-gap: 2vw; } + #columnGapPercent { grid-column-gap: 15%; } + #columnGapCalc { grid-column-gap: calc(10px + 4px); } + #columnGapCalcFixedPercent { grid-column-gap: calc(5px + 10%); } + .columnGapInitial { grid-column-gap: initial; } + .columnGapInherit { grid-column-gap: inherit; } - #invalidColumnGapNegative { column-gap: -10px; } - #invalidColumnGapMaxContent { column-gap: max-content; } - #invalidColumnGapNone { column-gap: none; } - #invalidColumnGapMultiple { column-gap: 10px 1px; } - #invalidColumnGapAngle { column-gap: 3rad; } - #invalidColumnGapResolution { column-gap: 2dpi; } - #invalidColumnGapTime { column-gap: 200ms; } + #invalidColumnGapNegative { grid-column-gap: -10px; } + #invalidColumnGapMaxContent { grid-column-gap: max-content; } + #invalidColumnGapNone { grid-column-gap: none; } + #invalidColumnGapMultiple { grid-column-gap: 10px 1px; } + #invalidColumnGapAngle { grid-column-gap: 3rad; } + #invalidColumnGapResolution { grid-column-gap: 2dpi; } + #invalidColumnGapTime { grid-column-gap: 200ms; } </style> <body> <div id="log"></div> @@ -31,6 +32,7 @@ <div id="columnGapVw"></div> <div id="columnGapPercent"></div> <div id="columnGapCalc"></div> + <div id="columnGapCalcFixedPercent"></div> <div id="columnGapInitial" class="columnGapInitial"></div> <div class="columnGapPx"> <div id="columnGapInitialPx" class="columnGapInitial"></div> @@ -53,91 +55,96 @@ function(){ var target = document.getElementById("default"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Default column-gap is 'normal'"); + }, "Default grid-column-gap is 'normal'"); test( function(){ var target = document.getElementById("columnGapPx"); assert_equals(getComputedStyle(target).columnGap, "12px"); - }, "column-gap accepts pixels"); + }, "grid-column-gap accepts pixels"); test( function(){ var target = document.getElementById("columnGapEm"); assert_equals(getComputedStyle(target).columnGap, "20px"); - }, "column-gap accepts em"); + }, "grid-column-gap accepts em"); test( function(){ var target = document.getElementById("columnGapVw"); // The columnGap size would depend on the viewport width, so to make the test pass // in any window size we just check it's not "normal". assert_not_equals(getComputedStyle(target).columnGap, "normal"); - }, "column-gap accepts vw"); + }, "grid-column-gap accepts vw"); test( function(){ var target = document.getElementById("columnGapPercent"); assert_equals(getComputedStyle(target).columnGap, "15%"); - }, "column-gap accepts percentage"); + }, "grid-column-gap accepts percentage"); test( function(){ var target = document.getElementById("columnGapCalc"); assert_equals(getComputedStyle(target).columnGap, "14px"); - }, "column-gap accepts calc()"); + }, "grid-column-gap accepts calc()"); + test( + function(){ + var target = document.getElementById("columnGapCalcFixedPercent"); + assert_equals(getComputedStyle(target).columnGap, "calc(5px + 10%)"); + }, "grid-column-gap accepts calc() mixing fixed and percentage values"); test( function(){ var target = document.getElementById("columnGapInitial"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial column-gap is 'normal'"); + }, "Initial grid-column-gap is 'normal'"); test( function(){ var target = document.getElementById("columnGapInitialPx"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial column-gap is 'normal' 2"); + }, "Initial grid-column-gap is 'normal' 2"); test( function(){ var target = document.getElementById("columnGapInherit"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial inherited column-gap is 'normal'"); + }, "Initial inherited grid-column-gap is 'normal'"); test( function(){ var target = document.getElementById("columnGapInheritPx"); assert_equals(getComputedStyle(target).columnGap, "12px"); - }, "column-gap is inheritable"); + }, "grid-column-gap is inheritable"); test( function(){ var target = document.getElementById("invalidColumnGapNegative"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Negative column-gap is invalid"); + }, "Negative grid-column-gap is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapMaxContent"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "'max-content' column-gap is invalid"); + }, "'max-content' grid-column-gap is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapNone"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "'none' column-gap is invalid"); + }, "'none' grid-column-gap is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapMultiple"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "column-gap with multiple values is invalid"); + }, "grid-column-gap with multiple values is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapAngle"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Angle column-gap is invalid"); + }, "Angle grid-column-gap is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapResolution"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Resolution column-gap is invalid"); + }, "Resolution grid-column-gap is invalid"); test( function(){ var target = document.getElementById("invalidColumnGapTime"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Time column-gap is invalid"); + }, "Time grid-column-gap is invalid"); </script> </body> diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-gap-parsing-001.html index 614b23a7a4f..aa43f772996 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-gap-parsing-001.html @@ -16,6 +16,7 @@ #gapPercent { grid-gap: 15%; } #gapPercentTwo { grid-gap: 15% 10%; } #gapCalc { grid-gap: calc(10px + 4px); } + #gapCalcFixedPercent { grid-gap: calc(5px + 10%); } #gapCalcTwo { grid-gap: calc(10px + 4px) calc(20px - 8px); } .gapInitial { grid-gap: initial; } .gapInherit { grid-gap: inherit; } @@ -44,6 +45,7 @@ <div id="gapPercent"></div> <div id="gapPercentTwo"></div> <div id="gapCalc"></div> + <div id="gapCalcFixedPercent"></div> <div id="gapCalcTwo"></div> <div id="gapInitial" class="gapInitial"></div> <div class="gapPx"> @@ -70,37 +72,37 @@ var target = document.getElementById("default"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Default gap is 'normal'"); + }, "Default grid-gap is 'normal'"); test( function(){ var target = document.getElementById("gapPx"); assert_equals(getComputedStyle(target).rowGap, "12px"); assert_equals(getComputedStyle(target).columnGap, "12px"); - }, "gap accepts pixels"); + }, "grid-gap accepts pixels"); test( function(){ var target = document.getElementById("gapPxTwo"); assert_equals(getComputedStyle(target).rowGap, "12px"); assert_equals(getComputedStyle(target).columnGap, "8px"); - }, "gap accepts pixels 2"); + }, "grid-gap accepts pixels 2"); test( function(){ var target = document.getElementById("gapPxPercent"); assert_equals(getComputedStyle(target).rowGap, "12px"); assert_equals(getComputedStyle(target).columnGap, "10%"); - }, "gap accepts pixels combined with percentage"); + }, "grid-gap accepts pixels combined with percentage"); test( function(){ var target = document.getElementById("gapEm"); assert_equals(getComputedStyle(target).rowGap, "20px"); assert_equals(getComputedStyle(target).columnGap, "20px"); - }, "gap accepts em"); + }, "grid-gap accepts em"); test( function(){ var target = document.getElementById("gapEmTwo"); assert_equals(getComputedStyle(target).rowGap, "20px"); assert_equals(getComputedStyle(target).columnGap, "40px"); - }, "gap accepts em 2"); + }, "grid-gap accepts em 2"); test( function(){ var target = document.getElementById("gapVw"); @@ -108,7 +110,7 @@ // in any window size we just check it's not "normal". assert_not_equals(getComputedStyle(target).rowGap, "normal"); assert_not_equals(getComputedStyle(target).columnGap, "normal"); - }, "gap accepts vw"); + }, "grid-gap accepts vw"); test( function(){ var target = document.getElementById("gapVwTwo"); @@ -116,110 +118,116 @@ // in any window size we just check it's not "normal". assert_not_equals(getComputedStyle(target).rowGap, "normal"); assert_not_equals(getComputedStyle(target).columnGap, "normal"); - }, "gap accepts vw and vh"); + }, "grid-gap accepts vw and vh"); test( function(){ var target = document.getElementById("gapPercent"); assert_equals(getComputedStyle(target).rowGap, "15%"); assert_equals(getComputedStyle(target).columnGap, "15%"); - }, "gap accepts percentage"); + }, "grid-gap accepts percentage"); test( function(){ var target = document.getElementById("gapPercentTwo"); assert_equals(getComputedStyle(target).rowGap, "15%"); assert_equals(getComputedStyle(target).columnGap, "10%"); - }, "gap accepts percentage 2"); + }, "grid-gap accepts percentage 2"); test( function(){ var target = document.getElementById("gapCalc"); assert_equals(getComputedStyle(target).rowGap, "14px"); assert_equals(getComputedStyle(target).columnGap, "14px"); - }, "gap accepts calc()"); + }, "grid-gap accepts calc()"); + test( + function(){ + var target = document.getElementById("gapCalcFixedPercent"); + assert_equals(getComputedStyle(target).rowGap, "calc(5px + 10%)"); + assert_equals(getComputedStyle(target).columnGap, "calc(5px + 10%)"); + }, "grid-gap accepts calc() mixing fixed and percentage values"); test( function(){ var target = document.getElementById("gapCalcTwo"); assert_equals(getComputedStyle(target).rowGap, "14px"); assert_equals(getComputedStyle(target).columnGap, "12px"); - }, "gap accepts calc() 2"); + }, "grid-gap accepts calc() 2"); test( function(){ var target = document.getElementById("gapInitial"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial gap is 'normal'"); + }, "Initial grid-gap is 'normal'"); test( function(){ var target = document.getElementById("gapInitialPx"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial gap is 'normal' 2"); + }, "Initial grid-gap is 'normal' 2"); test( function(){ var target = document.getElementById("gapInherit"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Initial inherited gap is 'normal'"); + }, "Initial inherited grid-gap is 'normal'"); test( function(){ var target = document.getElementById("gapInheritPx"); assert_equals(getComputedStyle(target).rowGap, "12px"); assert_equals(getComputedStyle(target).columnGap, "12px"); - }, "gap is inheritable"); + }, "grid-gap is inheritable"); test( function(){ var target = document.getElementById("invalidGridGapNegative"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Negative gap is invalid"); + }, "Negative grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapMaxContent"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "'max-content' gap is invalid"); + }, "'max-content' grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapNone"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "'none' gap is invalid"); + }, "'none' grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapAngle"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Angle gap is invalid"); + }, "Angle grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapResolution"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Resolution gap is invalid"); + }, "Resolution grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapTime"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "Time gap is invalid"); + }, "Time grid-gap is invalid"); test( function(){ var target = document.getElementById("invalidGridGapThree"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "gap with three values is invalid"); + }, "grid-gap with three values is invalid"); test( function(){ var target = document.getElementById("invalidGridGapSlash"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "gap with slash is invalid"); + }, "grid-gap with slash is invalid"); test( function(){ var target = document.getElementById("invalidGridGapOneWrong"); assert_equals(getComputedStyle(target).rowGap, "normal"); assert_equals(getComputedStyle(target).columnGap, "normal"); - }, "gap with one wrong value is invalid"); + }, "grid-gap with one wrong value is invalid"); </script> </body> diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001.html index 9dc8c8da59a..e394ea1446b 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001.html @@ -1,26 +1,27 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Box Alignment Test: row-gap parsing</title> +<title>CSS Box Alignment Test: grid-row-gap parsing</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-legacy"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> - .rowGapPx { row-gap: 12px; } - #rowGapEm { row-gap: 2em; font: 10px/1 Monospace; } - #rowGapVw { row-gap: 2vw; } - #rowGapPercent { row-gap: 15%; } - #rowGapCalc { row-gap: calc(10px + 4px); } - .rowGapInitial { row-gap: initial; } - .rowGapInherit { row-gap: inherit; } + .rowGapPx { grid-row-gap: 12px; } + #rowGapEm { grid-row-gap: 2em; font: 10px/1 Monospace; } + #rowGapVw { grid-row-gap: 2vw; } + #rowGapPercent { grid-row-gap: 15%; } + #rowGapCalc { grid-row-gap: calc(10px + 4px); } + #rowGapCalcFixedPercent { grid-row-gap: calc(5px + 10%); } + .rowGapInitial { grid-row-gap: initial; } + .rowGapInherit { grid-row-gap: inherit; } - #invalidRowGapNegative { row-gap: -10px; } - #invalidRowGapMaxContent { row-gap: max-content; } - #invalidRowGapNone { row-gap: none; } - #invalidRowGapMultiple { row-gap: 10px 1px; } - #invalidRowGapAngle { row-gap: 3rad; } - #invalidRowGapResolution { row-gap: 2dpi; } - #invalidRowGapTime { row-gap: 200ms; } + #invalidRowGapNegative { grid-row-gap: -10px; } + #invalidRowGapMaxContent { grid-row-gap: max-content; } + #invalidRowGapNone { grid-row-gap: none; } + #invalidRowGapMultiple { grid-row-gap: 10px 1px; } + #invalidRowGapAngle { grid-row-gap: 3rad; } + #invalidRowGapResolution { grid-row-gap: 2dpi; } + #invalidRowGapTime { grid-row-gap: 200ms; } </style> <body> <div id="log"></div> @@ -31,6 +32,7 @@ <div id="rowGapVw"></div> <div id="rowGapPercent"></div> <div id="rowGapCalc"></div> + <div id="rowGapCalcFixedPercent"></div> <div id="rowGapInitial" class="rowGapInitial"></div> <div class="rowGapPx"> <div id="rowGapInitialPx" class="rowGapInitial"></div> @@ -53,91 +55,96 @@ function(){ var target = document.getElementById("default"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Default row-gap is 'normal'"); + }, "Default grid-row-gap is 'normal'"); test( function(){ var target = document.getElementById("rowGapPx"); assert_equals(getComputedStyle(target).rowGap, "12px"); - }, "row-gap accepts pixels"); + }, "grid-row-gap accepts pixels"); test( function(){ var target = document.getElementById("rowGapEm"); assert_equals(getComputedStyle(target).rowGap, "20px"); - }, "row-gap accepts em"); + }, "grid-row-gap accepts em"); test( function(){ var target = document.getElementById("rowGapVw"); // The rowGap size would depend on the viewport width, so to make the test pass // in any window size we just check it's not "normal". assert_not_equals(getComputedStyle(target).rowGap, "normal"); - }, "row-gap accepts vw"); + }, "grid-row-gap accepts vw"); test( function(){ var target = document.getElementById("rowGapPercent"); assert_equals(getComputedStyle(target).rowGap, "15%"); - }, "row-gap accepts percentage"); + }, "grid-row-gap accepts percentage"); test( function(){ var target = document.getElementById("rowGapCalc"); assert_equals(getComputedStyle(target).rowGap, "14px"); - }, "row-gap accepts calc()"); + }, "grid-row-gap accepts calc()"); + test( + function(){ + var target = document.getElementById("rowGapCalcFixedPercent"); + assert_equals(getComputedStyle(target).rowGap, "calc(5px + 10%)"); + }, "grid-row-gap accepts calc() mixing fixed and percentage values"); test( function(){ var target = document.getElementById("rowGapInitial"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Initial row-gap is 'normal'"); + }, "Initial grid-row-gap is 'normal'"); test( function(){ var target = document.getElementById("rowGapInitialPx"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Initial row-gap is 'normal' 2"); + }, "Initial grid-row-gap is 'normal' 2"); test( function(){ var target = document.getElementById("rowGapInherit"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Initial inherited row-gap is 'normal'"); + }, "Initial inherited grid-row-gap is 'normal'"); test( function(){ var target = document.getElementById("rowGapInheritPx"); assert_equals(getComputedStyle(target).rowGap, "12px"); - }, "row-gap is inheritable"); + }, "grid-row-gap is inheritable"); test( function(){ var target = document.getElementById("invalidRowGapNegative"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Negative row-gap is invalid"); + }, "Negative grid-row-gap is invalid"); test( function(){ var target = document.getElementById("invalidRowGapMaxContent"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "'max-content' row-gap is invalid"); + }, "'max-content' grid-row-gap is invalid"); test( function(){ var target = document.getElementById("invalidRowGapNone"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "'none' row-gap is invalid"); + }, "'none' grid-row-gap is invalid"); test( function(){ var target = document.getElementById("invalidRowGapMultiple"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "row-gap with multiple values is invalid"); + }, "grid-row-gap with multiple values is invalid"); test( function(){ var target = document.getElementById("invalidRowGapAngle"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Angle row-gap is invalid"); + }, "Angle grid-row-gap is invalid"); test( function(){ var target = document.getElementById("invalidRowGapResolution"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Resolution row-gap is invalid"); + }, "Resolution grid-row-gap is invalid"); test( function(){ var target = document.getElementById("invalidRowGapTime"); assert_equals(getComputedStyle(target).rowGap, "normal"); - }, "Time row-gap is invalid"); + }, "Time grid-row-gap is invalid"); </script> </body> diff --git a/tests/wpt/web-platform-tests/css/css-align/gaps/row-gap-parsing-001.html b/tests/wpt/web-platform-tests/css/css-align/gaps/row-gap-parsing-001.html index 6de848c3c2a..71b971d3a8a 100644 --- a/tests/wpt/web-platform-tests/css/css-align/gaps/row-gap-parsing-001.html +++ b/tests/wpt/web-platform-tests/css/css-align/gaps/row-gap-parsing-001.html @@ -11,6 +11,7 @@ #rowGapVw { row-gap: 2vw; } #rowGapPercent { row-gap: 15%; } #rowGapCalc { row-gap: calc(10px + 4px); } + #rowGapCalcFixedPercent { row-gap: calc(5px + 10%); } .rowGapInitial { row-gap: initial; } .rowGapInherit { row-gap: inherit; } @@ -31,6 +32,7 @@ <div id="rowGapVw"></div> <div id="rowGapPercent"></div> <div id="rowGapCalc"></div> + <div id="rowGapCalcFixedPercent"></div> <div id="rowGapInitial" class="rowGapInitial"></div> <div class="rowGapPx"> <div id="rowGapInitialPx" class="rowGapInitial"></div> @@ -83,6 +85,11 @@ }, "row-gap accepts calc()"); test( function(){ + var target = document.getElementById("rowGapCalcFixedPercent"); + assert_equals(getComputedStyle(target).rowGap, "calc(5px + 10%)"); + }, "row-gap accepts calc() mixing fixed and percentage values"); + test( + function(){ var target = document.getElementById("rowGapInitial"); assert_equals(getComputedStyle(target).rowGap, "normal"); }, "Initial row-gap is 'normal'"); diff --git a/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html b/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html new file mode 100644 index 00000000000..037e62f9949 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>Font Loading API IDL tests</title> +<link rel="help" href="https://drafts.csswg.org/css-font-loading/#fontfacesetloadevent"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="/resources/idlharness.js"></script> +<script> +"use strict"; + +function doTest([dom, cssfontloading]) { + const idl_array = new IdlArray(); + idl_array.add_untested_idls(dom); + idl_array.add_untested_idls("[Exposed=Worker] interface WorkerGlobalScope : EventTarget { };"); + idl_array.add_objects({Document: ["document"]}); + idl_array.add_idls(cssfontloading); + idl_array.test(); +} + +function fetchText(url) { + return fetch(url).then((response) => response.text()); +} + +promise_test(() => { + return Promise.all([ + "/interfaces/dom.idl", + "/interfaces/css-font-loading.idl", + ].map(fetchText)).then(doTest); +}, "Test IDL implementation of CSS Font Loading"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/calc-in-font-variation-settings.html b/tests/wpt/web-platform-tests/css/css-fonts/calc-in-font-variation-settings.html new file mode 100644 index 00000000000..1a7c59abd5d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/calc-in-font-variation-settings.html @@ -0,0 +1,19 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Test: calc() function in font-variation-settings</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +#test { + font-variation-settings: "XHGT" calc(0.7); +} +</style> +<div id="test"></div> +<script> +const div = document.querySelector("#test"); +test(function() { + assert_equals(getComputedStyle(div).fontVariationSettings, "\"XHGT\" 0.7"); +}, "calc() in font-variation-settings"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-containing-block-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-containing-block-001.html index a447ead37f5..e456af8ce0a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-containing-block-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-containing-block-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks the behavior of the absolutely positioned elements with a grid container as containing block."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html index 82e60635499..e798b80d9d0 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks the behavior of the absolutely positioned elements with a grid container as parent."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-paint-positioned-children-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-paint-positioned-children-001.html index 7528b084c8a..ae074da1af5 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-paint-positioned-children-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-paint-positioned-children-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="match" href="grid-paint-positioned-children-001-ref.html"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { border: 2px solid black; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001-ref.html index 3610cd3bfc7..e8ab2426c84 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8"> <title>CSS Grid Layout Test: Grid positioned children writing modes reference test</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001.html index b92263956ab..eb855279ca8 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-children-writing-modes-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="match" href="grid-positioned-children-writing-modes-001-ref.html"> <meta name="assert" content="This test checks the behavior of the positioned grid children in combination with the writing modes and text direction properties."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html index 849567c600a..81ea909d029 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items don't avoid auto-fit tracks to collapse."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html index 7271081ea6f..27fc722e6c3 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks tracks before the first in-flow item also collapse and positioned items don't have any impact."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html index 05ac15dd289..1c893392a4b 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items will use the area defined by the in-flow items, ignoring any collapsed track."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html index 13b29ea9c53..54b2ff79027 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items ignore collapsed gaps."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html index 70695c4e128..56f870f4ec0 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items ignore collapsed gaps, both before and after the first in-flow item ."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html index 5b792205ab3..e301d349376 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items ignore collapsed gaps but consider those between in-flow items inside their grid area."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 200px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html index 1f9958029cc..8c4621627fd 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-repeat" title="7.2.2.2. Repeat-to-fill: auto-fill and auto-fit repetitions"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> <meta name="assert" content="This test checks that positioned items ignore collapsed gaps even with non-empty tracks before and after."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .container { width: 250px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-001.html index 2b299cd5dae..19ee662e04e 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="match" href="grid-positioned-items-background-001-ref.html"> <meta name="assert" content="This test checks that the background of positioned items is painted in the right position"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-rtl-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-rtl-001.html index 50741e2fe6b..9ed046b4215 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-rtl-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-background-rtl-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="match" href="grid-positioned-items-background-rtl-001-ref.html"> <meta name="assert" content="This test checks that the background of positioned items is painted in the right position using RTL direction."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html index 80b795dcc58..ebff62aae9a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align" title="10.5. Aligning the Grid: the justify-content and align-content properties"> <meta name="assert" content="This test checks the behavior of the positioned items in a grid using content alignment."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <link rel="stylesheet" href="../../support/alignment.css"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html index ad9147e22a1..628a63c7e79 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align" title="10.5. Aligning the Grid: the justify-content and align-content properties"> <meta name="assert" content="This test checks the behavior of the positioned items in a grid using content alignment in RTL."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <link rel="stylesheet" href="../../support/alignment.css"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-001.html index e1adc6b713b..b9f3343ea92 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#gutters" title="10.1. Gutters: the row-gap, column-gap, and gap properties"> <meta name="assert" content="This test checks the behavior of the positioned items in a grid container with gaps."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-rtl-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-rtl-001.html index 4a6cd881b19..16ab39df9fb 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-rtl-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-gaps-rtl-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#gutters" title="10.1. Gutters: the row-gap, column-gap, and gap properties"> <meta name="assert" content="This test checks the behavior of the positioned items in a grid container with gaps in RTL."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-001.html index 6d62088435e..71f096aa74b 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#implicit-grids" title="7.5. The Implicit Grid"> <meta name="assert" content="This test checks the behavior of the absolutely positioned grid items placed on the implicit grid."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-line-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-line-001.html index f0f98d2d682..7b8fa4ef7bd 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-line-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-implicit-grid-line-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#implicit-grids" title="7.5. The Implicit Grid"> <meta name="assert" content="This test checks that grid placement properties of absolutely positioned items using implicit grid lines are treated as 'auto'."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html index a0ccd1ef78c..4941d77a71a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks that positioned grid items can be placed directly on the padding."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html index a50e12abdf5..24d9d769f99 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks that grid placement properties of absolutely positioned items using unknown named grid lines are treated as 'auto'."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-within-grid-implicit-track-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-within-grid-implicit-track-001.html index fb9cad16847..5a31c35f208 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-within-grid-implicit-track-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-positioned-items-within-grid-implicit-track-001.html @@ -5,7 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#implicit-grids" title="7.5. The Implicit Grid"> <meta name="assert" content="This test checks that positioned grid items are placed properly (including implicit tracks) even if the grid has implicit tracks."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-sizing-positioned-items-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-sizing-positioned-items-001.html index 2acae44e768..0e8cd3369f7 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-sizing-positioned-items-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/grid-sizing-positioned-items-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks the different size options for absolutely positioned grid items."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-create-implicit-tracks-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-create-implicit-tracks-001.html index 56aa0e15e5c..5ef006ae137 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-create-implicit-tracks-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-create-implicit-tracks-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks that positioned items shouldn't create implicit tracks on the grid."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-take-up-space-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-take-up-space-001.html index a6834cb0d59..597e778019b 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-take-up-space-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-should-not-take-up-space-001.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning"> <meta name="assert" content="This test checks that positioned items shouldn't take up space or otherwise participate in the layout of the grid."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001-ref.html index a468863543f..2ded937ad4b 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001-ref.html @@ -3,7 +3,7 @@ <title>CSS Grid Layout Test: Positioned grid items sizing reference file</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <meta name="flags" content="ahem"> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001.html b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001.html index ae128064f1d..4f849575f0a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/positioned-grid-items-sizing-001.html @@ -6,7 +6,7 @@ <link rel="match" href="positioned-grid-items-sizing-001-ref.html"> <meta name="assert" content="This test checks that the sizing of positioned grid items without specific dimensions or offsets is equivalent to the size of regular items."> <meta name="flags" content="ahem"> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/support/grid.css b/tests/wpt/web-platform-tests/css/css-grid/abspos/support/grid.css index 602e114880a..602e114880a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/support/grid.css +++ b/tests/wpt/web-platform-tests/css/css-grid/abspos/support/grid.css diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-011.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-011.html new file mode 100644 index 00000000000..daeba00aee1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-011.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Support for calc mixing fixed and percentage values for gap</title> +<link rel="help" href="https://www.w3.org/TR/css-grid-1/#gutters"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-shorthand"> +<link rel="match" href="../reference/grid-different-gutters-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> + #grid { + display: grid; + width: 200px; + height: 220px; + gap: calc(15% + 7px) calc(10px + 5%); + grid-template-columns: 90px 90px; + grid-template-rows: 90px 90px; + background-color: green; + } + + #grid > div { + background-color: silver; + } +</style> + +<p>The test passes if it has the same visual effect as reference.</p> +<div id="grid"> + <div></div> + <div></div> + <div></div> + <div></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-012.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-012.html new file mode 100644 index 00000000000..1e56e708dfb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-gutters-012.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Support for calc mixing fixed and percentage values for grid-gap as alias for gap</title> +<link rel="help" href="https://www.w3.org/TR/css-grid-1/#gutters"> +<link rel="help" href="https://www.w3.org/TR/css-align-3/#gap-shorthand"> +<link rel="help" href0"https://www.w3.org/TR/css-align-3/#gap-legacy"> +<link rel="match" href="../reference/grid-different-gutters-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> + #grid { + display: grid; + width: 200px; + height: 220px; + grid-gap: calc(15% + 7px) calc(10px + 5%); + grid-template-columns: 90px 90px; + grid-template-rows: 90px 90px; + background-color: green; + } + + #grid > div { + background-color: silver; + } +</style> + +<p>The test passes if it has the same visual effect as reference.</p> +<div id="grid"> + <div></div> + <div></div> + <div></div> + <div></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001.html index d08712d30d2..9441b0a439e 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001.html @@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-grid-1/#track-sizing"> <meta name="assert" content="This test checks that grid-template-{rows|columns} with fit-content() tracks recomputes the tracks when the fit-content() argument is modified."> <meta name="flags" content="ahem"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { width: fit-content; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-ref.html index cb7a582ab10..f90bd047993 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-ref.html @@ -3,7 +3,7 @@ <meta charset="utf-8"> <title>CSS Grid Layout Test: grid-template-columns fit-content() reference file</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <meta name="flags" content="ahem"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html index d492d4585f8..c594d805e64 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html @@ -7,7 +7,7 @@ <link rel="match" href="grid-template-columns-fit-content-001-ref.html"> <meta name="assert" content="This test checks that 'fit-content()' works as expected in grid-template-columns, i.e., it's similar to 'auto' ('minmax(auto, max-content)') except that the growth limit is clamped at the argument of 'fit-content' (if greater than the 'auto' minimum)."> <meta name="flags" content="ahem"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { justify-content: start; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html index a1f83dc85af..a6785fcb12f 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html @@ -3,7 +3,7 @@ <meta charset="utf-8"> <title>CSS Grid Layout Test: grid-template-rows fit-content() reference file</title> <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <meta name="flags" content="ahem"> <style> .grid { diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html index 6d406c3f1b4..293196032e1 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html @@ -7,7 +7,7 @@ <link rel="match" href="grid-template-rows-fit-content-001-ref.html"> <meta name="assert" content="This test checks that 'fit-content()' works as expected in grid-template-rows, i.e., it's similar to 'auto' ('minmax(auto, max-content)') except that the growth limit is clamped at the argument of 'fit-content' (if greater than the 'auto' minimum)."> <meta name="flags" content="ahem"> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { justify-content: start; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/grid.css b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/grid.css new file mode 100644 index 00000000000..602e114880a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/grid.css @@ -0,0 +1,277 @@ +.grid { + display: grid; + background-color: grey; +} + +.inline-grid { + display: inline-grid; + background-color: grey; +} + +.firstRowFirstColumn { + background-color: blue; + grid-column: 1; + grid-row: 1; +} + +.onlyFirstRowOnlyFirstColumn { + background-color: blue; + grid-column: 1 / 2; + grid-row: 1 / 2; +} + +.firstRowSecondColumn { + background-color: lime; + grid-column: 2; + grid-row: 1; +} + +.onlyFirstRowOnlySecondColumn { + background-color: lime; + grid-column: 2 / 3; + grid-row: 1 / 2; +} + +.secondRowFirstColumn { + background-color: purple; + grid-column: 1; + grid-row: 2; +} + +.onlySecondRowOnlyFirstColumn { + background-color: purple; + grid-column: 1 / 2; + grid-row: 2 / 3; +} + +.secondRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: 2; +} + +.onlySecondRowOnlySecondColumn { + background-color: orange; + grid-column: 2 / 3; + grid-row: 2 / 3; +} + +.endSecondRowEndSecondColumn { + background-color: orange; + grid-column-end: 3; + grid-row-end: 3; +} + +.thirdRowSecondColumn { + background-color: red; + grid-column: 2; + grid-row: 3; +} + +.firstRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: 1; +} + +.secondRowThirdColumn { + background-color: navy; + grid-column: 3; + grid-row: 2; +} + +.firstRowFourthColumn { + background-color: green; + grid-column: 4; + grid-row: 1; +} + +.secondRowFourthColumn { + background-color: pink; + grid-column: 4; + grid-row: 2; +} + +.firstAutoRowSecondAutoColumn { + grid-row: 1 / auto; + grid-column: 2 / auto; +} + +.autoLastRowAutoLastColumn { + grid-row: auto / -1; + grid-column: auto / -1; +} + +.autoSecondRowAutoFirstColumn { + grid-row: auto / 2; + grid-column: auto / 1; +} + +.firstRowBothColumn { + grid-row: 1; + grid-column: 1 / -1; +} + +.secondRowBothColumn { + grid-row: 2; + grid-column: 1 / -1; +} + +.bothRowFirstColumn { + grid-row: 1 / -1; + grid-column: 1; +} + +.bothRowSecondColumn { + grid-row: 1 / -1; + grid-column: 2; +} + +.bothRowBothColumn { + grid-row: 1 / -1; + grid-column: 1 / -1; +} + +/* Auto column / row. */ +.autoRowAutoColumn { + background-color: pink; + grid-column: auto; + grid-row: auto; +} + +.firstRowAutoColumn { + background-color: blue; + grid-column: auto; + grid-row: 1; +} + +.secondRowAutoColumn { + background-color: purple; + grid-column: auto; + grid-row: 2; +} + +.thirdRowAutoColumn { + background-color: navy; + grid-column: auto; + grid-row: 3; +} + +.autoRowFirstColumn { + background-color: lime; + grid-column: 1; + grid-row: auto; +} + +.autoRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: auto; +} + +.autoRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: auto; +} + +.autoRowAutoColumnSpanning2 { + background-color: maroon; + grid-column: span 2; + grid-row: auto; +} + +.autoRowSpanning2AutoColumn { + background-color: aqua; + grid-column: auto; + grid-row: span 2; +} + +.autoRowSpanning2AutoColumnSpanning3 { + background-color: olive; + grid-column: span 3; + grid-row: span 2; +} + +.autoRowSpanning3AutoColumnSpanning2 { + background-color: indigo; + grid-column: span 2; + grid-row: span 3; +} + +.autoRowFirstColumnSpanning2 { + background-color: maroon; + grid-column: 1 / span 2; + grid-row: auto; +} + +.autoRowSecondColumnSpanning2 { + background-color: olive; + grid-column: 2 / span 2; + grid-row: auto; +} + +.firstRowSpanning2AutoColumn { + background-color: maroon; + grid-column: auto; + grid-row: 1 / span 2; + height: 100%; +} + +.secondRowSpanning2AutoColumn { + background-color: olive; + grid-column: auto; + grid-row: 2 / span 2; + height: 100%; +} + +/* Grid element flow. */ +.gridAutoFlowColumnSparse { + grid-auto-flow: column; +} + +.gridAutoFlowColumnDense { + grid-auto-flow: column dense; +} + +.gridAutoFlowRowSparse { + grid-auto-flow: row; +} + +.gridAutoFlowRowDense { + grid-auto-flow: row dense; +} + +/* This rule makes sure the container is smaller than any grid items to avoid distributing any extra logical space to them. */ +.constrainedContainer { + width: 10px; + height: 10px; +} + +.unconstrainedContainer { + width: 1000px; + height: 1000px; +} + +.sizedToGridArea { + font: 10px/1 Ahem; + /* Make us fit our grid area. */ + width: 100%; + height: 100%; +} + +.verticalRL { + writing-mode: vertical-rl; +} +.verticalLR { + writing-mode: vertical-lr; +} +.horizontalTB { + writing-mode: horizontal-tb; +} +.directionRTL { + direction: rtl; +} +.directionLTR { + direction: ltr; +} diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/testing-utils.js b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/testing-utils.js index 202c865b15e..217b6204636 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/testing-utils.js +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/support/testing-utils.js @@ -1,10 +1,14 @@ var TestingUtils = (function() { function checkGridTemplateColumns(element, value) { + if (!Array.isArray(value)) + value = new Array(value); assert_in_array(getComputedStyle(element).gridTemplateColumns, value, "gridTemplateColumns"); } function checkGridTemplateRows(element, value) { + if (!Array.isArray(value)) + value = new Array(value); assert_in_array(getComputedStyle(element).gridTemplateRows, value, "gridTemplateRows"); } @@ -19,6 +23,8 @@ var TestingUtils = (function() { } function checkGridTemplateAreas(element, value) { + if (!Array.isArray(value)) + value = new Array(value); assert_in_array(getComputedStyle(element).gridTemplateAreas, value, "gridTemplateAreas"); } diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-001.html new file mode 100644 index 00000000000..00487f766a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-001.html @@ -0,0 +1,349 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with definite width."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + width: 100px; + border: solid thick; + grid: 10px 10px / minmax(auto, 0px); +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-002.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-002.html new file mode 100644 index 00000000000..c9f77a6ebe0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-002.html @@ -0,0 +1,349 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with indefinite width."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + display: inline-grid; + border: solid 5px; + grid: 10px 10px / minmax(auto, 0px); +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html new file mode 100644 index 00000000000..943837d2031 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html @@ -0,0 +1,349 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items orthogonal</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that orthogonal grid items minimum width takes into account borders, padding and margins for grid containers with definite width."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + width: 100px; + border: solid thick; + grid: 10px 10px / minmax(auto, 0px); +} + +.grid > div:nth-child(1) { background: cyan; writing-mode: vertical-lr; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html new file mode 100644 index 00000000000..25ad710d5d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-002.html @@ -0,0 +1,349 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items orthogonal</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that orthogonal grid items minimum width takes into account borders, padding and margins for grid containers with indefinite width."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + display: inline-grid; + border: solid 5px; + grid: 10px 10px / minmax(auto, 0px); +} + +.grid > div:nth-child(1) { background: cyan; writing-mode: vertical-lr; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html new file mode 100644 index 00000000000..1afe6df9535 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-001.html @@ -0,0 +1,350 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items vertical-lr</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with definite width in vertical-lr."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + width: 100px; + border: solid thick; + grid: minmax(auto, 0px) / 10px 10px; + writing-mode: vertical-lr; +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html new file mode 100644 index 00000000000..a239369e4d9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-lr-002.html @@ -0,0 +1,350 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items vertical-lr</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with indefinite width in vertical-lr."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + display: inline-grid; + border: solid 5px; + grid: minmax(auto, 0px) / 10px 10px; + writing-mode: vertical-lr; +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html new file mode 100644 index 00000000000..df3fe9bca49 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-001.html @@ -0,0 +1,350 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items vertical-rl</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with definite width in vertical-rl."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + width: 100px; + border: solid thick; + grid: minmax(auto, 0px) / 10px 10px; + writing-mode: vertical-rl; +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html new file mode 100644 index 00000000000..3978ed607b7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-vertical-rl-002.html @@ -0,0 +1,350 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Mininum width of grid items vertical-rl</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items"> +<meta name="assert" content="Checks that grid items minimum width takes into account borders, padding and margins for grid containers with indefinite width in vertical-rl."> +<link rel="stylesheet" href="support/grid.css"> +<style> +.grid { + display: inline-grid; + border: solid 5px; + grid: minmax(auto, 0px) / 10px 10px; + writing-mode: vertical-rl; +} + +.grid > div:nth-child(1) { background: cyan; } +.grid > div:nth-child(2) { background: magenta; } + +.width60 { width: 60px; } +.minWidth60 { min-width: 60px; } + +.marginLeft5 { margin-left: 5px; } +.marginRight10 { margin-right: 10px; } + +.paddingLeft6 { padding-left: 6px; } +.paddingRight3 { padding-right: 3px; } + +.borderLeft2, .borderRight4 { border: solid yellow 0px; } +.borderLeft2 { border-left-width: 2px; } +.borderRight4 { border-right-width: 4px; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid')"> + +<div id="log"></div> + +<h3>Direction LTR</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<h3>Direction RTL</h3> + +<pre>Item width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="width60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item min-width: 60px;</pre> + +<div class="grid directionRTL" data-expected-width="70"> + <div class="minWidth60" data-expected-width="60"></div> + <div data-expected-width="60"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="width60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px;</pre> + +<div class="grid directionRTL" data-expected-width="75"> + <div class="minWidth60 marginLeft5" data-expected-width="60"></div> + <div data-expected-width="65"></div> +</div> + +<pre>Item width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="width60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item min-width: 60px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="80"> + <div class="minWidth60 marginRight10" data-expected-width="60"></div> + <div data-expected-width="70"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="width60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px;</pre> + +<div class="grid directionRTL" data-expected-width="85"> + <div class="minWidth60 marginLeft5 marginRight10" data-expected-width="60"></div> + <div data-expected-width="75"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 paddingLeft6" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="width60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item min-width: 60px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="73"> + <div class="minWidth60 paddingRight3" data-expected-width="63"></div> + <div data-expected-width="63"></div> +</div> + +<pre>Item width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="width60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item min-width: 60px; & padding-left: 6px; & padding-right: 3px;</pre> + +<div class="grid directionRTL" data-expected-width="79"> + <div class="minWidth60 paddingLeft6 paddingRight3" data-expected-width="69"></div> + <div data-expected-width="69"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="width60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px;</pre> + +<div class="grid directionRTL" data-expected-width="72"> + <div class="minWidth60 borderLeft2" data-expected-width="62"></div> + <div data-expected-width="62"></div> +</div> + +<pre>Item width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="width60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item min-width: 60px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="74"> + <div class="minWidth60 borderRight4" data-expected-width="64"></div> + <div data-expected-width="64"></div> +</div> + +<pre>Item width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="width60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item min-width: 60px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="76"> + <div class="minWidth60 borderLeft2 borderRight4" data-expected-width="66"></div> + <div data-expected-width="66"></div> +</div> + +<pre>Item width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="width60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> + +<pre>Item min-width: 60px; & margin-left: 5px; & margin-right: 10px; & padding-left: 6px; & padding-right: 3px; & border-left-width: 2px; & border-right-width: 4px;</pre> + +<div class="grid directionRTL" data-expected-width="100"> + <div class="minWidth60 marginLeft5 marginRight10 paddingLeft6 paddingRight3 borderLeft2 borderRight4" data-expected-width="75"></div> + <div data-expected-width="90"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html index 127ea8df4af..ce1db93080a 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> <meta name="assert" content="Checks that automatic minimum size is clamped with different column sizes."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { border: solid thick; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html index 636a40fcb2d..c5e6da55887 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> <meta name="assert" content="Checks that automatic minimum size is clamped with different row sizes."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { border: solid thick; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html index fb706bfca59..c77556cfc2e 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> <meta name="assert" content="Checks that automatic minimum size is clamped with different column sizes and spaning items."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { border: solid thick; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html index 722426e0c9b..a3c35a5a370 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html @@ -4,7 +4,7 @@ <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> <link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> <meta name="assert" content="Checks that automatic minimum size is clamped with different row sizes and spaning items."> -<link rel="stylesheet" href="../support/grid.css"> +<link rel="stylesheet" href="support/grid.css"> <style> .grid { border: solid thick; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/support/grid.css b/tests/wpt/web-platform-tests/css/css-grid/grid-items/support/grid.css new file mode 100644 index 00000000000..602e114880a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/support/grid.css @@ -0,0 +1,277 @@ +.grid { + display: grid; + background-color: grey; +} + +.inline-grid { + display: inline-grid; + background-color: grey; +} + +.firstRowFirstColumn { + background-color: blue; + grid-column: 1; + grid-row: 1; +} + +.onlyFirstRowOnlyFirstColumn { + background-color: blue; + grid-column: 1 / 2; + grid-row: 1 / 2; +} + +.firstRowSecondColumn { + background-color: lime; + grid-column: 2; + grid-row: 1; +} + +.onlyFirstRowOnlySecondColumn { + background-color: lime; + grid-column: 2 / 3; + grid-row: 1 / 2; +} + +.secondRowFirstColumn { + background-color: purple; + grid-column: 1; + grid-row: 2; +} + +.onlySecondRowOnlyFirstColumn { + background-color: purple; + grid-column: 1 / 2; + grid-row: 2 / 3; +} + +.secondRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: 2; +} + +.onlySecondRowOnlySecondColumn { + background-color: orange; + grid-column: 2 / 3; + grid-row: 2 / 3; +} + +.endSecondRowEndSecondColumn { + background-color: orange; + grid-column-end: 3; + grid-row-end: 3; +} + +.thirdRowSecondColumn { + background-color: red; + grid-column: 2; + grid-row: 3; +} + +.firstRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: 1; +} + +.secondRowThirdColumn { + background-color: navy; + grid-column: 3; + grid-row: 2; +} + +.firstRowFourthColumn { + background-color: green; + grid-column: 4; + grid-row: 1; +} + +.secondRowFourthColumn { + background-color: pink; + grid-column: 4; + grid-row: 2; +} + +.firstAutoRowSecondAutoColumn { + grid-row: 1 / auto; + grid-column: 2 / auto; +} + +.autoLastRowAutoLastColumn { + grid-row: auto / -1; + grid-column: auto / -1; +} + +.autoSecondRowAutoFirstColumn { + grid-row: auto / 2; + grid-column: auto / 1; +} + +.firstRowBothColumn { + grid-row: 1; + grid-column: 1 / -1; +} + +.secondRowBothColumn { + grid-row: 2; + grid-column: 1 / -1; +} + +.bothRowFirstColumn { + grid-row: 1 / -1; + grid-column: 1; +} + +.bothRowSecondColumn { + grid-row: 1 / -1; + grid-column: 2; +} + +.bothRowBothColumn { + grid-row: 1 / -1; + grid-column: 1 / -1; +} + +/* Auto column / row. */ +.autoRowAutoColumn { + background-color: pink; + grid-column: auto; + grid-row: auto; +} + +.firstRowAutoColumn { + background-color: blue; + grid-column: auto; + grid-row: 1; +} + +.secondRowAutoColumn { + background-color: purple; + grid-column: auto; + grid-row: 2; +} + +.thirdRowAutoColumn { + background-color: navy; + grid-column: auto; + grid-row: 3; +} + +.autoRowFirstColumn { + background-color: lime; + grid-column: 1; + grid-row: auto; +} + +.autoRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: auto; +} + +.autoRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: auto; +} + +.autoRowAutoColumnSpanning2 { + background-color: maroon; + grid-column: span 2; + grid-row: auto; +} + +.autoRowSpanning2AutoColumn { + background-color: aqua; + grid-column: auto; + grid-row: span 2; +} + +.autoRowSpanning2AutoColumnSpanning3 { + background-color: olive; + grid-column: span 3; + grid-row: span 2; +} + +.autoRowSpanning3AutoColumnSpanning2 { + background-color: indigo; + grid-column: span 2; + grid-row: span 3; +} + +.autoRowFirstColumnSpanning2 { + background-color: maroon; + grid-column: 1 / span 2; + grid-row: auto; +} + +.autoRowSecondColumnSpanning2 { + background-color: olive; + grid-column: 2 / span 2; + grid-row: auto; +} + +.firstRowSpanning2AutoColumn { + background-color: maroon; + grid-column: auto; + grid-row: 1 / span 2; + height: 100%; +} + +.secondRowSpanning2AutoColumn { + background-color: olive; + grid-column: auto; + grid-row: 2 / span 2; + height: 100%; +} + +/* Grid element flow. */ +.gridAutoFlowColumnSparse { + grid-auto-flow: column; +} + +.gridAutoFlowColumnDense { + grid-auto-flow: column dense; +} + +.gridAutoFlowRowSparse { + grid-auto-flow: row; +} + +.gridAutoFlowRowDense { + grid-auto-flow: row dense; +} + +/* This rule makes sure the container is smaller than any grid items to avoid distributing any extra logical space to them. */ +.constrainedContainer { + width: 10px; + height: 10px; +} + +.unconstrainedContainer { + width: 1000px; + height: 1000px; +} + +.sizedToGridArea { + font: 10px/1 Ahem; + /* Make us fit our grid area. */ + width: 100%; + height: 100%; +} + +.verticalRL { + writing-mode: vertical-rl; +} +.verticalLR { + writing-mode: vertical-lr; +} +.horizontalTB { + writing-mode: horizontal-tb; +} +.directionRTL { + direction: rtl; +} +.directionLTR { + direction: ltr; +} diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-001.html index f94fdcfe965..b8e344ef777 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-001.html @@ -5,7 +5,7 @@ <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"> <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter"> <meta name="assert" content="The test checks that grid item should ignore grid container's first-letter pseudo-element."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> body { line-height: 20px; } .grid-first-letter::first-letter { line-height: 100px; color: red; } diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-line-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-line-001.html index b491298f3ea..140d7bf1151 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-line-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-line-001.html @@ -5,7 +5,7 @@ <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"> <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line"> <meta name="assert" content="The test checks that grid item should ignore grid container's first-line pseudo-element."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> body { line-height: 20px; } .grid-first-line::first-line { line-height: 100px; } diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-letter-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-letter-001.html index c9454fe30e7..b6914eb536e 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-letter-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-letter-001.html @@ -5,7 +5,7 @@ <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"> <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter"> <meta name="assert" content="The test checks that grid items accept first-letter pseudo-element."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .item::first-letter { line-height: 100px; } </style> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-line-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-line-001.html index 1330b376318..8bf8c653bf7 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-line-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-model/grid-item-accepts-first-line-001.html @@ -5,7 +5,7 @@ <link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"> <link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line"> <meta name="assert" content="The test checks that grid items accept first-line pseudo-element."> -<link href="../support/grid.css" rel="stylesheet"> +<link href="support/grid.css" rel="stylesheet"> <style> .item::first-line { line-height: 100px; } </style> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-model/support/grid.css b/tests/wpt/web-platform-tests/css/css-grid/grid-model/support/grid.css new file mode 100644 index 00000000000..602e114880a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-model/support/grid.css @@ -0,0 +1,277 @@ +.grid { + display: grid; + background-color: grey; +} + +.inline-grid { + display: inline-grid; + background-color: grey; +} + +.firstRowFirstColumn { + background-color: blue; + grid-column: 1; + grid-row: 1; +} + +.onlyFirstRowOnlyFirstColumn { + background-color: blue; + grid-column: 1 / 2; + grid-row: 1 / 2; +} + +.firstRowSecondColumn { + background-color: lime; + grid-column: 2; + grid-row: 1; +} + +.onlyFirstRowOnlySecondColumn { + background-color: lime; + grid-column: 2 / 3; + grid-row: 1 / 2; +} + +.secondRowFirstColumn { + background-color: purple; + grid-column: 1; + grid-row: 2; +} + +.onlySecondRowOnlyFirstColumn { + background-color: purple; + grid-column: 1 / 2; + grid-row: 2 / 3; +} + +.secondRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: 2; +} + +.onlySecondRowOnlySecondColumn { + background-color: orange; + grid-column: 2 / 3; + grid-row: 2 / 3; +} + +.endSecondRowEndSecondColumn { + background-color: orange; + grid-column-end: 3; + grid-row-end: 3; +} + +.thirdRowSecondColumn { + background-color: red; + grid-column: 2; + grid-row: 3; +} + +.firstRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: 1; +} + +.secondRowThirdColumn { + background-color: navy; + grid-column: 3; + grid-row: 2; +} + +.firstRowFourthColumn { + background-color: green; + grid-column: 4; + grid-row: 1; +} + +.secondRowFourthColumn { + background-color: pink; + grid-column: 4; + grid-row: 2; +} + +.firstAutoRowSecondAutoColumn { + grid-row: 1 / auto; + grid-column: 2 / auto; +} + +.autoLastRowAutoLastColumn { + grid-row: auto / -1; + grid-column: auto / -1; +} + +.autoSecondRowAutoFirstColumn { + grid-row: auto / 2; + grid-column: auto / 1; +} + +.firstRowBothColumn { + grid-row: 1; + grid-column: 1 / -1; +} + +.secondRowBothColumn { + grid-row: 2; + grid-column: 1 / -1; +} + +.bothRowFirstColumn { + grid-row: 1 / -1; + grid-column: 1; +} + +.bothRowSecondColumn { + grid-row: 1 / -1; + grid-column: 2; +} + +.bothRowBothColumn { + grid-row: 1 / -1; + grid-column: 1 / -1; +} + +/* Auto column / row. */ +.autoRowAutoColumn { + background-color: pink; + grid-column: auto; + grid-row: auto; +} + +.firstRowAutoColumn { + background-color: blue; + grid-column: auto; + grid-row: 1; +} + +.secondRowAutoColumn { + background-color: purple; + grid-column: auto; + grid-row: 2; +} + +.thirdRowAutoColumn { + background-color: navy; + grid-column: auto; + grid-row: 3; +} + +.autoRowFirstColumn { + background-color: lime; + grid-column: 1; + grid-row: auto; +} + +.autoRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: auto; +} + +.autoRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: auto; +} + +.autoRowAutoColumnSpanning2 { + background-color: maroon; + grid-column: span 2; + grid-row: auto; +} + +.autoRowSpanning2AutoColumn { + background-color: aqua; + grid-column: auto; + grid-row: span 2; +} + +.autoRowSpanning2AutoColumnSpanning3 { + background-color: olive; + grid-column: span 3; + grid-row: span 2; +} + +.autoRowSpanning3AutoColumnSpanning2 { + background-color: indigo; + grid-column: span 2; + grid-row: span 3; +} + +.autoRowFirstColumnSpanning2 { + background-color: maroon; + grid-column: 1 / span 2; + grid-row: auto; +} + +.autoRowSecondColumnSpanning2 { + background-color: olive; + grid-column: 2 / span 2; + grid-row: auto; +} + +.firstRowSpanning2AutoColumn { + background-color: maroon; + grid-column: auto; + grid-row: 1 / span 2; + height: 100%; +} + +.secondRowSpanning2AutoColumn { + background-color: olive; + grid-column: auto; + grid-row: 2 / span 2; + height: 100%; +} + +/* Grid element flow. */ +.gridAutoFlowColumnSparse { + grid-auto-flow: column; +} + +.gridAutoFlowColumnDense { + grid-auto-flow: column dense; +} + +.gridAutoFlowRowSparse { + grid-auto-flow: row; +} + +.gridAutoFlowRowDense { + grid-auto-flow: row dense; +} + +/* This rule makes sure the container is smaller than any grid items to avoid distributing any extra logical space to them. */ +.constrainedContainer { + width: 10px; + height: 10px; +} + +.unconstrainedContainer { + width: 1000px; + height: 1000px; +} + +.sizedToGridArea { + font: 10px/1 Ahem; + /* Make us fit our grid area. */ + width: 100%; + height: 100%; +} + +.verticalRL { + writing-mode: vertical-rl; +} +.verticalLR { + writing-mode: vertical-lr; +} +.horizontalTB { + writing-mode: horizontal-tb; +} +.directionRTL { + direction: rtl; +} +.directionLTR { + direction: ltr; +} diff --git a/tests/wpt/web-platform-tests/css/css-multicol/float-and-block.html b/tests/wpt/web-platform-tests/css/css-multicol/float-and-block.html new file mode 100644 index 00000000000..21f9fb97436 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-multicol/float-and-block.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<title>Paint order with float VS regular block is correct inside multicol</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/CSS22/zindex.html#painting-order" title="E.2 Painting order"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns:2; column-gap:0; width:100px; background:hotpink;"> + <div style="float:left; width:50px; height:200px; background:green;"></div> + <div style="height:200px; background:red;"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html new file mode 100644 index 00000000000..500add40ef3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html @@ -0,0 +1,163 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty" /> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#supported-syntax-strings" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +test_count = 0; + +function assert_valid(syntax, initialValue) { + // No actual assertions, this just shouldn't throw + test(function() { + var name = '--syntax-test-' + (test_count++); + CSS.registerProperty({name: name, syntax: syntax, initialValue: initialValue}); + }, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is valid"); +} + +function assert_invalid(syntax, initialValue) { + test(function(){ + var name = '--syntax-test-' + (test_count++); + assert_throws(new SyntaxError(), + () => CSS.registerProperty({name: name, syntax: syntax, initialValue: initialValue})); + }, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is invalid"); +} + +assert_valid("*", "a"); +assert_valid(" * ", "b"); +assert_valid("<length>", "2px"); +assert_valid(" <number>", "5"); +assert_valid("<percentage> ", "10%"); +assert_valid("<color>+", "red"); +assert_valid(" <length>+ | <percentage>", "2px 8px"); +assert_valid("<length>|<percentage>|<length-percentage>", "2px"); // Valid but silly +assert_valid("<color> | <image> | <url> | <integer> | <angle>", "red"); +assert_valid("<time> | <resolution> | <transform-list> | <custom-ident>", "red"); + +assert_valid("*", ":> hello"); +assert_valid("*", "([ brackets ]) { yay (??)}"); +assert_valid("*", "yep 'this is valid too'"); +assert_valid("*", "unmatched opening bracket is valid :("); +assert_valid("*", '"'); + +assert_valid("<length>", "0"); +assert_valid("<length>", "10px /*:)*/"); +assert_valid("<length>", " calc(-2px)"); +assert_valid("<length>", "calc(2px*4 + 10px)"); +assert_valid("<length>", "7.1e-4cm"); +assert_valid("<length>", "calc(7in - 12px)"); +assert_valid("<length>+", "2px 7px calc(8px)"); +assert_valid("<percentage>", "-9.3e3%"); +assert_valid("<length-percentage>", "-54%"); +assert_valid("<length-percentage>", "0"); +assert_valid("<length-percentage>", "calc(-11px + 10.4%)"); + +assert_valid("<number>", "-109"); +assert_valid("<number>", "2.3e4"); +assert_valid("<integer>", "-109"); +assert_valid("<integer>", "19"); + +assert_valid("<angle>", "10deg"); +assert_valid("<angle>", "20.5rad"); +assert_valid("<angle>", "calc(50grad + 3.14159rad)"); +assert_valid("<time>", "2s"); +assert_valid("<time>", "calc(2s - 9ms)"); +assert_valid("<resolution>", "10dpi"); +assert_valid("<resolution>", "3dPpX"); +assert_valid("<resolution>", "-5.3dpcm"); +assert_valid("<transform-list>", "scale(2)"); +assert_valid("<transform-list>", "translateX(2px) rotate(20deg)"); + +assert_valid("<color>", "rgb(12, 34, 56)"); +assert_valid("<color>", "lightgoldenrodyellow"); +assert_valid("<image>", "url(a)"); +assert_valid("<image>", "linear-gradient(yellow, blue)"); +assert_valid("<url>", "url(a)"); + +assert_valid("banana", "banana"); +assert_valid("bAnAnA", "bAnAnA"); +assert_valid("ba-na-nya", "ba-na-nya"); +assert_valid("banana", "banan\\61"); +assert_valid("<custom-ident>", "banan\\61"); +assert_valid("big | bigger | BIGGER", "bigger"); +assert_valid("foo+|bar", "foo foo foo"); +assert_valid("default", "default"); + +assert_valid("banana\t", "banana"); +assert_valid("\nbanana\r\n", "banana"); +assert_valid("ba\f\n|\tna\r|nya", "nya"); + +assert_valid(null, "null"); +assert_valid(undefined, "undefined"); +assert_valid(["array"], "array"); + +// Invalid syntax +assert_invalid("banana,nya", "banana"); +assert_invalid("banan\\61", "banana"); +assert_invalid("<\\6c ength>", "10px"); +assert_invalid("<banana>", "banana"); +assert_invalid("<Number>", "10"); +assert_invalid("<length", "10px"); +assert_invalid("<LENGTH>", "10px"); +assert_invalid("< length>", "10px"); +assert_invalid("<length >", "10px"); +assert_invalid("<length> +", "10px"); + +assert_invalid("<length>++", "10px"); +assert_invalid("<length> | *", "10px"); +assert_invalid("*|banana", "banana"); +assert_invalid("*+", "banana"); + +assert_invalid("initial", "initial"); +assert_invalid("inherit", "inherit"); +assert_invalid("unset", "unset"); +assert_invalid("<length>|initial", "10px"); +assert_invalid("<length>|INHERIT", "10px"); +assert_invalid("<percentage>|unsEt", "2%"); + +// Invalid initialValue +assert_invalid("*", "initial"); +assert_invalid("*", "inherit"); +assert_invalid("*", "unset"); +assert_invalid("*", "revert"); +assert_invalid("<custom-ident>", "initial"); +assert_invalid("<custom-ident>+", "foo inherit bar"); + +assert_invalid("*", ")"); +assert_invalid("*", "([)]"); +assert_invalid("*", "whee!"); +assert_invalid("*", '"\n'); +assert_invalid("*", "url(moo '')"); +assert_invalid("*", "semi;colon"); +assert_invalid("*", "var(invalid var ref)"); +assert_invalid("*", "var(--foo)"); + +assert_invalid("banana", "bAnAnA"); +assert_invalid("<length>", "var(--moo)"); +assert_invalid("<length>", "10"); +assert_invalid("<length>", "10%"); +assert_invalid("<length>", "calc(5px + 10%)"); +assert_invalid("<length>", "calc(5px * 3px / 6px)"); +assert_invalid("<length>", "10em"); +assert_invalid("<length>", "10vmin"); +assert_invalid("<length>", "calc(4px + 3em)"); +assert_invalid("<length>", "calc(4px + calc(8 * 2em))"); +assert_invalid("<length>+", "calc(2ex + 16px)"); +assert_invalid("<length>+", "10px calc(20px + 4rem)"); +assert_invalid("<percentage> | <length>+", "calc(100vh - 10px) 30px"); +assert_invalid("<length>", "10px;"); +assert_invalid("<length-percentage>", "calc(2px + 10% + 7ex)"); +assert_invalid("<percentage>", "0"); +assert_invalid("<integer>", "1.0"); +assert_invalid("<integer>", "1e0"); +assert_invalid("<number>|foo", "foo var(--foo, bla)"); + +assert_invalid("<angle>", "0"); +assert_invalid("<angle>", "10%"); +assert_invalid("<time>", "2px"); +assert_invalid("<resolution>", "10"); +assert_invalid("<transform-list>", "scale()"); +assert_invalid("<transform-list>+", "translateX(2px) rotate(20deg)"); +assert_invalid("<color>", "fancy-looking"); +assert_invalid("<image>", "banana.png"); +assert_invalid("<url>", "banana.png"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property.html new file mode 100644 index 00000000000..597247cc215 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#register-a-custom-property" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// Tests for error checking during property registration + +test(function() { + assert_throws(new TypeError(), () => CSS.registerProperty()); + assert_throws(new TypeError(), () => CSS.registerProperty(undefined)); + assert_throws(new TypeError(), () => CSS.registerProperty(true)); + assert_throws(new TypeError(), () => CSS.registerProperty(2)); + assert_throws(new TypeError(), () => CSS.registerProperty("css")); + assert_throws(new TypeError(), () => CSS.registerProperty(null)); +}, "registerProperty requires a Dictionary type"); + +test(function() { + // Valid property names, shouldn't throw + CSS.registerProperty({name: '--name1'}); + CSS.registerProperty({name: '--name2, no need for escapes'}); + CSS.registerProperty({name: ['--name', 3]}); + + // Invalid property names + assert_throws(new TypeError(), () => CSS.registerProperty({})); + assert_throws(new SyntaxError(), () => CSS.registerProperty({name: 'no-leading-dash'})); + assert_throws(new SyntaxError(), () => CSS.registerProperty({name: ''})); + assert_throws(new SyntaxError(), () => CSS.registerProperty({name: '\\--name'})); +}, "registerProperty requires a name matching <custom-property-name>"); + +test(function() { + CSS.registerProperty({name: '--syntax-test-1', syntax: '*'}); + CSS.registerProperty({name: '--syntax-test-2', syntax: ' * '}); + assert_throws(new SyntaxError(), + () => CSS.registerProperty({name: '--syntax-test-3', syntax: 'length'})); +}, "registerProperty only allows omitting initialValue is syntax is '*'"); + +test(function() { + CSS.registerProperty({name: '--re-register', syntax: '<length>', initialValue: '0px'}); + assert_throws({name: 'InvalidModificationError'}, + () => CSS.registerProperty({name: '--re-register', syntax: '<percentage>', initialValue: '0%'})); +}, "registerProperty fails for an already registered property"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html new file mode 100644 index 00000000000..17074a69619 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-propertydescriptor-inherits" /> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#register-a-custom-property" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +#outer { + --inherited-length-1: 10px; + --inherited-length-2: var(--non-inherited-length-1); + --inherited-length-3: 30px; + --non-inherited-length-1: 22px; + --non-inherited-length-3: calc(var(--non-inherited-length-2) * 10); +} + +#inner { + --inherited-length-3: 15px; + --non-inherited-length-1: 40px; + --non-inherited-length-2: 90px; +} +</style> +<div id=outer><div id=inner></div></div> +<script> +CSS.registerProperty({name: '--inherited-length-1', syntax: '<length>', initialValue: '1px', inherits: true}); +CSS.registerProperty({name: '--inherited-length-2', syntax: '<length>', initialValue: '2px', inherits: true}); +CSS.registerProperty({name: '--inherited-length-3', syntax: '<length>', initialValue: '3px', inherits: true}); +CSS.registerProperty({name: '--non-inherited-length-1', syntax: '<length>', initialValue: '4px'}); +CSS.registerProperty({name: '--non-inherited-length-2', syntax: '<length>', initialValue: '5px'}); +CSS.registerProperty({name: '--non-inherited-length-3', syntax: '<length>', initialValue: '6px'}); + +test(function() { + outerComputedStyle = getComputedStyle(outer); + assert_equals(outerComputedStyle.getPropertyValue('--inherited-length-1'), '10px'); + assert_equals(outerComputedStyle.getPropertyValue('--inherited-length-2'), '22px'); + assert_equals(outerComputedStyle.getPropertyValue('--inherited-length-3'), '30px'); + assert_equals(outerComputedStyle.getPropertyValue('--non-inherited-length-1'), '22px'); + assert_equals(outerComputedStyle.getPropertyValue('--non-inherited-length-2'), '5px'); + assert_equals(outerComputedStyle.getPropertyValue('--non-inherited-length-3'), '50px'); + + innerComputedStyle = getComputedStyle(inner); + assert_equals(innerComputedStyle.getPropertyValue('--inherited-length-1'), '10px'); + assert_equals(innerComputedStyle.getPropertyValue('--inherited-length-2'), '22px'); + assert_equals(innerComputedStyle.getPropertyValue('--inherited-length-3'), '15px'); + assert_equals(innerComputedStyle.getPropertyValue('--non-inherited-length-1'), '40px'); + assert_equals(innerComputedStyle.getPropertyValue('--non-inherited-length-2'), '90px'); + assert_equals(innerComputedStyle.getPropertyValue('--non-inherited-length-3'), '6px'); +}, "Registered properties are correctly inherited (or not) depending on the inherits flag."); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html new file mode 100644 index 00000000000..8f635e97a63 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html @@ -0,0 +1,88 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#calculation-of-computed-values" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +#divWithFontSizeSet, #parentDiv { + font-size: 10px; +} +#divWithFontSizeSet, #divWithFontSizeInherited { + --length-1: 12px; + --length-2: 13vw; + --length-3: 14em; + --length-4: 15vmin; + --length-5: calc(16px - 7em + 10vh); + --length-6: var(--length-3); + --length-percentage-1: 17em; + --length-percentage-2: 18%; + --length-percentage-3: calc(19em - 2%); + --list-1: 10px 3em; + --list-2: 4em 9px; + --list-3: 3% 10vmax 22px; + --list-4: calc(50% + 1em) 4px; +} +#fontSizeCycle { + --font-size: 2em; + font-size: var(--font-size); +} +</style> + +<div id=divWithFontSizeSet></div> +<div id=parentDiv> + <div id=divWithFontSizeInherited></div> + <div id=fontSizeCycle></div> +</div> + +<script> +CSS.registerProperty({name: '--length-1', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-2', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-3', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-4', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-5', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-6', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-percentage-1', syntax: '<length-percentage>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-percentage-2', syntax: '<length-percentage>', initialValue: '0px'}); +CSS.registerProperty({name: '--length-percentage-3', syntax: '<length-percentage>', initialValue: '0px'}); +CSS.registerProperty({name: '--list-1', syntax: '<length>+', initialValue: '0px'}); +CSS.registerProperty({name: '--list-2', syntax: '<length>+', initialValue: '0px'}); +CSS.registerProperty({name: '--list-3', syntax: '<length-percentage>+', initialValue: '0px'}); +CSS.registerProperty({name: '--list-4', syntax: '<length-percentage>+', initialValue: '0px'}); +CSS.registerProperty({name: '--font-size', syntax: '<length>', initialValue: '0px'}); + +for (var element of [divWithFontSizeSet, divWithFontSizeInherited]) { + var id = element.id; + var computedStyle = getComputedStyle(element); + + test(function() { + assert_equals(computedStyle.getPropertyValue('--length-1'), '12px'); + assert_equals(computedStyle.getPropertyValue('--length-2'), '104px'); + assert_equals(computedStyle.getPropertyValue('--length-3'), '140px'); + assert_equals(computedStyle.getPropertyValue('--length-4'), '90px'); + assert_equals(computedStyle.getPropertyValue('--length-5'), '6px'); + assert_equals(computedStyle.getPropertyValue('--length-6'), '140px'); + }, "<length> values are computed correctly for " + id); + + test(function() { + assert_equals(computedStyle.getPropertyValue('--length-percentage-1'), '170px'); + assert_equals(computedStyle.getPropertyValue('--length-percentage-2'), '18%'); + assert_equals(computedStyle.getPropertyValue('--length-percentage-3'), 'calc(190px + -2%)'); + }, "<length-percentage> values are computed correctly for " + id); + + test(function() { + assert_equals(computedStyle.getPropertyValue('--list-1'), '10px 30px'); + assert_equals(computedStyle.getPropertyValue('--list-2'), '40px 9px'); + }, "<length>+ values are computed correctly for " + id); + + test(function() { + assert_equals(computedStyle.getPropertyValue('--list-3'), '3% 80px 22px'); + assert_equals(computedStyle.getPropertyValue('--list-4'), 'calc(10px + 50%) 4px'); + }, "<length-percentage>+ values are computed correctly for " + id); +} + +test(function() { + var computedStyle = getComputedStyle(fontSizeCycle); + assert_equals(computedStyle.fontSize, '20px'); + assert_equals(computedStyle.getPropertyValue('--font-size'), '40px'); +}, "font-size with a var() reference to a registered property using ems works as expected"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-cssom.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-cssom.html new file mode 100644 index 00000000000..9dc9d7e50bb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-cssom.html @@ -0,0 +1,86 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +#inner { + --length: 10px; + --color: red; +} +#outer { + --length: 77px; + --color: blue; +} +</style> + +<div id=outer> + <div id=inner></div> +</div> + +<script> +var computedStyle = getComputedStyle(inner); +var inlineStyle = inner.style; +var sheetStyle = document.styleSheets[0].cssRules[0].style; + +test(function() { + // Nothing registered yet, whatever you specify works + assert_equals(computedStyle.getPropertyValue('--length'), ' 10px'); + assert_equals(computedStyle.getPropertyValue('--color'), ' red'); + + inlineStyle.setProperty('--length', '5'); + inlineStyle.setProperty('--color', 'hello'); + + assert_equals(inlineStyle.getPropertyValue('--length'), '5'); + assert_equals(inlineStyle.getPropertyValue('--color'), 'hello'); + assert_equals(computedStyle.getPropertyValue('--length'), '5'); + assert_equals(computedStyle.getPropertyValue('--color'), 'hello'); +}, "CSSOM setters function as expected for unregistered properties"); + +CSS.registerProperty({name: '--length', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--color', syntax: '<color>', initialValue: 'white', inherits: true}); + +test(function() { + assert_equals(inlineStyle.getPropertyValue('--length'), '5'); + assert_equals(inlineStyle.getPropertyValue('--color'), 'hello'); + assert_equals(computedStyle.getPropertyValue('--length'), '0px'); + assert_equals(computedStyle.getPropertyValue('--color'), 'blue'); +}, "Formerly valid values are still readable from inline styles but are computed as the unset value"); + +test(function() { + inlineStyle.setProperty('--length', 'hi'); + inlineStyle.setProperty('--color', '20'); + assert_equals(inlineStyle.getPropertyValue('--length'), '5'); + assert_equals(inlineStyle.getPropertyValue('--color'), 'hello'); +}, "Values not matching the registered type can't be set"); + +test(function() { + inlineStyle.removeProperty('--length'); + inlineStyle.setProperty('--color', ''); + assert_equals(inlineStyle.getPropertyValue('--length'), ''); + assert_equals(inlineStyle.getPropertyValue('--color'), ''); + assert_equals(computedStyle.getPropertyValue('--length'), '10px'); + assert_equals(computedStyle.getPropertyValue('--color'), 'red'); +}, "Values can be removed from inline styles"); + +test(function() { + sheetStyle.setProperty('--length', 'banana'); // Invalid, no change + assert_equals(computedStyle.getPropertyValue('--length'), '10px'); + sheetStyle.setProperty('--length', '20px'); + assert_equals(computedStyle.getPropertyValue('--length'), '20px'); + sheetStyle.setProperty('--length', 'initial'); + assert_equals(computedStyle.getPropertyValue('--length'), '0px'); +}, "Stylesheets can be modified by CSSOM"); + +test(function() { + inlineStyle.setProperty('--length', '30px'); + inlineStyle.setProperty('--color', 'pink'); + assert_equals(inlineStyle.getPropertyValue('--length'), '30px'); + assert_equals(inlineStyle.getPropertyValue('--color'), 'pink'); + assert_equals(computedStyle.getPropertyValue('--length'), '30px'); + assert_equals(computedStyle.getPropertyValue('--color'), 'pink'); + inlineStyle.setProperty('--color', 'inherit'); + assert_equals(inlineStyle.getPropertyValue('--color'), 'inherit'); + assert_equals(computedStyle.getPropertyValue('--color'), 'blue'); +}, "Valid values can be set on inline styles"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-initial.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-initial.html new file mode 100644 index 00000000000..22ea3c4dd6b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-initial.html @@ -0,0 +1,33 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-propertydescriptor-initialvalue" /> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#register-a-custom-property" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +#target { + background: var(--inherited-color); + color: var(--non-inherited-color); +} +</style> +<div id=target></div> +<script> +CSS.registerProperty({name: '--length', syntax: '<length>', initialValue: 'calc(10px + 15px)'}); +CSS.registerProperty({name: '--length-percentage', syntax: '<length-percentage>', initialValue: 'calc(1in + 10% + 4px)'}); +CSS.registerProperty({name: '--inherited-color', syntax: '<color>', initialValue: 'pink', inherits: true}); +CSS.registerProperty({name: '--non-inherited-color', syntax: '<color>', initialValue: 'purple'}); +CSS.registerProperty({name: '--single-transform-list', syntax: '<transform-list>', initialValue: 'scale(calc(2 + 2))'}); +CSS.registerProperty({name: '--multiple-transform-list', syntax: '<transform-list>', initialValue: 'scale(calc(2 + 1)) translateX(calc(3px + 1px))'}); + +test(function() { + computedStyle = getComputedStyle(target); + assert_equals(computedStyle.getPropertyValue('--length'), '25px'); + assert_equals(computedStyle.getPropertyValue('--length-percentage'), 'calc(100px + 10%)'); + assert_equals(computedStyle.getPropertyValue('--inherited-color'), 'pink'); + assert_equals(computedStyle.getPropertyValue('--non-inherited-color'), 'purple'); + assert_equals(computedStyle.getPropertyValue('--single-transform-list'), 'scale(4)'); + assert_equals(computedStyle.getPropertyValue('--multiple-transform-list'), 'scale(3) translateX(4px)'); + + assert_equals(computedStyle.backgroundColor, 'rgb(255, 192, 203)'); + assert_equals(computedStyle.color, 'rgb(128, 0, 128)'); +}, "Initial values of registered properties can be referenced when no custom properties are explicitly set."); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-cycles.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-cycles.html new file mode 100644 index 00000000000..fdf8eaae153 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties-cycles.html @@ -0,0 +1,145 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +#test1 { + --registered-1-a: var(--registered-1-b, 10px); + --registered-1-b: var(--registered-1-a, 20px); + + --registered-1-c: var(--registered-1-b, 30px); + --registered-1-d: var(--registered-1-b); + --unregistered-1-a:var(--registered-1-a,40px); + --unregistered-1-a:var(--registered-1-a); + left: var(--registered-1-a, 50px); + top: var(--registered-1-b, 60px); +} +</style> +<div id=test1></div> +<script> +test(function() { + CSS.registerProperty({name: '--registered-1-a', syntax: '<length>', initialValue: '1px'}); + CSS.registerProperty({name: '--registered-1-b', syntax: '<length>', initialValue: '2px'}); + CSS.registerProperty({name: '--registered-1-c', syntax: '<length>', initialValue: '3px'}); + CSS.registerProperty({name: '--registered-1-d', syntax: '<length>', initialValue: '4px'}); + + computedStyle = getComputedStyle(test1); + assert_equals(computedStyle.getPropertyValue('--registered-1-a'), '1px'); + assert_equals(computedStyle.getPropertyValue('--registered-1-b'), '2px'); + + assert_equals(computedStyle.getPropertyValue('--registered-1-c'), '2px'); + assert_equals(computedStyle.getPropertyValue('--registered-1-d'), '2px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-1-a'), '1px'); + assert_equals(computedStyle.left, '1px'); + assert_equals(computedStyle.top, '2px'); +}, "A var() cycle between two registered properties is handled correctly."); +</script> + +<style> +#test2 { + --registered-2-a: var(--unregistered-2-a, 10px); + --unregistered-2-a:var(--registered-2-a,20px); + + --registered-2-b: var(--registered-2-a, 30px); + --registered-2-c: var(--registered-2-a); + --registered-2-d: var(--unregistered-2-a, 40px); + --registered-2-e: var(--unregistered-2-a); + --unregistered-2-b:var(--registered-2-a,50px); + --unregistered-2-c:var(--registered-2-a); + --unregistered-2-d:var(--unregistered-2-a,60px); + --unregistered-2-e:var(--unregistered-2-a); + left: var(--registered-2-a, 70px); + top: var(--unregistered-2-a, 80px); +} +</style> +<div id=test2></div> +<script> +test(function() { + CSS.registerProperty({name: '--registered-2-a', syntax: '<length>', initialValue: '1px'}); + CSS.registerProperty({name: '--registered-2-b', syntax: '<length>', initialValue: '2px'}); + CSS.registerProperty({name: '--registered-2-c', syntax: '<length>', initialValue: '3px'}); + CSS.registerProperty({name: '--registered-2-d', syntax: '<length>', initialValue: '4px'}); + CSS.registerProperty({name: '--registered-2-e', syntax: '<length>', initialValue: '5px'}); + + computedStyle = getComputedStyle(test2); + assert_equals(computedStyle.getPropertyValue('--registered-2-a'), '1px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-a'), ''); + + assert_equals(computedStyle.getPropertyValue('--registered-2-b'), '1px'); + assert_equals(computedStyle.getPropertyValue('--registered-2-c'), '1px'); + assert_equals(computedStyle.getPropertyValue('--registered-2-d'), '40px'); + assert_equals(computedStyle.getPropertyValue('--registered-2-e'), '5px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-b'), '1px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-c'), '1px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-d'), '60px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-e'), ''); + assert_equals(computedStyle.left, '1px'); + assert_equals(computedStyle.top, '80px'); +}, "A var() cycle between a registered properties and an unregistered property is handled correctly."); +</script> + +<style> +#test3 { + --unregistered-3-a:var(--unregistered-3-b,10px); + --unregistered-3-b:var(--unregistered-3-a,20px); + + --registered-3-a: var(--unregistered-3-a, 30px); + --registered-3-b: var(--unregistered-3-a); + --registered-3-c: var(--unregistered-3-b, 40px); + --registered-3-d: var(--registered-3-c, 50px); + left: var(--registered-3-d, 60px); + top: var(--registered-3-b, 70px); +} +</style> +<div id=test3></div> +<script> +test(function() { + CSS.registerProperty({name: '--registered-3-a', syntax: '<length>', initialValue: '1px'}); + CSS.registerProperty({name: '--registered-3-b', syntax: '<length>', initialValue: '2px'}); + CSS.registerProperty({name: '--registered-3-c', syntax: '<length>', initialValue: '3px'}); + CSS.registerProperty({name: '--registered-3-d', syntax: '<length>', initialValue: '4px'}); + + computedStyle = getComputedStyle(test3); + assert_equals(computedStyle.getPropertyValue('--unregistered-3-a'), ''); + assert_equals(computedStyle.getPropertyValue('--unregistered-3-b'), ''); + + assert_equals(computedStyle.getPropertyValue('--registered-3-a'), '30px'); + assert_equals(computedStyle.getPropertyValue('--registered-3-b'), '2px'); + assert_equals(computedStyle.getPropertyValue('--registered-3-c'), '40px'); + assert_equals(computedStyle.getPropertyValue('--registered-3-d'), '40px'); + assert_equals(computedStyle.left, '40px'); + assert_equals(computedStyle.top, '2px'); +}, "A var() cycle between a two unregistered properties is handled correctly."); +</script> + +<style> +#test4 { + --registered-4-a:var(--unregistered-4-a,hello); + --unregistered-4-a:var(--registered-4-a,world); + + --registered-4-b:var(--unregistered-4-a,meow); + --registered-4-c:var(--unregistered-4-a); + --unregistered-4-b:var(--unregistered-4-a,woof); + --unregistered-4-c:var(--unregistered-4-a); + transition-property: var(--registered-4-a, water); +} +</style> +<div id=test4></div> +<script> +test(function() { + CSS.registerProperty({name: '--registered-4-a', syntax: '*'}); + CSS.registerProperty({name: '--registered-4-b', syntax: '*', initialValue: 'moo'}); + CSS.registerProperty({name: '--registered-4-c', syntax: '*', initialValue: 'circle'}); + + computedStyle = getComputedStyle(test4); + assert_equals(computedStyle.getPropertyValue('--registered-4-a'), ''); + assert_equals(computedStyle.getPropertyValue('--unregistered-4-a'), ''); + + assert_equals(computedStyle.getPropertyValue('--registered-4-b'), 'meow'); + assert_equals(computedStyle.getPropertyValue('--registered-4-c'), 'circle'); + assert_equals(computedStyle.getPropertyValue('--unregistered-4-b'), 'woof'); + assert_equals(computedStyle.getPropertyValue('--unregistered-4-c'), ''); + assert_equals(computedStyle.transitionProperty, 'water'); +}, "A var() cycle between a syntax:'*' property and an unregistered property is handled correctly."); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html new file mode 100644 index 00000000000..5dd1f0f1692 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/var-reference-registered-properties.html @@ -0,0 +1,61 @@ +<!DOCTYPE HTML> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +div { + --registered-length-1: 10px; + --registered-length-2: var(--registered-length-1); + --registered-length-3: var(--length-1); + --registered-length-4: calc(var(--length-1) + 40px); + --registered-length-5: var(--invalid, 70px); + --registered-length-6: calc(var(--registered-length-3)*4); + --registered-length-7: var(--123px, 6px); + + --length-1: 20px; + --length-2: var(--registered-length-1); + --length-3: calc(var(--123px, 6px) + var(--123px)); + + --percentage: 10%; + --registered-length-invalid: var(--percentage); + + --registered-token-stream-1:var(--invalid); + --registered-token-stream-2:var(--invalid,fallback); + --token-stream-1:var(--registered-token-stream-1,moo); +} +</style> +<div id=element></div> +<script> +CSS.registerProperty({name: '--123px', syntax: '<length>', initialValue: '123px'}); + +CSS.registerProperty({name: '--registered-length-1', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-2', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-3', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-4', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-5', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-6', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-7', syntax: '<length>', initialValue: '0px'}); +CSS.registerProperty({name: '--registered-length-invalid', syntax: '<length>', initialValue: '15px'}); + +CSS.registerProperty({name: '--registered-token-stream-1', syntax: '*'}); +CSS.registerProperty({name: '--registered-token-stream-2', syntax: '*'}); + +test(function() { + computedStyle = getComputedStyle(element); + assert_equals(computedStyle.getPropertyValue('--registered-length-1'), '10px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-2'), '10px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-3'), '20px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-4'), '60px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-5'), '70px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-6'), '80px'); + assert_equals(computedStyle.getPropertyValue('--registered-length-7'), '123px'); + assert_equals(computedStyle.getPropertyValue('--length-1'), ' 20px'); + assert_equals(computedStyle.getPropertyValue('--length-2'), ' 10px'); + assert_equals(computedStyle.getPropertyValue('--length-3'), ' calc(123px + 123px)'); + assert_equals(computedStyle.getPropertyValue('--registered-length-invalid'), '15px'); + + assert_equals(computedStyle.getPropertyValue('--registered-token-stream-1'), ''); + assert_equals(computedStyle.getPropertyValue('--registered-token-stream-2'), 'fallback'); + assert_equals(computedStyle.getPropertyValue('--token-stream-1'), 'moo'); +}, "var() references work with registered properties"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html new file mode 100644 index 00000000000..275ac47a613 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Disabled stylesheet dynamically</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"></div> +<script> + let root = host.attachShadow({ mode: 'open' }); + root.innerHTML = ` + <style> + div { background: green; width: 100px; height: 100px; } + </style> + <style> + div { background: red; } + </style> + <div></div> + `; + document.body.offsetTop; + root.styleSheets[1].disabled = true; +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html new file mode 100644 index 00000000000..9a5672eb63a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html @@ -0,0 +1,19 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic fallback content</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"> + <span slot="myslot">FAIL</span> +</div> +<script> + let root = host.attachShadow({ mode: "open" }); + root.innerHTML = ` + <slot name="myslot"> + <div style="width: 100px; height: 100px; background: green"></div> + </slot> + `; + document.body.offsetTop; + host.firstElementChild.remove(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html new file mode 100644 index 00000000000..f65d0c7a212 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html @@ -0,0 +1,19 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic fallback content</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"> + <span slot="myslot">FAIL</span> +</div> +<script> + let root = host.attachShadow({ mode: "open" }); + root.innerHTML = ` + <slot name="myslot"> + <div style="width: 100px; height: 100px; background: green"></div> + </slot> + `; + document.body.offsetTop; + host.firstElementChild.removeAttribute("slot"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html new file mode 100644 index 00000000000..a30e8fed7d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html @@ -0,0 +1,18 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic fallback content</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"> +</div> +<script> + let root = host.attachShadow({ mode: "open" }); + root.innerHTML = ` + <slot name="myslot">FAIL</slot> + `; + document.body.offsetTop; + host.innerHTML = ` + <div slot="myslot" style="width: 100px; height: 100px; background: green"></div> + `; +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html new file mode 100644 index 00000000000..29e407573a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html @@ -0,0 +1,20 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic fallback content</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"> + <div slot="myslot" style="width: 100px; height: 100px; background: green"></div> +</div> +<script> + let root = host.attachShadow({ mode: "open" }); + root.innerHTML = ` + <slot name="myslot"></slot> + `; + document.body.offsetTop; + let newSlot = document.createElement('slot'); + newSlot.appendChild(document.createTextNode("FAIL")); + newSlot.setAttribute("name", "myslot"); + root.insertBefore(newSlot, root.firstChild); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html new file mode 100644 index 00000000000..1d84907e5fc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html @@ -0,0 +1,20 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic fallback content</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<div id="host"> + <div slot="myslot" style="width: 100px; height: 100px; background: green"></div> +</div> +<script> + let root = host.attachShadow({ mode: "open" }); + root.innerHTML = ` + <slot name="myslot"></slot> + <slot name="myotherslot"> + FAIL + </slot> + `; + document.body.offsetTop; + host.firstElementChild.setAttribute("slot", "myotherslot"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html new file mode 100644 index 00000000000..a3b89be389a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html @@ -0,0 +1,18 @@ +<!doctype html> +<title>CSS Scoping Module Level 1 - Dynamic insertion of shadow host</title> +<link rel="author" href="mailto:emilio@crisal.io"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model"> +<link rel="match" href="reference/green-box.html"/> +<p>Test passes if you see a single 100px by 100px green box below.</p> +<script> + let host = document.createElement('div'); + let root = host.attachShadow({ mode: 'open' }); + root.innerHTML = ` + <style> + div { background: green; width: 100px; height: 100px; } + </style> + <div></div> + `; + document.body.offsetTop; + document.body.appendChild(host); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-type-proximity.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-type-proximity.html new file mode 100644 index 00000000000..cfe990c4fca --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-type-proximity.html @@ -0,0 +1,80 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +div { + position: absolute; + margin: 0px; +} +#scroller { + height: 400px; + width: 400px; + overflow: scroll; +} +#space { + width: 2000px; + height: 2000px; +} + +.snap { + width: 200px; + height: 200px; + background-color: blue; + scroll-snap-align: start; +} +#left-top { + left: 0px; + top: 0px; +} +#right-bottom { + left: 1000px; + top: 1000px; +} +</style> + +<div id="scroller"> + <div id="space"></div> + <div class="snap" id="left-top"></div> + <div class="snap" id="right-bottom"></div> +</div> + +<script> +var scroller = document.getElementById("scroller"); +var visible_x = 1000 - scroller.clientWidth; +var visible_y = 1000 - scroller.clientHeight; + +test(() => { + scroller.style.scrollSnapType = "both mandatory"; + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 0); + + scroller.scrollTo(visible_x + 10, visible_y + 10); + assert_equals(scroller.scrollLeft, 1000); + assert_equals(scroller.scrollTop, 1000); +}, "mandatory scroll-snap-type should snap as long as the element is visible."); + +test(() => { + scroller.style.scrollSnapType = "both proximity"; + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 0); + + scroller.scrollTo(visible_x + 10, visible_y + 10); + assert_equals(scroller.scrollLeft, visible_x + 10); + assert_equals(scroller.scrollTop, visible_y + 10); +}, "proximity scroll-snap-type shouldn't snap if the snap position is too far away."); + +test(() => { + scroller.style.scrollSnapType = "both proximity"; + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 0); + + scroller.scrollTo(995, 995); + assert_equals(scroller.scrollLeft, 1000); + assert_equals(scroller.scrollTop, 1000); +}, "proximity scroll-snap-type should snap if the snap position is close."); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html new file mode 100644 index 00000000000..d41dcc8a759 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +div { + position: absolute; + margin: 0px; +} +#scroller { + width: 400px; + height: 350px; + overflow: scroll; + scroll-snap-type: both mandatory; +} +#space { + width: 1000px; + height: 1000px; +} +#target { + width: 200px; + height: 200px; + left: 300px; + top: 300px; + scroll-snap-align: start end; +} +</style> + +<div id="scroller"> + <div id="space"></div> + <div id="target"></div> +</div> + +<script> +var scroller = document.getElementById("scroller"); +var width = scroller.clientWidth; +var height = scroller.clientHeight; +[ + ["horizontal-tb", 300, 500 - height], + ["vertical-lr", 500 - width, 300], + ["vertical-rl", 300, 300] +].forEach(([writing_mode, left, top]) => { + test(() => { + scroller.style.writingMode = writing_mode; + if (writing_mode == "vertical-rl") + document.getElementById("target").style.left = (width - 700) + "px"; + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, left, "aligns correctly on x"); + assert_equals(scroller.scrollTop, top, "aligns correctly on y"); + }, "Snaps correctly for " + writing_mode + + " writing mode with 'inline' and 'block' alignments"); +}) +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-to-visible-areas.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-to-visible-areas.html new file mode 100644 index 00000000000..82274344526 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-to-visible-areas.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +div { + position: absolute; + margin: 0px; +} +#scroller { + height: 600px; + width: 600px; + overflow: scroll; + scroll-snap-type: both mandatory; +} +#space { + width: 2000px; + height: 2000px; +} + +.snap { + width: 200px; + height: 200px; + background-color: blue; + scroll-snap-align: start; +} + +#left-top { + left: 0px; + top: 0px; +} + +#right-top { + left: 800px; + top: 0px; +} + +#left-bottom { + left: 0px; + top: 800px; +} + +</style> +<div id="scroller"> + <div id="space"></div> + <div id="left-top" class="snap"></div> + <div id="right-top" class="snap"></div> + <div id="left-bottom" class="snap"></div> +</div> +<script> +var scroller = document.getElementById("scroller"); +test(() => { + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 0); + scroller.scrollTo(300, 0); + assert_equals(scroller.scrollLeft, 800); + assert_equals(scroller.scrollTop, 0); +}, 'Only snap to visible area on X axis, even when the non-visible ones are closer'); + +test(() => { + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 0); + scroller.scrollTo(0, 300); + assert_equals(scroller.scrollLeft, 0); + assert_equals(scroller.scrollTop, 800); +}, 'Only snap to visible area on Y axis, even when the non-visible ones are closer'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html new file mode 100644 index 00000000000..2fd6df98196 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<style> +.test { + width: 200px; + overflow: hidden; +} + +.float { + float: left; + width: 50%; + height: 100px; + + background: orange; + clip-path: polygon(0 0, 100% 100%, 0 100%); +} + +.flex { + display: flex; + height: 50px; + background: rebeccapurple; +} +</style> +<div class="test"> + <div class="float"></div> + <div class="flex"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html new file mode 100644 index 00000000000..cfb5d46a0db --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<link rel="match" href="reference/shape-outside-formatting-context-ref.html"> +<link rel="help" href="https://drafts.csswg.org/css-shapes/"> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1970"> +<meta name="assert" content="The test verifies that a new formatting context does *not* get sized and positioned based off the float area (defined by shape outside)."> +<style> +.test { + width: 200px; + overflow: hidden; +} + +.float { + float: left; + width: 50%; + height: 100px; + + background: orange; + shape-outside: polygon(0 0, 100% 100%, 0 100%); + clip-path: polygon(0 0, 100% 100%, 0 100%); +} + +.flex { + display: flex; + height: 50px; + background: rebeccapurple; +} +</style> +<div class="test"> + <div class="float"></div> + <div class="flex"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-tables/table-model-fixup-2.html b/tests/wpt/web-platform-tests/css/css-tables/table-model-fixup-2.html index 543645135ba..737a8d7e2a8 100644 --- a/tests/wpt/web-platform-tests/css/css-tables/table-model-fixup-2.html +++ b/tests/wpt/web-platform-tests/css/css-tables/table-model-fixup-2.html @@ -79,8 +79,8 @@ <p>Replaced elements inside a table cannot be <mark>table-row</mark> and are considered <mark>block</mark> -- img elements</p> <div> <x-table style="width: 400px"> - <x-tr><x-td><img block src="http://w3.org/favicon.ico" target=a /></x-tr> - <img src="http://w3.org/favicon.ico" table-row target=b /> + <x-tr><x-td><img block src="../support/blue32x32.ico" target=a /></x-tr> + <img src="../support/blue32x32.ico" table-row target=b /> </x-table> </div> <script> @@ -109,8 +109,8 @@ <p>Replaced elements inside a table cannot be <mark>table-column</mark> and are considered <mark>inline</mark> -- img elements</p> <div> <x-table style="width: 400px"> - <x-tr><x-td><img inline src="http://w3.org/favicon.ico" target=a /></x-tr> - <img src="http://w3.org/favicon.ico" table-column target=b /> + <x-tr><x-td><img inline src="../support/blue32x32.ico" target=a /></x-tr> + <img src="../support/blue32x32.ico" table-column target=b /> </x-table> </div> <script> @@ -139,8 +139,8 @@ <p>Replaced elements inside a table cannot be <mark>table-cell</mark> and are considered <mark>inline</mark> -- img elements</p> <div> <x-table style="width: 400px"> - <x-tr><x-td><img inline src="http://w3.org/favicon.ico" target=a /></x-tr> - <x-tr><img src="http://w3.org/favicon.ico" table-cell target=b /></x-tr> + <x-tr><x-td><img inline src="../support/blue32x32.ico" target=a /></x-tr> + <x-tr><img src="../support/blue32x32.ico" table-cell target=b /></x-tr> </x-table> </div> <script> @@ -192,8 +192,8 @@ <p>Both images should share the same line:</p> <p>Replaced elements outside a table cannot be <mark>inline-table</mark> and are considered <mark>inline</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" inline-table target=a /> - <img src="http://w3.org/favicon.ico" inline-table target=b /> + <img src="../support/blue32x32.ico" inline-table target=a /> + <img src="../support/blue32x32.ico" inline-table target=b /> </div> <script> @@ -244,8 +244,8 @@ <p>Both images should stand on their own line:</p> <p>Replaced elements outside a table cannot be <mark>table</mark> and are considered <mark>block</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" table target=a /> - <img src="http://w3.org/favicon.ico" table target=b /> + <img src="../support/blue32x32.ico" table target=a /> + <img src="../support/blue32x32.ico" table target=b /> </div> <script> @@ -296,8 +296,8 @@ <p>Both images should stand on their own line:</p> <p>Replaced elements outside a table cannot be <mark>table-row</mark> and are considered <mark>block</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" table-row target=a /> - <img src="http://w3.org/favicon.ico" table-row target=b /> + <img src="../support/blue32x32.ico" table-row target=a /> + <img src="../support/blue32x32.ico" table-row target=b /> </div> <script> @@ -348,8 +348,8 @@ <p>Both images should stand on their own line:</p> <p>Replaced elements outside a table cannot be <mark>table-row-group</mark> and are considered <mark>block</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" table-row-group target=a /> - <img src="http://w3.org/favicon.ico" table-row-group target=b /> + <img src="../support/blue32x32.ico" table-row-group target=a /> + <img src="../support/blue32x32.ico" table-row-group target=b /> </div> <script> @@ -400,8 +400,8 @@ <p>Both images should share the same line:</p> <p>Replaced elements outside a table cannot be <mark>table-column</mark> and are considered <mark>inline</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" table-column target=a /> - <img src="http://w3.org/favicon.ico" table-column target=b /> + <img src="../support/blue32x32.ico" table-column target=a /> + <img src="../support/blue32x32.ico" table-column target=b /> </div> <script> @@ -452,8 +452,8 @@ <p>Both images should share the same line:</p> <p>Replaced elements outside a table cannot be <mark>table-cell</mark> and are considered <mark>inline</mark> -- img elements</p> <div> - <img src="http://w3.org/favicon.ico" table-cell target=a /> - <img src="http://w3.org/favicon.ico" table-cell target=b /> + <img src="../support/blue32x32.ico" table-cell target=a /> + <img src="../support/blue32x32.ico" table-cell target=b /> </div> <script> diff --git a/tests/wpt/web-platform-tests/css/css-tables/width-distribution/td-with-subpixel-padding.html b/tests/wpt/web-platform-tests/css/css-tables/width-distribution/td-with-subpixel-padding.html new file mode 100644 index 00000000000..ff040773e23 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-tables/width-distribution/td-with-subpixel-padding.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://drafts.csswg.org/css-tables/#width-distribution" /> +<style> +div { + display: inline-block; + width: 20px; + height: 20px; + background: blue; +} +</style> +Passes if each row has two blue squares. +<table> + <tr> + <td class='target' style="padding: 0 0.8px"><div></div> <div></div></td> + <td style="padding: 0 0.8px; width: 30px"></td> + </tr> +</table> +<table> + <tr> + <td class='target' style="padding: 0 1px"><div></div> <div></div></td> + <td style="padding: 0 1px; width: 30px"></td> + </tr> +</table> +<table> + <tr> + <td class='target' style="padding: 0 1.3px"><div></div> <div></div></td> + <td style="padding: 0 1.3px; width: 30px"></td> + </tr> +</table> +<table> + <tr> + <td class='target' style="padding: 0 1.5px"><div></div> <div></div></td> + <td style="padding: 0 1.5px; width: 30px"></td> + </tr> +</table> +<table> + <tr> + <td class='target' style="padding: 0 1.7px"><div></div> <div></div></td> + <td style="padding: 0 1.7px; width: 30px"></td> + </tr> +</table> +<script> +test(() => { + var targets = document.getElementsByClassName('target'); + for (var i = 0; i < targets.length; ++i) { + var divs = targets[i].getElementsByTagName('div'); + assert_equals(divs.length, 2); + assert_equals(divs[0].offsetTop, divs[1].offsetTop, 'Contents of td.target[' + i + '] should not wrap'); + } +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-013.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-013.html deleted file mode 100644 index 4d3c9ca4bb5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-013.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 23B4 TOP SQUARE BRACKET</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-013-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has OP Opening Punctuation property, the browser will not leave 23B4 TOP SQUARE BRACKET at the end of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中⎴文</div> - - - - - -<div class='ref'>中中<br />⎴文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-048.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-048.html deleted file mode 100644 index a2fd90baa82..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-048.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FD3E ORNATE LEFT PARENTHESIS</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-048-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has OP Opening Punctuation property, the browser will not leave FD3E ORNATE LEFT PARENTHESIS at the end of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中﴾文</div> - - - - - -<div class='ref'>中中<br />﴾文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-118.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-118.html deleted file mode 100644 index c460ee42fcf..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-118.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 23B5 BOTTOM SQUARE BRACKET</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-118-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has a CL Closing Punctuation property, the browser will not leave 23B5 BOTTOM SQUARE BRACKET at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中中⎵文</div> - - - - - -<div class='ref'>中中<br />中⎵文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-154.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-154.html deleted file mode 100644 index 47b8ed043ff..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-154.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FD3F ORNATE RIGHT PARENTHESIS</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-154-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has a CL Closing Punctuation property, the browser will not leave FD3F ORNATE RIGHT PARENTHESIS at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中中﴿文</div> - - - - - -<div class='ref'>中中<br />中﴿文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-216.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-216.html deleted file mode 100644 index 6cace8eec2b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-216.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-216-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has an NS Non-Starter property, the browser will not leave 30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中中ー文</div> - - - - - -<div class='ref'>中中<br />中ー文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-224.html b/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-224.html deleted file mode 100644 index 11517ac0dde..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-224.html +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-breaking'> -<link rel="match" href="reference/css3-text-line-break-opclns-224-ref.html"> -<meta name='flags' content=''> -<meta name="assert" content="Because it has an NS Non-Starter property, the browser will not leave FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK at the beginning of a line."> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='test'>中中中ー文</div> - - - - - -<div class='ref'>中中<br />中ー文</div> - - -<!--Notes: - -These tests examine the default behavior of characters against the expectations in the Unicode Standard Annex, version 5.1.0. The two-letter abbreviations are conventions for property names in the Unicode Standard. Non-tailorable characters have normative behavior in the Unicode Standard that applies in all normal circumstances. -<p class='notes'>For more information about expected line break behavior and line break classes, see <a href='http://www.unicode.org/reports/tr14/'>Unicode Standard Annex #14 Line Breaking Properties</a>. - - ---> - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html deleted file mode 100644 index 666a8b8c091..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-013-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 23B4 TOP SQUARE BRACKET</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />⎴文</div> - - - - - -<div class='ref'>中中<br />⎴文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html deleted file mode 100644 index b087f2ddb15..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-048-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FD3E ORNATE LEFT PARENTHESIS</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />﴾文</div> - - - - - -<div class='ref'>中中<br />﴾文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html deleted file mode 100644 index 3aeff410e31..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-118-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 23B5 BOTTOM SQUARE BRACKET</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />中⎵文</div> - - - - - -<div class='ref'>中中<br />中⎵文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html deleted file mode 100644 index e1e1361e774..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-154-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FD3F ORNATE RIGHT PARENTHESIS</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />中﴿文</div> - - - - - -<div class='ref'>中中<br />中﴿文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html deleted file mode 100644 index a93b2261b68..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-216-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: 30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />中ー文</div> - - - - - -<div class='ref'>中中<br />中ー文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html b/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html deleted file mode 100644 index b0b4f7392fb..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/i18n/reference/css3-text-line-break-opclns-224-ref.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html lang="en" > -<head> -<meta charset="utf-8"/> -<title>CSS3 Text, linebreaks: FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK</title> -<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> -<meta name='flags' content=''> -<style type='text/css'> -@font-face { - font-family: 'mplus-1p-regular'; - src: url('/fonts/mplus-1p-regular.woff') format('woff'); - /* filesize: 803K */ - } -.test, .ref { font-size: 30px; font-family: mplus-1p-regular, sans-serif; width: 95px; padding: 0; border: 1px solid orange; line-height: 1em; } -</style> -</head> -<body> -<p class="instructions">Test passes if the two orange boxes are identical.</p> - - -<div class='ref'>中中<br />中ー文</div> - - - - - -<div class='ref'>中中<br />中ー文</div> - - - - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-normal-025.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-normal-025.xht deleted file mode 100644 index 87dcaf34e2f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-normal-025.xht +++ /dev/null @@ -1,119 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Text Test: line-break - normal and prefixes</title> - <!-- prefixes --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <link rel="help" title="5.2. Breaking Rules for Punctuation: the 'line-break' property" href="http://www.w3.org/TR/css-text-3/#line-break" /> - <link rel="match" href="reference/line-break-normal-025-ref.xht" /> - <meta http-equiv="content-language" content="en, ja" /> - <meta name="assert" content="This test verifies that 'line-break: normal' does not allow line breaking before prefixes such as EURO SIGN (U+20AC) and FULLWIDTH DOLLAR SIGN (U+FF04)." /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - .test span { - line-break: normal; // The property to be tested - } - p.test, p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 5px; - padding: 5px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes DOLLAR SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes POUND SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes YEN SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes EURO SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">€</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes NUMERO SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">№</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH DOLLAR SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH POUND SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH YEN SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018a.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018a.xht deleted file mode 100644 index d65f5257844..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018a.xht +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Text Test: line-break - strict and prefixes</title> - <!-- prefixes --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <link rel="help" title="5.2. Breaking Rules for Punctuation: the 'line-break' property" href="http://www.w3.org/TR/css-text-3/#line-break" /> - <link rel="match" href="reference/line-break-strict-018a-ref.xht" /> - <meta http-equiv="content-language" content="en, ja" /> - <meta name="assert" content="This test verifies that 'line-break: strict' does not allow line breaking before prefixes such as EURO SIGN (U+20AC) and FULLWIDTH DOLLAR SIGN (U+FF04)." /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - .test span { - line-break: strict; // The property to be tested - } - p.test, p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes DOLLAR SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes POUND SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes YEN SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes EURO SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">€</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes NUMERO SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">№</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH DOLLAR SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018b.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018b.xht deleted file mode 100644 index 62315b945b7..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/line-break-strict-018b.xht +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Text Test: line-break - strict and prefixes</title> - <!-- prefixes --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <link rel="help" title="5.2. Breaking Rules for Punctuation: the 'line-break' property" href="http://www.w3.org/TR/css-text-3/#line-break" /> - <link rel="match" href="reference/line-break-strict-018b-ref.xht" /> - <meta http-equiv="content-language" content="en, ja" /> - <meta name="assert" content="This test verifies that 'line-break: strict' does not allow line breaking before prefixes such as EURO SIGN (U+20AC) and FULLWIDTH DOLLAR SIGN (U+FF04)." /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - .test span { - line-break: strict; // The property to be tested - } - p.test, p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes FULLWIDTH POUND SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH YEN SIGN --> - <p class="test" lang="ja"> - <span>サンプル文サンプル文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-normal-025-ref.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-normal-025-ref.xht deleted file mode 100644 index 5f62f080541..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-normal-025-ref.xht +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Reftest Reference</title> - <!-- reftest for line-break-normal-025.xht --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <meta http-equiv="content-language" content="en, ja" /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 5px; - padding: 5px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes DOLLAR SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes POUND SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes YEN SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes EURO SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes NUMERO SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH DOLLAR SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH POUND SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH YEN SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018a-ref.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018a-ref.xht deleted file mode 100644 index ec2860fe175..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018a-ref.xht +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Reftest Reference</title> - <!-- reftest for line-break-strict-018.xht --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <meta http-equiv="content-language" content="en, ja" /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes DOLLAR SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes POUND SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes YEN SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes EURO SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">€</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes NUMERO SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">№</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH DOLLAR SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">$</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018b-ref.xht b/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018b-ref.xht deleted file mode 100644 index 8d654a61572..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/line-break/reference/line-break-strict-018b-ref.xht +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Reftest Reference</title> - <!-- reftest for line-break-strict-018.xht --> - <link rel="author" title="Taka Oshiyama" href="mailto:takaoshiyama@gmail.com" /> - <meta http-equiv="content-language" content="en, ja" /> - <style type="text/css"> - @font-face - { - font-family: "mplus-1p-regular"; - src: url("/fonts/mplus-1p-regular.woff") format("woff"); - /* filesize: 803300 bytes (784.5 KBytes) */ - /* - mplus-1p-regular.ttf can be downloaded at/from [TBD later] - */ - } - p.control { - border: 1px solid gray; - color: blue; - font-family: "mplus-1p-regular"; - width: 10em; - } - span.target { - background-color: aqua; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - </style> - </head> - <body lang="en"> - <p> - Test passes if the highlighted characters in each pair of rectangles are at the exact same horizontal position. - </p> - <div class="wrapper"> - <!-- prefixes FULLWIDTH POUND SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">£</span>サンプル文</span> - </p> - </div> - <div class="wrapper"> - <!-- prefixes FULLWIDTH YEN SIGN --> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - <p class="control" lang="ja"> - <span>サンプル文サンプル<br />文<span class="target">¥</span>サンプル文</span> - </p> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-012.html b/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-012.html new file mode 100644 index 00000000000..08f956c9166 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/line-breaking/line-breaking-012.html @@ -0,0 +1,40 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>CSS Text — line breaking for nowrap and floats</title> +<meta name=assert content="When whitespace: nowrap is specified, floats should not cause line breaks"> +<link rel=help href="https://www.w3.org/TR/css-text-3/#white-space-property"> +<link rel=match href="reference/line-breaking-012-ref.html"> +<style> +.container { + position: relative; + color:green; + line-height: 1em; + font-family: Ahem; + font-size: 20px; +} + +.wrapper { + white-space: nowrap; +} + +span { + float: left; +} + +.fail { + color: red; + position: absolute; + left: 0; + top: 0; + z-index: -1; +} +</style> +<body> + <p>There should be a green rectangle and no red.</p> + <div class="container"> + <div class="fail">XX</div> + <div class="wrapper">X<span>X<span></div> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-012-ref.html b/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-012-ref.html new file mode 100644 index 00000000000..463dc2287ea --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/line-breaking/reference/line-breaking-012-ref.html @@ -0,0 +1,17 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Reference File for line breaking tests</title> +<style> +div { + color:green; + line-height: 1em; + font-family: Ahem; + font-size: 20px; +} +</style> +<body> + <p>There should be a green rectangle and no red.</p> + <div>XX</div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/reference/word-break-normal-002-ref.xht b/tests/wpt/web-platform-tests/css/css-text/word-break/reference/word-break-normal-002-ref.xht deleted file mode 100644 index 726103e2f5f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/word-break/reference/word-break-normal-002-ref.xht +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> - <head> - <title>CSS Test: word-break - normal - basic cases Reftest Reference</title> - <link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" /> - <style type="text/css"> - <![CDATA[ - p.control { - border: 1px solid gray; - color: blue; - font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック"; - width: 10em; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - span.attention { - color: red; - } - ]]> - </style> - </head> - <body> - <p> - Test passes if each pair of upper and lower text in the square box is identical. - </p> - <div class="wrapper"> - <p class="control"> - <span>Filler Text Filler<br />Text Filler Text</span> - </p> - <p class="control"> - <span>Filler Text Filler<br />Text Filler Text</span> - </p> - </div> - <div class="wrapper"> - <p class="control"> - <span>満たすための文字<br />Filler Text</span> - </p> - <p class="control"> - <span>満たすための文字<br />Filler Text</span> - </p> - </div> - <div class="wrapper"> - <p class="control"> - <span>満たすための文字満た<br />すための文字</span> - </p> - <p class="control"> - <span>満たすための文字満た<br />すための文字</span> - </p> - </div> - <p> - <span class="attention">* You will need a Japanese font.</span><br /> - If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page. - </p> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-normal-002.xht b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-normal-002.xht deleted file mode 100644 index 059dc19e93a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-normal-002.xht +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> - <head> - <title>CSS Test: word-break - normal - basic cases</title> - <link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" /> - <link rel="help" title="CSS Text Level 3: 5.2. Word Breaking Rules: the ‘word-break’ property" href="http://www.w3.org/TR/css-text-3/#word-break" /> - <link rel="match" href="reference/word-break-normal-002-ref.xht"/> - <meta name="flags" content="font" /> - <meta name="assert" content="Break lines according to their usual rules." /> - <style type="text/css"> - <![CDATA[ - .test span { - word-break: normal; - } - /* the CSS below is not part of the test */ - p.test, p.control { - border: 1px solid gray; - color: blue; - font-family: "IPAMincho", "IPAGothic", "IPA明朝", "IPAゴシック"; - width: 10em; - } - div.wrapper { - display: inline-block; - border: 1px solid; - margin: 10px; - padding: 10px; - } - span.attention { - color: red; - } - ]]> - </style> - </head> - <body> - <p> - Test passes if each pair of upper and lower text in the square box is identical. - </p> - <div class="wrapper"> - <p class="test"> - <span>Filler Text Filler Text Filler Text</span> - </p> - <p class="control"> - <span>Filler Text Filler<br />Text Filler Text</span> - </p> - </div> - <div class="wrapper"> - <p class="test"> - <span>満たすための文字 Filler Text</span> - </p> - <p class="control"> - <span>満たすための文字<br />Filler Text</span> - </p> - </div> - <div class="wrapper"> - <p class="test"> - <span>満たすための文字満たすための文字</span> - </p> - <p class="control"> - <span>満たすための文字満た<br />すための文字</span> - </p> - </div> - <p> - <span class="attention">* You will need a Japanese font.</span><br /> - If you are unable to see font glyphs for certain characters using the browsers default font, install the <a href="http://ossipedia.ipa.go.jp/ipafont/">IPA Font(http://ossipedia.ipa.go.jp/ipafont/)</a> and reload this page. - </p> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html index b6b0de59e75..b923f380bda 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html @@ -14,10 +14,4 @@ test(() => { assert_throws(new TypeError(), () => new CSSKeywordValue('')); }, 'Constructing CSSKeywordValue with an empty string throws a TypeError'); -test(() => { - let result = new CSSKeywordValue('lemon'); - assert_throws(new TypeError(), () => result.value = ''); - assert_equals(result.value, 'lemon'); -}, 'Updating CSSKeywordValue.value with an empty string throws a TypeError'); - </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html new file mode 100644 index 00000000000..1af557fb086 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-value.html @@ -0,0 +1,34 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSKeywordValue.value</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-csskeywordvalue-value"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +const gTestArguments = [ + { keyword: 'initial', description: 'a CSS wide keyword' }, + { keyword: 'auto', description: 'a CSS keyword' }, + { keyword: 'lemon', description: 'an unsupported CSS keyword' }, + { keyword: '3! + 4@', description: 'a string containing multiple tokens' }, + { keyword: '☺', description: 'a unicode string' }, +]; + +for (const args of gTestArguments) { + test(() => { + const result = new CSSKeywordValue(args.keyword); + assert_not_equals(result, null, 'a CSSKeywordValue is created'); + assert_equals(result.value, args.keyword, 'value reflects new value'); + }, `CSSKeywordValue.value can be updated to ${args.description}`); +} + +test(() => { + let result = new CSSKeywordValue('lemon'); + assert_throws(new TypeError(), () => result.value = ''); + assert_equals(result.value, 'lemon', 'value does not change'); +}, 'Updating CSSKeywordValue.value with an empty string throws a TypeError'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html index fe163681ee9..1ebbf8de73b 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue.html @@ -1,12 +1,11 @@ <!doctype html> <meta charset="utf-8"> -<title>CSSKeywordValue</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#csskeywordvalue"> -<meta name="assert" content="Test CSSKeywordValue constructor and attributes" /> +<title>CSSKeywordValue Constructor</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-csskeywordvalue-csskeywordvalue"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<div id="log"> +<div id="log"></div> <script> 'use strict'; @@ -18,23 +17,13 @@ const gTestArguments = [ { keyword: '☺', description: 'a unicode string' }, ]; -for (const {keyword, description} of gTestArguments) { +for (const args of gTestArguments) { test(() => { - const result = new CSSKeywordValue(keyword); - - assert_not_equals(result, null, - 'A CSSKeywordValue should be created'); - assert_equals(result.value, keyword, - 'Value attribute should be same as passed in the constructor'); - }, 'CSSKeywordValue can be constructed from ' + description); - - test(() => { - let result = new CSSKeywordValue('auto'); - result.value = keyword; - - assert_equals(result.value, keyword, - 'Value attribute should be same as passed in the setter'); - }, 'CSSKeywordValue.value can be updated to ' + description); + const result = new CSSKeywordValue(args.keyword); + assert_not_equals(result, null, 'a CSSKeywordValue is created'); + assert_equals(result.value, args.keyword, + 'value is same as given by constructor'); + }, `CSSKeywordValue can be constructed from ${args.description}`); } </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html new file mode 100644 index 00000000000..9f0403fbae4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-indexed-getter-setter.html @@ -0,0 +1,54 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSUnparsedValue Indexed Getter and Setter</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunparsedvalue-__getter__-index-index"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunparsedvalue-__setter__-index-val-val"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/testhelper.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + const result = new CSSUnparsedValue(['foo', 'bar']); + assert_equals(result[3], undefined, 'result from out of range index'); + assert_equals(result[-1], undefined, 'result from negative index'); +}, 'Getting invalid index in CSSUnparsedValue returns undefined'); + +test(() => { + let result = new CSSUnparsedValue([new CSSVariableReferenceValue('--foo')]); + result[0] = 'A'; + assert_equals(result[0], 'A', 'fragment reflects new value'); +}, 'Can update fragment in CSSUnparsedValue to a String'); + +test(() => { + let result = new CSSUnparsedValue(['foo']); + result[0] = new CSSVariableReferenceValue('--A'); + assert_style_value_equals(result[0], new CSSVariableReferenceValue('--A'), + 'fragment reflects new value'); +}, 'Can update fragment in CSSUnparsedValue to a CSSVariableReference'); + +test(() => { + let result = new CSSUnparsedValue([]); + result[0] = 'foo'; + assert_equals(result[0], 'foo', 'new fragment is appended'); +}, 'Setting one past the last fragment in a CSSUnparsedValue to a String ' + + 'appends the new fragment'); + +test(() => { + let result = new CSSUnparsedValue([' ']); + result[1] = new CSSVariableReferenceValue('--A'); + assert_style_value_equals(result[1], new CSSVariableReferenceValue('--A'), + 'new fragment is appended'); +}, 'Setting one past the last fragment in a CSSUnparsedValue to a ' + + 'CSSVariableReferenceValue appends the new fragment'); + +test(() => { + let result = new CSSUnparsedValue(['foo', 'bar']); + assert_throws(new RangeError(), () => result[3] = 'foo'); + assert_equals(result[3], undefined, 'fragment does not change'); +}, 'Setting out of range index in CSSUnparsedValue throws RangeError'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html new file mode 100644 index 00000000000..186ba7329c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-iterable.html @@ -0,0 +1,24 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSUnparsedValue Iterable Declaration</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssunparsedvalue"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/testhelper.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + const result = new CSSUnparsedValue([]); + assert_array_equals([...result], [], 'result of iterating'); +}, 'Iterating over an empty CSSUnparsedValue produces nothing'); + +test(() => { + const args = [' ', new CSSVariableReferenceValue('--A')]; + const result = new CSSUnparsedValue(args); + assert_style_value_array_equals([...result], args, 'result of iterating'); +}, 'Iterating over a CSSUnparsedValue produces all fragments'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html new file mode 100644 index 00000000000..cb2b9c9b706 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-length.html @@ -0,0 +1,47 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSUnparsedValue.length</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunparsedvalue-length"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + const result = new CSSUnparsedValue([]); + assert_equals(result.length, 0, 'length'); +}, 'Length of CSSUnparsedValue with no fragments is zero'); + +test(() => { + const result = new CSSUnparsedValue([ + ' ', new CSSVariableReferenceValue('--A') + ]); + assert_equals(result.length, 2, 'length'); +}, 'Length of CSSUnparsedValue with multiple fragments is the number of ' + + 'fragments'); + +test(() => { + let result = new CSSUnparsedValue([' ']); + assert_equals(result.length, 1, 'initial length'); + + result[1] = new CSSVariableReferenceValue('--A'); + assert_equals(result.length, 2, 'length after appending once'); + + result[2] = 'lemon'; + assert_equals(result.length, 3, 'length after appending twice'); +}, 'Length of CSSUnparsedValue updates when fragments are appended'); + +test(() => { + let result = new CSSUnparsedValue([' ']); + assert_equals(result.length, 1, 'initial length'); + + result[0] = new CSSVariableReferenceValue('--A'); + assert_equals(result.length, 1, 'length after modification'); + + result[0] = 'lemon'; + assert_equals(result.length, 1, 'length after modification'); +}, 'Length of CSSUnparsedValue does not change when fragments are modified'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html index f33703256fb..db43fd7ecbe 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html @@ -1,32 +1,31 @@ <!doctype html> <meta charset="utf-8"> -<title>CSSUnparsedValue</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#unparsedvalue-objects"> -<meta name="assert" content="Test CSSUnparsedValue constructor and members"> +<title>CSSUnparsedValue Constructor</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunparsedvalue-cssunparsedvalue"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../resources/testhelper.js"></script> <body> -<div id="log"> +<div id="log"></div> <script> 'use strict'; const gTestArguments = [ { description: 'no arguments', - args: [], + fragments: [], }, { - description: 'an empty string', - args: [''], + description: 'a single empty string', + fragments: [''], }, { - description: 'a CSSVariableReferenceValue', - args: [new CSSVariableReferenceValue('--foo')], + description: 'a single CSSVariableReferenceValue', + fragments: [new CSSVariableReferenceValue('--foo')], }, { - description: 'mix of strings and CSSVariableReferenceValues', - args: [ + description: 'a mix of strings and CSSVariableReferenceValues', + fragments: [ 'foo', 'bar', new CSSVariableReferenceValue('--A'), @@ -36,56 +35,13 @@ const gTestArguments = [ }, ]; -for (const {args, description} of gTestArguments) { +for (const args of gTestArguments) { test(() => { - const result = new CSSUnparsedValue(args); - - assert_not_equals(result, null, - 'A CSSUnparsedValue should be created'); - assert_array_equals(result, args, - 'Content of CSSUnparsedValue should be same as the arguments ' + - 'passed in the constructor'); - }, 'CSSUnparsedValue can be constructed from ' + description); + const result = new CSSUnparsedValue(args.fragments); + assert_not_equals(result, null, 'a CSSUnparsedValue is created'); + assert_style_value_array_equals(result, args.fragments, + 'fragments are same as given by constructor'); + }, `CSSUnparsedValue can be constructed from ${args.description}`); } -test(() => { - let result = new CSSUnparsedValue([new CSSVariableReferenceValue('--foo')]); - - result[0] = 'A'; - assert_equals(result[0], 'A', 'Item should be updated to new value'); -}, 'Can update item in CSSUnparsedValue to a string'); - -test(() => { - let result = new CSSUnparsedValue(['foo']); - - result[0] = new CSSVariableReferenceValue('--A'); - assert_style_value_equals(result[0], new CSSVariableReferenceValue('--A'), - 'Item should be updated to new value'); -}, 'Can update item in CSSUnparsedValue to a variable reference'); - -test(() => { - let result = new CSSUnparsedValue([]); - - result[0] = new CSSVariableReferenceValue('--A'); - assert_equals(result.length, 1, - 'Length of CSSUnparsedValue should have increased'); - assert_style_value_equals(result[0], new CSSVariableReferenceValue('--A'), - 'New item should be appended'); - - result[1] = 'foo'; - assert_equals(result.length, 2, - 'Length of CSSUnparsedValue should have increased'); - assert_equals(result[1], 'foo', 'New item should be appended'); -}, 'Can append items to CSSUnparsedValue'); - -test(() => { - const result = new CSSUnparsedValue(['foo', 'bar']); - assert_equals(result[3], undefined); -}, 'Getting invalid index in CSSUnparsedValue returns undefined'); - -test(() => { - let result = new CSSUnparsedValue(['foo', 'bar']); - assert_throws(new RangeError(), () => result[3] = 'foo'); -}, 'Setting invalid index in CSSUnparsedValue throws RangeError'); - </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html index c58bf76bac3..3696e9997ed 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html @@ -20,22 +20,4 @@ test(() => { }, 'Constructing a CSSVariableReferenceValue with an invalid variable name ' + 'throws SyntaxError'); -test(() => { - let result = new CSSVariableReferenceValue('--foo'); - assert_throws(new TypeError(), () => result.variable = ''); - - assert_equals(result.variable, '--foo', - 'Variable member should not have changed'); -}, 'Updating CSSVariableReferenceValue.variable to an empty variable name ' + - 'throws TypeError'); - -test(() => { - let result = new CSSVariableReferenceValue('--foo'); - assert_throws(new TypeError(), () => result.variable = 'bar'); - - assert_equals(result.variable, '--foo', - 'Variable member should not have changed'); -}, 'Updating CSSVariableReferenceValue.variable to an invalid variable name ' + - 'throws TypeError'); - </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html new file mode 100644 index 00000000000..236758bf1f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-variable.html @@ -0,0 +1,33 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSVariableReferenceValue.variable</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssvariablereferencevalue-variable"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + let result = new CSSVariableReferenceValue('--foo'); + result.variable = '--bar'; + assert_equals(result.variable, '--bar', 'variable reflects new value'); +}, 'CSSVariableReferenceValue.variable can updated to a valid custom ' + + 'property name'); + +test(() => { + let result = new CSSVariableReferenceValue('--foo'); + assert_throws(new TypeError(), () => result.variable = ''); + assert_equals(result.variable, '--foo', 'variable does not change'); +}, 'Updating CSSVariableReferenceValue.variable to the empty string ' + + 'throws TypeError'); + +test(() => { + let result = new CSSVariableReferenceValue('--foo'); + assert_throws(new TypeError(), () => result.variable = 'bar'); + assert_equals(result.variable, '--foo', 'variable does not change'); +}, 'Updating CSSVariableReferenceValue.variable to an invalid custom ' + + 'property name throws TypeError'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html index 7e981567fe8..9899b210ad5 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue.html @@ -1,55 +1,40 @@ <!doctype html> <meta charset="utf-8"> -<title>CSSVariableReferenceValue tests</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssvariablereferencevalue"> -<meta name="assert" content="Test CSSVariableReferenceValue constructor and attributes" /> +<title>CSSVariableReferenceValue Constructor</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssvariablereferencevalue-cssvariablereferencevalue"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../resources/testhelper.js"></script> +<body> +<div id="log"></div> <script> 'use strict'; test(() => { const result = new CSSVariableReferenceValue('--foo'); - - assert_not_equals(result, null, - 'A CSSVariableReferenceValue should be created'); + assert_not_equals(result, null, 'a CSSVariableReferenceValue is created'); assert_equals(result.variable, '--foo', - 'Variable member should be same as passed in the constructor'); - assert_equals(result.fallback, null, - 'Fallback member should be null'); + 'variable is same as passed by constructor'); + assert_equals(result.fallback, null, 'fallback'); }, 'CSSVariableReferenceValue can be constructed with no fallback'); test(() => { const result = new CSSVariableReferenceValue('--foo', null); - - assert_not_equals(result, null, - 'A CSSVariableReferenceValue should be created'); + assert_not_equals(result, null, 'a CSSVariableReferenceValue is created'); assert_equals(result.variable, '--foo', - 'Variable member should be same as passed in the constructor'); - assert_equals(result.fallback, null, 'Fallback member should be null'); + 'variable is same as passed by constructor'); + assert_equals(result.fallback, null, 'fallback'); }, 'CSSVariableReferenceValue can be constructed with null fallback'); test(() => { const result = new CSSVariableReferenceValue('--foo', new CSSUnparsedValue(['lemon'])); - - assert_not_equals(result, null, - 'A CSSVariableReferenceValue should be created'); + assert_not_equals(result, null, 'a CSSVariableReferenceValue is created'); assert_equals(result.variable, '--foo', - 'Variable member should be same as passed in the constructor'); - assert_not_equals(result.fallback, null, - 'Fallback member should not be null'); + 'variable is same as passed by constructor'); + assert_not_equals(result.fallback, null, 'fallback'); assert_style_value_equals(result.fallback, new CSSUnparsedValue(['lemon']), - 'Fallback member should be as same as passed in the constructor'); + 'fallback is same as passed by constructor'); }, 'CSSVariableReferenceValue can be constructed with valid fallback'); -test(() => { - let result = new CSSVariableReferenceValue('--foo'); - result.variable = '--bar'; - - assert_equals(result.variable, '--bar', - 'Variable member should be updated to new value'); -}, 'CSSVariableReferenceValue.variable can updated to a valid variable name'); - </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html new file mode 100644 index 00000000000..4dff735e971 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue-value.html @@ -0,0 +1,19 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSUnitValue.value</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssunitvalue"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + const result = new CSSUnitValue(-3.14, 'px'); + result.value = 3.14; + assert_equals(result.value, 3.14, 'value reflects new value'); + assert_equals(result.unit, 'px', 'unit does not change'); +}, 'CSSUnitValue.value can be updated to a different value'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html new file mode 100644 index 00000000000..411b36fe1ed --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.html @@ -0,0 +1,32 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSUnitValue Constructor</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunitvalue-cssunitvalue"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +test(() => { + assert_throws(new TypeError(), () => new CSSUnitValue(0, 'lemon')); +}, 'Constructing CSSUnitValue with an unknown unit throws a TypeError'); + +test(() => { + assert_throws(new TypeError(), () => new CSSUnitValue(0, '')); +}, 'Constructing CSSUnitValue with a empty string unit throws a TypeError'); + +for (const unit of gValidUnits) { + test(() => { + const result = new CSSUnitValue(-3.14, unit); + assert_not_equals(result, null, 'a CSSUnitValue is created'); + assert_equals(result.value, -3.14, + 'value is same as given by constructor'); + assert_equals(result.unit, unit.toLowerCase(), + 'unit is same as given by constructor'); + }, 'CSSUnitValue can be constructed with ' + unit); +} + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html deleted file mode 100644 index 24769b3774e..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html +++ /dev/null @@ -1,30 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>CSSUnitValue tests</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#simple-numeric"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../resources/testhelper.js"></script> -<script> -'use strict'; - -const gInvalidTestUnits = [ - { value: '', desc: 'an empty string' }, - { value: 'lemon', desc: 'an invalid unit' }, -]; - -for (const {unit, desc} of gInvalidTestUnits) { - test(() => { - assert_throws(new TypeError(), () => new CSSUnitValue(0, unit)); - }, 'Constructing CSSUnitValue with ' + desc + ' as the unit throws a TypeError'); -} - -for (const unit of gValidUnits) { - test(() => { - const result = new CSSUnitValue(-3.14, unit); - assert_equals(result.value, -3.14); - assert_equals(result.unit, unit.toLowerCase()); - }, 'CSSUnitValue can be constructed with ' + unit); -} - -</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/break.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/break.html new file mode 100644 index 00000000000..66d24beab09 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/break.html @@ -0,0 +1,41 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'break' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +for (const suffix of ['after', 'before']) { + runPropertyTests('break-' + suffix, [ + { syntax: 'auto' }, + { syntax: 'avoid' }, + { syntax: 'avoid-column' }, + { syntax: 'avoid-page' }, + { syntax: 'avoid-region' }, + { syntax: 'column' }, + { syntax: 'left' }, + { syntax: 'page' }, + { syntax: 'recto' }, + { syntax: 'region' }, + { syntax: 'right' }, + { syntax: 'verso' }, + ]); +} + +runPropertyTests('break-inside', [ + { syntax: 'auto' }, + { syntax: 'avoid' }, + { syntax: 'avoid-column' }, + { syntax: 'avoid-page' }, + { syntax: 'avoid-region' }, + ]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/caption-side.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/caption-side.html new file mode 100644 index 00000000000..9ae512d2dfe --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/caption-side.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'caption-side' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('caption-side', [ + { syntax: 'top' }, + { syntax: 'bottom' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-basis.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-basis.html new file mode 100644 index 00000000000..650b08035df --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-basis.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-basis' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('flex-basis', [ + { syntax: 'auto' }, + { syntax: 'content' }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling, + }, + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling, + }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-direction.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-direction.html new file mode 100644 index 00000000000..49b7a983316 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-direction.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-direction' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('flex-direction', [ + { syntax: 'row' }, + { syntax: 'row-reverse' }, + { syntax: 'column' }, + { syntax: 'column-reverse' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow.html new file mode 100644 index 00000000000..3d6b46f2624 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow.html @@ -0,0 +1,20 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-flow' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runUnsupportedPropertyTests('flex-flow', [ + 'row', 'column wrap', 'row-reverse wrap-reverse' +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-grow.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-grow.html new file mode 100644 index 00000000000..9c04ad30c86 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-grow.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-grow' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('flex-grow', [ + { + syntax: '<number>', + specified: assert_is_equal_with_range_handling, + }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html new file mode 100644 index 00000000000..30ee7db84d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-shrink.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-shrink' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('flex-shrink', [ + { + syntax: '<number>', + specified: assert_is_equal_with_range_handling, + }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html new file mode 100644 index 00000000000..56d14f64cf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-wrap.html @@ -0,0 +1,22 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex-wrap' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('flex-wrap', [ + { syntax: 'nowrap' }, + { syntax: 'wrap' }, + { syntax: 'wrap-reverse' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex.html new file mode 100644 index 00000000000..99a3e1219da --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex.html @@ -0,0 +1,20 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'flex' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runUnsupportedPropertyTests('flex', [ + 'auto', '2', '1 30px', '2 2 10%' +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html new file mode 100644 index 00000000000..620f68ff653 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html @@ -0,0 +1,65 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'font-size' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('font-size', [ + { + syntax: 'xx-small', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'x-small', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'small', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'medium', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'large', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'x-large', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'xx-large', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'larger', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: 'smaller', + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling, + computed: (_, result) => assert_is_unit('px', result) + }, + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling, + computed: (_, result) => assert_is_unit('px', result) + }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height.html index 4ec1a7a4ba0..55af0947c2a 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/height.html @@ -19,4 +19,27 @@ runPropertyTests('height', [ { syntax: '<length>', specified: assert_is_equal_with_range_handling }, ]); +runPropertyTests('min-height', [ + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling + }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling + }, +]); + +runPropertyTests('max-height', [ + { syntax: 'none' }, + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling + }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling + }, +]); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/isolation.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/isolation.html new file mode 100644 index 00000000000..85f5749f94e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/isolation.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'isolation' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('isolation', [ + { syntax: 'auto' }, + { syntax: 'isolate' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html new file mode 100644 index 00000000000..5509d878135 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mix-blend-mode.html @@ -0,0 +1,35 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'mix-blend-mode' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('mix-blend-mode', [ + { syntax: 'normal' }, + { syntax: 'multiply' }, + { syntax: 'screen' }, + { syntax: 'overlay' }, + { syntax: 'darken' }, + { syntax: 'lighten' }, + { syntax: 'color-dodge' }, + { syntax: 'color-burn' }, + { syntax: 'hard-light' }, + { syntax: 'soft-light' }, + { syntax: 'difference' }, + { syntax: 'exclusion' }, + { syntax: 'hue' }, + { syntax: 'saturation' }, + { syntax: 'color' }, + { syntax: 'luminosity' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/object-fit.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/object-fit.html new file mode 100644 index 00000000000..1d1ee0afd1f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/object-fit.html @@ -0,0 +1,24 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'object-fit' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('object-fit', [ + { syntax: 'fill' }, + { syntax: 'contain' }, + { syntax: 'cover' }, + { syntax: 'none' }, + { syntax: 'scale-down' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html new file mode 100644 index 00000000000..590e9eb776d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-anchor.html @@ -0,0 +1,20 @@ +<meta charset="utf-8"> +<title>'offset-anchor' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('offset-anchor', [ + { syntax: 'auto' }, + { syntax: '<position>' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-distance.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-distance.html new file mode 100644 index 00000000000..fc4adaff9da --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-distance.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'offset-distance' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('offset-distance', [ + { syntax: '<length>' }, + { syntax: '<percentage>' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-path.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-path.html new file mode 100644 index 00000000000..1cf1b094bbe --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-path.html @@ -0,0 +1,25 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'offset-path' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('offset-path', [ + { syntax: 'none' }, +]); + +runUnsupportedPropertyTests('offset-path', [ + 'ray(45deg closest-side)', + 'path("M 100 100 L 300 100 L 200 300 Z")', +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-position.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-position.html new file mode 100644 index 00000000000..fb843bf6822 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-position.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'offset-position' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('offset-position', [ + { syntax: 'auto' }, + { syntax: '<position>' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html new file mode 100644 index 00000000000..56a8580cb80 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-rotate.html @@ -0,0 +1,20 @@ +<meta charset="utf-8"> +<title>'offset-rotate' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runUnsupportedPropertyTests('offset-rotate', [ + 'auto 90deg', + 'reverse -90deg', +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset.html new file mode 100644 index 00000000000..5b7e713bec9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'offset' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runUnsupportedPropertyTests('offset', [ + 'auto', '10px 30px', 'none', + 'ray(45deg closest-side)', + 'path("M 100 100 L 300 100 L 200 300 z")', + 'ray(45deg closest-side) / 40px 20px' +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html new file mode 100644 index 00000000000..3e069e76045 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'pointer-events' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('pointer-events', [ + { syntax: 'bounding-box' }, + { syntax: 'visiblePainted' }, + { syntax: 'visibleFill' }, + { syntax: 'visibleStroke' }, + { syntax: 'visible' }, + { syntax: 'painted' }, + { syntax: 'fill' }, + { syntax: 'stroke' }, + { syntax: 'all' }, + { syntax: 'none' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js index 3145ac8911b..2c20c05e7d0 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js @@ -352,7 +352,7 @@ function runPropertyTests(propertyName, testCases) { // Retrieve test examples for this test case's syntax. If the syntax // looks like a keyword, then create an example on the fly. - const syntaxExamples = testCase.syntax.match(/^[a-z\-]+$/) ? + const syntaxExamples = testCase.syntax.toLowerCase().match(/^[a-z\-]+$/) ? createKeywordExample(testCase.syntax) : gTestSyntaxExamples[testCase.syntax]; diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html new file mode 100644 index 00000000000..8f2cc07593b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-margin.html @@ -0,0 +1,32 @@ +<!doctype html> +<meta charset="utf-8"> +<title>scroll-margin related properties</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +for (const suffix of ['top', 'left', 'right', 'bottom']) { + runPropertyTests('scroll-margin-' + suffix, [ + { syntax: '<length>' }, + ]); +} + +for (const suffix of ['inline-start', 'block-start', 'inline-end', 'block-end']) { + runPropertyTests('scroll-margin-' + suffix, [ + { syntax: '<length>' }, + ]); +} + +runUnsupportedPropertyTests('scroll-margin', + ['0px', '1px 2px', '3px 4px 5px', '6px 7px 8px 9px'] +); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html new file mode 100644 index 00000000000..228cf1fdc2d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.html @@ -0,0 +1,34 @@ +<!doctype html> +<meta charset="utf-8"> +<title>scroll-padding related properties</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +for (const suffix of ['top', 'left', 'right', 'bottom']) { + runPropertyTests('scroll-padding-' + suffix, [ + { syntax: '<percentage>' }, + { syntax: '<length>' }, + ]); +} + +for (const suffix of ['inline-start', 'block-start', 'inline-end', 'block-end']) { + runPropertyTests('scroll-padding-' + suffix, [ + { syntax: '<percentage>' }, + { syntax: '<length>' }, + ]); +} + +runUnsupportedPropertyTests('scroll-padding', + ['0%', '1px 2px', '3% 4px 5%', '6px 7% 8% 9px'] +); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/table-layout.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/table-layout.html new file mode 100644 index 00000000000..e58d019958b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/table-layout.html @@ -0,0 +1,21 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'table-layout' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('table-layout', [ + { syntax: 'auto' }, + { syntax: 'fixed' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-orientation.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-orientation.html new file mode 100644 index 00000000000..8bc74b7b3c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-orientation.html @@ -0,0 +1,22 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'text-orientation' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('text-orientation', [ + { syntax: 'mixed' }, + { syntax: 'upright' }, + { syntax: 'sideways' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html new file mode 100644 index 00000000000..5ac27c433dc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/unicode-bidi.html @@ -0,0 +1,25 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'unicode-bidi' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('unicode-bidi', [ + { syntax: 'normal' }, + { syntax: 'embed' }, + { syntax: 'isolate' }, + { syntax: 'bidi-override' }, + { syntax: 'isolate-override' }, + { syntax: 'plaintext' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width.html index f79eda147c6..29b3382b1dd 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/width.html @@ -25,4 +25,27 @@ runPropertyTests('width', [ }, ]); +runPropertyTests('min-width', [ + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling + }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling + }, +]); + +runPropertyTests('max-width', [ + { syntax: 'none' }, + { + syntax: '<percentage>', + specified: assert_is_equal_with_range_handling + }, + { + syntax: '<length>', + specified: assert_is_equal_with_range_handling + }, +]); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/writing-mode.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/writing-mode.html new file mode 100644 index 00000000000..976a0ea22db --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/writing-mode.html @@ -0,0 +1,24 @@ +<!doctype html> +<meta charset="utf-8"> +<title>'writing-mode' property</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set"> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../resources/testhelper.js"></script> +<script src="resources/testsuite.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +runPropertyTests('writing-mode', [ + { syntax: 'horizontal-tb' }, + { syntax: 'vertical-rl' }, + { syntax: 'vertical-lr' }, + { syntax: 'sideways-rl' }, + { syntax: 'sideways-lr' }, +]); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-in-color-001.html b/tests/wpt/web-platform-tests/css/css-values/calc-in-color-001.html index e87719b4fe7..7db087def75 100644 --- a/tests/wpt/web-platform-tests/css/css-values/calc-in-color-001.html +++ b/tests/wpt/web-platform-tests/css/css-values/calc-in-color-001.html @@ -12,7 +12,8 @@ const TESTS = { // specified -> expected "rgb(calc(0), calc(255 + 0), calc(140 - 139 - 1))": "rgb(0, 255, 0)", "rgba(calc(0%) calc(100%) calc(0%) / calc(10% * 10))": "rgb(0, 255, 0)", - "hsl(calc(5deg * (360 / 5)), calc(10% * 10), calc(10% * 10))": "rgb(255, 255, 255)" + "hsl(calc(5deg * (360 / 5)), calc(10% * 10), calc(10% * 10))": "rgb(255, 255, 255)", + "hsla(calc(5 * (360 / 5)), calc(10% * 10), calc(10% * 10), calc(1.0))": "rgb(255, 255, 255)" } test(function() { diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-043.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-043.xht index e860cd1bf32..43fa2037595 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-043.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-043.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-lr - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-043-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-047.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-047.xht index ecb3b69593f..dcc59fa04c4 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-047.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-047.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: right' and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-048.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-048.xht index 6802d8b0efa..f7c9c227be3 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-048.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-048.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: right' and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-050.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-050.xht index f5bfc731f19..5d8575dbb10 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-050.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-050.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: position absolute and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-054.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-054.xht index a779ab9cbd5..47f42abdb9f 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-054.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-054.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-055.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-055.xht index 8e35691fbb0..b934f4b2e1a 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-055.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-055.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-056.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-056.xht index da8f4834fca..286c44f2805 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-056.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-056.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-058.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-058.xht index 4b9f063e797..540991b6af9 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-058.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-058.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-cell and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-060.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-060.xht index 3c242b39f9a..a9a9c2ac984 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-060.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-060.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-caption and 'sideways-lr' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-062.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-062.xht index a6609bdd50b..ac1aec36412 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-062.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-062.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: list and sideways-lr - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-043-ref.xht" /> <meta content="ahem image" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-063.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-063.xht index 5c5056901dd..065f75e32ee 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-063.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-063.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-lr - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-043-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-066.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-066.xht index 108d4e247bc..24a4dfef3dd 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-066.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-slr-066.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: writing mode (sideways-lr) of document - horizontal position of first block</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="help" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#block-formatting" title="9.4.1 Block formatting contexts" /> <link rel="match" href="block-flow-direction-066-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-042.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-042.xht index 847b39d9220..6a99d55cd7c 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-042.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-042.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-rl - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-045.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-045.xht index 6a868bf383a..a8cefba9f0e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-045.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-045.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: left' and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-046.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-046.xht index e4ab2ec5db0..bb61fcfa5ea 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-046.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-046.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: left' and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-049.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-049.xht index a0cd94ed12b..447527fc80e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-049.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-049.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: position absolute and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-051.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-051.xht index 14cefa26dbd..2fc0b3770e5 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-051.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-051.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-052.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-052.xht index dae358a4f9f..f32066e9454 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-052.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-052.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-053.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-053.xht index 8635757eebd..86b36fce193 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-053.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-053.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-057.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-057.xht index 87c8dc138f2..1afed95c053 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-057.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-057.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-cell and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-059.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-059.xht index 0d14068bab8..6bd8d4ae379 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-059.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-059.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-caption and 'sideways-rl' - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-061.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-061.xht index b08891e98a9..5b05219968b 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-061.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-061.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: list and sideways-rl - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem image" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-064.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-064.xht index d023e63e324..40e5be94625 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-064.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-064.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-rl - block flow direction of block-level boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-065.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-065.xht index ac5fdf29e1e..40c0f83daa7 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-065.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/block-flow-direction-srl-065.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: writing mode (sideways-rl) of document - horizontal position of first block</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="help" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#block-formatting" title="9.4.1 Block formatting contexts" /> <link rel="match" href="block-flow-direction-025-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-004.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-004.xht index e5409900640..7774f4b6179 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-004.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-004.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: order, orientation and layout of form controls in 'sideways-lr' writing-mode</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="image should" name="flags" /> <meta content="This test checks the order, the flow, the orientation and layout of form controls used in Example 4 of section 3.1 when the 'writing-mode' of the whole form element is set to 'sideways-lr'." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-005.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-005.xht index 75370af2a3a..35b4ace5233 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-005.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-slr-005.xht @@ -8,7 +8,7 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="should" name="flags" /> <meta content="This test checks the rendering of various form controls (select, optgroup, options, various types of input and buttons) written with latin text in 'sideways-lr' writing mode. The text of replaced content should match the replaced element's writing mode and line orientation; therefore, in this test, a) the text's inline base direction must be from bottom to top, b) the glyphs must be rotated 90° counter-clockwise and c) the block flow direction must be from left to right." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-004.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-004.xht index 919c3de1034..37f4bb47330 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-004.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-004.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: order, orientation and layout of form controls in 'sideways-rl' writing-mode</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="image should" name="flags" /> <meta content="This test checks the order, the flow, the orientation and layout of form controls used in Example 4 of section 3.1 when the 'writing-mode' of the whole form element is set to 'sideways-rl'." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-005.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-005.xht index 5fe188ee4b6..f092ecc1d35 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-005.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/form-controls-srl-005.xht @@ -8,7 +8,7 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="should" name="flags" /> <meta content="This test checks the rendering of various form controls (select, optgroup, options, various types of input and buttons) written with latin text in 'sideways-rl' writing mode. The text of replaced content should match the replaced element's writing mode and line orientation; therefore, in this test, a) the text's inline base direction must be from top to bottom, b) the glyphs must be rotated 90° clockwise and c) the block flow direction must be from right to left." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/full-width-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/full-width-003.html index a708656a7e5..da0d4707798 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/full-width-003.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/full-width-003.html @@ -5,7 +5,7 @@ <title>CSS Writing Modes: 'text-combine-upright: digits 2' applied on 2 full-width characters</title> <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura"> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-fullwidth" title="9.1.3.1. Full-width Characters"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-fullwidth" title="9.1.3.1. Full-width Characters"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property" title="2.1. Case Transforms: the 'text-transform' property"> <link rel="mismatch" href="reference/full-width-002-notcu-notref.html"> <link rel="mismatch" href="reference/full-width-002-horizontal-notref.html"> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-slr-009.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-slr-009.xht index 1ec6bb90a63..55836bcfcc8 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-slr-009.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-slr-009.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: inline block alignment - alphabetical alignment with vertical layout</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-12 --> - <link rel="help" title="CSS3 Writing modes: 4.3. Atomic Inline Baseline" href="http://www.w3.org/TR/css-writing-modes-3/#replaced-baselines" /> + <link rel="help" title="CSS3 Writing modes: 4.3. Atomic Inline Baseline" href="http://www.w3.org/TR/css-writing-modes-4/#replaced-baselines" /> <link rel="help" title="CSS2.1 9.2.2 Inline-level elements and inline boxes" href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes" /> <link rel="match" href="inline-block-alignment-slr-009-ref.xht" /> <meta name="assert" content="This test checks the generation of inline-block baseline. When 'writing-mode' is 'sideways-lr', then the alphabetic baseline is used as the dominant baseline." /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-srl-008.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-srl-008.xht index 5ef9bc92a49..115f8a56ed0 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-srl-008.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/inline-block-alignment-srl-008.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: inline block alignment - alphabetical alignment with vertical layout</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-06 --> - <link rel="help" title="CSS3 Writing modes: 4.3. Atomic Inline Baseline" href="http://www.w3.org/TR/css-writing-modes-3/#replaced-baselines" /> + <link rel="help" title="CSS3 Writing modes: 4.3. Atomic Inline Baseline" href="http://www.w3.org/TR/css-writing-modes-4/#replaced-baselines" /> <link rel="help" title="CSS2.1 9.2.2 Inline-level elements and inline boxes" href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes" /> <link rel="match" href="inline-block-alignment-006-ref.xht" /> <meta name="assert" content="This test checks the generation of inline-block baseline. When 'writing-mode' is 'sideways-rl', then the alphabetic baseline is used as the dominant baseline." /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-043.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-043.xht index 80038f396ef..63fc7e9ff58 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-043.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-043.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-lr - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-047.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-047.xht index 21767135776..89c7a6d4746 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-047.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-047.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: right' and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-048.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-048.xht index 403b3ed8b1b..8dc5da47733 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-048.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-048.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: right' and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-002-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-050.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-050.xht index b9e99a326d3..10619f356b4 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-050.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-050.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: position absolute and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-053.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-053.xht index 20b23f3248d..5f9825048af 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-053.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-053.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-054.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-054.xht index 0efae8f6513..e38aea85ad6 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-054.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-054.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-056.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-056.xht index 9a162ff930a..6f2fdb01767 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-056.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-056.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-cell and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-058.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-058.xht index d483cff4b56..1b4bc0dd480 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-058.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-058.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-caption and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-060.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-060.xht index 8d1383cc007..b4b2d196236 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-060.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-slr-060.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: list and 'sideways-lr' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-042.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-042.xht index 921af5a214e..a3165003bc4 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-042.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-042.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-rl - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-045.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-045.xht index ba1420302e9..b6bc08a9f4f 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-045.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-045.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: left' and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-046.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-046.xht index 2f9edc291b9..2379135821b 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-046.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-046.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'float: left' and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-049.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-049.xht index babf754d318..822855eae8a 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-049.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-049.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: position absolute and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-051.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-051.xht index 995d7e53796..54c0068adb0 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-051.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-051.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-052.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-052.xht index 8d1c369b704..a1ace9571ff 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-052.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-052.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: inline-block and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-055.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-055.xht index 0000f0bd51f..23c4d2875ab 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-055.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-055.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-cell and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-057.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-057.xht index e694871fa78..18608c5c36e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-057.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-057.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: table-caption and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-059.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-059.xht index 7a0e79eb82d..5f66d208dee 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-059.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/line-box-direction-srl-059.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: list and 'sideways-rl' - ordering direction of line boxes</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-slr-005.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-slr-005.xht index 95267852397..42adb380b7b 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-slr-005.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-slr-005.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: outline layout and non-replaced inline in sideways-lr writing-mode</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="7.1. Principles of Layout in Vertical Writing Modes" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" /> + <link rel="help" title="7.1. Principles of Layout in Vertical Writing Modes" href="http://www.w3.org/TR/css-writing-modes-4/#vertical-layout" /> <link rel="help" title="18.4 Dynamic outlines: the 'outline' property" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#dynamic-outlines" /> <meta content="" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-srl-004.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-srl-004.xht index 4b077c45772..e9fc32af49b 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-srl-004.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/outline-inline-srl-004.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: outline layout and non-replaced inline and sideways-rl writing-mode</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="7.1. Principles of Layout in Vertical Writing Modes" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" /> + <link rel="help" title="7.1. Principles of Layout in Vertical Writing Modes" href="http://www.w3.org/TR/css-writing-modes-4/#vertical-layout" /> <link rel="help" title="18.4 Dynamic outlines: the 'outline' property" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#dynamic-outlines" /> <meta content="" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-slr-005.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-slr-005.xht index afc68ccc228..30d045d1d15 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-slr-005.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-slr-005.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-lr' - default page flow (progression) direction</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="image paged" name="flags" /> <meta content="This test checks that when 'writing-mode' is set on the root element, then it determines the default page flow (or progression) direction. In this test, the page flow (or progression) direction is left-to-right." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-srl-004.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-srl-004.xht index b12e9c183b8..d1d1aa65b57 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-srl-004.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/page-flow-direction-srl-004.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-rl' - default page flow (progression) direction</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <meta content="image paged" name="flags" /> <meta content="This test checks that when 'writing-mode' is set on the root element, then it determines the default page flow (or progression) direction. In this test, the page flow (or progression) direction is right-to-left." name="assert" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-023.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-023.xht index b907f478870..bf0e55259ab 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-023.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-023.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-lr - table rows progression</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-029.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-029.xht index 8f570dad0e5..a0c580c4c8f 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-029.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-slr-029.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-lr - table rows progression (thead, 2 tbodies, tfoot)</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-022.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-022.xht index 7ba0a904e1a..d21a70a47e4 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-022.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-022.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-rl - table rows progression</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-028.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-028.xht index 748b5241c49..6bfe38614fd 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-028.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-srl-028.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: sideways-rl - table rows progression (thead, 2 tbodies, tfoot)</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-vlr-009.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-vlr-009.xht index dbe161365fa..64ec1cda31c 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-vlr-009.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/row-progression-vlr-009.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: vertical-lr - table rows progression (thead, 2 tbodies, tfoot)</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#writing-mode" title="3.1 Block Flow Direction: the writing-mode property" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html new file mode 100644 index 00000000000..d8edfb69df8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 50px; + height: 100px; + writing-mode: vertical-lr; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html new file mode 100644 index 00000000000..d5a77cd23ae --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-001.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-001-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that a verticalLR element inside an horizontal container computes properly its percentage margins against the container's inline size (the container's width in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (500px), so it should be 50px and element's height should be 100px. */ + writing-mode: vertical-lr; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html new file mode 100644 index 00000000000..98e6d770ff0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 50px; + height: 100px; + writing-mode: vertical-rl; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html new file mode 100644 index 00000000000..55e266fd9ff --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-002.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-002-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that a verticalRL element inside an horizontal container computes properly its percentage margins against the container's inline size (the container's width in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (500px), so it should be 50px and element's height should be 100px. */ + writing-mode: vertical-rl; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html new file mode 100644 index 00000000000..f035f59db16 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; + writing-mode: vertical-lr; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 20px; + width: 460px; + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html new file mode 100644 index 00000000000..d722504a699 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-003.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-003-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that an horizontal element inside a verticalLR container computes properly its percentage margins against the container's inline size (the container's height in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; + writing-mode: vertical-lr; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (200px), so it should be 20px and element's width should be 460px. */ + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html new file mode 100644 index 00000000000..2cd59eb6d1f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-004.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-003-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that an horizontal element inside a verticalLR container computes properly its percentage margins against the container's inline size (the container's height in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 200px; + width: 500px; + writing-mode: vertical-rl; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (200px), so it should be 20px and element's width should be 460px. */ + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html new file mode 100644 index 00000000000..40e44125aba --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 20px; + height: 460px; + writing-mode: vertical-lr; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html new file mode 100644 index 00000000000..79801424565 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-005.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-005-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that a verticalLR element inside an horizontal container computes properly its percentage margins against the container's inline size (the container's width in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (200px), so it should be 20px and element's height should be 460px. */ + writing-mode: vertical-lr; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html new file mode 100644 index 00000000000..3b25252862d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 20px; + height: 460px; + writing-mode: vertical-rl; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html new file mode 100644 index 00000000000..f945dec8f64 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-006.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-006-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that a verticalRL element inside an horizontal container computes properly its percentage margins against the container's inline size (the container's width in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; +} +.element { + background: magenta; + font: 50px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (200px), so it should be 20px and element's height should be 460px. */ + writing-mode: vertical-rl; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html new file mode 100644 index 00000000000..02dfe07eb1c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins reference file</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; + writing-mode: vertical-lr; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 50px; + width: 100px; + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html new file mode 100644 index 00000000000..93f50533489 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-007.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-007-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that an horizontal element inside a verticalLR container computes properly its percentage margins against the container's inline size (the container's height in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; + writing-mode: vertical-lr; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (500px), so it should be 50px and element's width should be 100px. */ + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html new file mode 100644 index 00000000000..39bf4f5cf13 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthogonal-percentage-margin-008.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Writing Modes Test: Orthogonal element sizing and percentage margins</title> +<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#orthogonal-auto"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping"> +<link rel="match" href="sizing-orthogonal-percentage-margin-007-ref.html"> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<meta name="assert" content="This test checks that an horizontal element inside a verticalLR container computes properly its percentage margins against the container's inline size (the container's height in this test), and the element is sized accordingly subtracting those margins from the available size."> +<style> +.container { + background: cyan; + border: solid thick; + height: 500px; + width: 200px; + writing-mode: vertical-rl; +} +.element { + background: magenta; + font: 25px/1 Ahem; + margin: 10%; /* This should be computed against the container's inline size (500px), so it should be 50px and element's width should be 100px. */ + writing-mode: horizontal-tb; +} +</style> + +<p>The test passes if it has the same visual effect as reference.</p> + +<div class="container"> + <div class="element">XX X X X XX X X XX X XX</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-slr-007.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-slr-007.xht index 8d6f3fd0142..f1829e36dfa 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-slr-007.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-slr-007.xht @@ -8,8 +8,8 @@ <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-22 --> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the direction property" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the direction property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-srl-006.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-srl-006.xht index ce1d8ff4c3c..38cfa2fb55e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-srl-006.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-column-order-srl-006.xht @@ -8,8 +8,8 @@ <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-22 --> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the direction property" /> - <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the direction property" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-001.html index 45970fb2227..25050b8e371 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-001.html @@ -5,8 +5,8 @@ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-slr-001-ref.html"> <meta name="assert" content="This test checks that sideways-lr tables order rows/rowgroups left to right and cells bottom-to-top (LTR) or top-to-bottom (RTL) per 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the 'direction' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the 'direction' property"> <style> .test { diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-002.html index 6c4dd6a012c..1525e2423d5 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-slr-002.html @@ -3,8 +3,8 @@ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-002-ref.html"> <meta name="assert" content="This test checks that sideways-lr tables order columns bottom-to-top (LTR) or top-to-bottom (RTL) per the table's 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the 'direction' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the 'direction' property"> <style> .test { diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-001.html index 1ae2dd259d0..b74b2caee53 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-001.html @@ -5,8 +5,8 @@ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-001-ref.html"> <meta name="assert" content="This test checks that sideways-rl tables order rows/rowgroups right to left and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the 'direction' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the 'direction' property"> <style> .test { diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-002.html index d552244dac4..7d5df32cc26 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/table-progression-srl-002.html @@ -5,8 +5,8 @@ <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-002-ref.html"> <meta name="assert" content="This test checks that sideways-rl tables order columns top-to-bottom (LTR) or bottom-to-top (RTL) per the table's 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction" title="2.1 Specifying Directionality: the 'direction' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#block-flow" title="3.1 Block Flow Direction: the 'writing-mode' property"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#direction" title="2.1 Specifying Directionality: the 'direction' property"> <style> .test { diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-slr-009.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-slr-009.xht index 6b478a56367..a458bab4066 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-slr-009.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-slr-009.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: text baseline alignment - alphabetical alignment with vertical layout</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-05 --> - <link rel="help" title="4.2. Text Baseline" href="http://www.w3.org/TR/css-writing-modes-3/#text-baselines" /> + <link rel="help" title="4.2. Text Baseline" href="http://www.w3.org/TR/css-writing-modes-4/#text-baselines" /> <link rel="match" href="text-baseline-slr-009-ref.xht" /> <meta name="assert" content="When 'writing-mode' is 'sideways-lr', then the alphabetic baseline is used as the dominant baseline." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-srl-008.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-srl-008.xht index b7300bcaaeb..f9fc267c2f2 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-srl-008.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-baseline-srl-008.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: text baseline alignment - alphabetical alignment with vertical layout</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-05 --> - <link rel="help" title="4.2. Text Baseline" href="http://www.w3.org/TR/css-writing-modes-3/#text-baselines" /> + <link rel="help" title="4.2. Text Baseline" href="http://www.w3.org/TR/css-writing-modes-4/#text-baselines" /> <link rel="match" href="text-baseline-vrl-006-ref.xht" /> <meta name="assert" content="When 'writing-mode' is 'sideways-rl', then the alphabetic baseline is used as the dominant baseline." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-001.html index bcb6c143df9..4f083c870b8 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-001.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: parsing text-combine-upright for digits</title> <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <meta name="assert" content="text-combine-upright supports `none`, `all`, `digits`, and `digits` followed by a digit in the range from 2 to 4."> <meta name="flags" content="dom"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-002.html index 7a375d622bb..327ebdda11e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-002.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: parsing text-combine-upright with digits plus calc() computing to valid digits</title> <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="help" href="http://www.w3.org/TR/css-values-3/#calc-notation"> <meta name="assert" content="User Agents support text-combine-upright with values `digits calc(...)` if the expression inside `calc()` computes to a valid integer, which is either 2, 3, or 4."> <meta name="flags" content="dom"> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-001.html index aabe7a70680..beb54108a31 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-001.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: parsing text-combine-upright with invalid values</title> <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <meta name="assert" content="text-combine-upright doesn't support undefined keywords and out-of-range integer, and numbers."> <meta name="flags" content="dom invalid"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-002.html index ed5ce4eb32d..08a0978eaa9 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-002.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: parsing text-combine-upright with digits plus calc() computing to invalid digits</title> <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="help" href="http://www.w3.org/TR/css-values-3/#calc-notation"> <meta name="assert" content="User Agents ignore text-combine-upright with values `digits calc(...)` if the expression inside `calc()` computes to either numbers or out-of-range integers."> <meta name="flags" content="dom invalid"> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-001.html index 10c4f423350..a765d2dfa50 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-001.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 2</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/text-combine-upright-value-single-character.html"> <meta name="assert" content="the 'digits' values in text-combine-upright rotates the composition even if there is only one character inside tate-chu-yoko."> <meta name="flags" content=""> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-002.html index ab8d216c232..5a9784ea134 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-002.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 2 + two digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x1-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x1-notref.html"> <meta name="assert" content="'text-combine-upright: digits 2' combines two ASCII digits horizontally."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-003.html index 2a56d3eb9c5..dd73b555c7b 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-003.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits2-003.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 2 + three digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x3-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x3-notref.html"> <meta name="assert" content="'text-combine-upright: digits 2' does not combine digits that are greater than two."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-001.html index bec7de975d2..227ec7e5d5f 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-001.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 3 + two digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x1-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x1-notref.html"> <meta name="assert" content="'text-combine-upright: digits 3' combines two ASCII digits horizontally."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-002.html index 18da1a24372..d1a352d8bdd 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-002.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 3 + three digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x1-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x1-notref.html"> <meta name="assert" content="'text-combine-upright: digits 3' combines three ASCII digits horizontally."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-003.html index 11a6932519c..f8f837116a3 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-003.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits3-003.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 3 + four digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x4-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x4-notref.html"> <meta name="assert" content="'text-combine-upright: digits 3' does not combine digits that are greater than three."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-001.html index 5a9f0e43bd1..21a2a0d383a 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-001.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 4 + three digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x1-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x1-notref.html"> <meta name="assert" content="'text-combine-upright: digits 4' combines three ASCII digits horizontally."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-002.html index d58e555a3e8..14813450d9a 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-002.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-002.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 4 + four digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x1-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x1-notref.html"> <meta name="assert" content="'text-combine-upright: digits 4' combines four ASCII digits horizontally."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-003.html index 4b30058ad10..8dd3cd5b054 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-003.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-combine-upright-value-digits4-003.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Writing Modes: text-combine-upright: digits 4 + five digits</title> <link rel="author" title="Masataka Yakura" href="https://google.com/+MasatakaYakura"> -<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#text-combine-upright"> +<link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright"> <link rel="match" href="reference/vertical-ahem-1x5-ref.html"> <link rel="mismatch" href="reference/horizontal-ahem-1x5-notref.html"> <meta name="assert" content="'text-combine-upright: digits 4' does not combine digits that are greater than four."> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-slr-015.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-slr-015.xht index daa17052c78..c1d57ef1245 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-slr-015.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-slr-015.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-lr' - 'text-orientation: mixed' has no effect</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-3/#text-orientation" /> + <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-4/#text-orientation" /> <meta name="flags" content="image" /> <meta name="assert" content="This test checks that when 'writing-mode' is set to 'sideways-lr', then a 'text-orientation: mixed' declaration has no effect: the alphabetical baseline is used as the dominant baseline and all the glyphs remain rotated 90 degrees counter-clockwise. The typographic mode for 'sideways-lr' is horizontal and 'text-orientation' has no effect on boxes in horizontal typographic modes." /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-srl-016.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-srl-016.xht index 11a8f7eb186..4fd928a8764 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-srl-016.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-mixed-srl-016.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-rl' - 'text-orientation: mixed' has no effect</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-3/#text-orientation" /> + <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-4/#text-orientation" /> <link rel="match" href="text-orientation-mixed-srl-016-ref.xht" /> <meta name="flags" content="" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-sideways-slr-019.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-sideways-slr-019.xht index edaefc7fae0..9751a850cef 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-sideways-slr-019.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-sideways-slr-019.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-lr' - 'text-orientation: sideways' has no effect</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-3/#text-orientation" /> + <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-4/#text-orientation" /> <meta name="flags" content="image" /> <meta name="assert" content="This test checks that when 'writing-mode' is set to 'sideways-lr', then a 'text-orientation: sideways' declaration has no effect: the alphabetical baseline is used as the dominant baseline and all the glyphs remain rotated 90 degrees counter-clockwise. The typographic mode for 'sideways-lr' is horizontal and 'text-orientation' has no effect on boxes in horizontal typographic modes." /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-slr-017.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-slr-017.xht index a668d13d9e3..eb67dde8ed7 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-slr-017.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-slr-017.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-lr' - 'text-orientation: upright' has no effect</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-3/#text-orientation" /> + <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-4/#text-orientation" /> <meta name="flags" content="image" /> <meta name="assert" content="This test checks that when 'writing-mode' is set to 'sideways-lr', then a 'text-orientation: upright' declaration has no effect: the alphabetical baseline is used as the dominant baseline and all the glyphs remain rotated 90 degrees counter-clockwise. The typographic mode for 'sideways-lr' is horizontal and 'text-orientation' has no effect on boxes in horizontal typographic modes." /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-srl-018.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-srl-018.xht index 1da5b27ee2a..95549c2b195 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-srl-018.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/text-orientation-upright-srl-018.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-rl' - 'text-orientation: upright' has no effect</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-3/#text-orientation" /> + <link rel="help" title="5.1. Orienting Text: the 'text-orientation' property" href="http://www.w3.org/TR/css-writing-modes-4/#text-orientation" /> <link rel="match" href="text-orientation-mixed-srl-016-ref.xht" /> <meta name="flags" content="" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-029.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-029.xht index fc738a54f06..e4c4621358e 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-029.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-029.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'top' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr', 'vertical-align' is 'top', the physical left (logical top) edge of an inline non-replaced box is aligned with the physical left (logical top) edge of its line box." /> <link rel="match" href="vertical-alignment-008-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-031.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-031.xht index 68776ffe309..e26e644bc1f 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-031.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-031.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'text-top' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of an inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr', 'vertical-align' is 'text-top', the physical left (logical top) edge of an inline non-replaced box is aligned with the left side (logical top) of parent's content area." /> <link rel="match" href="vertical-alignment-006-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-033.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-033.xht index 64fa04498be..594af050775 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-033.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-033.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'text-bottom' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of an inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr', 'vertical-align' is 'text-bottom', the physical right (logical bottom) edge of an inline non-replaced box is aligned with the right side (logical bottom) of parent's content area." /> <link rel="match" href="vertical-alignment-004-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-035.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-035.xht index fc134d8b692..f080c1adba9 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-035.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-035.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'bottom' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr', 'vertical-align' is 'bottom', the physical right (logical bottom) edge of an inline non-replaced box is aligned with the physical right (logical bottom) edge of its line box." /> <link rel="match" href="vertical-alignment-002-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-037.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-037.xht index 2fa710919a1..2ce7a16ceb7 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-037.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-037.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'super' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr' and 'vertical-align' is 'super', the baseline of the box is shifted to the left." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-039.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-039.xht index 87a76f31d18..4421bf423fe 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-039.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-039.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'sub' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr' and 'vertical-align' is 'sub', the baseline of the box is shifted to the right." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-041.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-041.xht index 8d85d9dfb0e..478b7341c01 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-041.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-slr-041.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'middle' and sideways-lr writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-lr', 'text-orientation' is 'mixed', 'vertical-align' is 'middle', the vertical midpoint of the box is aligned with the alphabetic baseline of the parent box plus half the x-height of the parent." /> <link rel="match" href="vertical-alignment-slr-049-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-028.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-028.xht index dda7e6e74f9..323d9b9ceb7 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-028.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-028.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'top' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl', 'vertical-align' is 'top', the physical right (logical top) edge of an inline non-replaced box is aligned with the physical right (logical top) edge of its line box." /> <link rel="match" href="vertical-alignment-002-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-030.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-030.xht index ec1663354bc..9d452b96911 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-030.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-030.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'text-top' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of an inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl', 'vertical-align' is 'text-top', the physical right (logical top) edge of an inline non-replaced box is aligned with the right side (logical top) of parent's content area." /> <link rel="match" href="vertical-alignment-004-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-032.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-032.xht index 5905014d0c2..f249ebe57b0 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-032.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-032.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'text-bottom' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of an inline non-replaced box with vertical align property. When 'writing-mode' is 'vertical-rl', 'vertical-align' is 'text-bottom', the physical left (logical bottom) edge of an inline non-replaced box is aligned with the left side (logical bottom) of parent's content area." /> <link rel="match" href="vertical-alignment-006-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-034.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-034.xht index f99702879d4..3475d21b2a3 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-034.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-034.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'bottom' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl', 'vertical-align' is 'bottom', the physical left (logical bottom) edge of an inline non-replaced box is aligned with the physical left (logical bottom) edge of its line box." /> <link rel="match" href="vertical-alignment-008-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-036.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-036.xht index af38d90a001..59d49496d4d 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-036.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-036.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'super' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl' and 'vertical-align' is 'super', the baseline of the box is shifted to the right." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-038.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-038.xht index 941149acdc6..c8aa9756332 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-038.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-038.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'sub' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl' and 'vertical-align' is 'sub', the baseline of the box is shifted to the left." /> <meta name="flags" content="ahem" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-040.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-040.xht index 0281e516333..fd805a2552a 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-040.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/vertical-alignment-srl-040.xht @@ -4,7 +4,7 @@ <title>CSS Writing Modes Test: vertical-align - 'middle' and sideways-rl writing-mode</title> <link rel="author" title="Hajime Shiozawa" href="mailto:hajime.shiozawa@gmail.com" /> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2015-12-11 --> - <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-3/#line-mappings" /> + <link rel="help" title="7.5 Line-Relative Mappings" href="http://www.w3.org/TR/css-writing-modes-4/#line-mappings" /> <link rel="help" title="10.8.1 Leading and half-leading" href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#leading" /> <meta name="assert" content="This test checks the position of inline non-replaced box with vertical align property. When 'writing-mode' is 'sideways-rl' and 'vertical-align' is 'middle', the vertical midpoint of the box is aligned with the alphabetic baseline of the parent box plus half the x-height of the parent." /> <link rel="match" href="vertical-alignment-vrl-026-ref.xht" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-008.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-008.xht index 788afb701cd..feeb8575ad9 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-008.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-008.xht @@ -7,7 +7,7 @@ <title>CSS Writing Modes Test: 'writing-mode: sideways-rl' set to body element propagates to viewport</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> - <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#principal-flow" title="8. The Principal Writing Mode" /> + <link rel="help" href="https://www.w3.org/TR/css-writing-modes-4/#principal-flow" title="8. The Principal Writing Mode" /> <link rel="match" href="block-flow-direction-025-ref.xht" /> <meta name="flags" content="image" /> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001.html index 97083020153..0997dae95ce 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>CSS Writing Modes: parsing writing-mode: sideways-lr</title> <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com"> -<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#block-flow"> +<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#block-flow"> <meta name="assert" content="This test asserts the parser and getComputedStyle works correctly for the writing-mode: sideways-lr."> <meta name="flags" content="dom"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001.html index 71138dae13a..dfd6f4b3cba 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>CSS Writing Modes: parsing writing-mode: sideways-rl</title> <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com"> -<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#block-flow"> +<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#block-flow"> <meta name="assert" content="This test asserts the parser and getComputedStyle works correctly for the writing-mode: sideways-rl."> <meta name="flags" content="dom"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/cssom/GetBoundingRect.html b/tests/wpt/web-platform-tests/css/cssom-view/GetBoundingRect.html index 6ab5e4c9b3f..7286bd09882 100644 --- a/tests/wpt/web-platform-tests/css/cssom/GetBoundingRect.html +++ b/tests/wpt/web-platform-tests/css/cssom-view/GetBoundingRect.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>getBoundingClientRect</title> + <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSS.html b/tests/wpt/web-platform-tests/css/cssom/CSS.html index 1bbecbfa3ba..fd2966a104c 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSS.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSS.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSSOM - CSS interface</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#the-css.escape()-method"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSSKeyframeRule.html b/tests/wpt/web-platform-tests/css/cssom/CSSKeyframeRule.html index 532aa6fa910..3f6d1821867 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSSKeyframeRule.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSSKeyframeRule.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title></title> +<link rel="help" href="https://drafts.csswg.org/css-animations/#interface-csskeyframerule"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style type="text/css" id="styleElement"> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSSKeyframesRule.html b/tests/wpt/web-platform-tests/css/cssom/CSSKeyframesRule.html index 68453498767..7d91127d1e0 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSSKeyframesRule.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSSKeyframesRule.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - CSSKeyframesRule interface</title> + <link rel="help" href="https://drafts.csswg.org/css-animations/#interface-csskeyframesrule"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSSNamespaceRule.html b/tests/wpt/web-platform-tests/css/cssom/CSSNamespaceRule.html index 64ed94b6e7f..fbbaa3c5693 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSSNamespaceRule.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSSNamespaceRule.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - CSSNamespaceRule interface</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssnamespacerule-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSSRuleList.html b/tests/wpt/web-platform-tests/css/cssom/CSSRuleList.html index a394779617d..4605b749648 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSSRuleList.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSSRuleList.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - CSSRuleList interface</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssrulelist-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/CSSStyleSheet.html b/tests/wpt/web-platform-tests/css/cssom/CSSStyleSheet.html index 62ad133d5f6..86016ef5a3d 100644 --- a/tests/wpt/web-platform-tests/css/cssom/CSSStyleSheet.html +++ b/tests/wpt/web-platform-tests/css/cssom/CSSStyleSheet.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - CSSStyleSheet interface</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssstylesheet-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style id="my-stylesheet"> diff --git a/tests/wpt/web-platform-tests/css/cssom/MediaList.html b/tests/wpt/web-platform-tests/css/cssom/MediaList.html index bddb5c981cb..8308ee89e4b 100644 --- a/tests/wpt/web-platform-tests/css/cssom/MediaList.html +++ b/tests/wpt/web-platform-tests/css/cssom/MediaList.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - MediaList interface</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-medialist-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/StyleSheetList.html b/tests/wpt/web-platform-tests/css/cssom/StyleSheetList.html index 358264009a4..bb7d2ff4e3e 100644 --- a/tests/wpt/web-platform-tests/css/cssom/StyleSheetList.html +++ b/tests/wpt/web-platform-tests/css/cssom/StyleSheetList.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - StyleSheetList interface</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-stylesheetlist-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/computed-style-002.html b/tests/wpt/web-platform-tests/css/cssom/computed-style-002.html new file mode 100644 index 00000000000..7b31c96c098 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/computed-style-002.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>CSS Test: getComputedStyle - resolved width in iframe</title> +<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org" /> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-values" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe id="frm" width="100"></iframe> +<script> + test(() => { + const frmDoc = frm.contentWindow.document; + frmDoc.open(); + frmDoc.write('<body style="margin:0"><div style="width:100%"></div>'); + frmDoc.close(); + + assert_equals(frm.contentWindow.getComputedStyle(frmDoc.querySelector("div")).width, "100px"); + }, "Check that a percent width in an iframe is resolved against iframe width for getComputedStyle."); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom/computed-style-003.html b/tests/wpt/web-platform-tests/css/cssom/computed-style-003.html new file mode 100644 index 00000000000..e73b793b8f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/computed-style-003.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>CSS Test: getComputedStyle - resolved width in iframe dynamic display</title> +<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org" /> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-values" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe id="frm" width="100" style="display:none"></iframe> +<script> + const frmDoc = frm.contentWindow.document; + frmDoc.open(); + frmDoc.write('<body style="margin:0"><div style="width:100%"></div>'); + frmDoc.close(); + + document.body.offsetWidth; // Make sure we layout the top document. + + test(() => { + frm.style.display = "inline"; + assert_equals(frm.contentWindow.getComputedStyle(frmDoc.querySelector("div")).width, "100px"); + }, "Check that a percent width in an iframe is the resolved width when the iframe is displayed."); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom/computed-style-004.html b/tests/wpt/web-platform-tests/css/cssom/computed-style-004.html new file mode 100644 index 00000000000..c5b08712f96 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/computed-style-004.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<title>CSS Test: getComputedStyle - resolved width in nested iframes dynamic width</title> +<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org" /> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-values" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe id="outer" width="100" scrolling="no" frameborder="0"></iframe> +<script> + const outerDoc = outer.contentWindow.document; + outerDoc.open(); + outerDoc.write('<body style="margin:0"><iframe id="inner" scrolling="no" frameborder="0" style="width:100%"></iframe>'); + outerDoc.close(); + + const innerWindow = outerDoc.querySelector("#inner").contentWindow; + const innerDoc = innerWindow.document; + innerDoc.open(); + innerDoc.write('<body style="margin:0"><div style="width:100%"></div>'); + innerDoc.close(); + innerDoc.body.offsetWidth; // Make sure we layout the top document. + + test(() => { + assert_equals(innerWindow.getComputedStyle(innerDoc.querySelector("div")).width, "100px"); + }, "Check that the initial width is 100px."); + + test(() => { + outer.setAttribute("width", "200"); + assert_equals(innerWindow.getComputedStyle(innerDoc.querySelector("div")).width, "200px"); + }, "Check that the resolved width of the inner div is affected by changing the width of outer iframe."); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule-constructors.html b/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule-constructors.html index c94b63e9b31..ed1cab257df 100644 --- a/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule-constructors.html +++ b/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule-constructors.html @@ -4,7 +4,7 @@ <title>CSSOM Parsing Test: @font-face rules toString() as valid interfaces</title> <link rel="author" title="Paul Irish" href="mailto:paul.irish@gmail.com"> <link rel="reviewer" title="Ms2ger" href="mailto:ms2ger@gmail.com"> <!-- 2012-06-17 --> - <link rel="help" href="http://www.w3.org/TR/cssom-1/#css-font-face-rule"> + <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#om-fontface"> <meta name="flags" content="dom"> diff --git a/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule.html b/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule.html index e44c3dc6578..9a06808e3ae 100644 --- a/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule.html +++ b/tests/wpt/web-platform-tests/css/cssom/cssom-fontfacerule.html @@ -3,7 +3,7 @@ <head> <title>CSSOM Parsing Test: @font-face rules parsed into CSSOM CSSFontFaceRules</title> <link rel="author" title="Paul Irish" href="mailto:paul.irish@gmail.com"> - <link rel="help" href="https://drafts.csswg.org/cssom/#css-rules"> + <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#om-fontface"> <meta name="flags" content="dom"> diff --git a/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-dynamic-subdoc.html b/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-dynamic-subdoc.html new file mode 100644 index 00000000000..13bd694d97d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-dynamic-subdoc.html @@ -0,0 +1,37 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSOM: getComputedStyle cross-doc properly reflects media query changes</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle"> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<!-- + NOTE: The way this test is written doesn't match the spec, but matches all + implementations, see https://github.com/w3c/csswg-drafts/issues/2403 +--> +<iframe id="frm" style="width: 100px; height: 100px"></iframe> +<script> +test(function() { + let frm = document.getElementById('frm'); + let frmDoc = frm.contentWindow.document; + frmDoc.open(); + frmDoc.write('<style>body { color: red } @media all and (min-width: 101px) { body { color: green } }</style><body>Should be green</body>'); + frmDoc.close(); + + document.body.offsetTop; + + assert_equals( + getComputedStyle(frmDoc.body).color, + "rgb(255, 0, 0)", + "Initial color should be red" + ); + + frm.style.width = "200px"; + + assert_equals( + getComputedStyle(frmDoc.body).color, + "rgb(0, 128, 0)", + "style should have been updated to account for media query changes" + ); +}, "getComputedStyle cross-doc properly reflects media query changes"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom/historical.html b/tests/wpt/web-platform-tests/css/cssom/historical.html index ef31d14d3cf..d956f1410dc 100644 --- a/tests/wpt/web-platform-tests/css/cssom/historical.html +++ b/tests/wpt/web-platform-tests/css/cssom/historical.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <title>Historical features</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#changes-from-5-december-2013"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <div id=log></div> diff --git a/tests/wpt/web-platform-tests/css/cssom/inline-style-001.html b/tests/wpt/web-platform-tests/css/cssom/inline-style-001.html index b8b1aaaf707..51f36f250e5 100644 --- a/tests/wpt/web-platform-tests/css/cssom/inline-style-001.html +++ b/tests/wpt/web-platform-tests/css/cssom/inline-style-001.html @@ -16,15 +16,14 @@ <script type="text/javascript"> test(function() { var test = document.getElementById("test"); - assert_own_property(test, "style"); - assert_readonly(test, "style"); + assert_idl_attribute(test, "style"); declaration = test.style; }, "CSSStyleDeclaration_accessible", { assert: "Can access CSSStyleDeclaration through style property" }); test(function() { - assert_regexp_match(declaration.cssText, /margin-left: 5px;\s*/); + assert_equals(declaration.cssText, "margin-left: 5px;"); assert_equals(declaration.getPropertyValue("margin-left"), "5px"); }, "read", { assert: "initial property values are correct" @@ -32,7 +31,7 @@ test(function() { declaration.cssText = "margin-left: 10px; padding-left: 10px;"; - assert_regexp_match(declaration.cssText, /margin-left: 10px;\s+padding-left: 10px;\s+/); + assert_equals(declaration.cssText, "margin-left: 10px; padding-left: 10px;"); assert_equals(declaration.length, 2); assert_equals(declaration.item(0), "margin-left"); assert_equals(declaration.item(1), "padding-left"); diff --git a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-001.html b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-001.html index f5dbb569538..19c661e1b3d 100644 --- a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-001.html +++ b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-001.html @@ -57,7 +57,7 @@ assert_equals(mediaList.mediaText, "all, screen"); }, "mediatest_medialist_serialize_comma", - { help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serializing-media-queries"], + { help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"], assert: ["To serialize a comma-separated list concatenate all items of the list in list order while separating them by \",\" (U+002C), followed by a space (U+0020)."] }); test(function() { @@ -75,11 +75,11 @@ mediaList.appendMedium('screen'); mediaList.appendMedium('print'); - assert_equals(mediaList.mediaText, "all, print, screen"); + assert_equals(mediaList.mediaText, "all, screen, print"); - }, "mediatest_medialist_serialize_lexicographical", - { help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serializing-media-queries"], - assert: ["Each media query in the list of media queries should be sorted in lexicographical order."] }); + }, "mediatest_medialist_serialize_order", + { help: ["http://www.w3.org/TR/cssom-1/#the-medialist-interface", "http://www.w3.org/TR/cssom-1/#serialize-a-media-query-list"], + assert: ["Each media query should be sorted in the same order as they appear in the list of media queries."] }); </script> </body> diff --git a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-002.html b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-002.html index bba25a1ebb5..2b6bba2a661 100644 --- a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-002.html +++ b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-002.html @@ -58,7 +58,7 @@ media_list.appendMedium("all"); - media_list.deleteMedium("screen"); + assert_throws("NotFoundError", () => media_list.deleteMedium("screen")); assert_equals(media_list.length, 1); assert_equals(media_list.item(0), "all"); diff --git a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-004.html b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-004.html index 416addae7b5..cf9befb8ffb 100644 --- a/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-004.html +++ b/tests/wpt/web-platform-tests/css/cssom/medialist-interfaces-004.html @@ -55,7 +55,7 @@ assert_equals(media_list.length, 2); assert_equals(media_list.item(0), "screen"); assert_equals(media_list.item(1), "all"); - assert_equals(media_list.mediaText, "all, screen"); + assert_equals(media_list.mediaText, "screen, all"); }, "appendMedium_correctly_appends_medium_to_nonempty_MediaList", { assert: "MediaList.appendMedium correctly adds medium to a MediaList that already has a medium." }); diff --git a/tests/wpt/web-platform-tests/css/cssom/overflow-serialization.html b/tests/wpt/web-platform-tests/css/cssom/overflow-serialization.html index c350a1ac211..7e2d1767a0b 100644 --- a/tests/wpt/web-platform-tests/css/cssom/overflow-serialization.html +++ b/tests/wpt/web-platform-tests/css/cssom/overflow-serialization.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - Overlow property has different serialization than other shorthands.</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#serialize-a-css-value"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/selectorText-modification-restyle-001.html b/tests/wpt/web-platform-tests/css/cssom/selectorText-modification-restyle-001.html index 681d32f1865..43a76d1ef2e 100644 --- a/tests/wpt/web-platform-tests/css/cssom/selectorText-modification-restyle-001.html +++ b/tests/wpt/web-platform-tests/css/cssom/selectorText-modification-restyle-001.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>(Test #1) CSSOM - CSSStyleRule.selectorText Modification Restyle - Test #1</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext"> <link rel="match" href="selectorText-modification-restyle-001-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important.html b/tests/wpt/web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important.html index 0f165ae0cd2..804885a74a1 100644 --- a/tests/wpt/web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important.html +++ b/tests/wpt/web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset=utf-8> <title>cssom - Serialization of CSS declaration with "important" flag</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#serialize-a-css-declaration"> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <div id="noWhitespace" style="display: inline !important;"></div> diff --git a/tests/wpt/web-platform-tests/css/cssom/serialize-values.html b/tests/wpt/web-platform-tests/css/cssom/serialize-values.html index df6c692d293..7334424a0a1 100644 --- a/tests/wpt/web-platform-tests/css/cssom/serialize-values.html +++ b/tests/wpt/web-platform-tests/css/cssom/serialize-values.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSSOM serialize values</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#serializing-css-values"> <meta name="author" title="Josh Matthews" href="mailto:josh@joshmatthews.net"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/cssom/serialize-variable-reference.html b/tests/wpt/web-platform-tests/css/cssom/serialize-variable-reference.html index d714b81518b..b543bf40de1 100644 --- a/tests/wpt/web-platform-tests/css/cssom/serialize-variable-reference.html +++ b/tests/wpt/web-platform-tests/css/cssom/serialize-variable-reference.html @@ -1,6 +1,8 @@ <!doctype html> <meta charset="utf-8"> <title>CSSOM - Serialization with variable preserves original serialization.</title> +<link rel="help" href="https://drafts.csswg.org/css-variables/#serializing-custom-props"> +<link rel="help" href="https://drafts.csswg.org/css-variables/#variables-in-shorthands"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <div id="longhand-whitespace" style="font-size: var(--a);"></div> diff --git a/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html b/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html index c34b1652626..522e181dbf5 100644 --- a/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html +++ b/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html @@ -3,6 +3,8 @@ <head> <meta charset="utf-8"> <title>Shorthand serialization should be done correctly.</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block"> + <link rel="help" href="https://drafts.csswg.org/css-variables/#variables-in-shorthands"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> </head> diff --git a/tests/wpt/web-platform-tests/css/cssom/style-sheet-interfaces-001.html b/tests/wpt/web-platform-tests/css/cssom/style-sheet-interfaces-001.html index 79c485038dd..8a757e5ca2a 100644 --- a/tests/wpt/web-platform-tests/css/cssom/style-sheet-interfaces-001.html +++ b/tests/wpt/web-platform-tests/css/cssom/style-sheet-interfaces-001.html @@ -24,11 +24,11 @@ var styleSheet; var linkSheet; test(function() { - assert_own_property(styleElement, "sheet"); + assert_idl_attribute(styleElement, "sheet"); assert_readonly(styleElement, "sheet"); styleSheet = styleElement.sheet; assert_true(styleSheet instanceof CSSStyleSheet); - assert_own_property(linkElement, "sheet"); + assert_idl_attribute(linkElement, "sheet"); linkSheet = linkElement.sheet; assert_true(linkSheet instanceof CSSStyleSheet); }, "sheet_property", @@ -48,8 +48,8 @@ assert: "The sheet property on LinkStyle should always return the current associated style sheet." }); test(function() { - assert_own_property(styleSheet, "ownerRule"); - assert_own_property(styleSheet, "cssRules"); + assert_idl_attribute(styleSheet, "ownerRule"); + assert_idl_attribute(styleSheet, "cssRules"); assert_inherits(styleSheet, "insertRule"); assert_inherits(styleSheet, "deleteRule"); @@ -71,13 +71,13 @@ assert: "CSSStyleSheet initial property values are correct" }); test(function() { - assert_own_property(styleSheet, "type"); - assert_own_property(styleSheet, "disabled"); - assert_own_property(styleSheet, "ownerNode"); - assert_own_property(styleSheet, "parentStyleSheet"); - assert_own_property(styleSheet, "href"); - assert_own_property(styleSheet, "title"); - assert_own_property(styleSheet, "media"); + assert_idl_attribute(styleSheet, "type"); + assert_idl_attribute(styleSheet, "disabled"); + assert_idl_attribute(styleSheet, "ownerNode"); + assert_idl_attribute(styleSheet, "parentStyleSheet"); + assert_idl_attribute(styleSheet, "href"); + assert_idl_attribute(styleSheet, "title"); + assert_idl_attribute(styleSheet, "media"); assert_readonly(styleSheet, "type"); assert_readonly(styleSheet, "ownerNode"); diff --git a/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html b/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html index 9df0a54b7d8..ccfbf7cec2c 100644 --- a/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html +++ b/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html @@ -3,6 +3,7 @@ <head> <meta charset="utf-8"> <title>CSSOM - CSSStylesheet should support origins</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssstylesheet-interface"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/cssom/variable-names.html b/tests/wpt/web-platform-tests/css/cssom/variable-names.html index b951b7dfbb2..5591411e6e5 100644 --- a/tests/wpt/web-platform-tests/css/cssom/variable-names.html +++ b/tests/wpt/web-platform-tests/css/cssom/variable-names.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>Tests for handling of CSS Custom Property names</title> +<link rel="help" href="https://drafts.csswg.org/css-variables/#serializing-custom-props"> <meta name="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html index add2875716d..30ebf6764f5 100644 --- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html +++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html @@ -34,8 +34,6 @@ test_invalid_value("filter", "drop-shadow(10% 20%)"); test_invalid_value("filter", "drop-shadow(1px)"); test_invalid_value("filter", "drop-shadow(1px 2px 3px 4px)"); test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6))"); -// https://github.com/w3c/fxtf-drafts/issues/231 -test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); // Fails in Blink/WebKit "drop-shadow(rgb(4, 5, 6) 1px 2px)" and Firefox "drop-shadow(1px 2px rgb(4, 5, 6))". test_invalid_value("filter", "drop-shadow()"); test_invalid_value("filter", "grayscale(-20)"); diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html index d7e0af4a78a..773b1101138 100644 --- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html +++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html @@ -26,9 +26,10 @@ test_valid_value("filter", "contrast(300%)"); test_valid_value("filter", "drop-shadow(1px 2px)"); test_valid_value("filter", "drop-shadow(1px 2px 3px)"); test_valid_value("filter", "drop-shadow(0 0 0)", "drop-shadow(0px 0px 0px)"); -// https://github.com/w3c/fxtf-drafts/issues/231 -test_valid_value("filter", "drop-shadow(1px 2px rgb(4, 5, 6))"); // Blink/WebKit serialize as "drop-shadow(rgb(4, 5, 6) 1px 2px)" -test_valid_value("filter", "drop-shadow(1px 2px 3px rgba(4, 5, 6, 0.75))"); // Blink/WebKit serialize as "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)" +// https://github.com/w3c/fxtf-drafts/issues/240 +test_valid_value("filter", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); +test_valid_value("filter", "drop-shadow(1px 2px rgb(4, 5, 6))", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); +test_valid_value("filter", "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)"); test_valid_value("filter", "grayscale(0)"); test_valid_value("filter", "grayscale(300%)", "grayscale(100%)"); diff --git a/tests/wpt/web-platform-tests/css/support/blue32x32.ico b/tests/wpt/web-platform-tests/css/support/blue32x32.ico Binary files differnew file mode 100644 index 00000000000..5844dd614c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/support/blue32x32.ico diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1-ref.html index 43fa1caa6a1..ecd58d762f9 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1-ref.html @@ -10,7 +10,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-size: 36px 36px; background-repeat: repeat; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1a.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1a.html index 7ba2329d93c..6717ce1b348 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1a.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1a.html @@ -13,7 +13,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1b.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1b.html index 126909c906f..b3e1e9684b8 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1b.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1b.html @@ -13,7 +13,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round round; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1c.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1c.html index e956e16a49c..3fcfd80b1c7 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1c.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1c.html @@ -14,7 +14,7 @@ height: 72px; border: 1px solid black; background-size: 36px 36px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: repeat round; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1d.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1d.html index 424c9590100..69045cf605a 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1d.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1d.html @@ -14,7 +14,7 @@ height: 72px; border: 1px solid black; background-size: 32px 36px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round repeat; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1e.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1e.html index 64640ffdcaa..5fd4973dcd8 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1e.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-1e.html @@ -14,7 +14,7 @@ height: 72px; border: 1px solid black; background-size: 36px 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: repeat round; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2-ref.html index 6d62330786f..b530e61a6b5 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2-ref.html @@ -10,7 +10,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-size: 36px 36px; background-repeat: repeat-x; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2.html index cdb85833cbb..702931abe84 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-2.html @@ -13,7 +13,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round no-repeat; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3-ref.html index 49eaccb19ee..e44cecd8f5c 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3-ref.html @@ -10,7 +10,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-size: 36px 36px; background-repeat: repeat-y; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3.html index 410d7ed67b1..c3b5e2b2d00 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-3.html @@ -13,7 +13,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-size: 36px auto; background-repeat: no-repeat round; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4-ref.html index 8bb7d709527..8139ace8dad 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4-ref.html @@ -10,7 +10,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-size: 36px 36px; background-repeat: repeat; background-position: 5px 5px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4.html index f02ad55ab5d..be1a4c8ae9c 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-round-4.html @@ -13,7 +13,7 @@ width: 72px; height: 72px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round; background-position: 5px 5px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1-ref.html index f9efeeb8395..11ea2c7bc1e 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1-ref.html @@ -20,7 +20,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10-ref.html index 35ed461c8d7..f4c2b7c18e2 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10-ref.html @@ -20,7 +20,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10.html index db8c910d725..00205a938b8 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-10.html @@ -13,7 +13,7 @@ width: 96px; height: 106px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space; } </style> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1a.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1a.html index 3729e5ccb78..e4376c6391d 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1a.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1a.html @@ -13,7 +13,7 @@ width: 106px; height: 106px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1b.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1b.html index 50efcc2536a..55bc6dc704d 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1b.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1b.html @@ -13,7 +13,7 @@ width: 106px; height: 106px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-position: 15px 15px; background-repeat: space; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1c.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1c.html index 263bb0c2348..27470f9e0c0 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1c.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-1c.html @@ -13,7 +13,7 @@ width: 106px; height: 106px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space space; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2-ref.html index c2fc93aaca0..5dbd30d550a 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2-ref.html @@ -10,7 +10,7 @@ width: 48px; height: 48px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: no-repeat; background-position: 5px 5px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2.html index 6099aa0c1b6..ac9664482c5 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-2.html @@ -13,7 +13,7 @@ width: 48px; height: 48px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space; background-position: 5px 5px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3-ref.html index add80bc3c42..f132f2eceac 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3-ref.html @@ -18,7 +18,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); margin-top: 40px; } .outer2 @@ -34,7 +34,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); margin-left: 40px; } .inner_gradient1 diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3.html index 39d5701ecfa..9ea709b81f3 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-3.html @@ -17,14 +17,14 @@ .inner1 { width: 106px; height: 106px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space no-repeat; background-position: 7px 40px; } .inner2 { width: 106px; height: 106px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: no-repeat space; background-position: 40px 7px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4-ref.html index e7814de81c1..a375db50cd0 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4-ref.html @@ -19,7 +19,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); } .inner_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4.html index c8be103d9d9..834381c76fe 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-4.html @@ -13,7 +13,7 @@ width: 96px; height: 106px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: repeat space; } .outer_graident { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5-ref.html index 9ff6c6e2dd3..d9d3ca11842 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5-ref.html @@ -19,7 +19,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); } .inner_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5.html index 3c1b3d2d12c..0beca23d964 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-5.html @@ -13,7 +13,7 @@ width: 106px; height: 96px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space repeat; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6-ref.html index 7e2f19c8dbe..c07440184b6 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6-ref.html @@ -19,7 +19,7 @@ { height: 32px; width: 64px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: no-repeat; background-size: 64px 32px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6.html index 50753522995..ae2c0fa8f63 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-6.html @@ -14,7 +14,7 @@ height: 106px; border: 1px solid black; background-size: 60px 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: round space; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7-ref.html index 528599004c9..541fbd4ddc2 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7-ref.html @@ -19,7 +19,7 @@ { height: 64px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: no-repeat; background-size: 32px 64px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7.html index 49bee1fec05..809875f57be 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-7.html @@ -14,7 +14,7 @@ height: 192px; border: 1px solid black; background-size: 32px 60px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space round; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8-ref.html index 1f7f39e3594..58464091713 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8-ref.html @@ -11,7 +11,7 @@ border: 20px solid rgba(0, 0, 0, 0.5); width: 106px; height: 106px; - background-image: url(aqua-yellow-37x37.png); + background-image: url(support/aqua-yellow-37x37.png); background-repeat: repeat; } .outer_gradient diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8.html index 0ad57afd9d1..473d115ba69 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-8.html @@ -13,7 +13,7 @@ width: 106px; height: 106px; border: 20px solid rgba(0, 0, 0, .5); - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space; } .outer_gradient { diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9-ref.html index 1476eca646f..6aa9c732155 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9-ref.html @@ -20,7 +20,7 @@ { height: 32px; width: 32px; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9.html index 66f6c225890..28ff46473be 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-repeat-space-9.html @@ -13,7 +13,7 @@ width: 106px; height: 96px; border: 1px solid black; - background-image: url(aqua-yellow-32x32.png); + background-image: url(support/aqua-yellow-32x32.png); background-repeat: space; } </style> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1-ref.html index 69d38c3179d..298b46dd128 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2 { position: absolute; @@ -25,7 +25,7 @@ width: 34px; height: 27px; background-size: 102px 81px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -34px 0px; } .inner3 { @@ -34,7 +34,7 @@ left: 61px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4 { position: absolute; @@ -43,7 +43,7 @@ width: 27px; height: 34px; background-size: 81px 102px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -34px; } .inner5 { @@ -53,7 +53,7 @@ width: 27px; height: 34px; background-size: 81px 102px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -34px; } .inner6 { @@ -62,7 +62,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7 { position: absolute; @@ -71,7 +71,7 @@ width: 34px; height: 27px; background-size: 102px 81px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -34px -54px; } .inner8 { @@ -80,7 +80,7 @@ left: 61px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1.html index a935e445f57..832126ef3df 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-1.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: round round; width: 34px; height: 34px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2-ref.html index e96185c047a..e76f7cee832 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2 { position: absolute; @@ -25,7 +25,7 @@ width: 13px; height: 27px; background-size: 39px 81px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -13px 0px; } .inner3 { @@ -34,7 +34,7 @@ left: 40px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4 { position: absolute; @@ -43,7 +43,7 @@ width: 27px; height: 13px; background-size: 81px 39px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -13px; } .inner5 { @@ -53,7 +53,7 @@ width: 27px; height: 13px; background-size: 81px 39px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -13px; } .inner6 { @@ -62,7 +62,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7 { position: absolute; @@ -71,7 +71,7 @@ width: 13px; height: 27px; background-size: 39px 81px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -13px -54px; } .inner8 { @@ -80,7 +80,7 @@ left: 40px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2.html index 3c1cd3344bd..4e08ae03665 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-round-2.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: round round; width: 13px; height: 13px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1-ref.html index e2cc7105e77..7c6555a0ae4 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2 { position: absolute; @@ -24,7 +24,7 @@ left: 31px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner3 { @@ -33,7 +33,7 @@ left: 62px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4 { position: absolute; @@ -41,7 +41,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner5 { @@ -50,7 +50,7 @@ left: 62px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner6 { @@ -59,7 +59,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7 { position: absolute; @@ -67,7 +67,7 @@ left: 31px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner8 { @@ -76,7 +76,7 @@ left: 62px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1.html index 113d000dff7..c186a3139fe 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-1.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: space space; width: 35px; height: 35px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2-ref.html index 17b83e18360..6afc0733880 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2 { position: absolute; @@ -24,7 +24,7 @@ left: 40px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner3 { position: absolute; @@ -32,7 +32,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4 { position: absolute; @@ -40,7 +40,7 @@ left: 40px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2.html index 99dc6057f8a..b38bc847342 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-2.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: space space; width: 13px; height: 13px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3-ref.html index 03c23018671..904b325ccdc 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2_1 { position: absolute; @@ -24,7 +24,7 @@ left: 29px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner2_2 { @@ -33,7 +33,7 @@ left: 58px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner3 { @@ -42,7 +42,7 @@ left: 87px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4_1 { position: absolute; @@ -50,7 +50,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner4_2 { @@ -59,7 +59,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner5_1 { @@ -68,7 +68,7 @@ left: 87px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner5_2 { @@ -77,7 +77,7 @@ left: 87px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner6 { @@ -86,7 +86,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7_1 { position: absolute; @@ -94,7 +94,7 @@ left: 29px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner7_2 { @@ -103,7 +103,7 @@ left: 58px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner8 { @@ -112,7 +112,7 @@ left: 87px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3.html index c43f1d37025..085498f76a9 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-3.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: space space; width: 60px; height: 60px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-1.html index 2cf40973942..ff7700e9af1 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-1.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-1.html @@ -17,7 +17,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2 { position: absolute; @@ -25,7 +25,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner3 { @@ -34,7 +34,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4 { position: absolute; @@ -42,7 +42,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner5 { @@ -51,7 +51,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner6 { @@ -60,7 +60,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7 { position: absolute; @@ -68,7 +68,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner8 { @@ -77,7 +77,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-2.html index eee8c778745..dda3de638a2 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4-ref-2.html @@ -11,7 +11,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: stretch stretch; width: 27px; height: 27px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4.html index b91e3abf851..d82969d71c4 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-4.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: space space; width: 27px; height: 27px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-1.html index ac2fcea7f87..d52cab5bbe9 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-1.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-1.html @@ -17,7 +17,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner2_1 { position: absolute; @@ -25,7 +25,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner2_2 { @@ -34,7 +34,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner2_3 { @@ -43,7 +43,7 @@ left: 81px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px 0px; } .inner3 { @@ -52,7 +52,7 @@ left: 108px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner4_1 { position: absolute; @@ -60,7 +60,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner4_2 { @@ -69,7 +69,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner4_3 { @@ -78,7 +78,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: 0px -27px; } .inner5_1 { @@ -87,7 +87,7 @@ left: 108px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner5_2 { @@ -96,7 +96,7 @@ left: 108px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner5_3 { @@ -105,7 +105,7 @@ left: 108px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -54px -27px; } .inner6 { @@ -114,7 +114,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } .inner7_1 { position: absolute; @@ -122,7 +122,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner7_2 { @@ -131,7 +131,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner7_3 { @@ -140,7 +140,7 @@ left: 81px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); background-position: -27px -54px; } .inner8 { @@ -149,7 +149,7 @@ left: 108px; width: 27px; height: 27px; - background-image: url("border.png"); + background-image: url("support/border.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-2.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-2.html index 1d24b447e4c..bda8d7237f3 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-2.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5-ref-2.html @@ -11,7 +11,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: repeat repeat; width: 81px; height: 81px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5.html index 582c6586113..db21548af86 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-5.html @@ -14,7 +14,7 @@ left: 0px; top: 0px; border: 27px solid transparent; - border-image: url("border.png") 27; + border-image: url("support/border.png") 27; border-image-repeat: space space; width: 81px; height: 81px; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6-ref.html index 16647b3b724..307eda0ea52 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-tl.png"); + background-image: url("support/reticule-tl.png"); } .inner2 { position: absolute; @@ -24,7 +24,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("reticule-to.png"); + background-image: url("support/reticule-to.png"); } .inner3 { position: absolute; @@ -32,7 +32,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("reticule-tr.png"); + background-image: url("support/reticule-tr.png"); } .inner4 { position: absolute; @@ -40,7 +40,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-le.png"); + background-image: url("support/reticule-le.png"); } .inner5 { position: absolute; @@ -48,7 +48,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("reticule-ct.png"); + background-image: url("support/reticule-ct.png"); } .inner6 { position: absolute; @@ -56,7 +56,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("reticule-ri.png"); + background-image: url("support/reticule-ri.png"); } .inner7 { position: absolute; @@ -64,7 +64,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-bl.png"); + background-image: url("support/reticule-bl.png"); } .inner8 { position: absolute; @@ -72,7 +72,7 @@ left: 27px; width: 27px; height: 27px; - background-image: url("reticule-bo.png"); + background-image: url("support/reticule-bo.png"); } .inner9 { position: absolute; @@ -80,7 +80,7 @@ left: 54px; width: 27px; height: 27px; - background-image: url("reticule-br.png"); + background-image: url("support/reticule-br.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6.html index 3eb643110fb..045cde139d7 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-6.html @@ -15,7 +15,7 @@ top: 0px; border-width: 27px; border-style: solid; - border-image: url("reticule.png") 27 fill space; + border-image: url("support/reticule.png") 27 fill space; width: 27px; height: 27px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7-ref.html index e0cbdfe2d04..44b07f7696a 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7-ref.html @@ -16,7 +16,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-tl.png"); + background-image: url("support/reticule-tl.png"); } .inner2_1 { position: absolute; @@ -24,7 +24,7 @@ left: 35px; width: 27px; height: 27px; - background-image: url("reticule-to.png"); + background-image: url("support/reticule-to.png"); } .inner2_2 { position: absolute; @@ -32,7 +32,7 @@ left: 70px; width: 27px; height: 27px; - background-image: url("reticule-to.png"); + background-image: url("support/reticule-to.png"); } .inner3 { position: absolute; @@ -40,7 +40,7 @@ left: 105px; width: 27px; height: 27px; - background-image: url("reticule-tr.png"); + background-image: url("support/reticule-tr.png"); } .inner4_1 { position: absolute; @@ -48,7 +48,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-le.png"); + background-image: url("support/reticule-le.png"); } .inner4_2 { position: absolute; @@ -56,7 +56,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-le.png"); + background-image: url("support/reticule-le.png"); } .inner5_1 { position: absolute; @@ -64,7 +64,7 @@ left: 35px; width: 27px; height: 27px; - background-image: url("reticule-ct.png"); + background-image: url("support/reticule-ct.png"); } .inner5_2 { position: absolute; @@ -72,7 +72,7 @@ left: 70px; width: 27px; height: 27px; - background-image: url("reticule-ct.png"); + background-image: url("support/reticule-ct.png"); } .inner5_3 { position: absolute; @@ -80,7 +80,7 @@ left: 35px; width: 27px; height: 27px; - background-image: url("reticule-ct.png"); + background-image: url("support/reticule-ct.png"); } .inner5_4 { position: absolute; @@ -88,7 +88,7 @@ left: 70px; width: 27px; height: 27px; - background-image: url("reticule-ct.png"); + background-image: url("support/reticule-ct.png"); } .inner6_1 { position: absolute; @@ -96,7 +96,7 @@ left: 105px; width: 27px; height: 27px; - background-image: url("reticule-ri.png"); + background-image: url("support/reticule-ri.png"); } .inner6_2 { position: absolute; @@ -104,7 +104,7 @@ left: 105px; width: 27px; height: 27px; - background-image: url("reticule-ri.png"); + background-image: url("support/reticule-ri.png"); } .inner7 { position: absolute; @@ -112,7 +112,7 @@ left: 0px; width: 27px; height: 27px; - background-image: url("reticule-bl.png"); + background-image: url("support/reticule-bl.png"); } .inner8_1 { position: absolute; @@ -120,7 +120,7 @@ left: 35px; width: 27px; height: 27px; - background-image: url("reticule-bo.png"); + background-image: url("support/reticule-bo.png"); } .inner8_2 { position: absolute; @@ -128,7 +128,7 @@ left: 70px; width: 27px; height: 27px; - background-image: url("reticule-bo.png"); + background-image: url("support/reticule-bo.png"); } .inner9 { position: absolute; @@ -136,7 +136,7 @@ left: 105px; width: 27px; height: 27px; - background-image: url("reticule-br.png"); + background-image: url("support/reticule-br.png"); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7.html index 3e632877dd8..367657858ea 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border-image-repeat-space-7.html @@ -15,7 +15,7 @@ top: 0px; border-width: 27px; border-style: solid; - border-image: url("reticule.png") 27 fill space; + border-image: url("support/reticule.png") 27 fill space; width: 78px; height: 78px; } diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-32x32.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-32x32.png Binary files differindex 42f8a2100b2..42f8a2100b2 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-32x32.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-32x32.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-37x37.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-37x37.png Binary files differindex 0289b039413..0289b039413 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-37x37.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/aqua-yellow-37x37.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/border.png Binary files differindex 7a657391d65..7a657391d65 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/border.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/border.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bl.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bl.png Binary files differindex 6abbaf319f3..6abbaf319f3 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bl.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bl.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bo.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bo.png Binary files differindex f72a67381c6..f72a67381c6 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bo.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-bo.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-br.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-br.png Binary files differindex 84e22afe2a1..84e22afe2a1 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-br.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-br.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ct.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ct.png Binary files differindex 71ac10f6110..71ac10f6110 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ct.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ct.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-le.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-le.png Binary files differindex abe56ffad64..abe56ffad64 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-le.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-le.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ri.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ri.png Binary files differindex 95d7db84234..95d7db84234 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ri.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-ri.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tl.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tl.png Binary files differindex 8a3516998ab..8a3516998ab 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tl.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tl.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-to.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-to.png Binary files differindex d1b082c9ba2..d1b082c9ba2 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-to.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-to.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tr.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tr.png Binary files differindex cd9bb5a5a40..cd9bb5a5a40 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tr.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule-tr.png diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule.png b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule.png Binary files differindex 02c7d10e76b..02c7d10e76b 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule.png +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/background/support/reticule.png diff --git a/tests/wpt/web-platform-tests/custom-elements/builtin-coverage.html b/tests/wpt/web-platform-tests/custom-elements/builtin-coverage.html index bd084e968a4..e3001a2c485 100644 --- a/tests/wpt/web-platform-tests/custom-elements/builtin-coverage.html +++ b/tests/wpt/web-platform-tests/custom-elements/builtin-coverage.html @@ -9,805 +9,146 @@ <body is="my-body"> <div id="container"></div> <script> -class MyA extends HTMLAnchorElement { - constructor() { - super(); - } -} - -class MyAbbr extends HTMLElement { - constructor() { - super(); - } -} - -class MyAddress extends HTMLElement { - constructor() { - super(); - } -} - -class MyArea extends HTMLAreaElement { - constructor() { - super(); - } -} - -class MyArticle extends HTMLElement { - constructor() { - super(); - } -} - -class MyAside extends HTMLElement { - constructor() { - super(); - } -} - -class MyAudio extends HTMLAudioElement { - constructor() { - super(); - } -} - -class MyB extends HTMLElement { - constructor() { - super(); - } -} - -class MyBase extends HTMLBaseElement { - constructor() { - super(); - } -} - -class MyBdi extends HTMLElement { - constructor() { - super(); - } -} - -class MyBdo extends HTMLElement { - constructor() { - super(); - } -} - -class MyBlockquote extends HTMLQuoteElement { - constructor() { - super(); - } -} - -class MyBody extends HTMLBodyElement { - constructor() { - super(); - } -} - -class MyBr extends HTMLBRElement { - constructor() { - super(); - } -} - -class MyButton extends HTMLButtonElement { - constructor() { - super(); - } -} - -class MyCanvas extends HTMLCanvasElement { - constructor() { - super(); - } -} - -class MyCaption extends HTMLTableCaptionElement { - constructor() { - super(); - } -} - -class MyCite extends HTMLElement { - constructor() { - super(); - } -} - -class MyCode extends HTMLElement { - constructor() { - super(); - } -} - -class MyCol extends HTMLTableColElement { - constructor() { - super(); - } -} - -class MyColgroup extends HTMLTableColElement { - constructor() { - super(); - } -} - -class MyData extends HTMLDataElement { - constructor() { - super(); - } -} - -class MyDd extends HTMLElement { - constructor() { - super(); - } -} - -class MyDel extends HTMLModElement { - constructor() { - super(); - } -} - -class MyDetails extends HTMLDetailsElement { - constructor() { - super(); - } -} - -class MyDfn extends HTMLElement { - constructor() { - super(); - } -} - -class MyDiv extends HTMLDivElement { - constructor() { - super(); - } -} - -class MyDl extends HTMLDListElement { - constructor() { - super(); - } -} - -class MyDt extends HTMLElement { - constructor() { - super(); - } -} - -class MyEm extends HTMLElement { - constructor() { - super(); - } -} - -class MyEmbed extends HTMLEmbedElement { - constructor() { - super(); - } -} - -class MyFieldset extends HTMLFieldSetElement { - constructor() { - super(); - } -} - -class MyFigcaption extends HTMLElement { - constructor() { - super(); - } -} - -class MyFigure extends HTMLElement { - constructor() { - super(); - } -} - -class MyFooter extends HTMLElement { - constructor() { - super(); - } -} - -class MyForm extends HTMLFormElement { - constructor() { - super(); - } -} - -class MyH1 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyH2 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyH3 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyH4 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyH5 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyH6 extends HTMLHeadingElement { - constructor() { - super(); - } -} - -class MyHeader extends HTMLElement { - constructor() { - super(); - } -} - -class MyHgroup extends HTMLElement { - constructor() { - super(); - } -} - -class MyHr extends HTMLHRElement { - constructor() { - super(); - } -} - -class MyHtml extends HTMLHtmlElement { - constructor() { - super(); - } -} - -class MyI extends HTMLElement { - constructor() { - super(); - } -} - -class MyIframe extends HTMLIFrameElement { - constructor() { - super(); - } -} - -class MyImg extends HTMLImageElement { - constructor() { - super(); - } -} - -class MyInput extends HTMLInputElement { - constructor() { - super(); - } -} - -class MyIns extends HTMLModElement { - constructor() { - super(); - } -} - -class MyKbd extends HTMLElement { - constructor() { - super(); - } -} - -class MyLabel extends HTMLLabelElement { - constructor() { - super(); - } -} - -class MyLegend extends HTMLLegendElement { - constructor() { - super(); - } -} - -class MyLi extends HTMLLIElement { - constructor() { - super(); - } -} - -class MyLink extends HTMLLinkElement { - constructor() { - super(); - } -} - -class MyMain extends HTMLElement { - constructor() { - super(); - } -} - -class MyMap extends HTMLMapElement { - constructor() { - super(); - } -} - -class MyMark extends HTMLElement { - constructor() { - super(); - } -} - -class MyMenu extends HTMLMenuElement { - constructor() { - super(); - } -} - -class MyMeta extends HTMLMetaElement { - constructor() { - super(); - } -} - -class MyMeter extends HTMLMeterElement { - constructor() { - super(); - } -} - -class MyNav extends HTMLElement { - constructor() { - super(); - } -} - -class MyNoscript extends HTMLElement { - constructor() { - super(); - } -} - -class MyObject extends HTMLObjectElement { - constructor() { - super(); - } -} - -class MyOl extends HTMLOListElement { - constructor() { - super(); - } -} - -class MyOptgroup extends HTMLOptGroupElement { - constructor() { - super(); - } -} - -class MyOption extends HTMLOptionElement { - constructor() { - super(); - } -} - -class MyOutput extends HTMLOutputElement { - constructor() { - super(); - } -} - -class MyP extends HTMLParagraphElement { - constructor() { - super(); - } -} - -class MyParam extends HTMLParamElement { - constructor() { - super(); - } -} - -class MyPicture extends HTMLPictureElement { - constructor() { - super(); - } -} - -class MyPre extends HTMLPreElement { - constructor() { - super(); - } -} - -class MyProgress extends HTMLProgressElement { - constructor() { - super(); - } -} - -class MyQ extends HTMLQuoteElement { - constructor() { - super(); - } -} - -class MyRp extends HTMLElement { - constructor() { - super(); - } -} - -class MyRt extends HTMLElement { - constructor() { - super(); - } -} - -class MyRuby extends HTMLElement { - constructor() { - super(); - } -} - -class MyS extends HTMLElement { - constructor() { - super(); - } -} - -class MySamp extends HTMLElement { - constructor() { - super(); - } -} - -class MyScript extends HTMLScriptElement { - constructor() { - super(); - } -} - -class MySection extends HTMLElement { - constructor() { - super(); - } -} - -class MySelect extends HTMLSelectElement { - constructor() { - super(); - } -} - -class MySmall extends HTMLElement { - constructor() { - super(); - } -} - -class MySource extends HTMLSourceElement { - constructor() { - super(); - } -} - -class MySpan extends HTMLSpanElement { - constructor() { - super(); - } -} - -class MyStrong extends HTMLElement { - constructor() { - super(); - } -} - -class MyStyle extends HTMLStyleElement { - constructor() { - super(); - } -} - -class MySub extends HTMLElement { - constructor() { - super(); - } -} - -class MySummary extends HTMLElement { - constructor() { - super(); - } -} - -class MySup extends HTMLElement { - constructor() { - super(); - } -} - -class MyTable extends HTMLTableElement { - constructor() { - super(); - } -} - -class MyTbody extends HTMLTableSectionElement { - constructor() { - super(); - } -} - -class MyTd extends HTMLTableCellElement { - constructor() { - super(); - } -} - -class MyTemplate extends HTMLTemplateElement { - constructor() { - super(); - } -} - -class MyTextarea extends HTMLTextAreaElement { - constructor() { - super(); - } -} - -class MyTfoot extends HTMLTableSectionElement { - constructor() { - super(); - } -} - -class MyTh extends HTMLTableCellElement { - constructor() { - super(); - } -} - -class MyThead extends HTMLTableSectionElement { - constructor() { - super(); - } -} - -class MyTime extends HTMLTimeElement { - constructor() { - super(); - } -} - -class MyTitle extends HTMLTitleElement { - constructor() { - super(); - } -} - -class MyTr extends HTMLTableRowElement { - constructor() { - super(); - } -} - -class MyTrack extends HTMLTrackElement { - constructor() { - super(); - } -} - -class MyU extends HTMLElement { - constructor() { - super(); - } -} - -class MyUl extends HTMLUListElement { - constructor() { - super(); - } -} - -class MyVar extends HTMLElement { - constructor() { - super(); - } -} - -class MyVideo extends HTMLVideoElement { - constructor() { - super(); - } -} - -class MyWbr extends HTMLElement { - constructor() { - super(); - } -} - let testData = [ - {tag: 'a', klass: MyA}, - {tag: 'abbr', klass: MyAbbr}, - {tag: 'address', klass: MyAddress}, - {tag: 'area', klass: MyArea}, - {tag: 'article', klass: MyArticle}, - {tag: 'aside', klass: MyAside}, - {tag: 'audio', klass: MyAudio}, - {tag: 'b', klass: MyB}, - {tag: 'base', klass: MyBase}, - {tag: 'bdi', klass: MyBdi}, - {tag: 'bdo', klass: MyBdo}, - {tag: 'blockquote', klass: MyBlockquote}, - {tag: 'body', klass: MyBody, parsing: 'document'}, - {tag: 'br', klass: MyBr}, - {tag: 'button', klass: MyButton}, - {tag: 'canvas', klass: MyCanvas}, - {tag: 'caption', klass: MyCaption, parsing: 'table'}, - {tag: 'cite', klass: MyCite}, - {tag: 'code', klass: MyCode}, - {tag: 'col', klass: MyCol, parsing: 'table'}, - {tag: 'colgroup', klass: MyColgroup, parsing: 'table'}, - {tag: 'data', klass: MyData}, - {tag: 'dd', klass: MyDd}, - {tag: 'del', klass: MyDel}, - {tag: 'details', klass: MyDetails}, - {tag: 'dfn', klass: MyDfn}, - {tag: 'div', klass: MyDiv}, - {tag: 'dl', klass: MyDl}, - {tag: 'dt', klass: MyDt}, - {tag: 'em', klass: MyEm}, - {tag: 'embed', klass: MyEmbed}, - {tag: 'fieldset', klass: MyFieldset}, - {tag: 'figcaption', klass: MyFigcaption}, - {tag: 'figure', klass: MyFigure}, - {tag: 'footer', klass: MyFooter}, - {tag: 'form', klass: MyForm}, - {tag: 'h1', klass: MyH1}, - {tag: 'h2', klass: MyH2}, - {tag: 'h3', klass: MyH3}, - {tag: 'h4', klass: MyH4}, - {tag: 'h5', klass: MyH5}, - {tag: 'h6', klass: MyH6}, - {tag: 'header', klass: MyHeader}, - {tag: 'hgroup', klass: MyHgroup}, - {tag: 'hr', klass: MyHr}, - {tag: 'html', klass: MyHtml, parsing: 'document'}, - {tag: 'i', klass: MyI}, - {tag: 'iframe', klass: MyIframe}, - {tag: 'img', klass: MyImg}, - {tag: 'input', klass: MyInput}, - {tag: 'ins', klass: MyIns}, - {tag: 'kbd', klass: MyKbd}, - {tag: 'label', klass: MyLabel}, - {tag: 'legend', klass: MyLegend}, - {tag: 'li', klass: MyLi}, - {tag: 'link', klass: MyLink}, - {tag: 'main', klass: MyMain}, - {tag: 'map', klass: MyMap}, - {tag: 'mark', klass: MyMark}, - {tag: 'menu', klass: MyMenu}, - {tag: 'meta', klass: MyMeta}, - {tag: 'meter', klass: MyMeter}, - {tag: 'nav', klass: MyNav}, - {tag: 'noscript', klass: MyNoscript}, - {tag: 'object', klass: MyObject}, - {tag: 'ol', klass: MyOl}, - {tag: 'optgroup', klass: MyOptgroup}, - {tag: 'option', klass: MyOption}, - {tag: 'output', klass: MyOutput}, - {tag: 'p', klass: MyP}, - {tag: 'param', klass: MyParam}, - {tag: 'picture', klass: MyPicture}, - {tag: 'pre', klass: MyPre}, - {tag: 'progress', klass: MyProgress}, - {tag: 'q', klass: MyQ}, - {tag: 'rp', klass: MyRp}, - {tag: 'rt', klass: MyRt}, - {tag: 'ruby', klass: MyRuby}, - {tag: 's', klass: MyS}, - {tag: 'samp', klass: MySamp}, - {tag: 'script', klass: MyScript}, - {tag: 'section', klass: MySection}, - {tag: 'select', klass: MySelect}, - {tag: 'small', klass: MySmall}, - {tag: 'source', klass: MySource}, - {tag: 'span', klass: MySpan}, - {tag: 'strong', klass: MyStrong}, - {tag: 'style', klass: MyStyle}, - {tag: 'sub', klass: MySub}, - {tag: 'summary', klass: MySummary}, - {tag: 'sup', klass: MySup}, - {tag: 'table', klass: MyTable}, - {tag: 'tbody', klass: MyTbody, parsing: 'table'}, - {tag: 'td', klass: MyTd, parsing: 'table'}, - {tag: 'template', klass: MyTemplate}, - {tag: 'textarea', klass: MyTextarea}, - {tag: 'tfoot', klass: MyTfoot, parsing: 'table'}, - {tag: 'th', klass: MyTh, parsing: 'table'}, - {tag: 'thead', klass: MyThead, parsing: 'table'}, - {tag: 'time', klass: MyTime}, - {tag: 'title', klass: MyTitle}, - {tag: 'tr', klass: MyTr, parsing: 'table'}, - {tag: 'track', klass: MyTrack}, - {tag: 'u', klass: MyU}, - {tag: 'ul', klass: MyUl}, - {tag: 'var', klass: MyVar}, - {tag: 'video', klass: MyVideo}, - {tag: 'wbr', klass: MyWbr}, + {tag: 'a', interface: 'HTMLAnchorElement'}, + {tag: 'abbr', interface: 'HTMLElement'}, + {tag: 'address', interface: 'HTMLElement'}, + {tag: 'area', interface: 'HTMLAreaElement'}, + {tag: 'article', interface: 'HTMLElement'}, + {tag: 'aside', interface: 'HTMLElement'}, + {tag: 'audio', interface: 'HTMLAudioElement'}, + {tag: 'b', interface: 'HTMLElement'}, + {tag: 'base', interface: 'HTMLBaseElement'}, + {tag: 'bdi', interface: 'HTMLElement'}, + {tag: 'bdo', interface: 'HTMLElement'}, + {tag: 'blockquote', interface: 'HTMLQuoteElement'}, + {tag: 'body', interface: 'HTMLBodyElement', parsing: 'document'}, + {tag: 'br', interface: 'HTMLBRElement'}, + {tag: 'button', interface: 'HTMLButtonElement'}, + {tag: 'canvas', interface: 'HTMLCanvasElement'}, + {tag: 'caption', interface: 'HTMLTableCaptionElement', parsing: 'table'}, + {tag: 'cite', interface: 'HTMLElement'}, + {tag: 'code', interface: 'HTMLElement'}, + {tag: 'col', interface: 'HTMLTableColElement', parsing: 'table'}, + {tag: 'colgroup', interface: 'HTMLTableColElement', parsing: 'table'}, + {tag: 'data', interface: 'HTMLDataElement'}, + {tag: 'dd', interface: 'HTMLElement'}, + {tag: 'del', interface: 'HTMLModElement'}, + {tag: 'details', interface: 'HTMLDetailsElement'}, + {tag: 'dfn', interface: 'HTMLElement'}, + {tag: 'div', interface: 'HTMLDivElement'}, + {tag: 'dl', interface: 'HTMLDListElement'}, + {tag: 'dt', interface: 'HTMLElement'}, + {tag: 'em', interface: 'HTMLElement'}, + {tag: 'embed', interface: 'HTMLEmbedElement'}, + {tag: 'fieldset', interface: 'HTMLFieldSetElement'}, + {tag: 'figcaption', interface: 'HTMLElement'}, + {tag: 'figure', interface: 'HTMLElement'}, + {tag: 'footer', interface: 'HTMLElement'}, + {tag: 'form', interface: 'HTMLFormElement'}, + {tag: 'h1', interface: 'HTMLHeadingElement'}, + {tag: 'h2', interface: 'HTMLHeadingElement'}, + {tag: 'h3', interface: 'HTMLHeadingElement'}, + {tag: 'h4', interface: 'HTMLHeadingElement'}, + {tag: 'h5', interface: 'HTMLHeadingElement'}, + {tag: 'h6', interface: 'HTMLHeadingElement'}, + {tag: 'header', interface: 'HTMLElement'}, + {tag: 'hgroup', interface: 'HTMLElement'}, + {tag: 'hr', interface: 'HTMLHRElement'}, + {tag: 'html', interface: 'HTMLHtmlElement', parsing: 'document'}, + {tag: 'i', interface: 'HTMLElement'}, + {tag: 'iframe', interface: 'HTMLIFrameElement'}, + {tag: 'img', interface: 'HTMLImageElement'}, + {tag: 'input', interface: 'HTMLInputElement'}, + {tag: 'ins', interface: 'HTMLModElement'}, + {tag: 'kbd', interface: 'HTMLElement'}, + {tag: 'label', interface: 'HTMLLabelElement'}, + {tag: 'legend', interface: 'HTMLLegendElement'}, + {tag: 'li', interface: 'HTMLLIElement'}, + {tag: 'link', interface: 'HTMLLinkElement'}, + {tag: 'main', interface: 'HTMLElement'}, + {tag: 'map', interface: 'HTMLMapElement'}, + {tag: 'mark', interface: 'HTMLElement'}, + {tag: 'menu', interface: 'HTMLMenuElement'}, + {tag: 'meta', interface: 'HTMLMetaElement'}, + {tag: 'meter', interface: 'HTMLMeterElement'}, + {tag: 'nav', interface: 'HTMLElement'}, + {tag: 'noscript', interface: 'HTMLElement'}, + {tag: 'object', interface: 'HTMLObjectElement'}, + {tag: 'ol', interface: 'HTMLOListElement'}, + {tag: 'optgroup', interface: 'HTMLOptGroupElement'}, + {tag: 'option', interface: 'HTMLOptionElement'}, + {tag: 'output', interface: 'HTMLOutputElement'}, + {tag: 'p', interface: 'HTMLParagraphElement'}, + {tag: 'param', interface: 'HTMLParamElement'}, + {tag: 'picture', interface: 'HTMLPictureElement'}, + {tag: 'pre', interface: 'HTMLPreElement'}, + {tag: 'progress', interface: 'HTMLProgressElement'}, + {tag: 'q', interface: 'HTMLQuoteElement'}, + {tag: 'rp', interface: 'HTMLElement'}, + {tag: 'rt', interface: 'HTMLElement'}, + {tag: 'ruby', interface: 'HTMLElement'}, + {tag: 's', interface: 'HTMLElement'}, + {tag: 'samp', interface: 'HTMLElement'}, + {tag: 'script', interface: 'HTMLScriptElement'}, + {tag: 'section', interface: 'HTMLElement'}, + {tag: 'select', interface: 'HTMLSelectElement'}, + {tag: 'small', interface: 'HTMLElement'}, + {tag: 'source', interface: 'HTMLSourceElement'}, + {tag: 'span', interface: 'HTMLSpanElement'}, + {tag: 'strong', interface: 'HTMLElement'}, + {tag: 'style', interface: 'HTMLStyleElement'}, + {tag: 'sub', interface: 'HTMLElement'}, + {tag: 'summary', interface: 'HTMLElement'}, + {tag: 'sup', interface: 'HTMLElement'}, + {tag: 'table', interface: 'HTMLTableElement'}, + {tag: 'tbody', interface: 'HTMLTableSectionElement', parsing: 'table'}, + {tag: 'td', interface: 'HTMLTableCellElement', parsing: 'table'}, + {tag: 'template', interface: 'HTMLTemplateElement'}, + {tag: 'textarea', interface: 'HTMLTextAreaElement'}, + {tag: 'tfoot', interface: 'HTMLTableSectionElement', parsing: 'table'}, + {tag: 'th', interface: 'HTMLTableCellElement', parsing: 'table'}, + {tag: 'thead', interface: 'HTMLTableSectionElement', parsing: 'table'}, + {tag: 'time', interface: 'HTMLTimeElement'}, + {tag: 'title', interface: 'HTMLTitleElement'}, + {tag: 'tr', interface: 'HTMLTableRowElement', parsing: 'table'}, + {tag: 'track', interface: 'HTMLTrackElement'}, + {tag: 'u', interface: 'HTMLElement'}, + {tag: 'ul', interface: 'HTMLUListElement'}, + {tag: 'var', interface: 'HTMLElement'}, + {tag: 'video', interface: 'HTMLVideoElement'}, + {tag: 'wbr', interface: 'HTMLElement'}, ]; // HTMLDataListElement isn't implemented by all major browsers yet. if (window.HTMLDataListElement) { - testData.push({tag: 'datalist', klass: class extends HTMLDataListElement { - constructor() { - super(); - } - }}); + testData.push({tag: 'datalist', interface: 'HTMLDataListElement'}); } // HTMLDialogElement isn't implemented by all major browsers yet. if (window.HTMLDialogElement) { - testData.push({tag: 'dialog', klass: class MyDialog extends HTMLDialogElement { - constructor() { - super(); - } - }}); + testData.push({tag: 'dialog', interface: 'HTMLDialogElement'}); } // HTMLSlotElement isn't implemented by all major browsers yet. if (window.HTMLSlotElement) { - testData.push({tag: 'slot', klass: class extends HTMLSlotElement { - constructor() { - super(); - } - }}); + testData.push({tag: 'slot', interface: 'HTMLSlotElement'}); } for (const t of testData) { test(() => { let name = 'my-' + t.tag; - customElements.define(name, t.klass, { extends: t.tag }); + let klass = eval(`(class extends ${t.interface} {})`); + customElements.define(name, klass, { extends: t.tag }); test(() => { - let customized = new t.klass(); - assert_equals(customized.constructor, t.klass); - assert_equals(customized.cloneNode().constructor, t.klass, + let customized = new klass(); + assert_equals(customized.constructor, klass); + assert_equals(customized.cloneNode().constructor, klass, 'Cloning a customized built-in element should succeed.'); }, `${t.tag}: Operator 'new' should instantiate a customized built-in element`); test(() => { let customized = document.createElement(t.tag, { is: name }); - assert_equals(customized.constructor, t.klass); - assert_equals(customized.cloneNode().constructor, t.klass, + assert_equals(customized.constructor, klass); + assert_equals(customized.cloneNode().constructor, klass, 'Cloning a customized built-in element should succeed.'); }, `${t.tag}: document.createElement() should instantiate a customized built-in element`); @@ -815,8 +156,8 @@ for (const t of testData) { let test = async_test(`${t.tag}: document parser should instantiate a customized built-in element`); window.addEventListener('load', test.step_func_done(() => { let customized = document.querySelector(t.tag); - assert_equals(customized.constructor, t.klass); - assert_equals(customized.cloneNode().constructor, t.klass, + assert_equals(customized.constructor, klass); + assert_equals(customized.cloneNode().constructor, klass, 'Cloning a customized built-in element should succeed.'); })); return; @@ -829,8 +170,8 @@ for (const t of testData) { container.innerHTML = `<${t.tag} is="${name}" id="${name}">`; } let customized = document.getElementById(name); - assert_equals(customized.constructor, t.klass); - assert_equals(customized.cloneNode().constructor, t.klass, + assert_equals(customized.constructor, klass); + assert_equals(customized.cloneNode().constructor, klass, 'Cloning a customized built-in element should succeed.'); }, `${t.tag}: innerHTML should instantiate a customized built-in element`); diff --git a/tests/wpt/web-platform-tests/docs/_config.yml b/tests/wpt/web-platform-tests/docs/_config.yml index c70d94b448d..91ece99d713 100644 --- a/tests/wpt/web-platform-tests/docs/_config.yml +++ b/tests/wpt/web-platform-tests/docs/_config.yml @@ -41,3 +41,5 @@ exclude: - vendor/bundle/ - .bundle/ - OWNERS +sass: + sass_dir: assets/ diff --git a/tests/wpt/web-platform-tests/docs/_includes/header.html b/tests/wpt/web-platform-tests/docs/_includes/header.html index 150d6163a59..6c966407672 100644 --- a/tests/wpt/web-platform-tests/docs/_includes/header.html +++ b/tests/wpt/web-platform-tests/docs/_includes/header.html @@ -1,5 +1,7 @@ <header class="site-header" role="banner"> + <a class="github-fork-ribbon left-top" href="https://github.com/w3c/web-platform-tests/blob/master/docs/{{ page.path }}" data-ribbon="Edit on GitHub">Edit on GitHub</a> + <div class="wrapper"> <a class="site-title" href="{{ "/" | relative_url}}">{{ site.title | escape }}</a> diff --git a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md index d888a5c9ab2..1785a8dd610 100644 --- a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md +++ b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md @@ -7,8 +7,10 @@ To run WPT on Chrome on an Android device, some additional set up is required. First of all, as usual Android development, we need to have `adb` and be able to connect to the device. -Furthermore, until we find a better way, we need to root the Android device and -update the /etc/hosts file to include +## Hosts + +Until we find a better way, we need to root the Android device and update the +/etc/hosts file to include ``` 127.0.0.1 web-platform.test @@ -20,7 +22,23 @@ update the /etc/hosts file to include 0.0.0.0 nonexistent-origin.web-platform.test ``` -After this, we may run wpt with the `chrome_android` product +## CA certificate + +In order to run HTTPS tests, we need to add +[WPT's CA](https://github.com/w3c/web-platform-tests/blob/master/tools/certs/cacert.pem) +to the phone. First, convert the certificate from PEM to CRT: + +``` +openssl x509 -outform der -in tools/certs/cacert.pem -out cacert.crt +``` + +Then copy `cacert.crt` to your phone's external storage (preferably to +Downloads/ as it'll be easier to find). Open Settings -> Security & location -> +Encryption & credentials -> Install from storage. Find and install `cacert.crt`. +(The setting entries might be slightly different based your Android version.) + + +Finally, we may run wpt with the `chrome_android` product ``` ./wpt run chrome_android [test_list] diff --git a/tests/wpt/web-platform-tests/docs/_running-tests/index.md b/tests/wpt/web-platform-tests/docs/_running-tests/index.md index 7977c7efecd..f0cecfb15c2 100644 --- a/tests/wpt/web-platform-tests/docs/_running-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/_running-tests/index.md @@ -32,7 +32,7 @@ Additional browser-specific documentation: * [Safari][safari] ## From Inside a Browser -Tests that have been merged on GitHub are mirrored at [http://w3c-test.org/]. +Tests that have been merged on GitHub are mirrored at [http://w3c-test.org/][w3c-test]. For running multiple tests inside a browser, there is a test runner located at `/tools/runner/index.html`. @@ -74,3 +74,4 @@ documented! [public-test-infra]: https://lists.w3.org/Archives/Public/public-test-infra/ [IRC]: irc://irc.w3.org:6667/testing [web irc]: http://irc.w3.org +[w3c-test]: http://w3c-test.org diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/reftests.md b/tests/wpt/web-platform-tests/docs/_writing-tests/reftests.md index 2658962c210..f90d66dbd91 100644 --- a/tests/wpt/web-platform-tests/docs/_writing-tests/reftests.md +++ b/tests/wpt/web-platform-tests/docs/_writing-tests/reftests.md @@ -99,14 +99,15 @@ leaf nodes.) ## Controlling When Comparison Occurs By default reftest screenshots are taken after the `load` event has -fired. In some cases it is necessary to delay the screenshot later -than this, for example because some DOM manipulation is required to -set up the desired test conditions. To enable this, the test may have -a `class="reftest-wait"` attribute specified on the root element. This -will cause the screenshot to be delayed until the `load` event has -fired and the `reftest-wait` class has been removed from the root -element. Note that in neither case is exact timing of the screenshot -guaranteed: it is only guaranteed to be after those events. +fired, and web fonts (if any) are loaded. In some cases it is +necessary to delay the screenshot later than this, for example because +some DOM manipulation is required to set up the desired test +conditions. To enable this, the test may have a `class="reftest-wait"` +attribute specified on the root element. This will cause the +screenshot to be delayed until the `load` event has fired and the +`reftest-wait` class has been removed from the root element. Note that +in neither case is exact timing of the screenshot guaranteed: it is +only guaranteed to be after those events. ## Fuzzy Matching diff --git a/tests/wpt/web-platform-tests/docs/assets/gh-fork-ribbon.scss b/tests/wpt/web-platform-tests/docs/assets/gh-fork-ribbon.scss new file mode 100644 index 00000000000..c81530bfdb6 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/assets/gh-fork-ribbon.scss @@ -0,0 +1,124 @@ +/*! + * "Fork me on GitHub" CSS ribbon v0.2.2 | MIT License + * https://github.com/simonwhitaker/github-fork-ribbon-css +*/ + +.github-fork-ribbon { + width: 12.1em; + height: 12.1em; + position: absolute; + overflow: hidden; + top: 0; + right: 0; + z-index: 9999; + pointer-events: none; + font-size: 13px; + text-decoration: none; + text-indent: -999999px; +} + +.github-fork-ribbon.fixed { + position: fixed; +} + +.github-fork-ribbon:hover, .github-fork-ribbon:active { + background-color: rgba(0, 0, 0, 0.0); +} + +.github-fork-ribbon:before, .github-fork-ribbon:after { + /* The right and left classes determine the side we attach our banner to */ + position: absolute; + display: block; + width: 15.38em; + height: 1.54em; + + top: 3.23em; + right: -3.23em; + + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} + +.github-fork-ribbon:before { + content: ""; + + /* Add a bit of padding to give some substance outside the "stitching" */ + padding: .38em 0; + + /* Set the base colour */ + background-color: #a00; + + /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ + background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15))); + background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); + background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); + background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); + background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); + + /* Add a drop shadow */ + -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); + box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); + + pointer-events: auto; +} + +.github-fork-ribbon:after { + /* Set the text from the data-ribbon attribute */ + content: attr(data-ribbon); + + /* Set the text properties */ + color: #fff; + font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 1.54em; + text-decoration: none; + text-shadow: 0 -.08em rgba(0, 0, 0, 0.5); + text-align: center; + text-indent: 0; + + /* Set the layout properties */ + padding: .15em 0; + margin: .15em 0; + + /* Add "stitching" effect */ + border-width: .08em 0; + border-style: dotted; + border-color: #fff; + border-color: rgba(255, 255, 255, 0.7); +} + +.github-fork-ribbon.left-top, .github-fork-ribbon.left-bottom { + right: auto; + left: 0; +} + +.github-fork-ribbon.left-bottom, .github-fork-ribbon.right-bottom { + top: auto; + bottom: 0; +} + +.github-fork-ribbon.left-top:before, .github-fork-ribbon.left-top:after, .github-fork-ribbon.left-bottom:before, .github-fork-ribbon.left-bottom:after { + right: auto; + left: -3.23em; +} + +.github-fork-ribbon.left-bottom:before, .github-fork-ribbon.left-bottom:after, .github-fork-ribbon.right-bottom:before, .github-fork-ribbon.right-bottom:after { + top: auto; + bottom: 3.23em; +} + +.github-fork-ribbon.left-top:before, .github-fork-ribbon.left-top:after, .github-fork-ribbon.right-bottom:before, .github-fork-ribbon.right-bottom:after { + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); +} diff --git a/tests/wpt/web-platform-tests/docs/assets/main.scss b/tests/wpt/web-platform-tests/docs/assets/main.scss index 4dc5e5c4147..6274e755100 100644 --- a/tests/wpt/web-platform-tests/docs/assets/main.scss +++ b/tests/wpt/web-platform-tests/docs/assets/main.scss @@ -164,3 +164,9 @@ nav.home { display: block !important; } } + +@import "gh-fork-ribbon"; + +.github-fork-ribbon:before { + background-color: $grey-color-dark; +} diff --git a/tests/wpt/web-platform-tests/docs/introduction.md b/tests/wpt/web-platform-tests/docs/introduction.md index 8833d869470..4e4932e21b2 100644 --- a/tests/wpt/web-platform-tests/docs/introduction.md +++ b/tests/wpt/web-platform-tests/docs/introduction.md @@ -128,22 +128,31 @@ The test environment can then be started using ./wpt serve This will start HTTP servers on two ports and a websockets server on -one port. By default one web server starts on port 8000 and the other +one port. By default the web servers start on ports 8000 and 8443 and the other ports are randomly-chosen free ports. Tests must be loaded from the *first* HTTP server in the output. To change the ports, copy the `config.default.json` file to `config.json` and edit the new file, replacing the part that reads: ``` -"http": [8000, "auto"] +"http": [8000, "auto"], +"https":[8443] ``` -to some port of your choice e.g. +to some ports of your choice e.g. ``` -"http": [1234, "auto"] +"http": [1234, "auto"], +"https":[5678] ``` +After your `hosts` file is configured, the servers will be locally accessible at: + +http://web-platform.test:8000/<br> +https://web-platform.test:8443/ * + +\**See [Trusting Root CA](https://github.com/w3c/web-platform-tests/blob/master/README.md#trusting-root-ca)* + ## Running tests automatically The `wpt run` command provides a frontend for running tests automatically diff --git a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html index bc28b1c6678..2b376d4cb00 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html +++ b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html @@ -370,65 +370,66 @@ function testClassList(e, desc) { // replace() method - function checkReplace(before, token, newToken, after, expectedException) { - checkModification(e, "replace", [token, newToken], undefined, before, + function checkReplace(before, token, newToken, expectedRes, after, expectedException) { + checkModification(e, "replace", [token, newToken], expectedRes, before, after, expectedException, desc); } - checkReplace(null, "", "a", null, "SyntaxError"); - checkReplace(null, "", " ", null, "SyntaxError"); - checkReplace(null, " ", "a", null, "InvalidCharacterError"); - checkReplace(null, "\ta", "b", null, "InvalidCharacterError"); - checkReplace(null, "a\t", "b", null, "InvalidCharacterError"); - checkReplace(null, "\na", "b", null, "InvalidCharacterError"); - checkReplace(null, "a\n", "b", null, "InvalidCharacterError"); - checkReplace(null, "\fa", "b", null, "InvalidCharacterError"); - checkReplace(null, "a\f", "b", null, "InvalidCharacterError"); - checkReplace(null, "\ra", "b", null, "InvalidCharacterError"); - checkReplace(null, "a\r", "b", null, "InvalidCharacterError"); - checkReplace(null, " a", "b", null, "InvalidCharacterError"); - checkReplace(null, "a ", "b", null, "InvalidCharacterError"); - - checkReplace(null, "a", "", null, "SyntaxError"); - checkReplace(null, " ", "", null, "SyntaxError"); - checkReplace(null, "a", " ", null, "InvalidCharacterError"); - checkReplace(null, "b", "\ta", null, "InvalidCharacterError"); - checkReplace(null, "b", "a\t", null, "InvalidCharacterError"); - checkReplace(null, "b", "\na", null, "InvalidCharacterError"); - checkReplace(null, "b", "a\n", null, "InvalidCharacterError"); - checkReplace(null, "b", "\fa", null, "InvalidCharacterError"); - checkReplace(null, "b", "a\f", null, "InvalidCharacterError"); - checkReplace(null, "b", "\ra", null, "InvalidCharacterError"); - checkReplace(null, "b", "a\r", null, "InvalidCharacterError"); - checkReplace(null, "b", " a", null, "InvalidCharacterError"); - checkReplace(null, "b", "a ", null, "InvalidCharacterError"); - - checkReplace("a", "a", "a", "a"); - checkReplace("a", "a", "b", "b"); - checkReplace("a", "A", "b", "a"); - checkReplace("a b", "b", "A", "a A"); - checkReplace("a b c", "d", "e", "a b c"); + checkReplace(null, "", "a", null, null, "SyntaxError"); + checkReplace(null, "", " ", null, null, "SyntaxError"); + checkReplace(null, " ", "a", null, null, "InvalidCharacterError"); + checkReplace(null, "\ta", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "a\t", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "\na", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "a\n", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "\fa", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "a\f", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "\ra", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "a\r", "b", null, null, "InvalidCharacterError"); + checkReplace(null, " a", "b", null, null, "InvalidCharacterError"); + checkReplace(null, "a ", "b", null, null, "InvalidCharacterError"); + + checkReplace(null, "a", "", null, null, "SyntaxError"); + checkReplace(null, " ", "", null, null, "SyntaxError"); + checkReplace(null, "a", " ", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "\ta", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "a\t", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "\na", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "a\n", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "\fa", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "a\f", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "\ra", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "a\r", null, null, "InvalidCharacterError"); + checkReplace(null, "b", " a", null, null, "InvalidCharacterError"); + checkReplace(null, "b", "a ", null, null, "InvalidCharacterError"); + + checkReplace("a", "a", "a", true, "a"); + checkReplace("a", "a", "b", true, "b"); + checkReplace("a", "A", "b", false, "a"); + checkReplace("a b", "b", "A", true, "a A"); + checkReplace("a b", "c", "a", false, "a b"); + checkReplace("a b c", "d", "e", false, "a b c"); // https://github.com/whatwg/dom/issues/443 - checkReplace("a a a b", "a", "a", "a b"); - checkReplace("a a a b", "c", "d", "a a a b"); - checkReplace(null, "a", "b", null); - checkReplace("", "a", "b", ""); - checkReplace(" ", "a", "b", " "); - checkReplace(" a \f", "a", "b", "b"); - checkReplace("a b c", "b", "d", "a d c"); - checkReplace("a b c", "c", "a", "a b"); - checkReplace("c b a", "c", "a", "a b"); - checkReplace("a b a", "a", "c", "c b"); - checkReplace("a b a", "b", "c", "a c"); - checkReplace(" a a b", "a", "c", "c b"); - checkReplace(" a a b", "b", "c", "a c"); - checkReplace("\t\n\f\r a\t\n\f\r b\t\n\f\r ", "a", "c", "c b"); - checkReplace("\t\n\f\r a\t\n\f\r b\t\n\f\r ", "b", "c", "a c"); - - checkReplace("a null", null, "b", "a b"); - checkReplace("a b", "a", null, "null b"); - checkReplace("a undefined", undefined, "b", "a b"); - checkReplace("a b", "a", undefined, "undefined b"); + checkReplace("a a a b", "a", "a", true, "a b"); + checkReplace("a a a b", "c", "d", false, "a a a b"); + checkReplace(null, "a", "b", false, null); + checkReplace("", "a", "b", false, ""); + checkReplace(" ", "a", "b", false, " "); + checkReplace(" a \f", "a", "b", true, "b"); + checkReplace("a b c", "b", "d", true, "a d c"); + checkReplace("a b c", "c", "a", true, "a b"); + checkReplace("c b a", "c", "a", true, "a b"); + checkReplace("a b a", "a", "c", true, "c b"); + checkReplace("a b a", "b", "c", true, "a c"); + checkReplace(" a a b", "a", "c", true, "c b"); + checkReplace(" a a b", "b", "c", true, "a c"); + checkReplace("\t\n\f\r a\t\n\f\r b\t\n\f\r ", "a", "c", true, "c b"); + checkReplace("\t\n\f\r a\t\n\f\r b\t\n\f\r ", "b", "c", true, "a c"); + + checkReplace("a null", null, "b", true, "a b"); + checkReplace("a b", "a", null, true, "null b"); + checkReplace("a undefined", undefined, "b", true, "a b"); + checkReplace("a b", "a", undefined, true, "undefined b"); } var content = document.getElementById("content"); diff --git a/tests/wpt/web-platform-tests/domxpath/document.tentative.html b/tests/wpt/web-platform-tests/domxpath/document.tentative.html new file mode 100644 index 00000000000..c44ebd99375 --- /dev/null +++ b/tests/wpt/web-platform-tests/domxpath/document.tentative.html @@ -0,0 +1,20 @@ +<!doctype html> +<title>XPath parent of documentElement</title> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<body> +<script> +test(function() { + var result = document.evaluate("..", // expression + document.documentElement, // context node + null, // resolver + XPathResult.ANY_TYPE, // type + null); // result + var matched = []; + var cur; + while ((cur = result.iterateNext()) !== null) { + matched.push(cur); + } + assert_array_equals(matched, [document]); +}); +</script> diff --git a/tests/wpt/web-platform-tests/encoding/idlharness.html b/tests/wpt/web-platform-tests/encoding/idlharness.html index 3359744c8b6..03cec924131 100644 --- a/tests/wpt/web-platform-tests/encoding/idlharness.html +++ b/tests/wpt/web-platform-tests/encoding/idlharness.html @@ -11,56 +11,15 @@ <h1>idlharness test</h1> <p>This test validates the WebIDL included in the Encoding Living Standard.</p> -<script type="text/plain" class="untested-idl"> -interface Window {}; -</script> - -<script type="text/plain" class="idl"> -// 8.1 Interface TextDecoder - -dictionary TextDecoderOptions { - boolean fatal = false; - boolean ignoreBOM = false; -}; - -dictionary TextDecodeOptions { - boolean stream = false; -}; - -[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), - Exposed=(Window,Worker)] -interface TextDecoder { - readonly attribute DOMString encoding; - readonly attribute boolean fatal; - readonly attribute boolean ignoreBOM; - USVString decode(optional BufferSource input, optional TextDecodeOptions options); -}; - -// 8.2 Interface TextDecoder - -[Constructor, - Exposed=(Window,Worker)] -interface TextEncoder { - readonly attribute DOMString encoding; - [NewObject] Uint8Array encode(optional USVString input = ""); -}; -</script> - <script> -function select(selector) { - return [].slice.call(document.querySelectorAll(selector)) - .map(function(e) { return e.textContent; }) - .join('\n\n'); -} - -var idl = select('.idl') -var untested = select('.untested-idl'); -var idl_array = new IdlArray(); -idl_array.add_untested_idls(untested); -idl_array.add_idls(idl); -idl_array.add_objects({ - TextEncoder: ['new TextEncoder()'], - TextDecoder: ['new TextDecoder()'] -}); -idl_array.test(); +promise_test(async() => { + const text = await (await fetch('/interfaces/encoding.idl')).text(); + const idl_array = new IdlArray(); + idl_array.add_idls(text); + idl_array.add_objects({ + TextEncoder: ['new TextEncoder()'], + TextDecoder: ['new TextDecoder()'] + }); + idl_array.test(); +}, 'Test driver'); </script> diff --git a/tests/wpt/web-platform-tests/entries-api/README.md b/tests/wpt/web-platform-tests/entries-api/README.md new file mode 100644 index 00000000000..2f54d8bf891 --- /dev/null +++ b/tests/wpt/web-platform-tests/entries-api/README.md @@ -0,0 +1,9 @@ +Tests for the [Files and Directory Entries API](https://github.com/wicg/entries-api) + +* [Explainer](https://github.com/WICG/entries-api/blob/gh-pages/EXPLAINER.md) +* [Draft Specification](https://wicg.github.io/entries-api/) + +Unfortunately, most of the tests are **manual** and require drag-and-drop of test +data files, which can be found in the `entries-api/support` directory. The tests +can be run via [w3c-test.org](http://w3c-test.org/entries-api/), but a local clone +of the repo is required for access to the test data files. diff --git a/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-close2.htm b/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-close2.htm new file mode 100644 index 00000000000..b1b74e88b82 --- /dev/null +++ b/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-close2.htm @@ -0,0 +1,29 @@ +<!-- +self.close() +var source = new EventSource("../resources/message.py") +postMessage(source.readyState) +/*--> +<!DOCTYPE html> +<html> + <head> + <title>dedicated worker - EventSource created after: worker.close()</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + <script> + var test = async_test(); + test.step(function() { + var worker = new Worker('#') + worker.onmessage = function(e) { + test.step(function() { + assert_equals(e.data, EventSource.CONNECTING, 'this.readyState') + }) + test.done() + } + }) + </script> + </body> +</html> +<!--*/ //--> diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html new file mode 100644 index 00000000000..defe06ffedb --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script src=/feature-policy/resources/featurepolicy.js></script> + <!-- Feature-Policy: fullscreen *; --> + <script> + 'use strict'; + var same_origin = 'https://{{domains[]}}:{{ports[https][0]}}'; + var cross_origin = 'https://{{domains[www]}}:{{ports[https][0]}}'; + var same_origin_src = '/feature-policy/resources/feature-policy-allowedfeatures.html'; + var cross_origin_src = cross_origin + same_origin_src; + var policies = [ + {allow: "*", sameOriginTestExpect: true, crossOriginTestExpect: true}, + {allow: "'self'", sameOriginTestExpect: true, crossOriginTestExpect: false}, + {allow: "'none'", sameOriginTestExpect: false, crossOriginTestExpect: false}, + {allow: "'self' " + cross_origin + " https://www.example.com", sameOriginTestExpect: true, crossOriginTestExpect: true}]; + var pipe_front = '?pipe=sub|header(Feature-Policy,fullscreen '; + var pipe_end = ';)'; + var header_policies = ["*", "'self'", "'none'"]; + + // Test that frame.policy inherits from parent's header policy when allow + // attribute is not specified. + test(function() { + test_frame_policy('fullscreen', same_origin_src, true); + }, 'Test frame policy on same origin iframe inherit from header policy.'); + test(function() { + test_frame_policy('fullscreen', cross_origin_src, true); + }, 'Test frame policy on cross origin iframe inherit from header policy.'); + + // Test frame policy with allow attribute set to be one of the policies above. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + '".'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + '".'); + } + + // Test that the header policy of the iframe document does not change the + // frame policy. + for (var i = 0; i < policies.length; i++) { + for (var j = 0; j < header_policies.length; j++) { + test(function() { + test_frame_policy( + 'fullscreen', + same_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + test(function() { + test_frame_policy( + 'fullscreen', + cross_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + } + } + + // Test that the allow attribute overrides allowfullscreen. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + } + </script> +</body> diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..111121a52fb --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-all.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen *; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html new file mode 100644 index 00000000000..d757d4c4cf5 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script src=/feature-policy/resources/featurepolicy.js></script> + <!-- Feature-Policy: fullscreen 'self'; --> + <script> + 'use strict'; + var same_origin = 'https://{{domains[]}}:{{ports[https][0]}}'; + var cross_origin = 'https://{{domains[www]}}:{{ports[https][0]}}'; + var same_origin_src = '/feature-policy/resources/feature-policy-allowedfeatures.html'; + var cross_origin_src = cross_origin + same_origin_src; + var policies = [ + {allow: "*", sameOriginTestExpect: true, crossOriginTestExpect: true}, + {allow: "'self'", sameOriginTestExpect: true, crossOriginTestExpect: false}, + {allow: "'none'", sameOriginTestExpect: false, crossOriginTestExpect: false}, + {allow: "'self' " + cross_origin + " https://www.example.com", sameOriginTestExpect: true, crossOriginTestExpect: true}]; + var pipe_front = '?pipe=sub|header(Feature-Policy,fullscreen '; + var pipe_end = ';)'; + var header_policies = ["*", "'self'", "'none'"]; + + // Test that frame.policy inherits from parent's header policy when allow + // attribute is not specified. + test(function() { + test_frame_policy('fullscreen', same_origin_src, true); + }, 'Test frame policy on same origin iframe inherit from header policy.'); + test(function() { + test_frame_policy('fullscreen', cross_origin_src, false); + }, 'Test frame policy on cross origin iframe inherit from header policy.'); + + // Test frame policy with allow attribute set to be one of the policies above. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + '".'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + '".'); + } + + // Test that the header policy of the iframe document does not change the + // frame policy. + for (var i = 0; i < policies.length; i++) { + for (var j = 0; j < header_policies.length; j++) { + test(function() { + test_frame_policy( + 'fullscreen', + same_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + test(function() { + test_frame_policy( + 'fullscreen', + cross_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + } + } + + // Test that the allow attribute overrides allowfullscreen. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + } + </script> +</body> diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers new file mode 100644 index 00000000000..0cc259b24f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-self.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'self'; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html new file mode 100644 index 00000000000..f10c66fe0e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script src=/feature-policy/resources/featurepolicy.js></script> + <!-- Feature-Policy: fullscreen 'self' cross_origin https://www.example.com; --> + <script> + 'use strict'; + var same_origin = 'https://{{domains[]}}:{{ports[https][0]}}'; + var cross_origin = 'https://{{domains[www]}}:{{ports[https][0]}}'; + var cross_origin1 = 'https://{{domains[www1]}}:{{ports[https][0]}}'; + var same_origin_src = '/feature-policy/resources/feature-policy-allowedfeatures.html'; + var cross_origin_src = cross_origin + same_origin_src; + var cross_origin_src1 = cross_origin1 + same_origin_src; + // Test feature policy with same_origin_src and cross_origin_src. + var policies = [ + {allow: "*", sameOriginTestExpect: true, crossOriginTestExpect: true, crossOrigin1TestExpect: true}, + {allow: "'self'", sameOriginTestExpect: true, crossOriginTestExpect: false, crossOrigin1TestExpect: false}, + {allow: "'none'", sameOriginTestExpect: false, crossOriginTestExpect: false, crossOrigin1TestExpect: false}, + {allow: "'self' " + cross_origin + " https://www.example.com", sameOriginTestExpect: true, crossOriginTestExpect: true, crossOrigin1TestExpect: false}]; + var pipe_front = '?pipe=sub|header(Feature-Policy,fullscreen '; + var pipe_end = ';)'; + var header_policies = ["*", "'self'", "'none'"]; + + // Test that frame.policy inherits from parent's header policy when allow + // attribute is not specified. + test(function() { + test_frame_policy('fullscreen', same_origin_src, true); + }, 'Test frame policy on same origin iframe inherit from header policy.'); + test(function() { + test_frame_policy('fullscreen', cross_origin_src, true); + }, 'Test frame policy on cross origin iframe inherit from header policy.'); + test(function() { + test_frame_policy('fullscreen', cross_origin_src1, false); + }, 'Test frame policy on another cross origin iframe inherit from header policy.'); + + // Test frame policy with allow attribute set to be one of the policies above. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + '".'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + '".'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src1, policies[i].crossOrigin1TestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on another cross origin iframe with allow = "' + policies[i].allow + '".'); + } + + // Test that the header policy of the iframe document does not change the + // frame policy. + for (var i = 0; i < policies.length; i++) { + for (var j = 0; j < header_policies.length; j++) { + test(function() { + test_frame_policy( + 'fullscreen', + same_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + test(function() { + test_frame_policy( + 'fullscreen', + cross_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + test(function() { + test_frame_policy( + 'fullscreen', + cross_origin_src1 + pipe_front + header_policies[j] + pipe_end, + policies[i].crossOrigin1TestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on another cross origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + } + } + + // Test that the allow attribute overrides allowfullscreen. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src1, policies[i].crossOrigin1TestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on another cross origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + } + </script> +</body> diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers new file mode 100644 index 00000000000..c2493a08903 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-allowed-for-some.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'self' https://{{domains[www]}}:{{ports[https][0]}} https://www.example.com; diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html new file mode 100644 index 00000000000..e1178e797d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script src=/feature-policy/resources/featurepolicy.js></script> + <!-- Feature-Policy: fullscreen 'none'; --> + <script> + 'use strict'; + var same_origin = 'https://{{domains[]}}:{{ports[https][0]}}'; + var cross_origin = 'https://{{domains[www]}}:{{ports[https][0]}}'; + var same_origin_src = '/feature-policy/resources/feature-policy-allowedfeatures.html'; + var cross_origin_src = cross_origin + same_origin_src; + var policies = [ + {allow: "*", sameOriginTestExpect: false, crossOriginTestExpect: false}, + {allow: "'self'", sameOriginTestExpect: false, crossOriginTestExpect: false}, + {allow: "'none'", sameOriginTestExpect: false, crossOriginTestExpect: false}, + {allow: "'self' " + cross_origin + " https://www.example.com", sameOriginTestExpect: false, crossOriginTestExpect: false}]; + var pipe_front = '?pipe=sub|header(Feature-Policy,fullscreen '; + var pipe_end = ';)'; + var header_policies = ["*", "'self'", "'none'"]; + + // Test that frame.policy inherits from parent's header policy when allow + // attribute is not specified. + test(function() { + test_frame_policy('fullscreen', same_origin_src, false); + }, 'Test frame policy on same origin iframe inherit from header policy.'); + test(function() { + test_frame_policy('fullscreen', cross_origin_src, false); + }, 'Test frame policy on cross origin iframe inherit from header policy.'); + + // Test frame policy with allow attribute set to be one of the policies above. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + '".'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + '".'); + } + + // Test that the header policy of the iframe document does not change the + // frame policy. + for (var i = 0; i < policies.length; i++) { + for (var j = 0; j < header_policies.length; j++) { + test(function() { + test_frame_policy( + 'fullscreen', + same_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + test(function() { + test_frame_policy( + 'fullscreen', + cross_origin_src + pipe_front + header_policies[j] + pipe_end, + policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';'); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and header policy = "Feature-Policy: fullscreen ' + header_policies[j] + ';".'); + } + } + + // Test that the allow attribute overrides allowfullscreen. + for (var i = 0; i < policies.length; i++) { + test(function() { + test_frame_policy( + 'fullscreen', same_origin_src, policies[i].sameOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on same origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + test(function() { + test_frame_policy( + 'fullscreen', cross_origin_src, policies[i].crossOriginTestExpect, + 'fullscreen ' + policies[i].allow + ';', /*allowfullscreen*/true); + }, 'Test frame policy on cross origin iframe with allow = "' + policies[i].allow + + '" and allowfullscreen.'); + } + </script> +</body> diff --git a/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers new file mode 100644 index 00000000000..961d40336ae --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/feature-policy-frame-policy-disallowed-for-all.https.sub.html.sub.headers @@ -0,0 +1 @@ +Feature-Policy: fullscreen 'none'; diff --git a/tests/wpt/web-platform-tests/feature-policy/interfaces.any.js b/tests/wpt/web-platform-tests/feature-policy/interfaces.any.js new file mode 100644 index 00000000000..baebc2ff0c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/interfaces.any.js @@ -0,0 +1,23 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +"use strict"; + +// https://wicg.github.io/feature-policy/ + +var idlArray = new IdlArray(); + +function doTest(idl) { + idlArray.add_untested_idls("interface HTMLIFrameElement {};"); + idlArray.add_idls(idl); + idlArray.add_objects({ + HTMLIframeElement: ['document.createElement("iframe")'], + }) + idlArray.test(); + done(); +} + +promise_test(function () { + return fetch("/interfaces/feature-policy.idl").then(response => response.text()) + .then(doTest); +}, "Test interfaces"); diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js index 925408ea8a4..be8629d153d 100644 --- a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js +++ b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js @@ -383,3 +383,33 @@ function test_subframe_header_policy( }); }, test_name); } + +// This function tests that frame policy allows a given feature correctly. A +// feature is allowed in a frame either through inherited policy or specified +// by iframe allow attribute. +// Arguments: +// feature: feature name. +// src: the URL to load in the frame. +// test_expect: boolean value of whether the feature should be allowed. +// allow: optional, the allow attribute (container policy) of the iframe. +// allowfullscreen: optional, boolean value of allowfullscreen attribute. +function test_frame_policy( + feature, src, test_expect, allow, allowfullscreen) { + let frame = document.createElement('iframe'); + document.body.appendChild(frame); + // frame_policy should be dynamically updated as allow and allowfullscreen is + // updated. + var frame_policy = frame.policy; + if (typeof allow !== 'undefined') { + frame.setAttribute('allow', allow); + } + if (!!allowfullscreen) { + frame.setAttribute('allowfullscreen', true); + } + frame.src = src; + if (test_expect) { + assert_true(frame_policy.allowedFeatures().includes(feature)); + } else { + assert_false(frame_policy.allowedFeatures().includes(feature)); + } +} diff --git a/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-location.js b/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-location.js index cb038a6812c..5b9a4fe454a 100644 --- a/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-location.js +++ b/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-location.js @@ -32,7 +32,7 @@ function redirectLocation(desc, redirectUrl, redirectLocation, redirectStatus, r var redirUrl = RESOURCES_DIR + "redirect.py"; var locationUrl = "top.txt"; -var invalidLocationUrl = "#invalidurl:"; +var invalidLocationUrl = "invalidurl:"; var dataLocationUrl = "data:,data%20url"; // FIXME: We may want to mix redirect-mode and cors-mode. // FIXME: Add tests for "error" redirect-mode. diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-disturbed.html b/tests/wpt/web-platform-tests/fetch/api/request/request-disturbed.html index 83a1a1f0e0c..d247a7ff2db 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-disturbed.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-disturbed.html @@ -49,6 +49,17 @@ }, "Check creating a new request from a disturbed request"); promise_test(function() { + assert_true(bodyConsumed.bodyUsed , "bodyUsed is true when request is disturbed"); + const originalBody = bodyConsumed.body; + const bodyReplaced = new Request(bodyConsumed, { body: "Replaced body" }); + assert_not_equals(bodyReplaced.body, originalBody, "new request's body is new"); + assert_false(bodyReplaced.bodyUsed, "bodyUsed is false when request is not disturbed"); + return bodyReplaced.text().then(text => { + assert_equals(text, "Replaced body"); + }); + }, "Check creating a new request with a new body from a disturbed request"); + + promise_test(function() { var bodyRequest = new Request("", initValuesDict); const originalBody = bodyRequest.body; assert_false(bodyRequest.bodyUsed , "bodyUsed is false when request is not disturbed"); @@ -58,7 +69,7 @@ assert_not_equals(originalBody, undefined, "body should not be undefined"); assert_not_equals(originalBody, null, "body should not be null"); assert_not_equals(requestFromRequest.body, originalBody, "new request's body is new"); - return requestFromRequest.text(text => { + return requestFromRequest.text().then(text => { assert_equals(text, "Request's body"); }); }, "Input request used for creating new request became disturbed"); @@ -74,7 +85,7 @@ assert_not_equals(originalBody, null, "body should not be null"); assert_not_equals(requestFromRequest.body, originalBody, "new request's body is new"); - return requestFromRequest.text(text => { + return requestFromRequest.text().then(text => { assert_equals(text, "init body"); }); }, "Input request used for creating new request became disturbed even if body is not used"); diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-consume.html b/tests/wpt/web-platform-tests/fetch/api/response/response-consume.html index 24d127f295e..4946a4d33a4 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-consume.html +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-consume.html @@ -31,6 +31,13 @@ }); } + function blobToTypeViaFetch(blob) { + var url = URL.createObjectURL(blob); + return fetch(url).then(function(response) { + return response.headers.get('Content-Type'); + }); + } + function responsePromise(body, responseInit) { return new Promise(function(resolve, reject) { resolve(new Response(body, responseInit)); @@ -75,15 +82,18 @@ return response.blob().then(function(bodyAsBlob) { assert_equals(bodyAsBlob.type, expectedType || "text/plain", "Blob body type should be computed from the response Content-Type"); - var promise = new Promise( function (resolve, reject) { - var reader = new FileReader(); - reader.onload = function(evt) { - resolve(reader.result) - }; - reader.onerror = function () { - reject("Blob's reader failed"); - }; - reader.readAsText(bodyAsBlob); + var promise = blobToTypeViaFetch(bodyAsBlob).then(function(type) { + assert_equals(type, expectedType || "text/plain", 'Type via blob URL'); + return new Promise( function (resolve, reject) { + var reader = new FileReader(); + reader.onload = function(evt) { + resolve(reader.result) + }; + reader.onerror = function () { + reject("Blob's reader failed"); + }; + reader.readAsText(bodyAsBlob); + }); }); return promise.then(function(body) { assert_equals(body, expectedBody, "Retrieve and verify response's body"); diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-error-from-stream.html b/tests/wpt/web-platform-tests/fetch/api/response/response-error-from-stream.html new file mode 100644 index 00000000000..392bc77a6c0 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-error-from-stream.html @@ -0,0 +1,69 @@ +<!doctype html> +<html> + <head> + <meta charset="utf-8"> + <title>Response Receives Propagated Error from ReadableStream</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <script> + function CustomTestError() { + const error = Error(); + error.name = 'custom-test-error'; + return error; + } + + function newStreamWithStartError() { + return new ReadableStream({ + start(controller) { + controller.error(CustomTestError()); + } + }) + } + + function newStreamWithPullError() { + return new ReadableStream({ + pull(controller) { + controller.error(CustomTestError()); + } + }) + } + + function runRequestPromiseTest(stream, responseReaderMethod, testDescription) { + promise_test(test => { + return promise_rejects( + test, + CustomTestError(), + new Response(stream)[responseReaderMethod](), + 'CustomTestError should propagate' + ) + }, testDescription) + } + + + promise_test(test => { + return promise_rejects(test, CustomTestError(), newStreamWithStartError().getReader().read(), 'CustomTestError should propagate') + }, "ReadableStreamDefaultReader Promise receives ReadableStream start() Error") + + promise_test(test => { + return promise_rejects(test, CustomTestError(), newStreamWithPullError().getReader().read(), 'CustomTestError should propagate') + }, "ReadableStreamDefaultReader Promise receives ReadableStream pull() Error") + + + // test start() errors for all Body reader methods + runRequestPromiseTest(newStreamWithStartError(), 'arrayBuffer', 'ReadableStream start() Error propagates to Response.arrayBuffer() Promise'); + runRequestPromiseTest(newStreamWithStartError(), 'blob', 'ReadableStream start() Error propagates to Response.blob() Promise'); + runRequestPromiseTest(newStreamWithStartError(), 'formData', 'ReadableStream start() Error propagates to Response.formData() Promise'); + runRequestPromiseTest(newStreamWithStartError(), 'json', 'ReadableStream start() Error propagates to Response.json() Promise'); + runRequestPromiseTest(newStreamWithStartError(), 'text', 'ReadableStream start() Error propagates to Response.text() Promise'); + + // test pull() errors for all Body reader methods + runRequestPromiseTest(newStreamWithPullError(), 'arrayBuffer', 'ReadableStream pull() Error propagates to Response.arrayBuffer() Promise'); + runRequestPromiseTest(newStreamWithPullError(), 'blob', 'ReadableStream pull() Error propagates to Response.blob() Promise'); + runRequestPromiseTest(newStreamWithPullError(), 'formData', 'ReadableStream pull() Error propagates to Response.formData() Promise'); + runRequestPromiseTest(newStreamWithPullError(), 'json', 'ReadableStream pull() Error propagates to Response.json() Promise'); + runRequestPromiseTest(newStreamWithPullError(), 'text', 'ReadableStream pull() Error propagates to Response.text() Promise'); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/sensors/OWNERS b/tests/wpt/web-platform-tests/generic-sensor/OWNERS index 06bc2d81d87..06bc2d81d87 100644 --- a/tests/wpt/web-platform-tests/sensors/OWNERS +++ b/tests/wpt/web-platform-tests/generic-sensor/OWNERS diff --git a/tests/wpt/web-platform-tests/sensors/SensorErrorEvent-constructor.https.html b/tests/wpt/web-platform-tests/generic-sensor/SensorErrorEvent-constructor.https.html index 6e2d1684f57..6e2d1684f57 100644 --- a/tests/wpt/web-platform-tests/sensors/SensorErrorEvent-constructor.https.html +++ b/tests/wpt/web-platform-tests/generic-sensor/SensorErrorEvent-constructor.https.html diff --git a/tests/wpt/web-platform-tests/sensors/generic-sensor-feature-policy-test.sub.js b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-feature-policy-test.sub.js index f722315cfb2..f722315cfb2 100644 --- a/tests/wpt/web-platform-tests/sensors/generic-sensor-feature-policy-test.sub.js +++ b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-feature-policy-test.sub.js diff --git a/tests/wpt/web-platform-tests/sensors/generic-sensor-tests.js b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-tests.js index 4be4841586d..ece481bf4c4 100644 --- a/tests/wpt/web-platform-tests/sensors/generic-sensor-tests.js +++ b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-tests.js @@ -13,6 +13,14 @@ const properties = { 'accuracy', 'altitudeAccuracy', 'heading', 'speed'], 'ProximitySensor' : ['timestamp', 'max'] }; +const spatialSensors = ['Accelerometer', + 'LinearAccelerationSensor', + 'GravitySensor', + 'Gyroscope', + 'Magnetometer', + 'UncalibratedMagnetometer', + 'AbsoluteOrientationSensor', + 'RelativeOrientationSensor']; function assert_reading_not_null(sensor) { for (let property in properties[sensor.constructor.name]) { @@ -242,6 +250,65 @@ function runGenericSensorTests(sensorType) { sensor.stop(); }, `${sensorType.name}: sensor receives suspend / resume notifications when\ cross-origin subframe is focused`); + + test(() => { + assert_throws("NotSupportedError", () => { new sensorType({invalid: 1}) }); + assert_throws("NotSupportedError", () => { new sensorType({frequency: 60, invalid: 1}) }); + if (spatialSensors.indexOf(sensorType.name) == -1) { + assert_throws("NotSupportedError", () => { new sensorType({referenceFrame: "screen"}) }); + } + }, `${sensorType.name}: throw 'NotSupportedError' for an unsupported sensor option`); + + test(() => { + const invalidFreqs = [ + "invalid", + NaN, + Infinity, + -Infinity, + {}, + undefined + ]; + invalidFreqs.map(freq => { + assert_throws(new TypeError(), + () => { new sensorType({frequency: freq}) }, + `when freq is ${freq}`); + }); + }, `${sensorType.name}: throw 'TypeError' if frequency is invalid`); + + if (spatialSensors.indexOf(sensorType.name) == -1) { + // The sensorType does not represent a spatial sensor. + return; + } + + promise_test(async t => { + const sensor = new sensorType({referenceFrame: "screen"}); + const sensorWatcher = new EventWatcher(t, sensor, ["reading", "error"]); + sensor.start(); + + await sensorWatcher.wait_for("reading"); + //TODO use mock data to verify sensor readings, blocked by issue: + // https://github.com/w3c/web-platform-tests/issues/9686 + assert_reading_not_null(sensor); + + sensor.stop(); + }, `${sensorType.name}: sensor reading is correct when options.referenceFrame is 'screen'`); + + test(() => { + const invalidRefFrames = [ + "invalid", + null, + 123, + {}, + "", + true, + undefined + ]; + invalidRefFrames.map(refFrame => { + assert_throws(new TypeError(), + () => { new sensorType({referenceFrame: refFrame}) }, + `when refFrame is ${refFrame}`); + }); + }, `${sensorType.name}: throw 'TypeError' if referenceFrame is not one of enumeration values`); } function runGenericSensorInsecureContext(sensorType) { diff --git a/tests/wpt/web-platform-tests/sensors/idlharness.https.html b/tests/wpt/web-platform-tests/generic-sensor/idlharness.https.html index 56208e43a20..56208e43a20 100644 --- a/tests/wpt/web-platform-tests/sensors/idlharness.https.html +++ b/tests/wpt/web-platform-tests/generic-sensor/idlharness.https.html diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html index dd9869125ab..88f92c65399 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-disabled-by-feature-policy.https.html @@ -4,10 +4,22 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; run_fp_tests_disabled(GeolocationSensor); + +promise_test(async t => { + await promise_rejects(t, 'SecurityError', GeolocationSensor.read()); +}, "GeolocationSensor.read(): 'SecurityError' is thrown when disabled by Feature Policy"); + +promise_test(async t => { + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + + await promise_rejects(t, 'AbortError', GeolocationSensor.read({ signal })); +}, "GeolocationSensor.read(): 'AbortError' takes priority"); </script> </body> diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html index 45ee97f9347..66b7832e45f 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html index b4790575bb0..5ea2518af63 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html index 08d45f2c626..46ef9b7ce86 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html index 651d31cc85f..1694ed00fdf 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor.https.html index 3319c02807a..625963870f6 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://wicg.github.io/geolocation-sensor/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <script> runGenericSensorTests(GeolocationSensor); diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_insecure_context.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_insecure_context.html index 6e487cb2b5d..6a3a126c785 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_insecure_context.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://wicg.github.io/geolocation-sensor/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <script> runGenericSensorInsecureContext("GeolocationSensor"); diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_onerror-manual.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_onerror-manual.https.html index 00d1135bbdc..b449346546f 100644 --- a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://wicg.github.io/geolocation-sensor/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <h2>Precondition</h2> <ol> <li> diff --git a/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_read.https.html b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_read.https.html new file mode 100644 index 00000000000..9eb0339a185 --- /dev/null +++ b/tests/wpt/web-platform-tests/geolocation-sensor/GeolocationSensor_read.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>GeolocationSensor.read() Test</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://wicg.github.io/geolocation-sensor/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +const properties = [ + 'timestamp', + 'latitude', + 'longitude', + 'altitude', + 'accuracy', + 'altitudeAccuracy', + 'heading', + 'speed' +]; + +promise_test(async t => { + const geo = await GeolocationSensor.read({ signal: null }); + assert_not_equals(geo.timestamp, null); + properties.forEach(property => assert_own_property(geo, property)); +}, "Test that read() method resolves with valid reading when signal is null"); + +promise_test(async t => { + const geo = await GeolocationSensor.read(); + assert_not_equals(geo.timestamp, null); + properties.forEach(property => assert_own_property(geo, property)); +}, "Test that read() method resolves with valid reading"); + +promise_test(async t => { + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + + await promise_rejects(t, 'AbortError', GeolocationSensor.read({ signal })); +}, "Test that read() method rejects 'AbortError' if signal's aborted flag is set"); +</script> diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-disabled-by-feature-policy.https.html index 5ab2fb44147..de4aee2dacc 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https.html index 26c5edfa7a6..3c831bb7c7e 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https.html index e76571d6054..46473c3a9d0 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy.https.html index d21bd072411..95eee330b39 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html index 9626e60e339..ae5a63d1484 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope.https.html index 8f035222d3c..81cdfddee7b 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/gyroscope/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope_insecure_context.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope_insecure_context.html index e821db00885..2ae8117d708 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope_insecure_context.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/gyroscope/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/gyroscope/Gyroscope_onerror-manual.https.html b/tests/wpt/web-platform-tests/gyroscope/Gyroscope_onerror-manual.https.html index cf330cae0dc..f0126151a24 100644 --- a/tests/wpt/web-platform-tests/gyroscope/Gyroscope_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/gyroscope/Gyroscope_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/gyroscope/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html index 08d127e84b1..cd2d019c47d 100644 --- a/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html +++ b/tests/wpt/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html @@ -40,7 +40,7 @@ function runWindowTests (baselineDimensions) { var prefixedMessage = new PrefixedMessageTest(); prefixedMessage.onMessage(t.step_func_done((data, e) => { e.source.close(); - assert_equals(data.width, baselineDimensions.width); + assert_equals(data.height, baselineDimensions.height); })); var win = window.open(prefixedMessage.url(windowURL), '', feature); }, `${feature}: absence of feature "height" should be treated same as "height=0"`); diff --git a/tests/wpt/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js b/tests/wpt/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js new file mode 100644 index 00000000000..704130abfe9 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/type-argument.window.js @@ -0,0 +1,20 @@ +["replace", + "NOBODY", + "@ FD ;", + "it does not matter, you see \f", + "text/plain", + "text/xml", + "application/octet-stream", + "\0"].forEach(type => { + async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + frame.contentDocument.open(type); + frame.contentDocument.write("<B>heya</b>"); + frame.contentDocument.close(); + assert_equals(frame.contentDocument.body.firstChild.localName, "b"); + assert_equals(frame.contentDocument.body.textContent, "heya"); + assert_equals(frame.contentDocument.contentType, "text/html"); + t.done(); + }, "document.open() with type set to: " + type + " (type argument is supposed to be ignored)"); +}); diff --git a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html b/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html index a4bc173baaa..e991e19f059 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html +++ b/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html @@ -13,13 +13,13 @@ "use strict"; async_test(function(t) { var request = new XMLHttpRequest(); - request.open("GET", "domstringlist.idl"); + request.open("GET", "/interfaces/html.idl"); request.send(); request.onload = t.step_func(function() { var idlArray = new IdlArray(); var idls = request.responseText; - idlArray.add_idls(idls); + idlArray.add_idls(idls, { only: ["DOMStringList"] }); idlArray.add_objects({ DOMStringList: ['location.ancestorOrigins'], diff --git a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.worker.js b/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.worker.js index 0231b5058ce..e957b9e9b50 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.worker.js +++ b/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.worker.js @@ -5,13 +5,13 @@ importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); async_test(function(t) { var request = new XMLHttpRequest(); - request.open("GET", "domstringlist.idl"); + request.open("GET", "/interfaces/html.idl"); request.send(); request.onload = t.step_func(function() { var idlArray = new IdlArray(); var idls = request.responseText; - idlArray.add_idls(idls); + idlArray.add_idls(idls, { only: ["DOMStringList"] }); idlArray.add_objects({ DOMStringList: [], diff --git a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist.idl b/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist.idl deleted file mode 100644 index 9b72a7c834c..00000000000 --- a/tests/wpt/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/domstringlist.idl +++ /dev/null @@ -1,6 +0,0 @@ -[Exposed=(Window,Worker)] -interface DOMStringList { - readonly attribute unsigned long length; - getter DOMString? item(unsigned long index); - boolean contains(DOMString string); -}; diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js new file mode 100644 index 00000000000..bb1c083c41d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js @@ -0,0 +1,47 @@ +function assert_transfer_error(transferList) { + assert_throws("DataCloneError", () => self.postMessage({ get whatever() { throw new Error("You should not have gotten to this point") } }, "*", transferList)); +} + +test(() => { + [self, self.document, new Image()].forEach(val => { + assert_transfer_error([val]); + }); +}, "Cannot transfer all objects"); + +function transfer_tests(name, create) { + promise_test(async () => { + const transferable = await create(); + assert_transfer_error([transferable, transferable]); + }, `Cannot transfer the same ${name} twice`); + + promise_test(async () => { + const transferable = await create(); + self.postMessage(null, "*", [transferable]); + assert_throws("DataCloneError", () => self.postMessage(null, "*", [transferable])); + }, `Serialize should make the ${name} detached, so it cannot be transferred again`); + + promise_test(async () => { + const transferable = await create(), + customError = new Error("hi"); + self.postMessage(null, "*", [transferable]); + assert_throws(customError, () => self.postMessage({ get whatever() { throw customError } }, "*", [transferable])); + }, `Serialize should throw before a detached ${name} is found`); + + promise_test(async () => { + const transferable = await create(); + let seen = false; + const message = { + get a() { + self.postMessage(null, '*', [transferable]); + seen = true; + } + }; + assert_throws("DataCloneError", () => self.postMessage(message, "*", [transferable])); + assert_true(seen); + }, `Cannot transfer ${name} detached while the message was serialized`); +} + +transfer_tests("ArrayBuffer", () => new ArrayBuffer(1)); +transfer_tests("MessagePort", () => new MessageChannel().port1); +transfer_tests("ImageBitmap", () => self.createImageBitmap(document.createElement("canvas"))); +transfer_tests("OffscreenCanvas", () => new OffscreenCanvas(1, 1)); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html new file mode 100644 index 00000000000..ce171bfb8e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-1.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>iframe sandbox without allow_modals (alert)</title> +<link rel="author" title="Igalia" href="https://www.igalia.com/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-iframe-sandbox"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-iframe-element"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe sandbox="allow-scripts"></iframe> +<script src="support/iframe_sandbox_block_modals.js"></script> +<script> + runTest("alert", undefined); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html new file mode 100644 index 00000000000..fbd4d23d015 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-2.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>iframe sandbox without allow_modals (confirm)</title> +<link rel="author" title="Igalia" href="https://www.igalia.com/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-iframe-sandbox"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-iframe-element"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe sandbox="allow-scripts"></iframe> +<script src="support/iframe_sandbox_block_modals.js"></script> +<script> + runTest("confirm", false); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html new file mode 100644 index 00000000000..57123011807 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-3.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>iframe sandbox without allow_modals (prompt)</title> +<link rel="author" title="Igalia" href="https://www.igalia.com/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-iframe-sandbox"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-iframe-element"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe sandbox="allow-scripts"></iframe> +<script src="support/iframe_sandbox_block_modals.js"></script> +<script> + runTest("prompt", null); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html new file mode 100644 index 00000000000..f750e345ea3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_block_modals-4.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>iframe sandbox without allow_modals (print)</title> +<link rel="author" title="Igalia" href="https://www.igalia.com/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-iframe-sandbox"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-iframe-element"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<iframe sandbox="allow-scripts"></iframe> +<script src="support/iframe_sandbox_block_modals.js"></script> +<script> + runTest("print", undefined); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html new file mode 100644 index 00000000000..50f56c6278a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-opens-modals.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<script> +function openModal(name) { + switch (name) { + case "alert": + return alert("MESSAGE"); + break; + case "confirm": + return confirm("MESSAGE?"); + break; + case "prompt": + return prompt("MESSAGE:", "DEFAULT VALUE"); + break; + case "print": + return print(); + break; + } +} + +onmessage = function(e) { + parent.postMessage(openModal(e.data), "*"); +} +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js new file mode 100644 index 00000000000..67733d8101b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe_sandbox_block_modals.js @@ -0,0 +1,18 @@ +function runTest(modalName, expectedValue) { + let timeOutForFailingToOpenModal = 500; + let startTime; + async_test(t => { + let iframe = document.querySelector("iframe"); + iframe.onload = t.step_func(() => { + window.addEventListener("message", t.step_func_done(e => { + // This tests work by checking the call to open the modal diaglog will return immediately (or at least within timeOutForFailingToOpenModal). + // If the modal dialog is not blocked, then it will wait for user input and the test will time out. + assert_less_than(new Date().getTime() - startTime, timeOutForFailingToOpenModal, "Call to open modal dialog did not return immediately"); + assert_equals(e.data, expectedValue, "Call to open modal dialog did not return expected value"); + })); + startTime = new Date().getTime(); + iframe.contentWindow.postMessage(modalName, "*"); + }); + iframe.src = "support/iframe-that-opens-modals.html"; + }, "Frames without `allow-modals` should not be able to open modal dialogs"); +} diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py new file mode 100644 index 00000000000..5fc67faa880 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/file-submission.py @@ -0,0 +1,2 @@ +def main(request, response): + return ([("Content-Type", "text/html")], "<script>parent.postMessage(\"" + str(request.POST.first("testinput")) + "\", '*');</script>") diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html new file mode 100644 index 00000000000..1cf939cdaa9 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/submit-file.sub.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<iframe id=testframe name=testframe></iframe> +<form id=testform method=post action="//{{domains[www1]}}:{{location[port]}}/html/semantics/forms/form-submission-0/resources/file-submission.py" target=testframe enctype="multipart/form-data"> +<input name=testinput id=testinput type=file> +</form> +<script> +async_test(t => { + const dataTransfer = new DataTransfer(); + dataTransfer.items.add(new File(["foobar"], "name")); + assert_equals(1, dataTransfer.files.length); + + testinput.files = dataTransfer.files; + testform.submit(); + + onmessage = e => { + if (e.source !== testframe) return; + assert_equals("FieldStorage('testinput', 'name', 'foobar')", e.data); + t.done(); + }; +}, 'Posting a File'); +</script> diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/html-integration-point.html b/tests/wpt/web-platform-tests/html/syntax/parsing/html-integration-point.html new file mode 100644 index 00000000000..be6b42d07d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/syntax/parsing/html-integration-point.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#tree-construction:html-integration-point"> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<math><annotation-xml id="point-1" encoding="text/html"><xmp></xmp><img></xmp></annotation-xml></math> +<math><annotation-xml id="point-2" encoding="application/xhtml+xml"><style></style><img></style></annotation-xml></math> +<svg><foreignObject id="point-3"><iframe></iframe><img></iframe></foreignObject></svg> +<svg><desc id="point-4"><noembed></noembed><img></noembed></desc></svg> +<svg><title id="point-5"><noframes></noframes><img></noframes></title></svg> + +<script> +function generate_test(id) { + return () => { + let point = document.querySelector('#' + id); + assert_not_equals(point.namespaceURI, 'http://www.w3.org/1999/xhtml'); + let rawTextElement = point.firstChild; + assert_equals(rawTextElement.namespaceURI, 'http://www.w3.org/1999/xhtml'); + assert_equals(rawTextElement.textContent.substr(0, 4), '<', + 'Entity references should not be decoded.'); + }; +} + +test(generate_test('point-1'), 'MathML annotation-xml with encoding=text/html should be an HTML integration point'); +test(generate_test('point-2'), 'MathML annotation-xml with encoding=application/xhtml+xml should be an HTML integration point'); +test(generate_test('point-3'), 'SVG foreignObject should be an HTML integration point'); +test(generate_test('point-4'), 'SVG desc should be an HTML integration point'); +test(generate_test('point-5'), 'SVG title should be an HTML integration point'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/infrastructure/testdriver/click.html b/tests/wpt/web-platform-tests/infrastructure/testdriver/click.html new file mode 100644 index 00000000000..37721ad9ef3 --- /dev/null +++ b/tests/wpt/web-platform-tests/infrastructure/testdriver/click.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>TestDriver click method</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<button type="button" id="button">Button</button> + +<script> +async_test(t => { + let button = document.getElementById("button"); + test_driver + .click(button) + .then(() => t.done()) + .catch(t.unreached_func("click failed")); +}); +</script> diff --git a/tests/wpt/web-platform-tests/interfaces/IndexedDB.idl b/tests/wpt/web-platform-tests/interfaces/IndexedDB.idl index 3c993c3319f..89924c09b49 100644 --- a/tests/wpt/web-platform-tests/interfaces/IndexedDB.idl +++ b/tests/wpt/web-platform-tests/interfaces/IndexedDB.idl @@ -42,7 +42,7 @@ partial interface WindowOrWorkerGlobalScope { [Exposed=(Window,Worker)] interface IDBFactory { IDBOpenDBRequest open(DOMString name, - [EnforceRange] optional unsigned long long version); + optional [EnforceRange] unsigned long long version); IDBOpenDBRequest deleteDatabase(DOMString name); short cmp(any first, any second); diff --git a/tests/wpt/web-platform-tests/interfaces/WebCryptoAPI.idl b/tests/wpt/web-platform-tests/interfaces/WebCryptoAPI.idl index 132c6d076ca..f48eaf12e61 100644 --- a/tests/wpt/web-platform-tests/interfaces/WebCryptoAPI.idl +++ b/tests/wpt/web-platform-tests/interfaces/WebCryptoAPI.idl @@ -131,7 +131,7 @@ dictionary CryptoKeyPair { dictionary RsaKeyGenParams : Algorithm { // The length, in bits, of the RSA modulus - [EnforceRange] required unsigned long modulusLength; + required [EnforceRange] unsigned long modulusLength; // The RSA public exponent required BigInteger publicExponent; }; diff --git a/tests/wpt/web-platform-tests/interfaces/accelerometer.idl b/tests/wpt/web-platform-tests/interfaces/accelerometer.idl index dbde9da8672..d3db6023ea5 100644 --- a/tests/wpt/web-platform-tests/interfaces/accelerometer.idl +++ b/tests/wpt/web-platform-tests/interfaces/accelerometer.idl @@ -6,10 +6,10 @@ interface Accelerometer : Sensor { readonly attribute double? z; }; -enum LocalCoordinateSystem { "device", "screen" }; +enum AccelerometerLocalCoordinateSystem { "device", "screen" }; dictionary AccelerometerSensorOptions : SensorOptions { - LocalCoordinateSystem referenceFrame = "device"; + AccelerometerLocalCoordinateSystem referenceFrame = "device"; }; [Constructor(optional AccelerometerSensorOptions options), SecureContext, diff --git a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl index d4f64593741..6d4f35973cb 100644 --- a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl +++ b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl @@ -7,23 +7,17 @@ dictionary CookieListItem { typedef sequence<CookieListItem> CookieList; -[ - Exposed=(ServiceWorker,Window) -] interface CookieStore { - Promise<CookieList?> getAll(USVString name, optional CookieStoreGetOptions options); - Promise<CookieList?> getAll(optional CookieStoreGetOptions options); - - Promise<CookieListItem?> get(USVString name, optional CookieStoreGetOptions options); - Promise<CookieListItem?> get(optional CookieStoreGetOptions options); - - Promise<boolean> has(USVString name, optional CookieStoreGetOptions options); - Promise<boolean> has(optional CookieStoreGetOptions options); - - Promise<void> set(USVString name, USVString value, optional CookieStoreSetOptions options); - Promise<void> set(CookieStoreSetOptions options); +dictionary CookieChangeEventInit : EventInit { + CookieList changed; + CookieList deleted; +}; - Promise<void> delete(USVString name, optional CookieStoreSetOptions options); - Promise<void> delete(CookieStoreSetOptions options); +[ + Exposed=(ServiceWorker,Window), + Constructor(DOMString type, optional CookieChangeEventInit eventInitDict) +] interface CookieChangeEvent : Event { + readonly attribute CookieList changed; + readonly attribute CookieList deleted; }; enum CookieMatchType { @@ -47,6 +41,27 @@ dictionary CookieStoreSetOptions { boolean httpOnly = false; }; +[ + Exposed=(ServiceWorker,Window) +] interface CookieStore : EventTarget { + Promise<CookieList?> getAll(USVString name, optional CookieStoreGetOptions options); + Promise<CookieList?> getAll(optional CookieStoreGetOptions options); + + Promise<CookieListItem?> get(USVString name, optional CookieStoreGetOptions options); + Promise<CookieListItem?> get(optional CookieStoreGetOptions options); + + Promise<boolean> has(USVString name, optional CookieStoreGetOptions options); + Promise<boolean> has(optional CookieStoreGetOptions options); + + Promise<void> set(USVString name, USVString value, optional CookieStoreSetOptions options); + Promise<void> set(CookieStoreSetOptions options); + + Promise<void> delete(USVString name, optional CookieStoreSetOptions options); + Promise<void> delete(CookieStoreSetOptions options); + + attribute EventHandler onchange; +}; + partial interface Window { [Replaceable, SameObject] readonly attribute CookieStore cookieStore; }; diff --git a/tests/wpt/web-platform-tests/interfaces/css-font-loading.idl b/tests/wpt/web-platform-tests/interfaces/css-font-loading.idl new file mode 100644 index 00000000000..56091017172 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/css-font-loading.idl @@ -0,0 +1,86 @@ +typedef (ArrayBuffer or ArrayBufferView) BinaryData; + +dictionary FontFaceDescriptors { + CSSOMString style = "normal"; + CSSOMString weight = "normal"; + CSSOMString stretch = "normal"; + CSSOMString unicodeRange = "U+0-10FFFF"; + CSSOMString variant = "normal"; + CSSOMString featureSettings = "normal"; + CSSOMString variationSettings = "normal"; + CSSOMString display = "auto"; +}; + +enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" }; + +[Constructor(CSSOMString family, (CSSOMString or BinaryData) source, + optional FontFaceDescriptors descriptors), + Exposed=(Window,Worker)] +interface FontFace { + attribute CSSOMString family; + attribute CSSOMString style; + attribute CSSOMString weight; + attribute CSSOMString stretch; + attribute CSSOMString unicodeRange; + attribute CSSOMString variant; + attribute CSSOMString featureSettings; + attribute CSSOMString variationSettings; + attribute CSSOMString display; + + readonly attribute FontFaceLoadStatus status; + + Promise<FontFace> load(); + readonly attribute Promise<FontFace> loaded; +}; + +dictionary FontFaceSetLoadEventInit : EventInit { + sequence<FontFace> fontfaces = []; +}; + +[Constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict), + Exposed=(Window,Worker)] +interface FontFaceSetLoadEvent : Event { + [SameObject] readonly attribute FrozenArray<FontFace> fontfaces; +}; + +enum FontFaceSetLoadStatus { "loading", "loaded" }; + +callback ForEachCallback = void (FontFace font, long index, FontFaceSet self); + +[Exposed=(Window,Worker), + Constructor(sequence<FontFace> initialFaces)] +interface FontFaceSet : EventTarget { + // FontFaceSet is Set-like! + setlike<FontFace>; + FontFaceSet add(FontFace font); + boolean delete(FontFace font); + void clear(); + + // events for when loading state changes + attribute EventHandler onloading; + attribute EventHandler onloadingdone; + attribute EventHandler onloadingerror; + + // check and start loads if appropriate + // and fulfill promise when all loads complete + Promise<sequence<FontFace>> load(CSSOMString font, optional CSSOMString text = " "); + + // return whether all fonts in the fontlist are loaded + // (does not initiate load if not available) + boolean check(CSSOMString font, optional CSSOMString text = " "); + + // async notification that font loading and layout operations are done + readonly attribute Promise<FontFaceSet> ready; + + // loading state, "loading" while one or more fonts loading, "loaded" otherwise + readonly attribute FontFaceSetLoadStatus status; +}; + +[Exposed=(Window,Worker), + NoInterfaceObject] +interface FontFaceSource { + readonly attribute FontFaceSet fonts; +}; + +Document implements FontFaceSource; +WorkerGlobalScope implements FontFaceSource; diff --git a/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl index 6c33907a048..39e53ce39f9 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl @@ -1,31 +1,35 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the CSS Typed OM spec. +// See https://drafts.css-houdini.org/css-typed-om/ + [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] interface CSSStyleValue { stringifier; - [Exposed=Window] static CSSStyleValue parse(DOMString property, DOMString cssText); - [Exposed=Window] static sequence<CSSStyleValue> parseAll(DOMString property, DOMString cssText); + [Exposed=Window] static CSSStyleValue parse(USVString property, USVString cssText); + [Exposed=Window] static sequence<CSSStyleValue> parseAll(USVString property, USVString cssText); }; [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] interface StylePropertyMapReadOnly { - iterable<DOMString, sequence<CSSStyleValue>>; - any get(DOMString property); + iterable<USVString, sequence<CSSStyleValue>>; + any get(USVString property); /* 'any' means (undefined or CSSStyleValue) here, see https://github.com/heycam/webidl/issues/60 */ - sequence<CSSStyleValue> getAll(DOMString property); - boolean has(DOMString property); - readonly attribute long size; + sequence<CSSStyleValue> getAll(USVString property); + boolean has(USVString property); + readonly attribute unsigned long size; }; [Exposed=Window] interface StylePropertyMap : StylePropertyMapReadOnly { - void set(DOMString property, (CSSStyleValue or DOMString)... values); - void append(DOMString property, (CSSStyleValue or DOMString)... values); - void delete(DOMString property); + void set(USVString property, (CSSStyleValue or USVString)... values); + void append(USVString property, (CSSStyleValue or USVString)... values); + void delete(USVString property); void clear(); }; partial interface Element { - StylePropertyMapReadOnly computedStyleMap(); + [SameObject] StylePropertyMapReadOnly computedStyleMap(); }; partial interface CSSStyleRule { @@ -45,19 +49,19 @@ interface CSSUnparsedValue : CSSStyleValue { setter CSSUnparsedSegment (unsigned long index, CSSUnparsedSegment val); }; -typedef (DOMString or CSSVariableReferenceValue) CSSUnparsedSegment; +typedef (USVString or CSSVariableReferenceValue) CSSUnparsedSegment; [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), - Constructor(DOMString variable, optional CSSUnparsedValue? fallback = null)] + Constructor(USVString variable, optional CSSUnparsedValue? fallback = null)] interface CSSVariableReferenceValue { - attribute DOMString variable; + attribute USVString variable; readonly attribute CSSUnparsedValue? fallback; }; [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), - Constructor(DOMString value)] + Constructor(USVString value)] interface CSSKeywordValue : CSSStyleValue { - attribute DOMString value; + attribute USVString value; }; typedef (double or CSSNumericValue) CSSNumberish; @@ -94,18 +98,18 @@ interface CSSNumericValue : CSSStyleValue { boolean equals(CSSNumberish... value); - CSSUnitValue to(DOMString unit); - CSSMathSum toSum(DOMString... units); + CSSUnitValue to(USVString unit); + CSSMathSum toSum(USVString... units); CSSNumericType type(); - [Exposed=Window] static CSSNumericValue parse(DOMString cssText); + [Exposed=Window] static CSSNumericValue parse(USVString cssText); }; [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), - Constructor(double value, DOMString unit)] + Constructor(double value, USVString unit)] interface CSSUnitValue : CSSNumericValue { attribute double value; - readonly attribute DOMString unit; + readonly attribute USVString unit; }; [Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] diff --git a/tests/wpt/web-platform-tests/interfaces/dom.idl b/tests/wpt/web-platform-tests/interfaces/dom.idl index e97f803f821..4186f1d2df5 100644 --- a/tests/wpt/web-platform-tests/interfaces/dom.idl +++ b/tests/wpt/web-platform-tests/interfaces/dom.idl @@ -440,14 +440,22 @@ interface Comment : CharacterData { }; -[Constructor, - Exposed=Window] -interface Range { +[Exposed=Window] +interface AbstractRange { readonly attribute Node startContainer; readonly attribute unsigned long startOffset; readonly attribute Node endContainer; readonly attribute unsigned long endOffset; readonly attribute boolean collapsed; +}; + +[Exposed=Window] +interface StaticRange : AbstractRange { +}; + +[Constructor, + Exposed=Window] +interface Range : AbstractRange { readonly attribute Node commonAncestorContainer; void setStart(Node node, unsigned long offset); @@ -548,7 +556,7 @@ interface DOMTokenList { [CEReactions] void add(DOMString... tokens); [CEReactions] void remove(DOMString... tokens); [CEReactions] boolean toggle(DOMString token, optional boolean force); - [CEReactions] void replace(DOMString token, DOMString newToken); + [CEReactions] boolean replace(DOMString token, DOMString newToken); boolean supports(DOMString token); [CEReactions] stringifier attribute DOMString value; // iterable<DOMString>; diff --git a/tests/wpt/web-platform-tests/interfaces/encoding.idl b/tests/wpt/web-platform-tests/interfaces/encoding.idl new file mode 100644 index 00000000000..8f4189be796 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/encoding.idl @@ -0,0 +1,24 @@ +dictionary TextDecoderOptions { + boolean fatal = false; + boolean ignoreBOM = false; +}; + +dictionary TextDecodeOptions { + boolean stream = false; +}; + +[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), + Exposed=(Window,Worker)] +interface TextDecoder { + readonly attribute DOMString encoding; + readonly attribute boolean fatal; + readonly attribute boolean ignoreBOM; + USVString decode(optional BufferSource input, optional TextDecodeOptions options); +}; + +[Constructor, + Exposed=(Window,Worker)] +interface TextEncoder { + readonly attribute DOMString encoding; + [NewObject] Uint8Array encode(optional USVString input = ""); +}; diff --git a/tests/wpt/web-platform-tests/interfaces/feature-policy.idl b/tests/wpt/web-platform-tests/interfaces/feature-policy.idl new file mode 100644 index 00000000000..f11815ac543 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/feature-policy.idl @@ -0,0 +1,7 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Feature Policy spec. +// See https://wicg.github.io/feature-policy/ + +partial interface HTMLIFrameElement { + [CEReactions] attribute DOMString allow; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/gyroscope.idl b/tests/wpt/web-platform-tests/interfaces/gyroscope.idl index 86e70a814f8..5dbb2eae06d 100644 --- a/tests/wpt/web-platform-tests/interfaces/gyroscope.idl +++ b/tests/wpt/web-platform-tests/interfaces/gyroscope.idl @@ -5,8 +5,8 @@ interface Gyroscope : Sensor { readonly attribute double? z; }; -enum LocalCoordinateSystem { "device", "screen" }; +enum GyroscopeLocalCoordinateSystem { "device", "screen" }; dictionary GyroscopeSensorOptions : SensorOptions { - LocalCoordinateSystem referenceFrame = "device"; + GyroscopeLocalCoordinateSystem referenceFrame = "device"; }; diff --git a/tests/wpt/web-platform-tests/interfaces/hr-time.idl b/tests/wpt/web-platform-tests/interfaces/hr-time.idl index ccbbc332326..3c793c328c6 100644 --- a/tests/wpt/web-platform-tests/interfaces/hr-time.idl +++ b/tests/wpt/web-platform-tests/interfaces/hr-time.idl @@ -1,13 +1,17 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the High Resolution Time spec. +// See https://w3c.github.io/hr-time/ + typedef double DOMHighResTimeStamp; [Exposed=(Window,Worker)] interface Performance : EventTarget { - DOMHighResTimeStamp now(); + DOMHighResTimeStamp now (); readonly attribute DOMHighResTimeStamp timeOrigin; - [Default] object toJSON(); + [Default] object toJSON(); }; partial interface WindowOrWorkerGlobalScope { [Replaceable] - readonly attribute Performance performance; + readonly attribute Performance performance; }; diff --git a/tests/wpt/web-platform-tests/interfaces/html.idl b/tests/wpt/web-platform-tests/interfaces/html.idl index 49348a723b3..89558dfe133 100644 --- a/tests/wpt/web-platform-tests/interfaces/html.idl +++ b/tests/wpt/web-platform-tests/interfaces/html.idl @@ -2,7 +2,7 @@ LegacyUnenumerableNamedProperties] interface HTMLAllCollection { readonly attribute unsigned long length; - getter Element? (unsigned long index); + getter Element (unsigned long index); getter (HTMLCollection or Element)? namedItem(DOMString name); (HTMLCollection or Element)? item(optional DOMString nameOrIndex); diff --git a/tests/wpt/web-platform-tests/interfaces/magnetometer.idl b/tests/wpt/web-platform-tests/interfaces/magnetometer.idl index 5ede1ecdb7c..a9ef069276a 100644 --- a/tests/wpt/web-platform-tests/interfaces/magnetometer.idl +++ b/tests/wpt/web-platform-tests/interfaces/magnetometer.idl @@ -6,10 +6,10 @@ interface Magnetometer : Sensor { readonly attribute double? z; }; -enum LocalCoordinateSystem { "device", "screen" }; +enum MagnetometerLocalCoordinateSystem { "device", "screen" }; dictionary MagnetometerSensorOptions : SensorOptions { - LocalCoordinateSystem referenceFrame = "device"; + MagnetometerLocalCoordinateSystem referenceFrame = "device"; }; [Constructor(optional MagnetometerSensorOptions sensorOptions), SecureContext, diff --git a/tests/wpt/web-platform-tests/interfaces/orientation-sensor.idl b/tests/wpt/web-platform-tests/interfaces/orientation-sensor.idl index 2fee35d937e..df2ea38e408 100644 --- a/tests/wpt/web-platform-tests/interfaces/orientation-sensor.idl +++ b/tests/wpt/web-platform-tests/interfaces/orientation-sensor.idl @@ -6,10 +6,10 @@ interface OrientationSensor : Sensor { void populateMatrix(RotationMatrixType targetMatrix); }; -enum LocalCoordinateSystem { "device", "screen" }; +enum OrientationSensorLocalCoordinateSystem { "device", "screen" }; dictionary OrientationSensorOptions : SensorOptions { - LocalCoordinateSystem referenceFrame = "device"; + OrientationSensorLocalCoordinateSystem referenceFrame = "device"; }; [Constructor(optional OrientationSensorOptions sensorOptions), SecureContext, Exposed=Window] diff --git a/tests/wpt/web-platform-tests/interfaces/payment-request.idl b/tests/wpt/web-platform-tests/interfaces/payment-request.idl index 4568fd8cf12..50a5dea61f2 100644 --- a/tests/wpt/web-platform-tests/interfaces/payment-request.idl +++ b/tests/wpt/web-platform-tests/interfaces/payment-request.idl @@ -1,8 +1,11 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Payment Request API spec. +// See https://w3c.github.io/payment-request/ + [Constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options), - SecureContext, - Exposed=Window] +SecureContext, Exposed=Window] interface PaymentRequest : EventTarget { - Promise<PaymentResponse> show(); + Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise); Promise<void> abort(); Promise<boolean> canMakePayment(); @@ -15,40 +18,48 @@ interface PaymentRequest : EventTarget { attribute EventHandler onshippingoptionchange; }; + dictionary PaymentMethodData { required DOMString supportedMethods; object data; }; + dictionary PaymentCurrencyAmount { required DOMString currency; required DOMString value; // Note: currencySystem is "at risk" of being removed! DOMString currencySystem = "urn:iso:std:iso:4217"; }; + dictionary PaymentDetailsBase { sequence<PaymentItem> displayItems; sequence<PaymentShippingOption> shippingOptions; sequence<PaymentDetailsModifier> modifiers; }; + dictionary PaymentDetailsInit : PaymentDetailsBase { DOMString id; required PaymentItem total; }; + dictionary PaymentDetailsUpdate : PaymentDetailsBase { DOMString error; PaymentItem total; }; + dictionary PaymentDetailsModifier { required DOMString supportedMethods; PaymentItem total; sequence<PaymentItem> additionalDisplayItems; object data; }; + enum PaymentShippingType { "shipping", "delivery", "pickup" }; + dictionary PaymentOptions { boolean requestPayerName = false; boolean requestPayerEmail = false; @@ -56,19 +67,25 @@ dictionary PaymentOptions { boolean requestShipping = false; PaymentShippingType shippingType = "shipping"; }; + dictionary PaymentItem { required DOMString label; required PaymentCurrencyAmount amount; boolean pending = false; + // Note: type member is "at risk" of being removed! + PaymentItemType type; }; -[SecureContext, - Exposed=Window] + +enum PaymentItemType { + "tax" +}; + +[SecureContext, Exposed=Window] interface PaymentAddress { [Default] object toJSON(); readonly attribute DOMString country; readonly attribute FrozenArray<DOMString> addressLine; readonly attribute DOMString region; - readonly attribute DOMString regionCode; readonly attribute DOMString city; readonly attribute DOMString dependentLocality; readonly attribute DOMString postalCode; @@ -78,19 +95,21 @@ interface PaymentAddress { readonly attribute DOMString recipient; readonly attribute DOMString phone; }; + dictionary PaymentShippingOption { required DOMString id; required DOMString label; required PaymentCurrencyAmount amount; boolean selected = false; }; + enum PaymentComplete { "fail", "success", "unknown" }; -[SecureContext, - Exposed=Window] + +[SecureContext, Exposed=Window] interface PaymentResponse { [Default] object toJSON(); @@ -105,11 +124,10 @@ interface PaymentResponse { Promise<void> complete(optional PaymentComplete result = "unknown"); }; -[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), - SecureContext, - Exposed=Window] + +[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window] interface PaymentRequestUpdateEvent : Event { void updateWith(Promise<PaymentDetailsUpdate> detailsPromise); }; -dictionary PaymentRequestUpdateEventInit : EventInit { -}; + +dictionary PaymentRequestUpdateEventInit : EventInit {}; diff --git a/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl b/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl index 7db942ea955..faa1c93b70b 100644 --- a/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl +++ b/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl @@ -1,28 +1,34 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Screen Orientation API spec. +// See https://w3c.github.io/screen-orientation/ + partial interface Screen { - [SameObject] - readonly attribute ScreenOrientation orientation; + [SameObject] readonly attribute ScreenOrientation orientation; }; + [Exposed=Window] interface ScreenOrientation : EventTarget { - Promise<void> lock(OrientationLockType orientation); - void unlock(); - readonly attribute OrientationType type; - readonly attribute unsigned short angle; - attribute EventHandler onchange; + Promise<void> lock(OrientationLockType orientation); + void unlock(); + readonly attribute OrientationType type; + readonly attribute unsigned short angle; + attribute EventHandler onchange; }; + enum OrientationType { - "portrait-primary", - "portrait-secondary", - "landscape-primary", - "landscape-secondary" + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" }; + enum OrientationLockType { - "any", - "natural", - "landscape", - "portrait", - "portrait-primary", - "portrait-secondary", - "landscape-primary", - "landscape-secondary" + "any", + "natural", + "landscape", + "portrait", + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" }; diff --git a/tests/wpt/web-platform-tests/interfaces/storage.idl b/tests/wpt/web-platform-tests/interfaces/storage.idl index c45690352f9..cbaf9d0cb55 100644 --- a/tests/wpt/web-platform-tests/interfaces/storage.idl +++ b/tests/wpt/web-platform-tests/interfaces/storage.idl @@ -1,3 +1,7 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Storage spec. +// See https://storage.spec.whatwg.org/ + [SecureContext] interface mixin NavigatorStorage { readonly attribute StorageManager storage; diff --git a/tests/wpt/web-platform-tests/interfaces/uievents.idl b/tests/wpt/web-platform-tests/interfaces/uievents.idl index 5964ee8969a..a273887827e 100644 --- a/tests/wpt/web-platform-tests/interfaces/uievents.idl +++ b/tests/wpt/web-platform-tests/interfaces/uievents.idl @@ -1,4 +1,8 @@ -[Constructor(DOMString type, optional UIEventInit eventInitDict)] +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the UI Events spec. +// See https://w3c.github.io/uievents/ + +[Constructor(DOMString type, optional UIEventInit eventInitDict), Exposed=Window] interface UIEvent : Event { readonly attribute Window? view; readonly attribute long detail; @@ -9,7 +13,7 @@ dictionary UIEventInit : EventInit { long detail = 0; }; -[Constructor(DOMString type, optional FocusEventInit eventInitDict)] +[Constructor(DOMString type, optional FocusEventInit eventInitDict), Exposed=Window] interface FocusEvent : UIEvent { readonly attribute EventTarget? relatedTarget; }; @@ -18,7 +22,7 @@ dictionary FocusEventInit : UIEventInit { EventTarget? relatedTarget = null; }; -[Constructor(DOMString type, optional MouseEventInit eventInitDict)] +[Constructor(DOMString type, optional MouseEventInit eventInitDict), Exposed=Window] interface MouseEvent : UIEvent { readonly attribute long screenX; readonly attribute long screenY; @@ -67,7 +71,7 @@ dictionary EventModifierInit : UIEventInit { boolean modifierSymbolLock = false; }; -[Constructor(DOMString type, optional WheelEventInit eventInitDict)] +[Constructor(DOMString type, optional WheelEventInit eventInitDict), Exposed=Window] interface WheelEvent : MouseEvent { // DeltaModeCode const unsigned long DOM_DELTA_PIXEL = 0x00; @@ -87,19 +91,18 @@ dictionary WheelEventInit : MouseEventInit { unsigned long deltaMode = 0; }; -[Constructor(DOMString type, optional InputEventInit eventInitDict)] +[Constructor(DOMString type, optional InputEventInit eventInitDict), Exposed=Window] interface InputEvent : UIEvent { readonly attribute DOMString? data; readonly attribute boolean isComposing; }; - dictionary InputEventInit : UIEventInit { DOMString? data = ""; boolean isComposing = false; }; -[Constructor(DOMString type, optional KeyboardEventInit eventInitDict)] +[Constructor(DOMString type, optional KeyboardEventInit eventInitDict), Exposed=Window] interface KeyboardEvent : UIEvent { // KeyLocationCode const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00; @@ -130,7 +133,7 @@ dictionary KeyboardEventInit : EventModifierInit { boolean isComposing = false; }; -[Constructor(DOMString type, optional CompositionEventInit eventInitDict)] +[Constructor(DOMString type, optional CompositionEventInit eventInitDict), Exposed=Window] interface CompositionEvent : UIEvent { readonly attribute DOMString data; }; diff --git a/tests/wpt/web-platform-tests/interfaces/web-share.idl b/tests/wpt/web-platform-tests/interfaces/web-share.idl index cf19b7e9e76..7403af3e2f7 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-share.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-share.idl @@ -1,8 +1,9 @@ -// https://wicg.github.io/web-share/ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Web Share API spec. +// See https://wicg.github.io/web-share/ partial interface Navigator { - [SecureContext] - Promise<void> share(optional ShareData data); + [SecureContext] Promise<void> share(optional ShareData data); }; dictionary ShareData { diff --git a/tests/wpt/web-platform-tests/interfaces/webaudio.idl b/tests/wpt/web-platform-tests/interfaces/webaudio.idl new file mode 100644 index 00000000000..d20bc7fc559 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/webaudio.idl @@ -0,0 +1,596 @@ +enum AudioContextState { + "suspended", + "running", + "closed" +}; + +callback DecodeErrorCallback = void (DOMException error); + +callback DecodeSuccessCallback = void (AudioBuffer decodedData); + +[Exposed=Window] +interface BaseAudioContext : EventTarget { + readonly attribute AudioDestinationNode destination; + readonly attribute float sampleRate; + readonly attribute double currentTime; + readonly attribute AudioListener listener; + readonly attribute AudioContextState state; + [SameObject, SecureContext] + readonly attribute AudioWorklet audioWorklet; + Promise<void> resume (); + attribute EventHandler onstatechange; + AudioBuffer createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate); + Promise<AudioBuffer> decodeAudioData (ArrayBuffer audioData, + optional DecodeSuccessCallback successCallback, + optional DecodeErrorCallback errorCallback); + AudioBufferSourceNode createBufferSource (); + ConstantSourceNode createConstantSource (); + ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, + optional unsigned long numberOfInputChannels = 2, + optional unsigned long numberOfOutputChannels = 2); + AnalyserNode createAnalyser (); + GainNode createGain (); + DelayNode createDelay (optional double maxDelayTime = 1.0); + BiquadFilterNode createBiquadFilter (); + IIRFilterNode createIIRFilter (sequence<double> feedforward, sequence<double> feedback); + WaveShaperNode createWaveShaper (); + PannerNode createPanner (); + StereoPannerNode createStereoPanner (); + ConvolverNode createConvolver (); + ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6); + ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6); + DynamicsCompressorNode createDynamicsCompressor (); + OscillatorNode createOscillator (); + PeriodicWave createPeriodicWave (sequence<float> real, sequence<float> imag, optional PeriodicWaveConstraints constraints); +}; + +[Exposed=Window] +enum AudioContextLatencyCategory { + "balanced", + "interactive", + "playback" +}; + +[Exposed=Window, + Constructor (optional AudioContextOptions contextOptions)] +interface AudioContext : BaseAudioContext { + readonly attribute double baseLatency; + readonly attribute double outputLatency; + AudioTimestamp getOutputTimestamp (); + Promise<void> suspend (); + Promise<void> close (); + MediaElementAudioSourceNode createMediaElementSource (HTMLMediaElement mediaElement); + MediaStreamAudioSourceNode createMediaStreamSource (MediaStream mediaStream); + MediaStreamTrackAudioSourceNode createMediaStreamTrackSource (MediaStreamTrack mediaStreamTrack); + MediaStreamAudioDestinationNode createMediaStreamDestination (); +}; + +[Exposed=Window] +dictionary AudioContextOptions { + (AudioContextLatencyCategory or double) latencyHint = "interactive"; + float sampleRate; +}; + +[Exposed=Window] +dictionary AudioTimestamp { + double contextTime; + DOMHighResTimeStamp performanceTime; +}; + +[Exposed=Window, + Constructor (OfflineAudioContextOptions contextOptions), + Constructor (unsigned long numberOfChannels, unsigned long length, float sampleRate)] +interface OfflineAudioContext : BaseAudioContext { + Promise<AudioBuffer> startRendering(); + Promise<void> suspend(double suspendTime); + readonly attribute unsigned long length; + attribute EventHandler oncomplete; +}; + +[Exposed=Window] +dictionary OfflineAudioContextOptions { + unsigned long numberOfChannels = 1; + required unsigned long length; + required float sampleRate; +}; + +[Exposed=Window, + Constructor (DOMString type, OfflineAudioCompletionEventInit eventInitDict)] +interface OfflineAudioCompletionEvent : Event { + readonly attribute AudioBuffer renderedBuffer; +}; + +[Exposed=Window] +dictionary OfflineAudioCompletionEventInit : EventInit { + required AudioBuffer renderedBuffer; +}; + +[Exposed=Window, + Constructor (AudioBufferOptions options)] +interface AudioBuffer { + readonly attribute float sampleRate; + readonly attribute unsigned long length; + readonly attribute double duration; + readonly attribute unsigned long numberOfChannels; + Float32Array getChannelData (unsigned long channel); + void copyFromChannel (Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0); + void copyToChannel (Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0); +}; + +dictionary AudioBufferOptions { + unsigned long numberOfChannels = 1; + required unsigned long length; + required float sampleRate; +}; + +[Exposed=Window] +interface AudioNode : EventTarget { + AudioNode connect (AudioNode destinationNode, + optional unsigned long output = 0, + optional unsigned long input = 0); + void connect (AudioParam destinationParam, optional unsigned long output = 0); + void disconnect (); + void disconnect (unsigned long output); + void disconnect (AudioNode destinationNode); + void disconnect (AudioNode destinationNode, unsigned long output); + void disconnect (AudioNode destinationNode, unsigned long output, unsigned long input); + void disconnect (AudioParam destinationParam); + void disconnect (AudioParam destinationParam, unsigned long output); + readonly attribute BaseAudioContext context; + readonly attribute unsigned long numberOfInputs; + readonly attribute unsigned long numberOfOutputs; + attribute unsigned long channelCount; + attribute ChannelCountMode channelCountMode; + attribute ChannelInterpretation channelInterpretation; +}; + +[Exposed=Window] +enum ChannelCountMode { + "max", + "clamped-max", + "explicit" +}; + +[Exposed=Window] +enum ChannelInterpretation { + "speakers", + "discrete" +}; + +dictionary AudioNodeOptions { + unsigned long channelCount; + ChannelCountMode channelCountMode; + ChannelInterpretation channelInterpretation; +}; + +[Exposed=Window] +interface AudioParam { + attribute float value; + readonly attribute float defaultValue; + readonly attribute float minValue; + readonly attribute float maxValue; + AudioParam setValueAtTime (float value, double startTime); + AudioParam linearRampToValueAtTime (float value, double endTime); + AudioParam exponentialRampToValueAtTime (float value, double endTime); + AudioParam setTargetAtTime (float target, double startTime, float timeConstant); + AudioParam setValueCurveAtTime (sequence<float> values, double startTime, double duration); + AudioParam cancelScheduledValues (double cancelTime); + AudioParam cancelAndHoldAtTime (double cancelTime); +}; + +[Exposed=Window] +interface AudioScheduledSourceNode : AudioNode { + attribute EventHandler onended; + void start(optional double when = 0); + void stop(optional double when = 0); +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional AnalyserOptions options)] +interface AnalyserNode : AudioNode { + void getFloatFrequencyData (Float32Array array); + void getByteFrequencyData (Uint8Array array); + void getFloatTimeDomainData (Float32Array array); + void getByteTimeDomainData (Uint8Array array); + attribute unsigned long fftSize; + readonly attribute unsigned long frequencyBinCount; + attribute double minDecibels; + attribute double maxDecibels; + attribute double smoothingTimeConstant; +}; + +dictionary AnalyserOptions : AudioNodeOptions { + unsigned long fftSize = 2048; + double maxDecibels = -30; + double minDecibels = -100; + double smoothingTimeConstant = 0.8; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional AudioBufferSourceOptions options)] +interface AudioBufferSourceNode : AudioScheduledSourceNode { + attribute AudioBuffer? buffer; + readonly attribute AudioParam playbackRate; + readonly attribute AudioParam detune; + attribute boolean loop; + attribute double loopStart; + attribute double loopEnd; + void start (optional double when = 0, + optional double offset, + optional double duration); + void stop (optional double when = 0); +}; + +dictionary AudioBufferSourceOptions { + AudioBuffer? buffer; + float detune = 0; + boolean loop = false; + double loopEnd = 0; + double loopStart = 0; + float playbackRate = 1; +}; + +[Exposed=Window] +interface AudioDestinationNode : AudioNode { + readonly attribute unsigned long maxChannelCount; +}; + +[Exposed=Window] +interface AudioListener { + readonly attribute AudioParam positionX; + readonly attribute AudioParam positionY; + readonly attribute AudioParam positionZ; + readonly attribute AudioParam forwardX; + readonly attribute AudioParam forwardY; + readonly attribute AudioParam forwardZ; + readonly attribute AudioParam upX; + readonly attribute AudioParam upY; + readonly attribute AudioParam upZ; + void setPosition (float x, float y, float z); + void setOrientation (float x, float y, float z, float xUp, float yUp, float zUp); +}; + +[Exposed=Window, + Constructor (DOMString type, AudioProcessingEventInit eventInitDict)] +interface AudioProcessingEvent : Event { + readonly attribute double playbackTime; + readonly attribute AudioBuffer inputBuffer; + readonly attribute AudioBuffer outputBuffer; +}; + +dictionary AudioProcessingEventInit : EventInit { + required double playbackTime; + required AudioBuffer inputBuffer; + required AudioBuffer outputBuffer; +}; + +enum BiquadFilterType { + "lowpass", + "highpass", + "bandpass", + "lowshelf", + "highshelf", + "peaking", + "notch", + "allpass" +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional BiquadFilterOptions options)] +interface BiquadFilterNode : AudioNode { + attribute BiquadFilterType type; + readonly attribute AudioParam frequency; + readonly attribute AudioParam detune; + readonly attribute AudioParam Q; + readonly attribute AudioParam gain; + void getFrequencyResponse (Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); +}; + +dictionary BiquadFilterOptions : AudioNodeOptions { + BiquadFilterType type = "lowpass"; + float Q = 1; + float detune = 0; + float frequency = 350; + float gain = 0; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional ChannelMergerOptions options)] +interface ChannelMergerNode : AudioNode { +}; + +dictionary ChannelMergerOptions : AudioNodeOptions { + unsigned long numberOfInputs = 6; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional ChannelSplitterNode options)] +interface ChannelSplitterNode : AudioNode { +}; + +dictionary ChannelSplitterOptions : AudioNodeOptions { + unsigned long numberOfOutputs = 6; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional ConstantSourceOptions options)] +interface ConstantSourceNode : AudioScheduledSourceNode { + readonly attribute AudioParam offset; +}; + +dictionary ConstantSourceOptions { + float offset = 1; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional ConvolverOptions options)] +interface ConvolverNode : AudioNode { + attribute AudioBuffer? buffer; + attribute boolean normalize; +}; + +dictionary ConvolverOptions : AudioNodeOptions { + AudioBuffer? buffer; + boolean disableNormalization = false; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional DelayOptions options)] +interface DelayNode : AudioNode { + readonly attribute AudioParam delayTime; +}; + +dictionary DelayOptions : AudioNodeOptions { + double maxDelayTime = 1; + double delayTime = 0; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional DynamicsCompressorOptions options)] +interface DynamicsCompressorNode : AudioNode { + readonly attribute AudioParam threshold; + readonly attribute AudioParam knee; + readonly attribute AudioParam ratio; + readonly attribute float reduction; + readonly attribute AudioParam attack; + readonly attribute AudioParam release; +}; + +dictionary DynamicsCompressorOptions : AudioNodeOptions { + float attack = 0.003; + float knee = 30; + float ratio = 12; + float release = 0.25; + float threshold = -24; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional GainOptions options)] +interface GainNode : AudioNode { + readonly attribute AudioParam gain; +}; + +dictionary GainOptions : AudioNodeOptions { + float gain = 1.0; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, IIRFilterOptions options)] +interface IIRFilterNode : AudioNode { + void getFrequencyResponse (Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse); +}; + +dictionary IIRFilterOptions : AudioNodeOptions { + required sequence<double> feedforward; + required sequence<double> feedback; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, MediaElementAudioSourceOptions options)] +interface MediaElementAudioSourceNode : AudioNode { + [SameObject] readonly attribute HTMLMediaElement mediaElement; +}; + +dictionary MediaElementAudioSourceOptions { + required HTMLMediaElement mediaElement; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional AudioNodeOptions options)] +interface MediaStreamAudioDestinationNode : AudioNode { + readonly attribute MediaStream stream; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, MediaStreamAudioSourceOptions options)] +interface MediaStreamAudioSourceNode : AudioNode { + [SameObject] readonly attribute MediaStream mediaStream; +}; + +dictionary MediaStreamAudioSourceOptions { + required MediaStream mediaStream; +}; + +[Exposed=Window, + Constructor (AudioContext context, MediaStreamTrackAudioSourceOptions options)] +interface MediaStreamTrackAudioSourceNode : AudioNode { +}; + +dictionary MediaStreamTrackAudioSourceOptions { + required MediaStreamTrack mediaStreamTrack; +}; + +enum OscillatorType { + "sine", + "square", + "sawtooth", + "triangle", + "custom" +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional OscillatorOptions options)] +interface OscillatorNode : AudioScheduledSourceNode { + attribute OscillatorType type; + readonly attribute AudioParam frequency; + readonly attribute AudioParam detune; + void setPeriodicWave (PeriodicWave periodicWave); +}; + +dictionary OscillatorOptions : AudioNodeOptions { + OscillatorType type = "sine"; + float frequency = 440; + float detune = 0; + PeriodicWave periodicWave; +}; + +enum PanningModelType { + "equalpower", + "HRTF" +}; + +enum DistanceModelType { + "linear", + "inverse", + "exponential" +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional PannerOptions options)] +interface PannerNode : AudioNode { + attribute PanningModelType panningModel; + readonly attribute AudioParam positionX; + readonly attribute AudioParam positionY; + readonly attribute AudioParam positionZ; + readonly attribute AudioParam orientationX; + readonly attribute AudioParam orientationY; + readonly attribute AudioParam orientationZ; + attribute DistanceModelType distanceModel; + attribute double refDistance; + attribute double maxDistance; + attribute double rolloffFactor; + attribute double coneInnerAngle; + attribute double coneOuterAngle; + attribute double coneOuterGain; + void setPosition (float x, float y, float z); + void setOrientation (float x, float y, float z); +}; + +dictionary PannerOptions : AudioNodeOptions { + PanningModelType panningModel = "equalpower"; + DistanceModelType distanceModel = "inverse"; + float positionX = 0; + float positionY = 0; + float positionZ = 0; + float orientationX = 1; + float orientationY = 0; + float orientationZ = 0; + double refDistance = 1; + double maxDistance = 10000; + double rolloffFactor = 1; + double coneInnerAngle = 360; + double coneOuterAngle = 360; + double coneOuterGain = 0; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional PeriodicWaveOptions options)] +interface PeriodicWave { +}; + +dictionary PeriodicWaveConstraints { + boolean disableNormalization = false; +}; + +dictionary PeriodicWaveOptions : PeriodicWaveConstraints { + sequence<float> real; + sequence<float> imag; +}; + +[Exposed=Window] +interface ScriptProcessorNode : AudioNode { + attribute EventHandler onaudioprocess; + readonly attribute long bufferSize; +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional StereoPannerOptions options)] +interface StereoPannerNode : AudioNode { + readonly attribute AudioParam pan; +}; + +dictionary StereoPannerOptions : AudioNodeOptions { + float pan = 0; +}; + +enum OverSampleType { + "none", + "2x", + "4x" +}; + +[Exposed=Window, + Constructor (BaseAudioContext context, optional WaveShaperOptions options)] +interface WaveShaperNode : AudioNode { + attribute Float32Array? curve; + attribute OverSampleType oversample; +}; + +dictionary WaveShaperOptions : AudioNodeOptions { + sequence<float> curve; + OverSampleType oversample = "none"; +}; + +[Exposed=Window, SecureContext] +interface AudioWorklet : Worklet { +}; + +[Global=(Worklet, AudioWorklet), Exposed=AudioWorklet] +interface AudioWorkletGlobalScope : WorkletGlobalScope { + void registerProcessor (DOMString name, VoidFunction processorCtor); + readonly attribute double currentTime; + readonly attribute float sampleRate; +}; + +[Exposed=Window] +interface AudioParamMap { + readonly maplike<DOMString, AudioParam>; +}; + +enum AudioWorkletProcessorState { + "pending", + "running", + "stopped", + "error" +}; + +[Exposed=Window, + SecureContext, + Constructor (BaseAudioContext context, DOMString name, optional AudioWorkletNodeOptions options)] +interface AudioWorkletNode : AudioNode { + readonly attribute AudioParamMap parameters; + readonly attribute MessagePort port; + readonly attribute AudioWorkletProcessorState processorState; + attribute EventHandler onprocessorstatechange; +}; + +dictionary AudioWorkletNodeOptions : AudioNodeOptions { + unsigned long numberOfInputs = 1; + unsigned long numberOfOutputs = 1; + sequence<unsigned long> outputChannelCount; + record<DOMString, double> parameterData; + object processorOptions = null; +}; + +[Exposed=AudioWorklet, +Constructor (optional AudioWorkletNodeOptions options)] +interface AudioWorkletProcessor { + readonly attribute MessagePort port; +}; + +dictionary AudioParamDescriptor { + required DOMString name; + float defaultValue = 0; + float minValue = -3.4028235e38; + float maxValue = 3.4028235e38; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/webvtt.idl b/tests/wpt/web-platform-tests/interfaces/webvtt.idl new file mode 100644 index 00000000000..d4603d1726b --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/webvtt.idl @@ -0,0 +1,39 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the WebVTT spec. +// See https://w3c.github.io/webvtt/ + +enum AutoKeyword { "auto" }; +typedef (double or AutoKeyword) LineAndPositionSetting; +enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; +enum LineAlignSetting { "start", "center", "end" }; +enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; +enum AlignSetting { "start", "center", "end", "left", "right" }; +[Exposed=Window, + Constructor(double startTime, double endTime, DOMString text)] +interface VTTCue : TextTrackCue { + attribute VTTRegion? region; + attribute DirectionSetting vertical; + attribute boolean snapToLines; + attribute LineAndPositionSetting line; + attribute LineAlignSetting lineAlign; + attribute LineAndPositionSetting position; + attribute PositionAlignSetting positionAlign; + attribute double size; + attribute AlignSetting align; + attribute DOMString text; + DocumentFragment getCueAsHTML(); +}; + +enum ScrollSetting { "" /* none */, "up" }; +[Exposed=Window, + Constructor] +interface VTTRegion { + attribute DOMString id; + attribute double width; + attribute unsigned long lines; + attribute double regionAnchorX; + attribute double regionAnchorY; + attribute double viewportAnchorX; + attribute double viewportAnchorY; + attribute ScrollSetting scroll; +}; diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index 032303aeca1..958adb25ace 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -197,6 +197,7 @@ SET TIMEOUT: screen-orientation/lock-bad-argument.html SET TIMEOUT: screen-orientation/onchange-event.html SET TIMEOUT: screen-orientation/resources/sandboxed-iframe-locking.html SET TIMEOUT: secure-contexts/basic-popup-and-iframe-tests.https.js +SET TIMEOUT: service-workers/cache-storage/script-tests/cache-abort.js SET TIMEOUT: service-workers/service-worker/activation.https.html SET TIMEOUT: service-workers/service-worker/fetch-frame-resource.https.html SET TIMEOUT: service-workers/service-worker/fetch-request-redirect.https.html @@ -403,19 +404,6 @@ SUPPORT-WRONG-DIR: css/filter-effects/filter-external-002-filter.svg SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/check-for-references.sh SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests-filter SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-32x32.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/aqua-yellow-37x37.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/border.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bl.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-bo.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-br.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ct.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-le.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-ri.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tl.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-to.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule-tr.png -SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/background/reticule.png SUPPORT-WRONG-DIR: css/vendor-imports/mozilla/mozilla-central-reftests/masking/blank.html SUPPORT-WRONG-DIR: css/WOFF2/testcaseindex.xht NON-EXISTENT-REF: css/css-masking/clip-path-svg-content/clip-path-clip-rule-008.svg @@ -902,25 +890,7 @@ SUPPORT-WRONG-DIR: css/css-timing/testcommon.js MISSING-LINK: css/css-typed-om/CSSMatrixComponent-DOMMatrix-mutable.html MISSING-LINK: css/css-typed-om/declared-styleMap-accepts-inherit.html MISSING-LINK: css/css-typed-om/styleMap-update-function.html -MISSING-LINK: css/cssom/CSS.html -MISSING-LINK: css/cssom/CSSKeyframeRule.html -MISSING-LINK: css/cssom/CSSKeyframesRule.html -MISSING-LINK: css/cssom/CSSNamespaceRule.html -MISSING-LINK: css/cssom/CSSRuleList.html -MISSING-LINK: css/cssom/CSSStyleSheet.html -MISSING-LINK: css/cssom/GetBoundingRect.html -MISSING-LINK: css/cssom/historical.html -MISSING-LINK: css/cssom/MediaList.html -MISSING-LINK: css/cssom/overflow-serialization.html -MISSING-LINK: css/cssom/selectorText-modification-restyle-001.html -MISSING-LINK: css/cssom/serialization-CSSDeclaration-with-important.html -MISSING-LINK: css/cssom/serialize-values.html -MISSING-LINK: css/cssom/serialize-variable-reference.html -MISSING-LINK: css/cssom/shorthand-serialization.html SUPPORT-WRONG-DIR: css/cssom/stylesheet-same-origin.css -MISSING-LINK: css/cssom/stylesheet-same-origin.sub.html -MISSING-LINK: css/cssom/StyleSheetList.html -MISSING-LINK: css/cssom/variable-names.html MISSING-LINK: css/cssom-view/DOMRectList.html MISSING-LINK: css/cssom-view/elementFromPoint-002.html MISSING-LINK: css/cssom-view/elementFromPoint-003.html diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-disabled-by-feature-policy.https.html index 3d861c156e2..56a1cc4f0f9 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html index f63768191d8..b5f6798e248 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https.html index 31f83f1edaa..6cad267b6f5 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy.https.html index 83e08ebf2ac..24e2554bca2 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html index feb8fecdea7..59dfef5bf20 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer.https.html index 496c5281c48..a3cefc26169 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/magnetometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer_insecure_context.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer_insecure_context.html index 7452181914d..45ff584b425 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer_insecure_context.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/magnetometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/magnetometer/Magnetometer_onerror-manual.https.html b/tests/wpt/web-platform-tests/magnetometer/Magnetometer_onerror-manual.https.html index 0c823d00df9..04b987797fa 100644 --- a/tests/wpt/web-platform-tests/magnetometer/Magnetometer_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/magnetometer/Magnetometer_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://www.w3.org/TR/magnetometer/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html index f2b32516475..a047a30873c 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-1.html @@ -62,7 +62,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html index 08d639dd488..54451138868 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html @@ -50,7 +50,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html index ee06e19fd57..327a72e30b5 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-axis-height-1.html @@ -26,7 +26,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html index beddc512a77..67a46138134 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html @@ -50,7 +50,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html index bc710f302f6..9bc6bcbf277 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/subsup-parameters-1.html @@ -62,7 +62,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html index 462c8193374..1e5a6606b03 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-1.html @@ -38,7 +38,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html index afd5b8e77a9..c28f29c99e6 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-2.html @@ -38,7 +38,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html index 29b023b3051..0172ff1c700 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html @@ -41,7 +41,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html index 4dfe2eae975..061cda79af9 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-4.html @@ -41,7 +41,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html index f68f13df77d..50c3491e487 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/tables/table-axis-height.html @@ -26,7 +26,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/displaystyle-1.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/displaystyle-1.html index a616e7f2336..2749e09c48a 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/displaystyle-1.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/displaystyle-1.html @@ -32,7 +32,8 @@ } window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/lengths-3.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/lengths-3.html index 3dadb399a26..a7133f89ecf 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/lengths-3.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/lengths-3.html @@ -26,7 +26,8 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { - document.fonts.ready.then(runTests); + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); }); function runTests() { diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html index c623aecb4d5..a29b5832a9e 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html @@ -16,30 +16,63 @@ <script> "use strict"; //NOTE ALEX: for completion, a test for ondevicechange event is missing. -test(function () { +promise_test(function() { assert_true(undefined !== navigator.mediaDevices.enumerateDevices, "navigator.mediaDevices.enumerateDevices exists"); - var p = navigator.mediaDevices.enumerateDevices() - p.then(function(list){ + return navigator.mediaDevices.enumerateDevices().then(function(list) { for (let mediainfo of list) { assert_true(undefined !== mediainfo.deviceId, "mediaInfo's deviceId should exist."); assert_true(undefined !== mediainfo.kind, "mediaInfo's kind should exist."); assert_true(undefined !== mediainfo.label, "mediaInfo's label should exist."); assert_true(undefined !== mediainfo.groupId, "mediaInfo's groupId should exist."); // TODO the values of some of those fields should be empty string by default if no permission has been requested. - if ( mediainfo.kind == "audioinput" || - mediainfo.kind == "videoinput") { + if ( mediainfo.kind == "audioinput" || mediainfo.kind == "videoinput") { assert_true(mediainfo instanceof InputDeviceInfo); + var capabilities = mediainfo.getCapabilities(); + assert_equals(typeof capabilities, "object", "capabilities must be an object."); + assert_equals(typeof capabilities.deviceId, "string", "deviceId must be a string."); + assert_equals(typeof capabilities.groupId, "string", "groupId must be a string."); + if (mediainfo.kind == "audioinput") { + assert_equals(typeof capabilities.echoCancellation, "object", "echoCancellation must be an object."); + } + if (mediainfo.kind == "videoinput") { + assert_equals(typeof capabilities.facingMode, "object", "facingMode must be an object."); + verifyVideoRangeProperties(capabilities); + } } else if ( mediainfo.kind == "audiooutput" ) { assert_true(mediainfo instanceof MediaDeviceInfo); } else { assert_unreached("mediainfo.kind should be one of 'audioinput', 'videoinput', or 'audiooutput'.") } } - }) - p.catch(function(err){ - assert_unreached("A call to enumerateDevices() should never fail."); }); }, "mediaDevices.enumerateDevices() is present and working on navigator"); + +function verifyVideoRangeProperties(capabilities) { + if (capabilities.hasOwnProperty('width')) { + assert_equals(Object.keys(capabilities.width).length, 2); + assert_true(capabilities.width.hasOwnProperty('min')); + assert_true(capabilities.width.hasOwnProperty('max')); + assert_less_than_equal(capabilities.width.min, capabilities.width.max); + } + if (capabilities.hasOwnProperty('height')) { + assert_equals(Object.keys(capabilities.height).length, 2); + assert_true(capabilities.height.hasOwnProperty('min')); + assert_true(capabilities.height.hasOwnProperty('max')); + assert_less_than_equal(capabilities.height.min, capabilities.height.max); + } + if (capabilities.hasOwnProperty('aspectRatio')) { + assert_equals(Object.keys(capabilities.aspectRatio).length, 2); + assert_true(capabilities.aspectRatio.hasOwnProperty('min')); + assert_true(capabilities.aspectRatio.hasOwnProperty('max')); + assert_less_than_equal(capabilities.aspectRatio.min, capabilities.aspectRatio.max); + } + if (capabilities.hasOwnProperty('frameRate')) { + assert_equals(Object.keys(capabilities.frameRate).length, 2); + assert_true(capabilities.frameRate.hasOwnProperty('min')); + assert_true(capabilities.frameRate.hasOwnProperty('max')); + assert_less_than_equal(capabilities.frameRate.min, capabilities.frameRate.max); + } +} </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..f0c5ae172ba --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..e592db53c3c --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..ee9c3c6d22d --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: swap-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "swap-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/cross-origin-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..e050885df3b --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/keep-scheme-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..369044ff69e --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..aea84f71e64 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: http-csp + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: swap-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "swap-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-http/top-level/swap-scheme-redirect/blockable/opt-in-blocks.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html new file mode 100644 index 00000000000..83d425c58eb --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Allowed content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of allowed content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/"> + <meta name="assert" content="opt_in_method: http-csp + origin: same-host-https + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: allowed"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "same-host-https", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "allowed" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html new file mode 100644 index 00000000000..728e6ce73ff --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Allowed content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of allowed content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/"> + <meta name="assert" content="opt_in_method: http-csp + origin: same-host-https + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: allowed"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "http-csp", + "origin": "same-host-https", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "allowed" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.headers b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.headers new file mode 100644 index 00000000000..46e2255e388 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/http-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: block-all-mixed-content diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..4753bb3208d --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/cross-origin-http/top-level/no-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: meta-csp + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "meta-csp", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html new file mode 100644 index 00000000000..e82c6cfdc18 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-http/top-level/no-redirect/blockable/opt-in-blocks.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: meta-csp + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "meta-csp", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html new file mode 100644 index 00000000000..d9c87b30c54 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Allowed content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of allowed content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/"> + <meta name="assert" content="opt_in_method: meta-csp + origin: same-host-https + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: allowed"> + <meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "meta-csp", + "origin": "same-host-https", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "allowed" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..2a4f6a5e459 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..6b9d9b4f826 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..a3f302ae60b --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/cross-origin-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: cross-origin-http + source_scheme: https + context_nesting: top-level + redirection: swap-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "cross-origin-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "swap-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..0a507e5b109 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/keep-scheme-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..5375ae50b97 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/no-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html new file mode 100644 index 00000000000..c6afc29050c --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-http/top-level/swap-scheme-redirect/blockable/no-opt-in-blocks.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Blockable content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of blockable content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/#category-blockable"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: same-host-http + source_scheme: https + context_nesting: top-level + redirection: swap-scheme-redirect + subresource: beacon-request + expectation: blocked"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "same-host-http", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "swap-scheme-redirect", + "subresource": "beacon-request", + "expectation": "blocked" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html new file mode 100644 index 00000000000..2b83f31198b --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/keep-scheme-redirect/allowed/allowed.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Allowed content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of allowed content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: same-host-https + source_scheme: https + context_nesting: top-level + redirection: keep-scheme-redirect + subresource: beacon-request + expectation: allowed"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "same-host-https", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "keep-scheme-redirect", + "subresource": "beacon-request", + "expectation": "allowed" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html new file mode 100644 index 00000000000..efc6ce6881d --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/beacon-request/no-opt-in/same-host-https/top-level/no-redirect/allowed/allowed.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! Generated by mixed-content/generic/tools/generate.py using mixed-content/generic/template/test.release.html.template. --> +<html> + <head> + <title>Mixed-Content: Allowed content</title> + <meta charset='utf-8'> + <meta name="description" content="Test behavior of allowed content."> + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="http://www.w3.org/TR/mixed-content/"> + <meta name="assert" content="opt_in_method: no-opt-in + origin: same-host-https + source_scheme: https + context_nesting: top-level + redirection: no-redirect + subresource: beacon-request + expectation: allowed"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/mixed-content/generic/common.js"></script> + <script src="/mixed-content/generic/mixed-content-test-case.js?pipe=sub"></script> + </head> + <body> + <script> + MixedContentTestCase( + { + "opt_in_method": "no-opt-in", + "origin": "same-host-https", + "source_scheme": "https", + "context_nesting": "top-level", + "redirection": "no-redirect", + "subresource": "beacon-request", + "expectation": "allowed" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() + ).start(); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/common.js b/tests/wpt/web-platform-tests/mixed-content/generic/common.js index b2673e0d9c1..12e9262ca07 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/common.js +++ b/tests/wpt/web-platform-tests/mixed-content/generic/common.js @@ -305,6 +305,26 @@ function requestViaLinkPrefetch(url) { } /** + * Initiates a new beacon request. + * @param {string} url The URL of a resource to prefetch. + * @return {Promise} The promise for success/error events. + */ +async function requestViaSendBeacon(url) { + function wait(ms) { + return new Promise(resolve => step_timeout(resolve, ms)); + } + if (!navigator.sendBeacon(url)) { + // If mixed-content check fails, it should return false. + throw new Error('sendBeacon() fails.'); + } + // We don't have a means to see the result of sendBeacon() request + // for sure. Let's wait for a while and let the generic test function + // ask the server for the result. + await wait(500); + return 'allowed'; +} + +/** * Creates a new media element with a child source element, binds loadeddata and * error events, sets attributes and appends to document.body. * @param {string} type The type of the media element (audio/video/picture). diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js b/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js index fa27a3d6ae1..f0e2d340fcf 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js +++ b/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js @@ -59,6 +59,7 @@ function MixedContentTestCase(scenario, description, sanityChecker) { var resourceMap = { "a-tag": requestViaAnchor, "area-tag": requestViaArea, + "beacon-request": requestViaSendBeacon, "fetch-request": requestViaFetch, "form-tag": requestViaForm, "iframe-tag": requestViaIframe, @@ -81,6 +82,7 @@ function MixedContentTestCase(scenario, description, sanityChecker) { var contentType = { "a-tag": "text/html", "area-tag": "text/html", + "beacon-request": "text/plain", "fetch-request": "application/json", "form-tag": "text/html", "iframe-tag": "text/html", diff --git a/tests/wpt/web-platform-tests/mixed-content/spec.src.json b/tests/wpt/web-platform-tests/mixed-content/spec.src.json index e59fa9f8c4c..54479ef4282 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec.src.json +++ b/tests/wpt/web-platform-tests/mixed-content/spec.src.json @@ -240,7 +240,8 @@ "object-tag", "picture-tag", "websocket-request", - "link-prefetch-tag" + "link-prefetch-tag", + "beacon-request" ], "optionally-blockable": [ "img-tag", diff --git a/tests/wpt/web-platform-tests/mixed-content/spec_json.js b/tests/wpt/web-platform-tests/mixed-content/spec_json.js index f70e3ccc000..1bd1ecc8a26 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec_json.js +++ b/tests/wpt/web-platform-tests/mixed-content/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http", "same-host-wss", "same-host-ws", "cross-origin-wss", "cross-origin-ws"], "subresource": {"blockable": ["script-tag", "link-css-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request", "link-prefetch-tag"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-ws", "same-host-ws"], "name": "ws-downgrade-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["no-opt-in", "http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": ["same-host-wss"], "name": "websocket-allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "Redundant-subresources", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "name": "Skip-origins-not-applicable-to-websockets", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]}; +var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http", "same-host-wss", "same-host-ws", "cross-origin-wss", "cross-origin-ws"], "subresource": {"blockable": ["script-tag", "link-css-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request", "link-prefetch-tag", "beacon-request"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-ws", "same-host-ws"], "name": "ws-downgrade-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["no-opt-in", "http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": ["same-host-wss"], "name": "websocket-allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "Redundant-subresources", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "name": "Skip-origins-not-applicable-to-websockets", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]}; diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.html b/tests/wpt/web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html index fce08e56a77..fce08e56a77 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.html diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.w.html b/tests/wpt/web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w.html index a6c4b4b7f93..a6c4b4b7f93 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.convert.to.blob.w.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w.html diff --git a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html index b3e802eeb45..ccefe2ea23e 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html index ea416bbbb4f..6aed47d4ddf 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https.html index 2fba4878c08..51bbba1cae4 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html index c61c957d9b9..c0b4cc8ed30 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html index 412a8672bfb..9ce51ab6448 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/AbsoluteOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor.https.html b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor.https.html index 6fca92d4824..5e728a688db 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor.https.html @@ -6,7 +6,7 @@ <link rel="help" href="https://w3c.github.io/sensors/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_insecure_context.html b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_insecure_context.html index 4b71e19424e..18d41cec9ee 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_insecure_context.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://w3c.github.io/sensors/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Note:</h2> <ol> diff --git a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_onerror-manual.https.html b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_onerror-manual.https.html index 6ea7582404e..d70ea3048ea 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/OrientationSensor_onerror-manual.https.html @@ -6,7 +6,7 @@ <link rel="help" href="https://w3c.github.io/sensors/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html index e1f4401b599..9296af8ea6c 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-disabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html index c1557da7ab0..01b45b09935 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute-redirect-on-load.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https.html b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https.html index acd9ca53bf4..1bf41196663 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy-attribute.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html index ca71e3d708e..7ea2fb50f3b 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html index 8ed6bde0345..6d677bf0d42 100644 --- a/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html +++ b/tests/wpt/web-platform-tests/orientation-sensor/RelativeOrientationSensor-enabled-on-self-origin-by-feature-policy.https.html @@ -4,7 +4,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/feature-policy/resources/featurepolicy.js"></script> -<script src="/sensors/generic-sensor-feature-policy-test.sub.js"></script> +<script src="/generic-sensor/generic-sensor-feature-policy-test.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/payment-handler/interfaces.https.any.js b/tests/wpt/web-platform-tests/payment-handler/interfaces.https.any.js index d0e23281c27..ccddf464d13 100644 --- a/tests/wpt/web-platform-tests/payment-handler/interfaces.https.any.js +++ b/tests/wpt/web-platform-tests/payment-handler/interfaces.https.any.js @@ -3,11 +3,6 @@ 'use strict'; -if (self.importScripts) { - importScripts('/resources/testharness.js'); - importScripts('/resources/WebIDLParser.js', '/resources/idlharness.js'); -} - // https://w3c.github.io/payment-handler/ promise_test(async () => { diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method-manual.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method-manual.https.html new file mode 100644 index 00000000000..9552c3ce3fd --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method-manual.https.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for PaymentRequest.abort() method</title> +<link rel="help" href="https://w3c.github.io/browser-payment-api/#abort-method"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +"use strict"; +setup({ + // Ignore unhandled rejections resulting from .show()'s acceptPromise + // not being explicitly handled. + allow_uncaught_exception: true, + explicit_done: true, + explicit_timeout: true, +}); +const basicCard = Object.freeze({ supportedMethods: "basic-card" }); +const defaultMethods = Object.freeze([basicCard]); +const defaultDetails = Object.freeze({ + total: { + label: "Total", + amount: { + currency: "USD", + value: "1.00", + }, + }, +}); + +promise_test(async t => { + // request is in "created" state + const request = new PaymentRequest(defaultMethods, defaultDetails); + await promise_rejects(t, "InvalidStateError", request.abort()); +}, `Throws if the promise [[state]] is not "interactive"`); + +function manualTest1(elem){ + elem.disabled = true; + promise_test(async t => { + // request is in "created" state. + const request = new PaymentRequest(defaultMethods, defaultDetails); + await promise_rejects(t, "InvalidStateError", request.abort()); + // Call it again, for good measure. + await promise_rejects(t, "InvalidStateError", request.abort()); + // The request's state is "created", so let's show it + // which changes the state to "interactive.". + const acceptPromise = request.show(); + // Let's set request the state to "closed" by calling .abort() + try { + await request.abort(); + } catch (err) { + assert_unreached("Unexpected promise rejection: " + err.message); + } + // The request is now "closed", so... + await promise_rejects(t, "InvalidStateError", request.abort()); + await promise_rejects(t, "AbortError", acceptPromise); + }, elem.textContent.trim()); +} + +function manualTest2(elem){ + elem.disabled = true; + promise_test(async t => { + const request = new PaymentRequest(defaultMethods, defaultDetails); + const acceptPromise = request.show(); + try { + await request.abort(); + } catch (err) { + assert_unreached("Unexpected promise rejection: " + err.message); + } + await promise_rejects(t, "AbortError", acceptPromise); + // As request is now "closed", trying to show it will fail + await promise_rejects(t, "InvalidStateError", request.show()); + }, elem.textContent.trim()); + done(); +} +</script> + +<h2>Test for PaymentRequest.abort() method</h2> +<p> + Click on each button in sequence from top to bottom without refreshing the page. + No payment sheet will be shown, but the tests will run in the background. +</p> +<ol> + <li> + <button onclick="manualTest1(this)"> + Calling abort must not change the [[state]] until after "interactive". + </button> + </li> + <li> + <button onclick="manualTest2(this)"> + Calling .abort() causes acceptPromise to reject and closes the request. + </button> + </li> +</ol> +<small> + If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> + and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. +</small> diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html deleted file mode 100644 index cfcdb75a66b..00000000000 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html +++ /dev/null @@ -1,65 +0,0 @@ -<!DOCTYPE html> -<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> -<meta charset="utf-8"> -<title>Test for PaymentRequest.abort() method</title> -<link rel="help" href="https://w3c.github.io/browser-payment-api/#abort-method"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -"use strict"; -setup(() => {}, { - // Ignore unhandled rejections resulting from .show()'s acceptPromise - // not being explicitly handled. - allow_uncaught_exception: true, -}); -const basicCard = Object.freeze({ supportedMethods: "basic-card" }); -const defaultMethods = Object.freeze([basicCard]); -const defaultDetails = Object.freeze({ - total: { - label: "Total", - amount: { - currency: "USD", - value: "1.00", - }, - }, -}); - -promise_test(async t => { - // request is in "created" state - const request = new PaymentRequest(defaultMethods, defaultDetails); - await promise_rejects(t, "InvalidStateError", request.abort()); -}, `Throws if the promise [[state]] is not "interactive"`); - -promise_test(async t => { - // request is in "created" state. - const request = new PaymentRequest(defaultMethods, defaultDetails); - await promise_rejects(t, "InvalidStateError", request.abort()); - // Call it again, for good measure. - await promise_rejects(t, "InvalidStateError", request.abort()); - // The request's state is "created", so let's show it - // which changes the state to "interactive.". - request.show(); - // Let's set request the state to "closed" by calling .abort() - try { - await request.abort(); - } catch (err) { - assert_unreached("Unexpected promise rejection: " + err.message); - } - // The request is now "closed", so... - await promise_rejects(t, "InvalidStateError", request.abort()); -}, `Calling abort must not change the [[state]] until after "interactive"`); - -promise_test(async t => { - const request = new PaymentRequest(defaultMethods, defaultDetails); - const acceptPromise = request.show(); - try { - await request.abort(); - } catch (err) { - assert_unreached("Unexpected promise rejection: " + err.message); - } - await promise_rejects(t, "AbortError", acceptPromise); - // As request is now "closed", trying to show it will fail - await promise_rejects(t, "InvalidStateError", request.show()); -}, "calling .abort() causes acceptPromise to reject and closes the request."); - -</script> diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-manual.https.html index 9fe0c4a0811..caf43d1cb0c 100644 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method.https.html +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-manual.https.html @@ -1,11 +1,15 @@ <!DOCTYPE html> -<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> <meta charset="utf-8"> <title>Tests for PaymentRequest.canMakePayment() method</title> <link rel="help" href="https://w3c.github.io/browser-payment-api/#show-method"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> +setup({ + explicit_done: true, + explicit_timeout: true, +}); + const basicCard = Object.freeze({ supportedMethods: "basic-card" }); const defaultMethods = Object.freeze([basicCard]); const defaultDetails = Object.freeze({ @@ -40,47 +44,6 @@ promise_test(async t => { promise_test(async t => { const request = new PaymentRequest(defaultMethods, defaultDetails); - const acceptPromise = request.show(); // Sets state to "interactive" - const canMakePaymentPromise = request.canMakePayment(); - try { - const result = await canMakePaymentPromise; - assert_true( - false, - `canMakePaymentPromise should have thrown InvalidStateError` - ); - } catch (err) { - await promise_rejects(t, "InvalidStateError", canMakePaymentPromise); - } finally { - await request.abort(); - await promise_rejects(t, "AbortError", acceptPromise); - } - // The state should be "closed" - await promise_rejects(t, "InvalidStateError", request.canMakePayment()); -}, `If request.[[state]] is "interactive", then return a promise rejected with an "InvalidStateError" DOMException.`); - -promise_test(async t => { - const request = new PaymentRequest(defaultMethods, defaultDetails); - const acceptPromise = request.show(); // The state is now "interactive" - acceptPromise.catch(() => {}); // no-op, just to silence unhandled rejection in devtools. - await request.abort(); // The state is now "closed" - await promise_rejects(t, "InvalidStateError", request.canMakePayment()); - try { - const result = await request.canMakePayment(); - assert_true( - false, - `should have thrown InvalidStateError, but instead returned "${result}"` - ); - } catch (err) { - assert_equals( - err.name, - "InvalidStateError", - "must be an InvalidStateError." - ); - } -}, `If request.[[state]] is "closed", then return a promise rejected with an "InvalidStateError" DOMException.`); - -promise_test(async t => { - const request = new PaymentRequest(defaultMethods, defaultDetails); assert_true(await request.canMakePayment(), "basic-card should be supported"); }, `If payment method identifier and serialized parts are supported, resolve promise with true.`); @@ -160,4 +123,74 @@ promise_test(async t => { } } }, `Optionally, at the user agent's discretion, return a promise rejected with a "NotAllowedError" DOMException.`); + +function manualTest1(elem){ + elem.disabled = true; + promise_test(async t => { + const request = new PaymentRequest(defaultMethods, defaultDetails); + const acceptPromise = request.show(); // Sets state to "interactive" + const canMakePaymentPromise = request.canMakePayment(); + try { + const result = await canMakePaymentPromise; + assert_true( + false, + `canMakePaymentPromise should have thrown InvalidStateError` + ); + } catch (err) { + await promise_rejects(t, "InvalidStateError", canMakePaymentPromise); + } finally { + await request.abort(); + await promise_rejects(t, "AbortError", acceptPromise); + } + // The state should be "closed" + await promise_rejects(t, "InvalidStateError", request.canMakePayment()); + }, elem.textContent.trim()); +} + +function manualTest2(elem){ + elem.disabled = true; + promise_test(async t => { + const request = new PaymentRequest(defaultMethods, defaultDetails); + const acceptPromise = request.show(); // The state is now "interactive" + acceptPromise.catch(() => {}); // no-op, just to silence unhandled rejection in devtools. + await request.abort(); // The state is now "closed" + await promise_rejects(t, "InvalidStateError", request.canMakePayment()); + try { + const result = await request.canMakePayment(); + assert_true( + false, + `should have thrown InvalidStateError, but instead returned "${result}"` + ); + } catch (err) { + assert_equals( + err.name, + "InvalidStateError", + "must be an InvalidStateError." + ); + } + }, elem.textContent.trim()); + done(); +} </script> + +<h2>Tests for PaymentRequest.canMakePayment() method</h2> +<p> + Click on each button in sequence from top to bottom without refreshing the page. + No payment sheet will be shown, but the tests will run in the background. +</p> +<ol> + <li> + <button onclick="manualTest1(this)"> + If request.[[state]] is "interactive", then return a promise rejected with an "InvalidStateError" DOMException. + </button> + </li> + <li> + <button onclick="manualTest2(this)"> + If request.[[state]] is "closed", then return a promise rejected with an "InvalidStateError" DOMException. + </button> + </li> +</ol> +<small> + If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> + and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. +</small> diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-show-method-manual.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method-manual.https.html new file mode 100644 index 00000000000..fab78f43fd6 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method-manual.https.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for PaymentRequest.show() method</title> +<link rel="help" href="https://w3c.github.io/browser-payment-api/#show-method"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +"use strict"; +setup({ + explicit_done: true, + explicit_timeout: true, +}); +const basicCard = Object.freeze({ supportedMethods: "basic-card" }); +const defaultMethods = Object.freeze([basicCard]); +const defaultDetails = Object.freeze({ + total: { + label: "Total", + amount: { + currency: "USD", + value: "1.00", + }, + }, +}); + +test(() => { + try { + new PaymentRequest(defaultMethods, defaultDetails); + } catch (err) { + done(); + throw err; + } +}, "Must be possible to construct a payment request"); + +function manualTest1(button){ + button.disabled = true; + promise_test(async t => { + const request = new PaymentRequest(defaultMethods, defaultDetails); + const acceptPromise = request.show(); // Sets state to "interactive" + await promise_rejects(t, "InvalidStateError", request.show()); + await request.abort(); + await promise_rejects(t, "AbortError", acceptPromise); + }, button.textContent.trim()); +} + +function manualTest2(button){ + button.disabled = true; + promise_test(async t => { + const request1 = new PaymentRequest(defaultMethods, defaultDetails); + const request2 = new PaymentRequest(defaultMethods, defaultDetails); + const acceptPromise1 = request1.show(); + const acceptPromise2 = request2.show(); + await promise_rejects(t, "AbortError", acceptPromise2); + await request1.abort(); + await promise_rejects(t, "AbortError", acceptPromise1); + }, button.textContent.trim()); +} + +function manualTest3(button){ + button.disabled = true; + promise_test(async t => { + const request = new PaymentRequest( + [{ supportedMethods: "this-is-not-supported" }], + defaultDetails); + const acceptPromise = request.show(); + await promise_rejects(t, "NotSupportedError", acceptPromise); + }, button.textContent.trim()); + done(); +} +</script> + +<h2>Test for PaymentRequest.show() method</h2> +<p> + Click on each button in sequence from top to bottom without refreshing the page. +</p> +<ol> + <li> + <button onclick="manualTest1(this)"> + Throws if the promise [[state]] is not "created" + </button> + </li> + <li> + <button onclick="manualTest2(this)"> + If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. + </button> + </li> + <li> + <button onclick="manualTest3(this)"> + If payment method consultation produces no supported method of payment, then return a promise rejected with a "NotSupportedError" DOMException. + </button> + </li> +</ol> +<small> + If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> + and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. +</small> diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html index 555c4936537..32b56680e7f 100644 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html @@ -7,8 +7,11 @@ <script src="/resources/testharnessreport.js"></script> <script> 'use strict'; -const basicCard = Object.freeze({ supportedMethods: "basic-card" }); -const defaultMethods = Object.freeze([basicCard]); +const defaultMethods = Object.freeze([ + { supportedMethods: "basic-card" }, + { supportedMethods: "https://apple.com/pay" } +]); + const defaultDetails = Object.freeze({ total: { label: "Total", @@ -19,39 +22,9 @@ const defaultDetails = Object.freeze({ }, }); -test(() => { - try { - new PaymentRequest(defaultMethods, defaultDetails); - } catch (err) { - done(); - throw err; - } -}, "Must be possible to construct a payment request"); - - promise_test(async t => { const request = new PaymentRequest(defaultMethods, defaultDetails); - const acceptPromise = request.show(); // Sets state to "interactive" - await promise_rejects(t, "InvalidStateError", request.show()); - await request.abort(); - await promise_rejects(t, "AbortError", acceptPromise); -}, `Throws if the promise [[state]] is not "created"`); - -promise_test(async t => { - const request1 = new PaymentRequest(defaultMethods, defaultDetails); - const request2 = new PaymentRequest(defaultMethods, defaultDetails); - const acceptPromise1 = request1.show(); - const acceptPromise2 = request2.show(); - await promise_rejects(t, "AbortError", acceptPromise2); - await request1.abort(); - await promise_rejects(t, "AbortError", acceptPromise1); -}, `If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException.`); - -promise_test(async t => { - const request = new PaymentRequest( - [{ supportedMethods: "this-is-not-supported" }], - defaultDetails); const acceptPromise = request.show(); - await promise_rejects(t, "NotSupportedError", acceptPromise); -}, `If payment method consultation produces no supported method of payment, then return a promise rejected with a "NotSupportedError" DOMException.`); + await promise_rejects(t, "SecurityError", acceptPromise); +}, `Calling show() without being triggered by user interaction throws`); </script> diff --git a/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-iframe.html b/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-iframe.html new file mode 100644 index 00000000000..fd73d6bfa5a --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-iframe.html @@ -0,0 +1,40 @@ +<h1>This iframe calls shows() via postMessage()</h1> +<script> +"use strict"; +const defaultMethods = Object.freeze([ + { supportedMethods: "basic-card" }, + { supportedMethods: "https://apple.com/pay" }, +]); + +const defaultDetails = Object.freeze({ + id: "fail", + total: { + label: "Total", + amount: { + currency: "USD", + value: "1.00", + }, + }, +}); + +// We are going to use the id to prove that this works +// which we will pass back to the caller +window.onmessage = async event => { + const { source, data: { id, request } } = event; + switch (request) { + case "show-payment-request": { + const details = Object.assign({}, defaultDetails, { id }); + const request = new PaymentRequest(defaultMethods, details); + try { + const response = await request.show(); + source.postMessage(response.toJSON(), window.location.origin); + await response.complete(); + } catch (err) { + source.postMessage({ requestId: "fail" }, window.location.origin); + await request.abort(); + } + } + } +}; + +</script> diff --git a/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-manual.https.html b/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-manual.https.html new file mode 100644 index 00000000000..00ce84a4859 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/show-method-postmessage-manual.https.html @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for PaymentRequest.show() method</title> +<link rel="help" href="https://w3c.github.io/browser-payment-api/#show-method"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +"use strict"; +setup({ + explicit_done: true, + explicit_timeout: true, +}); + +async function runUserActivation(button) { + button.disabled = true; + const { contentWindow: iframeWindow } = document.getElementById("iframe"); + const expectedId = "pass123"; + await Promise.resolve(); // next tick + const promiseForResponse = new Promise(resolve => { + window.onmessage = ({ data: { requestId } }) => resolve(requestId); + }); + const ops = { id: expectedId, request: "show-payment-request" }; + iframeWindow.postMessage(ops, window.location.origin); + promise_test(async () => { + const actualId = await promiseForResponse; + assert_equals(actualId, expectedId, "ids must match"); + }, button.textContent.trim()); + done(); +} +</script> +<h2>Test PaymentRequest.show() triggered by user activation using postMessage()</h2> +<p> + Tests that user activation works over postMessage(). +</p> +<p> + Click on bottom below. Hit "Pay". +</p> +<ol> + <li> + <button onclick="runUserActivation(this)"> + show() is triggered by user activation passed through postMessage() and a promise + </button> + </li> +</ol> +<iframe width="100%" id="iframe" src="show-method-postmessage-iframe.html" allowpaymentrequest></iframe> +<p> + <small> + If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> + and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. + </small> +</p> diff --git a/tests/wpt/web-platform-tests/preload/download-resources.html b/tests/wpt/web-platform-tests/preload/download-resources.html index ee8fdd0ea12..dc2b4693cf1 100644 --- a/tests/wpt/web-platform-tests/preload/download-resources.html +++ b/tests/wpt/web-platform-tests/preload/download-resources.html @@ -8,7 +8,7 @@ <link rel=preload href="resources/dummy.js" as=script> <link rel=preload href="resources/dummy.css" as=style> <link rel=preload href="resources/square.png" as=image> -<link rel=preload href="resources/CanvasTest.ttf" as=font crossorigin> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font crossorigin> <link rel=preload href="resources/white.mp4" as=video> <link rel=preload href="resources/sound_5.oga" as=audio> <link rel=preload href="resources/foo.vtt" as=track> @@ -22,7 +22,7 @@ verifyPreloadAndRTSupport() verifyNumberOfDownloads("resources/dummy.js", 1); verifyNumberOfDownloads("resources/dummy.css", 1); - verifyNumberOfDownloads("resources/CanvasTest.ttf", 1); + verifyNumberOfDownloads("/fonts/CanvasTest.ttf", 1); verifyNumberOfDownloads("resources/white.mp4", 1); verifyNumberOfDownloads("resources/sound_5.oga", 1); verifyNumberOfDownloads("resources/foo.vtt", 1); diff --git a/tests/wpt/web-platform-tests/preload/link-header-on-subresource.html b/tests/wpt/web-platform-tests/preload/link-header-on-subresource.html index 22351e37c7b..a02bc7c819e 100644 --- a/tests/wpt/web-platform-tests/preload/link-header-on-subresource.html +++ b/tests/wpt/web-platform-tests/preload/link-header-on-subresource.html @@ -10,7 +10,7 @@ <script> window.addEventListener("load", t.step_func(function() { verifyPreloadAndRTSupport(); - verifyNumberOfDownloads("/preload/resources/CanvasTest.ttf?link-header-on-subresource", 1); + verifyNumberOfDownloads("/fonts/CanvasTest.ttf?link-header-on-subresource", 1); t.done(); })); </script> diff --git a/tests/wpt/web-platform-tests/preload/onload-event.html b/tests/wpt/web-platform-tests/preload/onload-event.html index 35ba2eb54b8..6af2d64a1c1 100644 --- a/tests/wpt/web-platform-tests/preload/onload-event.html +++ b/tests/wpt/web-platform-tests/preload/onload-event.html @@ -19,7 +19,7 @@ <link rel=preload href="resources/dummy.js" as=script onload="scriptLoaded = true;"> <link rel=preload href="resources/dummy.css" as=style onload="styleLoaded = true;"> <link rel=preload href="resources/square.png" as=image onload="imageLoaded = true;"> -<link rel=preload href="resources/CanvasTest.ttf" as=font crossorigin onload="fontLoaded = true;"> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font crossorigin onload="fontLoaded = true;"> <link rel=preload href="resources/white.mp4" as=video onload="videoLoaded = true;"> <link rel=preload href="resources/sound_5.oga" as=audio onload="audioLoaded = true;"> <link rel=preload href="resources/foo.vtt" as=track onload="trackLoaded = true;"> diff --git a/tests/wpt/web-platform-tests/preload/preload-csp.sub.html b/tests/wpt/web-platform-tests/preload/preload-csp.sub.html index 70db5f474e3..8e5e45b9a1c 100644 --- a/tests/wpt/web-platform-tests/preload/preload-csp.sub.html +++ b/tests/wpt/web-platform-tests/preload/preload-csp.sub.html @@ -9,7 +9,7 @@ <link rel=preload href="{{host}}:{{ports[http][1]}}/preload/resources/dummy.js" as=style> <link rel=preload href="resources/dummy.css" as=style> <link rel=preload href="resources/square.png" as=image> -<link rel=preload href="resources/CanvasTest.ttf" as=font crossorigin> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font crossorigin> <link rel=preload href="resources/white.mp4" as=video> <link rel=preload href="resources/sound_5.oga" as=audio> <link rel=preload href="resources/foo.vtt" as=track> @@ -23,7 +23,7 @@ verifyNumberOfDownloads("{{host}}:{{ports[http][1]}}/preload/resources/dummy.js", 0); verifyNumberOfDownloads("resources/dummy.css", 0); verifyNumberOfDownloads("resources/square.png", 0); - verifyNumberOfDownloads("resources/CanvasTest.ttf", 0); + verifyNumberOfDownloads("/fonts/CanvasTest.ttf", 0); verifyNumberOfDownloads("resources/white.mp4", 0); verifyNumberOfDownloads("resources/sound_5.oga", 0); verifyNumberOfDownloads("resources/foo.vtt", 0); diff --git a/tests/wpt/web-platform-tests/preload/preload-default-csp.sub.html b/tests/wpt/web-platform-tests/preload/preload-default-csp.sub.html index bde6b982bce..cb080e62ba3 100644 --- a/tests/wpt/web-platform-tests/preload/preload-default-csp.sub.html +++ b/tests/wpt/web-platform-tests/preload/preload-default-csp.sub.html @@ -9,7 +9,7 @@ <link rel=preload href="{{host}}:{{ports[http][1]}}/preload/resources/dummy.js" as=style> <link rel=preload href="resources/dummy.css" as=style> <link rel=preload href="resources/square.png" as=image> -<link rel=preload href="resources/CanvasTest.ttf" as=font crossorigin> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font crossorigin> <link rel=preload href="resources/white.mp4" as=video> <link rel=preload href="resources/sound_5.oga" as=audio> <link rel=preload href="resources/foo.vtt" as=track> @@ -23,7 +23,7 @@ verifyNumberOfDownloads("{{host}}:{{ports[http][1]}}/preload/resources/dummy.js", 0); verifyNumberOfDownloads("resources/dummy.css", 0); verifyNumberOfDownloads("resources/square.png", 0); - verifyNumberOfDownloads("resources/CanvasTest.ttf", 0); + verifyNumberOfDownloads("/fonts/CanvasTest.ttf", 0); verifyNumberOfDownloads("resources/white.mp4", 0); verifyNumberOfDownloads("resources/sound_5.oga", 0); verifyNumberOfDownloads("resources/foo.vtt", 0); diff --git a/tests/wpt/web-platform-tests/preload/preload-with-type.html b/tests/wpt/web-platform-tests/preload/preload-with-type.html index cf79e778c29..8578143a234 100644 --- a/tests/wpt/web-platform-tests/preload/preload-with-type.html +++ b/tests/wpt/web-platform-tests/preload/preload-with-type.html @@ -31,7 +31,7 @@ <link rel=preload href="resources/dummy.js" as=script type="text/javascript" onload="scriptLoaded = true;"> <link rel=preload href="resources/dummy.css" as=style type="text/css" onload="styleLoaded = true;"> <link rel=preload href="resources/square.png" as=image type="image/png" onload="imageLoaded = true;"> -<link rel=preload href="resources/CanvasTest.ttf" as=font type="font/ttf" crossorigin onload="fontLoaded = true;"> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font type="font/ttf" crossorigin onload="fontLoaded = true;"> <script> document.write('<link rel=preload href="' + videoURL + '" as=video type="video/' + videoFormat + '" onload="videoLoaded = true;">'); document.write('<link rel=preload href="' + audioURL + '" as=audio type="audio/' + audioFormat + '" onload="audioLoaded = true;">'); @@ -40,7 +40,7 @@ <link rel=preload href="resources/dummy.js" as=script type="application/foobar" onload="gibberishLoaded++;"> <link rel=preload href="resources/dummy.css" as=style type="text/foobar" onload="gibberishLoaded++;"> <link rel=preload href="resources/square.png" as=image type="image/foobar" onload="gibberishLoaded++;"> -<link rel=preload href="resources/CanvasTest.ttf" as=font type="font/foobar" crossorigin onload="gibberishLoaded++;"> +<link rel=preload href="/fonts/CanvasTest.ttf" as=font type="font/foobar" crossorigin onload="gibberishLoaded++;"> <script> document.write('<link rel=preload href="' + videoURL + '" as=video type="video/foobar" onload="gibberishLoaded++;">'); document.write('<link rel=preload href="' + audioURL + '" as=audio type="audio/foobar" onload="gibberishLoaded++;">'); diff --git a/tests/wpt/web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers b/tests/wpt/web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers index 4ada08cdf1e..f6b4b491ce5 100644 --- a/tests/wpt/web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers +++ b/tests/wpt/web-platform-tests/preload/resources/dummy-preloads-subresource.css.sub.headers @@ -1,2 +1,2 @@ Cache-Control: max-age=1000 -Link: </preload/resources/CanvasTest.ttf?link-header-on-subresource>; rel=preload;as=font;crossorigin +Link: </fonts/CanvasTest.ttf?link-header-on-subresource>; rel=preload;as=font;crossorigin diff --git a/tests/wpt/web-platform-tests/preload/single-download-preload.html b/tests/wpt/web-platform-tests/preload/single-download-preload.html index 83151c2a8d9..e8f26178710 100644 --- a/tests/wpt/web-platform-tests/preload/single-download-preload.html +++ b/tests/wpt/web-platform-tests/preload/single-download-preload.html @@ -9,7 +9,7 @@ <link rel=preload href="resources/dummy.css?single-download-preload" as=style> <link rel=preload href="resources/square.png?single-download-preload" as=image> <link rel=preload href="resources/square.png?background&single-download-preload" as=image> -<link rel=preload href="resources/CanvasTest.ttf?single-download-preload" as=font crossorigin> +<link rel=preload href="/fonts/CanvasTest.ttf?single-download-preload" as=font crossorigin> <link rel=preload href="resources/white.mp4?single-download-preload" as=video> <link rel=preload href="resources/sound_5.oga?single-download-preload" as=audio> <link rel=preload href="resources/foo.vtt?single-download-preload" as=track> @@ -25,7 +25,7 @@ } @font-face { font-family:ahem; - src: url(resources/CanvasTest.ttf?single-download-preload); + src: url(/fonts/CanvasTest.ttf?single-download-preload); } span { font-family: ahem, Arial; } </style> @@ -49,7 +49,7 @@ verifyNumberOfDownloads("resources/dummy.css?single-download-preload", 1); verifyNumberOfDownloads("resources/square.png?single-download-preload", 1); verifyNumberOfDownloads("resources/square.png?background&single-download-preload", 1); - verifyNumberOfDownloads("resources/CanvasTest.ttf?single-download-preload", 1); + verifyNumberOfDownloads("/fonts/CanvasTest.ttf?single-download-preload", 1); verifyNumberOfDownloads("resources/dummy.xml?foobar", 0); verifyNumberOfDownloads("resources/foo.vtt?single-download-preload", 1); verifyNumberOfDownloads("resources/dummy.xml?single-download-preload", 1); diff --git a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_error.https.html b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_error.https.html index d6324ea56ba..c5ab4667b0b 100644 --- a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_error.https.html +++ b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_error.https.html @@ -1,33 +1,36 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>Presentation API PresentationRequest for Controlling User Agent (Error)</title> +<title>Constructing a PresentationRequest (Error)</title> <link rel="author" title="Franck William Taffo" href="http://www.fokus.fraunhofer.de"> -<link rel="help" href="http://w3c.github.io/presentation-api/#dfn-controlling-user-agent"> +<link rel="author" title="Tomoyuki Shimizu" href="https://github.com/tomoyukilabs"> +<link rel="help" href="http://w3c.github.io/presentation-api/#constructing-a-presentationrequest"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> - test(function() { - assert_throws(new TypeError(), function() { - new PresentationRequest(); - }); + test(() => { + assert_throws(new TypeError(), () => { + new PresentationRequest(); }, 'Call PresentationRequest() constructor without presentation URL. TypeError Exception expected.'); - test(function() { - assert_throws('NotSupportedError', function() { - new PresentationRequest([]); - }); + assert_throws('NotSupportedError', () => { + new PresentationRequest([]); }, 'Call PresentationRequest constructor with an empty sequence. NotSupportedError Exception expected.'); - test(function() { - assert_throws('SyntaxError', function() { - new PresentationRequest('http://@'); - }); + assert_throws('SyntaxError', () => { + new PresentationRequest('http://@'); }, 'Call PresentationRequest constructor with an invalid URL. SyntaxError Exception expected.'); - test(function() { - assert_throws('SyntaxError', function() { - new PresentationRequest(['presentation.html', 'http://@']); - }); + assert_throws('NotSupportedError', () => { + new PresentationRequest('unsupported://example.com'); + }, 'Call PresentationRequest constructor with an unsupported URL. NotSupportedError expected.'); + + assert_throws('SyntaxError', function() { + new PresentationRequest(['presentation.html', 'http://@']); }, 'Call PresentationRequest constructor with a sequence of URLs, one of them invalid. SyntaxError Exception expected.'); + + assert_throws('NotSupportedError', function() { + new PresentationRequest(['unsupported://example.com', 'invalid://example.com']); + }, 'Call PresentationRequest constructor only with a sequence of unsupported URLs. NotSupportedError Exception expected.'); + }); </script> diff --git a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_success.https.html b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_success.https.html index 70ea5a806e7..890e0ed6249 100644 --- a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_success.https.html +++ b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_success.https.html @@ -8,17 +8,24 @@ <script src="/resources/testharnessreport.js"></script> <script> - test(() => { - let request = new PresentationRequest('presentation.html'); - assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with a relative presentation URL is constructed successfully.'); + test(() => { + let request = new PresentationRequest('presentation.html'); + assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with a relative presentation URL is constructed successfully.'); - request = new PresentationRequest('https://example.org/'); - assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with an absolute presentation URL is constructed successfully.'); + request = new PresentationRequest('https://example.org/'); + assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with an absolute presentation URL is constructed successfully.'); - request = new PresentationRequest([ - 'presentation.html', - 'https://example.org/presentation/' - ]); - assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with an array of presentation URLs is constructed successfully.'); - }); + request = new PresentationRequest([ + 'presentation.html', + 'https://example.org/presentation/' + ]); + assert_true(request instanceof PresentationRequest, 'An instance of PresentationRequest with an array of presentation URLs is constructed successfully.'); + + request = new PresentationRequest([ + 'unsupported://example.com', + 'presentation.html', + 'https://example.org/presentation/' + ]); + assert_true(request instanceof PresentationRequest, 'An unsupported URL in an array of presentation URLs is ignored successfully.'); + }); </script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/proximity/ProximitySensor.https.html b/tests/wpt/web-platform-tests/proximity/ProximitySensor.https.html index e94211123c2..ee7f684e02a 100644 --- a/tests/wpt/web-platform-tests/proximity/ProximitySensor.https.html +++ b/tests/wpt/web-platform-tests/proximity/ProximitySensor.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://w3c.github.io/proximity/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <script> diff --git a/tests/wpt/web-platform-tests/proximity/ProximitySensor_insecure_context.html b/tests/wpt/web-platform-tests/proximity/ProximitySensor_insecure_context.html index b693ceca216..b524cdc3214 100644 --- a/tests/wpt/web-platform-tests/proximity/ProximitySensor_insecure_context.html +++ b/tests/wpt/web-platform-tests/proximity/ProximitySensor_insecure_context.html @@ -5,7 +5,7 @@ <link rel="help" href="https://w3c.github.io/proximity/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/proximity/ProximitySensor_onerror-manual.https.html b/tests/wpt/web-platform-tests/proximity/ProximitySensor_onerror-manual.https.html index 8d2f8d6f0d1..e1ee3804e37 100644 --- a/tests/wpt/web-platform-tests/proximity/ProximitySensor_onerror-manual.https.html +++ b/tests/wpt/web-platform-tests/proximity/ProximitySensor_onerror-manual.https.html @@ -5,7 +5,7 @@ <link rel="help" href="https://w3c.github.io/proximity/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/sensors/generic-sensor-tests.js"></script> +<script src="/generic-sensor/generic-sensor-tests.js"></script> <div id="log"></div> <h2>Precondition</h2> <ol> diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html new file mode 100644 index 00000000000..af3d31eabd1 --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8" /> +<title>This test validates resource timing information for a timing allowed cross-origin redirect chain.</title> +<link rel="author" title="Intel" href="http://www.intel.com/" /> +<link rel="help" href="http://www.w3.org/TR/resource-timing/#performanceresourcetiming"/> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/webperftestharness.js"></script> +<script src="resources/webperftestharnessextension.js"></script> + +<script> + setup({explicit_done: true}); + test_namespace('getEntriesByName'); + const pageOrigin = document.location.host; + const crossOrigin = 'www.' + pageOrigin; + + function onload_test() + { + const context = new PerformanceContext(performance); + const entries = context.getEntriesByName(document.getElementById('frameContext').src, 'resource'); + test_equals(entries.length, 1, 'There should be one entry.'); + const entry = entries[0]; + + test_greater_than(entry.redirectStart, 0, 'redirectStart > 0 in timing allowed cross-origin redirect.'); + test_equals(entry.redirectStart, entry.startTime, 'redirectStart == startTime in timing allowed cross-origin redirect.'); + test_greater_than(entry.redirectEnd, entry.redirectStart, 'redirectEnd > redirectStart in timing allowed cross-origin redirect.'); + test_greater_or_equals(entry.fetchStart, entry.redirectEnd, 'fetchStart >= redirectEnd in timing allowed cross-origin redirect.'); + done(); + } +</script> + +</head> +<body> +<iframe id="frameContext" src="" style="width: 250px; height: 250px;"></iframe> +<script> + let destUrl = 'http://' + crossOrigin + '/resource-timing/resources/multi_redirect.py?'; + destUrl += 'page_origin=' + 'http://' + pageOrigin; + destUrl += '&cross_origin=' + 'http://' + crossOrigin; + destUrl += '&timing_allow=1'; + const frameContext = document.getElementById('frameContext'); + frameContext.onload = onload_test; + frameContext.src = destUrl; +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_frame_initiator_type.html b/tests/wpt/web-platform-tests/resource-timing/resource_frame_initiator_type.html deleted file mode 100644 index f6471988624..00000000000 --- a/tests/wpt/web-platform-tests/resource-timing/resource_frame_initiator_type.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="utf-8" /> -<title>Resource Timing frame initiator type</title> -<link rel="author" title="Google" href="http://www.google.com/" /> -<link rel="help" href="http://www.w3.org/TR/resource-timing/#dom-performanceresourcetiming-initiatortype"/> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/webperftestharness.js"></script> -<script src="resources/webperftestharnessextension.js"></script> -<script> -setup({explicit_done: true}); - -function onload_test() { - const iframe = document.getElementById('frameContext'); - const context = new PerformanceContext(iframe.contentWindow.performance); - const entries = context.getEntriesByType('resource'); - - const index = window.location.pathname.lastIndexOf('/'); - const pathname = window.location.pathname.substring(0, index) + - '/resources/blank_page_green.htm'; - const expected_entries = {}; - expected_entries[pathname] = 'frame'; - - test_resource_entries(entries, expected_entries); - done(); -} -</script> -</head> -<body> -<h1>Description</h1> -<p>This test validates that the frame initiator type is represented.</p> -<div id="log"></div> -<iframe id="frameContext" onload="onload_test();" src="resources/green_frame.htm" style="width: 250px; height: 250px;"></iframe> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_initiator_types.html b/tests/wpt/web-platform-tests/resource-timing/resource_initiator_types.html index 30f8c0c024e..d593f13db7e 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resource_initiator_types.html +++ b/tests/wpt/web-platform-tests/resource-timing/resource_initiator_types.html @@ -18,6 +18,7 @@ let ol_font_loaded = false; let ul_font_loaded = false; let xhr_loaded = false; let tests_run = false; +let frameset_loaded = false; function check_finished() { if (!ul_font_loaded) { @@ -26,7 +27,7 @@ function check_finished() { if (!ol_font_loaded) { ol_font_loaded = check_font_loaded('ol'); } - if (page_loaded && ol_font_loaded && ul_font_loaded && background_loaded && xhr_loaded) { + if (page_loaded && ol_font_loaded && ul_font_loaded && background_loaded && xhr_loaded && frameset_loaded) { perform_test(); } else { step_timeout(check_finished, 100); @@ -64,40 +65,88 @@ function onload_test() { step_timeout(check_finished, 100); } +function frameset_onload() { + frameset_loaded = true; + + step_timeout(check_finished, 100); +} + function perform_test() { if (tests_run) { return; } tests_run = true; const context = new PerformanceContext(document.getElementById('frameContext').contentWindow.performance); - const entries = context.getEntriesByType('resource'); + let entries = context.getEntriesByType('resource'); + + // check for frameset + if (document.getElementById('frameContext2') && + document.getElementById('frameContext2').contentWindow) { + const context2 = new PerformanceContext(document.getElementById('frameContext2').contentWindow.performance); + entries = entries.concat(context2.getEntriesByType('resource')); + } const index = window.location.pathname.lastIndexOf('/'); const pathname = window.location.pathname.substring(0, index) + '/resources/'; const font_pathname = window.location.pathname.substring(0, index - 15) + 'fonts/Ahem.ttf'; let expected_entries = {}; - expected_entries[font_pathname] = 'css'; - expected_entries[pathname + 'resource_timing_test0.png'] = 'img'; - expected_entries[pathname + 'blank_page_green.htm'] = 'iframe'; - expected_entries[pathname + 'empty_script.js'] = 'script'; - expected_entries[pathname + 'resource_timing_test0.css?id=embed'] = 'embed'; - expected_entries[pathname + 'resource_timing_test0.css?id=n1'] = 'css'; - expected_entries[font_pathname + '?id=n1'] = 'css'; - expected_entries[pathname + 'blue.png?id=1'] = 'css'; - expected_entries[pathname + 'blue.png?id=2'] = 'css'; - expected_entries[pathname + 'blue.png?id=async_xhr'] = 'xmlhttprequest'; - expected_entries[pathname + 'blue.png?id=body'] = 'body'; - expected_entries[pathname + 'blue.png?id=input'] = 'input'; - expected_entries[pathname + 'blue.png?id=n1'] = 'css'; - expected_entries[pathname + 'blue.png?id=object'] = 'object'; - expected_entries[pathname + 'blue.png?id=poster'] = 'video'; - expected_entries[pathname + 'nested.css'] = 'link'; + addEntryIfExists(entries, expected_entries, font_pathname, 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'resource_timing_test0.png', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'resource_timing_test0.png?id=srcset-srcset', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'resource_timing_test0.png?id=srcset-src', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blank_page_green.htm', 'iframe'); + addEntryIfExists(entries, expected_entries, pathname + 'blank_page_green.htm?id=frame', 'frame'); + addEntryIfExists(entries, expected_entries, pathname + 'empty_script.js', 'script'); + addEntryIfExists(entries, expected_entries, pathname + 'resource_timing_test0.css?id=embed', 'embed'); + addEntryIfExists(entries, expected_entries, pathname + 'resource_timing_test0.css?id=n1', 'css'); + addEntryIfExists(entries, expected_entries, font_pathname + '?id=n1', 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=cursor', 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=1', 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=2', 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=async_xhr', 'xmlhttprequest'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=body', 'body'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=input', 'input'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=n1', 'css'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=object', 'object'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=video-poster', 'video'); + addEntryIfExists(entries, expected_entries, '/media/test.mp4?id=video-src', 'video'); + addEntryIfExists(entries, expected_entries, '/media/test.mp4?id=video-source', 'source'); + addEntryIfExists(entries, expected_entries, '/media/test.ogv?id=video-source', 'source'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=video-track', 'track'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=audio-src', 'audio'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=audio-source-wav', 'source'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=audio-source-mpeg', 'source'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=audio-source-ogg', 'source'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-source', 'source'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-img', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-notsupported-img', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-img-src', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-img-srcset', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=picture-99x-img-src', 'img'); + addEntryIfExists(entries, expected_entries, pathname + 'blue.png?id=svg-image', 'image'); + addEntryIfExists(entries, expected_entries, pathname + 'nested.css', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'nested.css?id=prefetch', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'nested.css?id=preload', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'blank_page_green.htm?id=prerender', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'manifest.json', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=beacon', 'beacon'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?id=fetch', 'fetch'); + addEntryIfExists(entries, expected_entries, pathname + 'empty.py?favicon', 'link'); + addEntryIfExists(entries, expected_entries, pathname + 'eventsource.py?id=eventsource', 'eventsource'); test_resource_entries(entries, expected_entries); done(); } +function addEntryIfExists(entries, expected_entries, path, initiatorType) { + const url = window.location.protocol + "//" + window.location.host + path; + + if (entries.find(function(entry) { return entry.name === url; })) { + expected_entries[path] = initiatorType; + } +} + window.on_test_body_created = check_finished; window.on_async_xhr_done = function() { xhr_loaded = true; @@ -110,5 +159,6 @@ window.on_async_xhr_done = function() { <p>This test validates that all of the initiator types are represented.</p> <div id="log"></div> <iframe id="frameContext" onload="onload_test();" src="resources/all_resource_types.htm" style="width: 250px; height: 250px;"></iframe> +<iframe id="frameContext2" onload="frameset_onload();" src="resources/green_frame.htm" style="width: 250px; height: 250px;"></iframe> </body> </html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html b/tests/wpt/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html new file mode 100644 index 00000000000..2a7b2f7ce64 --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html @@ -0,0 +1,46 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8" /> +<title>This test validates resource timing information for a cross-origin redirect chain.</title> +<link rel="author" title="Intel" href="http://www.intel.com/" /> +<link rel="help" href="http://www.w3.org/TR/resource-timing/#performanceresourcetiming"/> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/webperftestharness.js"></script> +<script src="resources/webperftestharnessextension.js"></script> + +<script> + setup({explicit_done: true}); + test_namespace('getEntriesByName'); + const pageOrigin = document.location.host; + const crossOrigin = 'www.' + pageOrigin; + + function onload_test() + { + const context = new PerformanceContext(performance); + const entries = context.getEntriesByName(document.getElementById('frameContext').src, 'resource'); + test_equals(entries.length, 1, 'There should be one entry.'); + const entry = entries[0]; + + test_equals(entry.redirectStart, 0, 'redirectStart == 0 in cross-origin redirect.'); + test_equals(entry.redirectEnd, 0, 'redirectEnd == 0 in cross-origin redirect.'); + test_greater_than(entry.fetchStart, 0, 'fetchStart > 0 in cross-origin redirect.'); + test_equals(entry.startTime, entry.fetchStart, 'startTime == fetchStart in cross-origin redirect.'); + done(); + } +</script> + +</head> +<body> +<iframe id="frameContext" src="" style="width: 250px; height: 250px;"></iframe> +<script> + let destUrl = 'http://' + crossOrigin + '/resource-timing/resources/multi_redirect.py?'; + destUrl += 'page_origin=' + 'http://' + pageOrigin; + destUrl += '&cross_origin=' + 'http://' + crossOrigin; + const frameContext = document.getElementById('frameContext'); + frameContext.onload = onload_test; + frameContext.src = destUrl; +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/all_resource_types.htm b/tests/wpt/web-platform-tests/resource-timing/resources/all_resource_types.htm index 41789d869cf..bc7101c2192 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/all_resource_types.htm +++ b/tests/wpt/web-platform-tests/resource-timing/resources/all_resource_types.htm @@ -3,6 +3,7 @@ <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>All Resource Types Test Page</title> + <link rel="shortcut icon" href="empty.py?favicon"> </head> <body background='blue.png?id=body'> <script> @@ -10,7 +11,14 @@ window.parent.on_test_body_created(); </script> <link rel="stylesheet" href="nested.css"></link> + <link rel="prefetch" href="nested.css?id=prefetch"></link> + <link rel="preload" href="nested.css?id=preload" as="style"></link> + <link rel="prerender" href="blank_page_green.htm?id=prerender"></link> + <link rel="manifest" href="manifest.json"></link> <img src="resource_timing_test0.png"></img> + <img src="resource_timing_test0.png?id=srcset-src" + srcset="resource_timing_test0.png?id=srcset-srcset 67w" + sizes="67px"></img> <iframe src="blank_page_green.htm" width="100px" height="100px"></iframe> <script src="empty_script.js"></script> <script> @@ -21,6 +29,18 @@ parent.on_async_xhr_done(); } async_xhr.send(); + + if (window.navigator && navigator.sendBeacon) { + navigator.sendBeacon('empty.py?id=beacon'); + } + + if (window.fetch) { + fetch('empty.py?id=fetch'); + } + + if (window.EventSource) { + var evtSource = new EventSource('eventsource.py?id=eventsource'); + } </script> <style> @font-face { @@ -30,6 +50,9 @@ iframe { background: url('blue.png?id=1'); } + body { + cursor: url('blue.png?id=cursor'), pointer; + } ul { font-family: remoteFontAhem; list-style-image: url('blue.png?id=2'); @@ -44,6 +67,41 @@ <embed src="resource_timing_test0.css?id=embed" type="text/css"></embed> <input type="image" src="blue.png?id=input"></input> <object type="image/png" data="blue.png?id=object"></object> - <video poster="blue.png?id=poster"></video> + <video poster="blue.png?id=video-poster"></video> + <video src="/media/test.mp4?id=video-src" autoplay="true"></video> + <video autoplay="true"> + <source src="/media/test.mp4?id=video-source" type="video/mp4"> + <source src="/media/test.ogv?id=video-source" type="video/ogg"> + <track kind="subtitles" src="empty.py?id=video-track" srclang="en" default> + </video> + <audio src="empty.py?id=audio-src"></audio> + <audio> + <source src="empty.py?id=audio-source-wav" type="audio/wav" /> + <source src="empty.py?id=audio-source-mpeg" type="audio/mpeg" /> + <source src="empty.py?id=audio-source-ogg" type="audio/ogg" /> + </audio> + <svg width=200 height=200 + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <image href="blue.png?id=svg-image" height="200" width="200"/> + </svg> + <picture> + <source srcset="blue.png?id=picture-source" type="image/png" /> + <img src="blue.png?id=picture-img" /> + </picture> + <picture> + <source srcset="blue.png?id=picture-notsupported-source" type="image/notsupported" /> + <img src="blue.png?id=picture-notsupported-img" /> + </picture> + <picture> + <img src="blue.png?id=picture-img-src" + srcset="blue.png?id=picture-img-srcset" + sizes="67px"></img> + </picture> + <picture> + <img src="blue.png?id=picture-99x-img-src" + srcset="blue.png?id=picture-99x-img-srcset 99x" + sizes="67px"></img> + </picture> </body> </html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/empty.py b/tests/wpt/web-platform-tests/resource-timing/resources/empty.py new file mode 100644 index 00000000000..e5ccfbe9739 --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/resources/empty.py @@ -0,0 +1,3 @@ +def main(request, response): + response.headers.set("Content-Type", "text/plain") + return "" diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/eventsource.py b/tests/wpt/web-platform-tests/resource-timing/resources/eventsource.py new file mode 100644 index 00000000000..5095ea9b34f --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/resources/eventsource.py @@ -0,0 +1,3 @@ +def main(request, response): + response.headers.set("Content-Type", "text/event-stream") + return "" diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/green_frame.htm b/tests/wpt/web-platform-tests/resource-timing/resources/green_frame.htm index c91f44abf32..f3f03245dcc 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/green_frame.htm +++ b/tests/wpt/web-platform-tests/resource-timing/resources/green_frame.htm @@ -1,7 +1,7 @@ <html> <head> <frameset> - <frame src="blank_page_green.htm"> + <frame src="blank_page_green.htm?id=frame"> </frameset> </head> </html> diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/multi_redirect.py b/tests/wpt/web-platform-tests/resource-timing/resources/multi_redirect.py new file mode 100644 index 00000000000..d1802a1e02d --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/resources/multi_redirect.py @@ -0,0 +1,40 @@ +def main(request, response): + """Handler that causes multiple redirections. + The request has two mandatory and one optional query parameters: + page_origin - The page origin, used for redirection and to set TAO. This is a mandatory parameter. + cross_origin - The cross origin used to make this a cross-origin redirect. This is a mandatory parameter. + timing_allow - Whether TAO should be set or not in the redirect chain. This is an optional parameter. Default: not set. + Note that |step| is a parameter used internally for the multi-redirect. It's the step we're at in the redirect chain. + """ + step = 1 + if "step" in request.GET: + try: + step = int(request.GET.first("step")) + except ValueError: + pass + + page_origin = request.GET.first("page_origin") + cross_origin = request.GET.first("cross_origin") + timing_allow = "0" + if "timing_allow" in request.GET: + timing_allow = request.GET.first("timing_allow") + + redirect_url = "/resource-timing/resources/multi_redirect.py?" + redirect_url += "page_origin=" + page_origin + redirect_url += "&cross_origin=" + cross_origin + redirect_url += "&timing_allow=" + timing_allow + redirect_url += "&step=" + + if step == 1: + redirect_url = cross_origin + redirect_url + "2" + if timing_allow != "0": + response.headers.set("timing-allow-origin", page_origin) + elif step == 2: + redirect_url = page_origin + redirect_url + "3" + if timing_allow != "0": + response.headers.set("timing-allow-origin", page_origin) + else: + redirect_url = page_origin + "/resource-timing/resources/blank_page_green.htm" + + response.status = 302 + response.headers.set("Location", redirect_url) diff --git a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js index e8e6ef71148..4daf3f058e2 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js @@ -190,6 +190,61 @@ encoder.skip(1); encoder.skip(1); }; + function ServiceDataMap(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + ServiceDataMap.prototype.initDefaults_ = function() { + this.serviceData = null; + }; + ServiceDataMap.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + ServiceDataMap.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 16} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + + // validate ServiceDataMap.serviceData + err = messageValidator.validateMapPointer(offset + codec.kStructHeaderSize + 0, false, codec.String, new codec.ArrayOf(codec.Uint8), false); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + ServiceDataMap.encodedSize = codec.kStructHeaderSize + 8; + + ServiceDataMap.decode = function(decoder) { + var packed; + var val = new ServiceDataMap(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + val.serviceData = decoder.decodeMapPointer(codec.String, new codec.ArrayOf(codec.Uint8)); + return val; + }; + + ServiceDataMap.encode = function(encoder, val) { + var packed; + encoder.writeUint32(ServiceDataMap.encodedSize); + encoder.writeUint32(0); + encoder.encodeMapPointer(codec.String, new codec.ArrayOf(codec.Uint8), val.serviceData); + }; function ScanRecord(values) { this.initDefaults_(); this.initFields_(values); @@ -202,6 +257,7 @@ this.appearance = null; this.txPower = null; this.manufacturerData = null; + this.serviceData = null; }; ScanRecord.prototype.initFields_ = function(fields) { for(var field in fields) { @@ -217,7 +273,7 @@ return err; var kVersionSizes = [ - {version: 0, numBytes: 48} + {version: 0, numBytes: 56} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) @@ -253,10 +309,16 @@ if (err !== validator.validationError.NONE) return err; + + // validate ScanRecord.serviceData + err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, ServiceDataMap, true); + if (err !== validator.validationError.NONE) + return err; + return validator.validationError.NONE; }; - ScanRecord.encodedSize = codec.kStructHeaderSize + 40; + ScanRecord.encodedSize = codec.kStructHeaderSize + 48; ScanRecord.decode = function(decoder) { var packed; @@ -268,6 +330,7 @@ val.appearance = decoder.decodeStructPointer(Appearance); val.txPower = decoder.decodeStructPointer(Power); val.manufacturerData = decoder.decodeMapPointer(codec.Uint8, new codec.ArrayOf(codec.Uint8)); + val.serviceData = decoder.decodeStructPointer(ServiceDataMap); return val; }; @@ -280,6 +343,7 @@ encoder.encodeStructPointer(Appearance, val.appearance); encoder.encodeStructPointer(Power, val.txPower); encoder.encodeMapPointer(codec.Uint8, new codec.ArrayOf(codec.Uint8), val.manufacturerData); + encoder.encodeStructPointer(ServiceDataMap, val.serviceData); }; function ScanResult(values) { this.initDefaults_(); @@ -4192,6 +4256,7 @@ exports.CentralState = CentralState; exports.Appearance = Appearance; exports.Power = Power; + exports.ServiceDataMap = ServiceDataMap; exports.ScanRecord = ScanRecord; exports.ScanResult = ScanResult; exports.CharacteristicProperties = CharacteristicProperties; diff --git a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js new file mode 100644 index 00000000000..535a90a4ab5 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js @@ -0,0 +1,822 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +'use strict'; + +(function() { + var mojomId = 'content/shell/common/layout_test/fake_bluetooth_chooser.mojom'; + if (mojo.internal.isMojomLoaded(mojomId)) { + console.warn('The following mojom is loaded multiple times: ' + mojomId); + return; + } + mojo.internal.markMojomLoaded(mojomId); + var bindings = mojo; + var associatedBindings = mojo; + var codec = mojo.internal; + var validator = mojo.internal; + + var exports = mojo.internal.exposeNamespace('content.mojom'); + + + var ChooserEventType = {}; + ChooserEventType.CHOOSER_OPENED = 0; + ChooserEventType.SCAN_STARTED = ChooserEventType.CHOOSER_OPENED + 1; + ChooserEventType.DEVICE_UPDATE = ChooserEventType.SCAN_STARTED + 1; + ChooserEventType.ADAPTER_REMOVED = ChooserEventType.DEVICE_UPDATE + 1; + ChooserEventType.ADAPTER_DISABLED = ChooserEventType.ADAPTER_REMOVED + 1; + ChooserEventType.ADAPTER_ENABLED = ChooserEventType.ADAPTER_DISABLED + 1; + ChooserEventType.DISCOVERY_FAILED_TO_START = ChooserEventType.ADAPTER_ENABLED + 1; + ChooserEventType.DISCOVERING = ChooserEventType.DISCOVERY_FAILED_TO_START + 1; + ChooserEventType.DISCOVERY_IDLE = ChooserEventType.DISCOVERING + 1; + ChooserEventType.ADD_DEVICE = ChooserEventType.DISCOVERY_IDLE + 1; + + ChooserEventType.isKnownEnumValue = function(value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + return true; + } + return false; + }; + + ChooserEventType.validate = function(enumValue) { + var isExtensible = false; + if (isExtensible || this.isKnownEnumValue(enumValue)) + return validator.validationError.NONE; + + return validator.validationError.UNKNOWN_ENUM_VALUE; + }; + + function FakeBluetoothChooserEvent(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooserEvent.prototype.initDefaults_ = function() { + this.type = 0; + this.origin = null; + this.peripheralAddress = null; + }; + FakeBluetoothChooserEvent.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooserEvent.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 32} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + + // validate FakeBluetoothChooserEvent.type + err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, ChooserEventType); + if (err !== validator.validationError.NONE) + return err; + + + // validate FakeBluetoothChooserEvent.origin + err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, true) + if (err !== validator.validationError.NONE) + return err; + + + // validate FakeBluetoothChooserEvent.peripheralAddress + err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooserEvent.encodedSize = codec.kStructHeaderSize + 24; + + FakeBluetoothChooserEvent.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooserEvent(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + val.type = decoder.decodeStruct(codec.Int32); + decoder.skip(1); + decoder.skip(1); + decoder.skip(1); + decoder.skip(1); + val.origin = decoder.decodeStruct(codec.NullableString); + val.peripheralAddress = decoder.decodeStruct(codec.NullableString); + return val; + }; + + FakeBluetoothChooserEvent.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooserEvent.encodedSize); + encoder.writeUint32(0); + encoder.encodeStruct(codec.Int32, val.type); + encoder.skip(1); + encoder.skip(1); + encoder.skip(1); + encoder.skip(1); + encoder.encodeStruct(codec.NullableString, val.origin); + encoder.encodeStruct(codec.NullableString, val.peripheralAddress); + }; + function FakeBluetoothChooser_WaitForEvents_Params(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_WaitForEvents_Params.prototype.initDefaults_ = function() { + this.numOfEvents = 0; + }; + FakeBluetoothChooser_WaitForEvents_Params.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_WaitForEvents_Params.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 16} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_WaitForEvents_Params.encodedSize = codec.kStructHeaderSize + 8; + + FakeBluetoothChooser_WaitForEvents_Params.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_WaitForEvents_Params(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + val.numOfEvents = decoder.decodeStruct(codec.Uint32); + decoder.skip(1); + decoder.skip(1); + decoder.skip(1); + decoder.skip(1); + return val; + }; + + FakeBluetoothChooser_WaitForEvents_Params.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_WaitForEvents_Params.encodedSize); + encoder.writeUint32(0); + encoder.encodeStruct(codec.Uint32, val.numOfEvents); + encoder.skip(1); + encoder.skip(1); + encoder.skip(1); + encoder.skip(1); + }; + function FakeBluetoothChooser_WaitForEvents_ResponseParams(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_WaitForEvents_ResponseParams.prototype.initDefaults_ = function() { + this.events = null; + }; + FakeBluetoothChooser_WaitForEvents_ResponseParams.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_WaitForEvents_ResponseParams.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 16} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + + // validate FakeBluetoothChooser_WaitForEvents_ResponseParams.events + err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(FakeBluetoothChooserEvent), false, [0], 0); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_WaitForEvents_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; + + FakeBluetoothChooser_WaitForEvents_ResponseParams.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_WaitForEvents_ResponseParams(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + val.events = decoder.decodeArrayPointer(new codec.PointerTo(FakeBluetoothChooserEvent)); + return val; + }; + + FakeBluetoothChooser_WaitForEvents_ResponseParams.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_WaitForEvents_ResponseParams.encodedSize); + encoder.writeUint32(0); + encoder.encodeArrayPointer(new codec.PointerTo(FakeBluetoothChooserEvent), val.events); + }; + function FakeBluetoothChooser_SelectPeripheral_Params(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_SelectPeripheral_Params.prototype.initDefaults_ = function() { + this.peripheralAddress = null; + }; + FakeBluetoothChooser_SelectPeripheral_Params.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_SelectPeripheral_Params.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 16} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + + // validate FakeBluetoothChooser_SelectPeripheral_Params.peripheralAddress + err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_SelectPeripheral_Params.encodedSize = codec.kStructHeaderSize + 8; + + FakeBluetoothChooser_SelectPeripheral_Params.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_SelectPeripheral_Params(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + val.peripheralAddress = decoder.decodeStruct(codec.String); + return val; + }; + + FakeBluetoothChooser_SelectPeripheral_Params.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_SelectPeripheral_Params.encodedSize); + encoder.writeUint32(0); + encoder.encodeStruct(codec.String, val.peripheralAddress); + }; + function FakeBluetoothChooser_SelectPeripheral_ResponseParams(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_SelectPeripheral_ResponseParams.prototype.initDefaults_ = function() { + }; + FakeBluetoothChooser_SelectPeripheral_ResponseParams.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_SelectPeripheral_ResponseParams.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 8} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_SelectPeripheral_ResponseParams.encodedSize = codec.kStructHeaderSize + 0; + + FakeBluetoothChooser_SelectPeripheral_ResponseParams.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_SelectPeripheral_ResponseParams(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + return val; + }; + + FakeBluetoothChooser_SelectPeripheral_ResponseParams.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_SelectPeripheral_ResponseParams.encodedSize); + encoder.writeUint32(0); + }; + function FakeBluetoothChooser_Cancel_Params(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_Cancel_Params.prototype.initDefaults_ = function() { + }; + FakeBluetoothChooser_Cancel_Params.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_Cancel_Params.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 8} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_Cancel_Params.encodedSize = codec.kStructHeaderSize + 0; + + FakeBluetoothChooser_Cancel_Params.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_Cancel_Params(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + return val; + }; + + FakeBluetoothChooser_Cancel_Params.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_Cancel_Params.encodedSize); + encoder.writeUint32(0); + }; + function FakeBluetoothChooser_Cancel_ResponseParams(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_Cancel_ResponseParams.prototype.initDefaults_ = function() { + }; + FakeBluetoothChooser_Cancel_ResponseParams.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_Cancel_ResponseParams.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 8} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_Cancel_ResponseParams.encodedSize = codec.kStructHeaderSize + 0; + + FakeBluetoothChooser_Cancel_ResponseParams.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_Cancel_ResponseParams(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + return val; + }; + + FakeBluetoothChooser_Cancel_ResponseParams.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_Cancel_ResponseParams.encodedSize); + encoder.writeUint32(0); + }; + function FakeBluetoothChooser_Rescan_Params(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_Rescan_Params.prototype.initDefaults_ = function() { + }; + FakeBluetoothChooser_Rescan_Params.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_Rescan_Params.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 8} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_Rescan_Params.encodedSize = codec.kStructHeaderSize + 0; + + FakeBluetoothChooser_Rescan_Params.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_Rescan_Params(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + return val; + }; + + FakeBluetoothChooser_Rescan_Params.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_Rescan_Params.encodedSize); + encoder.writeUint32(0); + }; + function FakeBluetoothChooser_Rescan_ResponseParams(values) { + this.initDefaults_(); + this.initFields_(values); + } + + + FakeBluetoothChooser_Rescan_ResponseParams.prototype.initDefaults_ = function() { + }; + FakeBluetoothChooser_Rescan_ResponseParams.prototype.initFields_ = function(fields) { + for(var field in fields) { + if (this.hasOwnProperty(field)) + this[field] = fields[field]; + } + }; + + FakeBluetoothChooser_Rescan_ResponseParams.validate = function(messageValidator, offset) { + var err; + err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); + if (err !== validator.validationError.NONE) + return err; + + var kVersionSizes = [ + {version: 0, numBytes: 8} + ]; + err = messageValidator.validateStructVersion(offset, kVersionSizes); + if (err !== validator.validationError.NONE) + return err; + + return validator.validationError.NONE; + }; + + FakeBluetoothChooser_Rescan_ResponseParams.encodedSize = codec.kStructHeaderSize + 0; + + FakeBluetoothChooser_Rescan_ResponseParams.decode = function(decoder) { + var packed; + var val = new FakeBluetoothChooser_Rescan_ResponseParams(); + var numberOfBytes = decoder.readUint32(); + var version = decoder.readUint32(); + return val; + }; + + FakeBluetoothChooser_Rescan_ResponseParams.encode = function(encoder, val) { + var packed; + encoder.writeUint32(FakeBluetoothChooser_Rescan_ResponseParams.encodedSize); + encoder.writeUint32(0); + }; + var kFakeBluetoothChooser_WaitForEvents_Name = 457051710; + var kFakeBluetoothChooser_SelectPeripheral_Name = 1924310743; + var kFakeBluetoothChooser_Cancel_Name = 1388880682; + var kFakeBluetoothChooser_Rescan_Name = 2112671529; + + function FakeBluetoothChooserPtr(handleOrPtrInfo) { + this.ptr = new bindings.InterfacePtrController(FakeBluetoothChooser, + handleOrPtrInfo); + } + + function FakeBluetoothChooserAssociatedPtr(associatedInterfacePtrInfo) { + this.ptr = new associatedBindings.AssociatedInterfacePtrController( + FakeBluetoothChooser, associatedInterfacePtrInfo); + } + + FakeBluetoothChooserAssociatedPtr.prototype = + Object.create(FakeBluetoothChooserPtr.prototype); + FakeBluetoothChooserAssociatedPtr.prototype.constructor = + FakeBluetoothChooserAssociatedPtr; + + function FakeBluetoothChooserProxy(receiver) { + this.receiver_ = receiver; + } + FakeBluetoothChooserPtr.prototype.waitForEvents = function() { + return FakeBluetoothChooserProxy.prototype.waitForEvents + .apply(this.ptr.getProxy(), arguments); + }; + + FakeBluetoothChooserProxy.prototype.waitForEvents = function(numOfEvents) { + var params = new FakeBluetoothChooser_WaitForEvents_Params(); + params.numOfEvents = numOfEvents; + return new Promise(function(resolve, reject) { + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_WaitForEvents_Name, + codec.align(FakeBluetoothChooser_WaitForEvents_Params.encodedSize), + codec.kMessageExpectsResponse, 0); + builder.encodeStruct(FakeBluetoothChooser_WaitForEvents_Params, params); + var message = builder.finish(); + this.receiver_.acceptAndExpectResponse(message).then(function(message) { + var reader = new codec.MessageReader(message); + var responseParams = + reader.decodeStruct(FakeBluetoothChooser_WaitForEvents_ResponseParams); + resolve(responseParams); + }).catch(function(result) { + reject(Error("Connection error: " + result)); + }); + }.bind(this)); + }; + FakeBluetoothChooserPtr.prototype.selectPeripheral = function() { + return FakeBluetoothChooserProxy.prototype.selectPeripheral + .apply(this.ptr.getProxy(), arguments); + }; + + FakeBluetoothChooserProxy.prototype.selectPeripheral = function(peripheralAddress) { + var params = new FakeBluetoothChooser_SelectPeripheral_Params(); + params.peripheralAddress = peripheralAddress; + return new Promise(function(resolve, reject) { + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_SelectPeripheral_Name, + codec.align(FakeBluetoothChooser_SelectPeripheral_Params.encodedSize), + codec.kMessageExpectsResponse, 0); + builder.encodeStruct(FakeBluetoothChooser_SelectPeripheral_Params, params); + var message = builder.finish(); + this.receiver_.acceptAndExpectResponse(message).then(function(message) { + var reader = new codec.MessageReader(message); + var responseParams = + reader.decodeStruct(FakeBluetoothChooser_SelectPeripheral_ResponseParams); + resolve(responseParams); + }).catch(function(result) { + reject(Error("Connection error: " + result)); + }); + }.bind(this)); + }; + FakeBluetoothChooserPtr.prototype.cancel = function() { + return FakeBluetoothChooserProxy.prototype.cancel + .apply(this.ptr.getProxy(), arguments); + }; + + FakeBluetoothChooserProxy.prototype.cancel = function() { + var params = new FakeBluetoothChooser_Cancel_Params(); + return new Promise(function(resolve, reject) { + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_Cancel_Name, + codec.align(FakeBluetoothChooser_Cancel_Params.encodedSize), + codec.kMessageExpectsResponse, 0); + builder.encodeStruct(FakeBluetoothChooser_Cancel_Params, params); + var message = builder.finish(); + this.receiver_.acceptAndExpectResponse(message).then(function(message) { + var reader = new codec.MessageReader(message); + var responseParams = + reader.decodeStruct(FakeBluetoothChooser_Cancel_ResponseParams); + resolve(responseParams); + }).catch(function(result) { + reject(Error("Connection error: " + result)); + }); + }.bind(this)); + }; + FakeBluetoothChooserPtr.prototype.rescan = function() { + return FakeBluetoothChooserProxy.prototype.rescan + .apply(this.ptr.getProxy(), arguments); + }; + + FakeBluetoothChooserProxy.prototype.rescan = function() { + var params = new FakeBluetoothChooser_Rescan_Params(); + return new Promise(function(resolve, reject) { + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_Rescan_Name, + codec.align(FakeBluetoothChooser_Rescan_Params.encodedSize), + codec.kMessageExpectsResponse, 0); + builder.encodeStruct(FakeBluetoothChooser_Rescan_Params, params); + var message = builder.finish(); + this.receiver_.acceptAndExpectResponse(message).then(function(message) { + var reader = new codec.MessageReader(message); + var responseParams = + reader.decodeStruct(FakeBluetoothChooser_Rescan_ResponseParams); + resolve(responseParams); + }).catch(function(result) { + reject(Error("Connection error: " + result)); + }); + }.bind(this)); + }; + + function FakeBluetoothChooserStub(delegate) { + this.delegate_ = delegate; + } + FakeBluetoothChooserStub.prototype.waitForEvents = function(numOfEvents) { + return this.delegate_ && this.delegate_.waitForEvents && this.delegate_.waitForEvents(numOfEvents); + } + FakeBluetoothChooserStub.prototype.selectPeripheral = function(peripheralAddress) { + return this.delegate_ && this.delegate_.selectPeripheral && this.delegate_.selectPeripheral(peripheralAddress); + } + FakeBluetoothChooserStub.prototype.cancel = function() { + return this.delegate_ && this.delegate_.cancel && this.delegate_.cancel(); + } + FakeBluetoothChooserStub.prototype.rescan = function() { + return this.delegate_ && this.delegate_.rescan && this.delegate_.rescan(); + } + + FakeBluetoothChooserStub.prototype.accept = function(message) { + var reader = new codec.MessageReader(message); + switch (reader.messageName) { + default: + return false; + } + }; + + FakeBluetoothChooserStub.prototype.acceptWithResponder = + function(message, responder) { + var reader = new codec.MessageReader(message); + switch (reader.messageName) { + case kFakeBluetoothChooser_WaitForEvents_Name: + var params = reader.decodeStruct(FakeBluetoothChooser_WaitForEvents_Params); + this.waitForEvents(params.numOfEvents).then(function(response) { + var responseParams = + new FakeBluetoothChooser_WaitForEvents_ResponseParams(); + responseParams.events = response.events; + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_WaitForEvents_Name, + codec.align(FakeBluetoothChooser_WaitForEvents_ResponseParams.encodedSize), + codec.kMessageIsResponse, reader.requestID); + builder.encodeStruct(FakeBluetoothChooser_WaitForEvents_ResponseParams, + responseParams); + var message = builder.finish(); + responder.accept(message); + }); + return true; + case kFakeBluetoothChooser_SelectPeripheral_Name: + var params = reader.decodeStruct(FakeBluetoothChooser_SelectPeripheral_Params); + this.selectPeripheral(params.peripheralAddress).then(function(response) { + var responseParams = + new FakeBluetoothChooser_SelectPeripheral_ResponseParams(); + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_SelectPeripheral_Name, + codec.align(FakeBluetoothChooser_SelectPeripheral_ResponseParams.encodedSize), + codec.kMessageIsResponse, reader.requestID); + builder.encodeStruct(FakeBluetoothChooser_SelectPeripheral_ResponseParams, + responseParams); + var message = builder.finish(); + responder.accept(message); + }); + return true; + case kFakeBluetoothChooser_Cancel_Name: + var params = reader.decodeStruct(FakeBluetoothChooser_Cancel_Params); + this.cancel().then(function(response) { + var responseParams = + new FakeBluetoothChooser_Cancel_ResponseParams(); + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_Cancel_Name, + codec.align(FakeBluetoothChooser_Cancel_ResponseParams.encodedSize), + codec.kMessageIsResponse, reader.requestID); + builder.encodeStruct(FakeBluetoothChooser_Cancel_ResponseParams, + responseParams); + var message = builder.finish(); + responder.accept(message); + }); + return true; + case kFakeBluetoothChooser_Rescan_Name: + var params = reader.decodeStruct(FakeBluetoothChooser_Rescan_Params); + this.rescan().then(function(response) { + var responseParams = + new FakeBluetoothChooser_Rescan_ResponseParams(); + var builder = new codec.MessageV1Builder( + kFakeBluetoothChooser_Rescan_Name, + codec.align(FakeBluetoothChooser_Rescan_ResponseParams.encodedSize), + codec.kMessageIsResponse, reader.requestID); + builder.encodeStruct(FakeBluetoothChooser_Rescan_ResponseParams, + responseParams); + var message = builder.finish(); + responder.accept(message); + }); + return true; + default: + return false; + } + }; + + function validateFakeBluetoothChooserRequest(messageValidator) { + var message = messageValidator.message; + var paramsClass = null; + switch (message.getName()) { + case kFakeBluetoothChooser_WaitForEvents_Name: + if (message.expectsResponse()) + paramsClass = FakeBluetoothChooser_WaitForEvents_Params; + break; + case kFakeBluetoothChooser_SelectPeripheral_Name: + if (message.expectsResponse()) + paramsClass = FakeBluetoothChooser_SelectPeripheral_Params; + break; + case kFakeBluetoothChooser_Cancel_Name: + if (message.expectsResponse()) + paramsClass = FakeBluetoothChooser_Cancel_Params; + break; + case kFakeBluetoothChooser_Rescan_Name: + if (message.expectsResponse()) + paramsClass = FakeBluetoothChooser_Rescan_Params; + break; + } + if (paramsClass === null) + return validator.validationError.NONE; + return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); + } + + function validateFakeBluetoothChooserResponse(messageValidator) { + var message = messageValidator.message; + var paramsClass = null; + switch (message.getName()) { + case kFakeBluetoothChooser_WaitForEvents_Name: + if (message.isResponse()) + paramsClass = FakeBluetoothChooser_WaitForEvents_ResponseParams; + break; + case kFakeBluetoothChooser_SelectPeripheral_Name: + if (message.isResponse()) + paramsClass = FakeBluetoothChooser_SelectPeripheral_ResponseParams; + break; + case kFakeBluetoothChooser_Cancel_Name: + if (message.isResponse()) + paramsClass = FakeBluetoothChooser_Cancel_ResponseParams; + break; + case kFakeBluetoothChooser_Rescan_Name: + if (message.isResponse()) + paramsClass = FakeBluetoothChooser_Rescan_ResponseParams; + break; + } + if (paramsClass === null) + return validator.validationError.NONE; + return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); + } + + var FakeBluetoothChooser = { + name: 'content::mojom::FakeBluetoothChooser', + kVersion: 0, + ptrClass: FakeBluetoothChooserPtr, + proxyClass: FakeBluetoothChooserProxy, + stubClass: FakeBluetoothChooserStub, + validateRequest: validateFakeBluetoothChooserRequest, + validateResponse: validateFakeBluetoothChooserResponse, + }; + FakeBluetoothChooserStub.prototype.validator = validateFakeBluetoothChooserRequest; + FakeBluetoothChooserProxy.prototype.validator = validateFakeBluetoothChooserResponse; + exports.ChooserEventType = ChooserEventType; + exports.FakeBluetoothChooserEvent = FakeBluetoothChooserEvent; + exports.FakeBluetoothChooser = FakeBluetoothChooser; + exports.FakeBluetoothChooserPtr = FakeBluetoothChooserPtr; + exports.FakeBluetoothChooserAssociatedPtr = FakeBluetoothChooserAssociatedPtr; +})();
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js.headers b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js.headers new file mode 100644 index 00000000000..6805c323df5 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth_chooser.mojom.js.headers @@ -0,0 +1 @@ +Content-Type: text/javascript; charset=utf-8 diff --git a/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js b/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js index 027ce442d54..c10685f376c 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js @@ -65,7 +65,7 @@ class FakeBluetooth { constructor() { this.fake_bluetooth_ptr_ = new bluetooth.mojom.FakeBluetoothPtr(); Mojo.bindInterface(bluetooth.mojom.FakeBluetooth.name, - mojo.makeRequest(this.fake_bluetooth_ptr_).handle, "process"); + mojo.makeRequest(this.fake_bluetooth_ptr_).handle, 'process'); } // Set it to indicate whether the platform supports BLE. For example, @@ -102,6 +102,15 @@ class FakeBluetooth { let {consumed} = await this.fake_bluetooth_ptr_.allResponsesConsumed(); return consumed; } + + // Returns a promise that resolves with a FakeChooser that clients can use to + // simulate chooser events. + async getManualChooser() { + if (typeof this.fake_chooser_ === 'undefined') { + this.fake_chooser_ = new FakeChooser(); + } + return this.fake_chooser_; + } } // FakeCentral allows clients to simulate events that a device in the @@ -164,8 +173,12 @@ class FakeCentral { scanResult.scanRecord.manufacturerData, Number); } - // TODO(https://crbug.com/817603): Add a conversion process for serviceData - // when the field is added in Mojo. + // Convert serviceData from a record<DOMString, BufferSource> into a + // map<string, array<uint8>> for Mojo. + if ('serviceData' in scanResult.scanRecord) { + scanResult.scanRecord.serviceData.serviceData = convertToMojoMap( + scanResult.scanRecord.serviceData, BluetoothUUID.getService); + } await this.fake_central_ptr_.simulateAdvertisementReceived( new bluetooth.mojom.ScanResult(scanResult)); @@ -433,6 +446,17 @@ class FakeRemoteGATTDescriptor { } } +// FakeChooser allows clients to simulate events that a user would trigger when +// using the Bluetooth chooser, and monitor the events that are produced. +class FakeChooser { + constructor() { + this.fake_bluetooth_chooser_ptr_ = + new content.mojom.FakeBluetoothChooserPtr(); + Mojo.bindInterface(content.mojom.FakeBluetoothChooser.name, + mojo.makeRequest(this.fake_bluetooth_chooser_ptr_).handle, 'process'); + } +} + // If this line fails, it means that current environment does not support the // Web Bluetooth Test API. try { diff --git a/tests/wpt/web-platform-tests/resources/test/tox.ini b/tests/wpt/web-platform-tests/resources/test/tox.ini index 4f45640479f..d3a30f870a1 100644 --- a/tests/wpt/web-platform-tests/resources/test/tox.ini +++ b/tests/wpt/web-platform-tests/resources/test/tox.ini @@ -1,4 +1,6 @@ [tox] +# wptserve etc. are Python2-only. +envlist = py27 skipsdist=True [testenv] @@ -9,5 +11,6 @@ deps = pytest>=2.9 pyvirtualdisplay selenium + requests commands = pytest {posargs} -vv tests diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js new file mode 100644 index 00000000000..ec4130fded2 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js @@ -0,0 +1,81 @@ +if (self.importScripts) { + importScripts('/resources/testharness.js'); + importScripts('../resources/test-helpers.js'); + importScripts('/common/utils.js'); +} + +// We perform the same tests on put, add, addAll. Parameterise the tests to +// reduce repetition. +const methodsToTest = { + put: async (cache, request) => { + const response = await fetch(request); + return cache.put(request, response); + }, + add: async (cache, request) => cache.add(request), + addAll: async (cache, request) => cache.addAll([request]), +}; + +for (const method in methodsToTest) { + const perform = methodsToTest[method]; + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + const request = new Request('../resources/simple.txt', { signal }); + return promise_rejects(test, 'AbortError', perform(cache, request), + `${method} should reject`); + }, `${method}() on an already-aborted request should reject with AbortError`); + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + const request = new Request('../resources/simple.txt', { signal }); + const promise = perform(cache, request); + controller.abort(); + return promise_rejects(test, 'AbortError', promise, + `${method} should reject`); + }, `${method}() synchronously followed by abort should reject with ` + + `AbortError`); + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + const stateKey = token(); + const abortKey = token(); + const request = new Request( + `../../../fetch/api/resources/infinite-slow-response.py?stateKey=${stateKey}&abortKey=${abortKey}`, + { signal }); + + const promise = perform(cache, request); + + // Wait for the server to start sending the response body. + let opened = false; + do { + // Normally only one fetch to 'stash-take' is needed, but the fetches + // will be served in reverse order sometimes + // (i.e., 'stash-take' gets served before 'infinite-slow-response'). + + const response = + await fetch(`../../../fetch/api/resources/stash-take.py?key=${stateKey}`); + const body = await response.json(); + if (body === 'open') opened = true; + } while (!opened); + + // Sadly the above loop cannot guarantee that the browser has started + // processing the response body. This delay is needed to make the test + // failures non-flaky in Chrome version 66. My deepest apologies. + await new Promise(resolve => setTimeout(resolve, 250)); + + controller.abort(); + + await promise_rejects(test, 'AbortError', promise, + `${method} should reject`); + + // infinite-slow-response.py doesn't know when to stop. + return fetch(`../../../fetch/api/resources/stash-put.py?key=${abortKey}`); + }, `${method}() followed by abort after headers received should reject ` + + `with AbortError`); +} + +done(); diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html new file mode 100644 index 00000000000..b4f203b3333 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<title>Cache Storage: Abort</title> +<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../service-worker/resources/test-helpers.sub.js"></script> +<script> +service_worker_test('../script-tests/cache-abort.js'); +</script> diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html new file mode 100644 index 00000000000..935023dbe6e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<title>Cache Storage: Abort</title> +<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/test-helpers.js"></script> +<script src="/common/utils.js"></script> +<script src="../script-tests/cache-abort.js"></script> diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html new file mode 100644 index 00000000000..ccd71910dc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<title>>Cache Storage: Abort</title> +<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +fetch_tests_from_worker(new Worker('../script-tests/cache-abort.js')); +</script> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html index 3c8533a8000..46d32a48a0a 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html @@ -94,9 +94,9 @@ function validate_window(win, url, opts) { resultList.sort(compare_urls); for (var i = 0; i < resultList.length; ++i) { - assert_equals(expected[i].url, resultList[i].url, + assert_equals(resultList[i].url, expected[i].url, 'client should have expected url'); - assert_equals(expected[i].frameType, resultList[i].frameType, + assert_equals(resultList[i].frameType, expected[i].frameType, 'client should have expected frame type'); } return win; diff --git a/tests/wpt/web-platform-tests/staticrange/OWNERS b/tests/wpt/web-platform-tests/staticrange/OWNERS deleted file mode 100644 index 5692d1b94a2..00000000000 --- a/tests/wpt/web-platform-tests/staticrange/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -@garykac -@siusin diff --git a/tests/wpt/web-platform-tests/staticrange/idlharness.html b/tests/wpt/web-platform-tests/staticrange/idlharness.html deleted file mode 100644 index e35bca1e7e4..00000000000 --- a/tests/wpt/web-platform-tests/staticrange/idlharness.html +++ /dev/null @@ -1,31 +0,0 @@ -<title>Static Range IDL tests</title> -<link rel="help" href="http://garykac.github.io/staticrange/index.html#interface-staticrange"/> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> - -<pre id="untested_idl"> -interface Node { -}; -</pre> - -<pre id='idl'> -interface StaticRange { - readonly attribute Node startContainer; - readonly attribute unsigned long startOffset; - readonly attribute Node endContainer; - readonly attribute unsigned long endOffset; - readonly attribute boolean collapsed; -}; -</pre> - -<script> -(function(){ - "use strict"; - const idl_array = new IdlArray(); - idl_array.add_untested_idls(document.getElementById("untested_idl").textContent); - idl_array.add_idls(document.getElementById("idl").textContent); - idl_array.test(); -})(); -</script> diff --git a/tests/wpt/web-platform-tests/streams/piping/error-propagation-backward.js b/tests/wpt/web-platform-tests/streams/piping/error-propagation-backward.js index 5dd9feaaea8..dda5774e1c9 100644 --- a/tests/wpt/web-platform-tests/streams/piping/error-propagation-backward.js +++ b/tests/wpt/web-platform-tests/streams/piping/error-propagation-backward.js @@ -548,7 +548,7 @@ promise_test(() => { return rs.pipeTo(ws).then( () => assert_unreached('the promise must not fulfill'), err => { - assert_equals(err.name, 'TypeError', 'the promise must reject with a TypeError (_not_ with error1)'); + assert_equals(err, error1, 'the promise must reject with error1'); assert_array_equals(rs.eventsWithoutPulls, ['cancel', err]); assert_array_equals(ws.events, ['abort', error1]); @@ -575,7 +575,7 @@ promise_test(t => { return ws.getWriter().closed.then( () => assert_unreached('the promise must not fulfill'), err => { - assert_equals(err.name, 'TypeError', 'the promise must reject with a TypeError (_not_ with error1)'); + assert_equals(err, error1, 'the promise must reject with error1'); assert_array_equals(rs.eventsWithoutPulls, ['cancel', err]); assert_array_equals(ws.events, ['abort', error1]); @@ -594,7 +594,7 @@ promise_test(t => { ws.abort(error1); - return promise_rejects(t, new TypeError(), rs.pipeTo(ws, { preventCancel: true })).then(() => { + return promise_rejects(t, error1, rs.pipeTo(ws, { preventCancel: true })).then(() => { assert_array_equals(rs.eventsWithoutPulls, []); assert_array_equals(ws.events, ['abort', error1]); }); diff --git a/tests/wpt/web-platform-tests/streams/piping/multiple-propagation.js b/tests/wpt/web-platform-tests/streams/piping/multiple-propagation.js index 447433f5980..4edc7c180e1 100644 --- a/tests/wpt/web-platform-tests/streams/piping/multiple-propagation.js +++ b/tests/wpt/web-platform-tests/streams/piping/multiple-propagation.js @@ -80,10 +80,10 @@ promise_test(t => { return Promise.all([ promise_rejects(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'), - promise_rejects(t, new TypeError(), ws.getWriter().closed, - 'closed must reject with a TypeError indicating the writable stream was aborted'), - promise_rejects(t, new TypeError(), closePromise, - 'close() must reject with a TypeError indicating the writable stream was aborted'), + promise_rejects(t, error1, ws.getWriter().closed, + 'closed must reject with error1'), + promise_rejects(t, error1, closePromise, + 'close() must reject with error1') ]); }); diff --git a/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js b/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js index 4207277d1a5..39dd7080bc7 100644 --- a/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js +++ b/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js @@ -300,22 +300,28 @@ function extractViewInfo(view) { promise_test(() => { let pullCount = 0; let controller; - let byobRequest; - let viewDefined = false; - let viewInfo; + const byobRequests = []; const stream = new ReadableStream({ start(c) { controller = c; }, pull() { - byobRequest = controller.byobRequest; + const byobRequest = controller.byobRequest; const view = byobRequest.view; - viewDefined = view !== undefined; - viewInfo = extractViewInfo(view); - - view[0] = 0x01; - byobRequest.respond(1); + byobRequests[pullCount] = { + defined: byobRequest !== undefined, + viewDefined: view !== undefined, + viewInfo: extractViewInfo(view) + }; + if (pullCount === 0) { + view[0] = 0x01; + byobRequest.respond(1); + } else if (pullCount === 1) { + view[0] = 0x02; + view[1] = 0x03; + byobRequest.respond(2); + } ++pullCount; }, @@ -326,28 +332,52 @@ promise_test(() => { }); const reader = stream.getReader(); - const readPromise = reader.read(); - const ignoredReadPromise = reader.read(); + const p0 = reader.read(); + const p1 = reader.read(); assert_equals(pullCount, 0, 'No pull() as start() just finished and is not yet reflected to the state of the stream'); return Promise.resolve().then(() => { assert_equals(pullCount, 1, 'pull() must have been invoked once'); - assert_not_equals(byobRequest, undefined, 'byobRequest must not be undefined'); - assert_true(viewDefined, 'byobRequest.view must not be undefined'); - assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array'); - assert_equals(viewInfo.bufferByteLength, 16, 'view.buffer.byteLength should be 16'); - assert_equals(viewInfo.byteOffset, 0, 'view.byteOffset should be 0'); - assert_equals(viewInfo.byteLength, 16, 'view.byteLength should be 16'); - return readPromise; + const byobRequest = byobRequests[0]; + assert_true(byobRequest.defined, 'first byobRequest must not be undefined'); + assert_true(byobRequest.viewDefined, 'first byobRequest.view must not be undefined'); + const viewInfo = byobRequest.viewInfo; + assert_equals(viewInfo.constructor, Uint8Array, 'first view.constructor should be Uint8Array'); + assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16'); + assert_equals(viewInfo.byteOffset, 0, 'first view.byteOffset should be 0'); + assert_equals(viewInfo.byteLength, 16, 'first view.byteLength should be 16'); + + return p0; + }).then(result => { + assert_equals(pullCount, 2, 'pull() must have been invoked twice'); + const value = result.value; + assert_not_equals(value, undefined, 'first read should have a value'); + assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0'); + assert_equals(value.byteLength, 1, 'first value.byteLength should be 1'); + assert_equals(value[0], 0x01, 'first value[0] should be 0x01'); + const byobRequest = byobRequests[1]; + assert_true(byobRequest.defined, 'second byobRequest must not be undefined'); + assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined'); + const viewInfo = byobRequest.viewInfo; + assert_equals(viewInfo.constructor, Uint8Array, 'second view.constructor should be Uint8Array'); + assert_equals(viewInfo.bufferByteLength, 16, 'second view.buffer.byteLength should be 16'); + assert_equals(viewInfo.byteOffset, 0, 'second view.byteOffset should be 0'); + assert_equals(viewInfo.byteLength, 16, 'second view.byteLength should be 16'); + + return p1; }).then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 16); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 1); - assert_equals(result.value[0], 0x01); - assert_equals(pullCount, 1, 'pull() should only be invoked once'); + assert_equals(pullCount, 2, 'pull() should only be invoked twice'); + const value = result.value; + assert_not_equals(value, undefined, 'second read should have a value'); + assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'second value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0'); + assert_equals(value.byteLength, 2, 'second value.byteLength should be 2'); + assert_equals(value[0], 0x02, 'second value[0] should be 0x02'); + assert_equals(value[1], 0x03, 'second value[1] should be 0x03'); }); }, 'ReadableStream with byte source: autoAllocateChunkSize'); @@ -387,12 +417,13 @@ promise_test(() => { const reader = stream.getReader(); return reader.read().then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 16); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 1); - assert_equals(result.value[0], 0x01); + const value = result.value; + assert_not_equals(value, undefined, 'first read should have a value'); + assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0'); + assert_equals(value.byteLength, 1, 'first value.byteLength should be 1'); + assert_equals(value[0], 0x01, 'first value[0] should be 0x01'); const byobRequest = byobRequests[0]; assert_true(byobRequest.defined, 'first byobRequest must not be undefined'); assert_true(byobRequest.viewDefined, 'first byobRequest.view must not be undefined'); @@ -406,13 +437,14 @@ promise_test(() => { const byobReader = stream.getReader({ mode: 'byob' }); return byobReader.read(new Uint8Array(32)); }).then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 32); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 2); - assert_equals(result.value[0], 0x02); - assert_equals(result.value[1], 0x03); + const value = result.value; + assert_not_equals(value, undefined, 'second read should have a value'); + assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 32, 'second value.buffer.byteLength should be 32'); + assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0'); + assert_equals(value.byteLength, 2, 'second value.byteLength should be 2'); + assert_equals(value[0], 0x02, 'second value[0] should be 0x02'); + assert_equals(value[1], 0x03, 'second value[1] should be 0x03'); const byobRequest = byobRequests[1]; assert_true(byobRequest.defined, 'second byobRequest must not be undefined'); assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined'); @@ -693,7 +725,7 @@ promise_test(() => { }, type: 'bytes' }, { - highWaterMark: 256 + highWaterMark: 0 }); const reader = stream.getReader(); @@ -717,12 +749,61 @@ promise_test(() => { assert_equals(result[2].done, false, 'result[2].done'); assert_equals(result[2].value.byteLength, 1, 'result[2].value.byteLength'); assert_equals(byobRequest, undefined, 'byobRequest should be undefined'); + assert_equals(desiredSizes[0], 0, 'desiredSize on pull should be 0'); + assert_equals(desiredSizes[1], 0, 'desiredSize after 1st enqueue() should be 0'); + assert_equals(desiredSizes[2], 0, 'desiredSize after 2nd enqueue() should be 0'); + assert_equals(pullCount, 1, 'pull() should only be called once'); + }); +}, 'ReadableStream with byte source: Respond to pull() by enqueue() asynchronously'); + +promise_test(() => { + let pullCount = 0; + + let byobRequest; + const desiredSizes = []; + + const stream = new ReadableStream({ + pull(c) { + byobRequest = c.byobRequest; + desiredSizes.push(c.desiredSize); + + if (pullCount < 3) { + c.enqueue(new Uint8Array(1)); + } else { + c.close(); + } + + ++pullCount; + }, + type: 'bytes' + }, { + highWaterMark: 256 + }); + + const reader = stream.getReader(); + + const p0 = reader.read(); + const p1 = reader.read(); + const p2 = reader.read(); + + assert_equals(pullCount, 0, 'No pull as start() just finished and is not yet reflected to the state of the stream'); + + return Promise.all([p0, p1, p2]).then(result => { + assert_equals(pullCount, 4, 'pullCount after completion of all read()s'); + + assert_equals(result[0].done, false, 'result[0].done'); + assert_equals(result[0].value.byteLength, 1, 'result[0].value.byteLength'); + assert_equals(result[1].done, false, 'result[1].done'); + assert_equals(result[1].value.byteLength, 1, 'result[1].value.byteLength'); + assert_equals(result[2].done, false, 'result[2].done'); + assert_equals(result[2].value.byteLength, 1, 'result[2].value.byteLength'); + assert_equals(byobRequest, undefined, 'byobRequest should be undefined'); assert_equals(desiredSizes[0], 256, 'desiredSize on pull should be 256'); assert_equals(desiredSizes[1], 256, 'desiredSize after 1st enqueue() should be 256'); assert_equals(desiredSizes[2], 256, 'desiredSize after 2nd enqueue() should be 256'); - assert_equals(pullCount, 1, 'pull() should only be called once'); + assert_equals(desiredSizes[3], 256, 'desiredSize after 3rd enqueue() should be 256'); }); -}, 'ReadableStream with byte source: Respond to pull() by enqueue() asynchronously'); +}, 'ReadableStream with byte source: Respond to multiple pull() by separate enqueue()'); promise_test(() => { let controller; diff --git a/tests/wpt/web-platform-tests/streams/transform-streams/errors.js b/tests/wpt/web-platform-tests/streams/transform-streams/errors.js index 83f4984c5bb..fdb21545546 100644 --- a/tests/wpt/web-platform-tests/streams/transform-streams/errors.js +++ b/tests/wpt/web-platform-tests/streams/transform-streams/errors.js @@ -205,7 +205,7 @@ promise_test(t => { return Promise.all([ abortPromise, cancelPromise, - promise_rejects(t, new TypeError(), writer.closed, 'writer.closed should reject with a TypeError')]); + promise_rejects(t, thrownError, writer.closed, 'writer.closed should reject with thrownError')]); }, 'abort should set the close reason for the writable when it happens before cancel during start, but cancel should ' + 'still succeed'); @@ -229,7 +229,7 @@ promise_test(t => { writePromise, abortPromise, cancelPromise, - promise_rejects(t, new TypeError(), writer.closed, 'writer.closed should reject with a TypeError')]); + promise_rejects(t, thrownError, writer.closed, 'writer.closed should reject with thrownError')]); }); }, 'abort should set the close reason for the writable when it happens before cancel during underlying sink write, ' + 'but cancel should still succeed'); @@ -269,9 +269,9 @@ promise_test(t => { controller = c; } }); - return ts.writable.abort().then(() => { + return ts.writable.abort(thrownError).then(() => { controller.error(ignoredError); - return promise_rejects(t, new TypeError(), ts.writable.getWriter().closed, 'closed should reject with a TypeError'); + return promise_rejects(t, thrownError, ts.writable.getWriter().closed, 'closed should reject with thrownError'); }); }, 'controller.error() should do nothing after writable.abort() has completed'); @@ -325,15 +325,22 @@ promise_test(t => { // write should start synchronously const writePromise = writer.write(0); // The underlying sink's abort() is not called until the write() completes. - const abortPromise = writer.abort(); + const abortPromise = writer.abort(thrownError); // Perform a read to relieve backpressure and permit the write() to complete. const readPromise = ts.readable.getReader().read(); return Promise.all([ - promise_rejects(t, new TypeError(), readPromise, 'read() should reject'), - promise_rejects(t, new TypeError(), writePromise, 'write() should reject'), + promise_rejects(t, thrownError, readPromise, 'read() should reject'), + promise_rejects(t, thrownError, writePromise, 'write() should reject'), abortPromise ]); }); }, 'a write() that was waiting for backpressure should reject if the writable is aborted'); +promise_test(t => { + const ts = new TransformStream(); + ts.writable.abort(thrownError); + const reader = ts.readable.getReader(); + return promise_rejects(t, thrownError, reader.read(), 'read() should reject with thrownError'); +}, 'the readable should be errored with the reason passed to the writable abort() method'); + done(); diff --git a/tests/wpt/web-platform-tests/streams/transform-streams/reentrant-strategies.js b/tests/wpt/web-platform-tests/streams/transform-streams/reentrant-strategies.js index 436552b9475..50285bbbcd9 100644 --- a/tests/wpt/web-platform-tests/streams/transform-streams/reentrant-strategies.js +++ b/tests/wpt/web-platform-tests/streams/transform-streams/reentrant-strategies.js @@ -317,7 +317,7 @@ promise_test(t => { // call to TransformStreamDefaultSink. return delay(0).then(() => { controller.enqueue('a'); - return Promise.all([promise_rejects(t, new TypeError(), reader.read(), 'read() should reject'), abortPromise]); + return Promise.all([promise_rejects(t, error1, reader.read(), 'read() should reject'), abortPromise]); }); }, 'writer.abort() inside size() should work'); diff --git a/tests/wpt/web-platform-tests/streams/writable-streams/aborting.js b/tests/wpt/web-platform-tests/streams/writable-streams/aborting.js index a193c3b2bb9..9fb175f2b53 100644 --- a/tests/wpt/web-platform-tests/streams/writable-streams/aborting.js +++ b/tests/wpt/web-platform-tests/streams/writable-streams/aborting.js @@ -27,8 +27,8 @@ promise_test(t => { assert_equals(writer.ready, readyPromise, 'the ready promise property should not change'); return Promise.all([ - promise_rejects(t, new TypeError(), readyPromise, 'the ready promise should reject with a TypeError'), - promise_rejects(t, new TypeError(), writePromise, 'the write() promise should reject with a TypeError') + promise_rejects(t, error1, readyPromise, 'the ready promise should reject with error1'), + promise_rejects(t, error1, writePromise, 'the write() promise should reject with error1') ]); }, 'Aborting a WritableStream before it starts should cause the writer\'s unsettled ready promise to reject'); @@ -44,7 +44,7 @@ promise_test(t => { writer.abort(error1); assert_not_equals(writer.ready, readyPromise, 'the ready promise property should change'); - return promise_rejects(t, new TypeError(), writer.ready, 'the ready promise should reject with a TypeError'); + return promise_rejects(t, error1, writer.ready, 'the ready promise should reject with error1'); }); }, 'Aborting a WritableStream should cause the writer\'s fulfilled ready promise to reset to a rejected one'); @@ -64,16 +64,16 @@ promise_test(t => { .then(() => { const writer = ws.getWriter(); - const abortPromise = writer.abort(); + const abortPromise = writer.abort(error1); return Promise.all([ - promise_rejects(t, new TypeError(), writer.write(1), 'write(1) must reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.write(2), 'write(2) must reject with a TypeError'), + promise_rejects(t, error1, writer.write(1), 'write(1) must reject with error1'), + promise_rejects(t, error1, writer.write(2), 'write(2) must reject with error1'), abortPromise ]); }) .then(() => { - assert_array_equals(ws.events, ['abort', undefined]); + assert_array_equals(ws.events, ['abort', error1]); }); }, 'Aborting a WritableStream immediately prevents future writes'); @@ -87,20 +87,20 @@ promise_test(t => { results.push( writer.write(1), - promise_rejects(t, new TypeError(), writer.write(2), 'write(2) must reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.write(3), 'write(3) must reject with a TypeError') + promise_rejects(t, error1, writer.write(2), 'write(2) must reject with error1'), + promise_rejects(t, error1, writer.write(3), 'write(3) must reject with error1') ); - const abortPromise = writer.abort(); + const abortPromise = writer.abort(error1); results.push( - promise_rejects(t, new TypeError(), writer.write(4), 'write(4) must reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.write(5), 'write(5) must reject with a TypeError') + promise_rejects(t, error1, writer.write(4), 'write(4) must reject with error1'), + promise_rejects(t, error1, writer.write(5), 'write(5) must reject with error1') ); return abortPromise; }).then(() => { - assert_array_equals(ws.events, ['write', 1, 'abort', undefined]); + assert_array_equals(ws.events, ['write', 1, 'abort', error1]); return Promise.all(results); }); @@ -209,26 +209,26 @@ promise_test(t => { return Promise.all([ abortPromise, - promise_rejects(t, new TypeError(), writer.write(), 'writing should reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.close(), 'closing should reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.ready, 'ready should reject with a TypeError'), - promise_rejects(t, new TypeError(), writer.closed, 'closed should reject with a TypeError') + promise_rejects(t, error1, writer.write(), 'writing should reject with error1'), + promise_rejects(t, error1, writer.close(), 'closing should reject with error1'), + promise_rejects(t, error1, writer.ready, 'ready should reject with error1'), + promise_rejects(t, error1, writer.closed, 'closed should reject with error1') ]).then(() => { assert_array_equals(['ready', 'closed'], events, 'ready should reject before closed'); }); -}, 'Aborting a WritableStream puts it in an errored state, with a TypeError as the stored error'); +}, 'Aborting a WritableStream puts it in an errored state with the error passed to abort()'); promise_test(t => { const ws = new WritableStream(); const writer = ws.getWriter(); - const writePromise = promise_rejects(t, new TypeError(), writer.write('a'), - 'writing should reject with a TypeError'); + const writePromise = promise_rejects(t, error1, writer.write('a'), + 'writing should reject with error1'); writer.abort(error1); return writePromise; -}, 'Aborting a WritableStream causes any outstanding write() promises to be rejected with a TypeError'); +}, 'Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied'); promise_test(t => { const ws = recordingWritableStream(); @@ -238,8 +238,8 @@ promise_test(t => { const abortPromise = writer.abort(error1); return Promise.all([ - promise_rejects(t, new TypeError(), writer.closed, 'closed should reject with a TypeError'), - promise_rejects(t, new TypeError(), closePromise, 'close() should reject with a TypeError'), + promise_rejects(t, error1, writer.closed, 'closed should reject with error1'), + promise_rejects(t, error1, closePromise, 'close() should reject with error1'), abortPromise ]).then(() => { assert_array_equals(ws.events, ['abort', error1]); @@ -293,9 +293,9 @@ promise_test(t => { const writer = ws.getWriter(); - writer.abort(); + writer.abort(error1); - return promise_rejects(t, new TypeError(), writer.closed, 'closed should reject with a TypeError').then(() => { + return promise_rejects(t, error1, writer.closed, 'closed should reject with error1').then(() => { assert_false(closeCalled, 'close must not have been called'); }); }, 'WritableStream should NOT call underlying sink\'s close if no abort is supplied (historical)'); @@ -329,7 +329,7 @@ promise_test(t => { let closedRejected = false; return Promise.all([ writePromise.then(() => assert_false(closedRejected, '.closed should not resolve before write()')), - promise_rejects(t, new TypeError(), writer.closed, '.closed should reject').then(() => { + promise_rejects(t, error1, writer.closed, '.closed should reject').then(() => { closedRejected = true; }) ]); @@ -350,7 +350,7 @@ promise_test(t => { return Promise.all([ promise_rejects(t, error1, writePromise, 'write() should reject') .then(() => assert_false(closedRejected, '.closed should not resolve before write()')), - promise_rejects(t, new TypeError(), writer.closed, '.closed should reject') + promise_rejects(t, error2, writer.closed, '.closed should reject') .then(() => { closedRejected = true; }), @@ -370,9 +370,9 @@ promise_test(t => { const settlementOrder = []; return Promise.all([ writer.write('1').then(() => settlementOrder.push(1)), - promise_rejects(t, new TypeError(), writer.write('2'), 'first queued write should be rejected') + promise_rejects(t, error1, writer.write('2'), 'first queued write should be rejected') .then(() => settlementOrder.push(2)), - promise_rejects(t, new TypeError(), writer.write('3'), 'second queued write should be rejected') + promise_rejects(t, error1, writer.write('3'), 'second queued write should be rejected') .then(() => settlementOrder.push(3)), writer.abort(error1) ]).then(() => assert_array_equals([1, 2, 3], settlementOrder, 'writes should be satisfied in order')); @@ -391,9 +391,9 @@ promise_test(t => { return Promise.all([ promise_rejects(t, error1, writer.write('1'), 'in-flight write should be rejected') .then(() => settlementOrder.push(1)), - promise_rejects(t, new TypeError(), writer.write('2'), 'first queued write should be rejected') + promise_rejects(t, error2, writer.write('2'), 'first queued write should be rejected') .then(() => settlementOrder.push(2)), - promise_rejects(t, new TypeError(), writer.write('3'), 'second queued write should be rejected') + promise_rejects(t, error2, writer.write('3'), 'second queued write should be rejected') .then(() => settlementOrder.push(3)), writer.abort(error2) ]).then(() => assert_array_equals([1, 2, 3], settlementOrder, 'writes should be satisfied in order')); @@ -410,12 +410,12 @@ promise_test(t => { return writer.ready.then(() => { return Promise.all([ promise_rejects(t, error1, writer.write('a'), 'writer.write() should reject with error from underlying write()'), - promise_rejects(t, new TypeError(), writer.close(), + promise_rejects(t, error2, writer.close(), 'writer.close() should reject with error from underlying write()'), - writer.abort() + writer.abort(error2) ]); }); -}, 'close() should reject with TypeError when abort() is first error'); +}, 'close() should reject with abort reason why abort() is first error'); promise_test(() => { let resolveWrite; @@ -510,14 +510,14 @@ promise_test(t => { return writer.ready.then(() => { writer.write('a'); const closePromise = writer.close(); - const abortPromise = writer.abort('b'); + const abortPromise = writer.abort(error1); return flushAsyncEvents().then(() => { assert_array_equals(ws.events, ['write', 'a'], 'abort should not be called while write is in-flight'); resolveWrite(); return abortPromise.then(() => { - assert_array_equals(ws.events, ['write', 'a', 'abort', 'b'], 'abort should be called after write completes'); - return promise_rejects(t, new TypeError(), closePromise, 'promise returned by close() should be rejected'); + assert_array_equals(ws.events, ['write', 'a', 'abort', error1], 'abort should be called after write completes'); + return promise_rejects(t, error1, closePromise, 'promise returned by close() should be rejected'); }); }); }); @@ -533,13 +533,13 @@ promise_test(t => { const writer = ws.getWriter(); return writer.ready.then(() => { writer.write('a'); - writer.abort(); + writer.abort(error1); writer.releaseLock(); const writer2 = ws.getWriter(); - return promise_rejects(t, new TypeError(), writer2.ready, - 'ready of the second writer should be rejected with a TypeError'); + return promise_rejects(t, error1, writer2.ready, + 'ready of the second writer should be rejected with error1'); }); -}, 'if a writer is created for a stream with a pending abort, its ready should be rejected with a TypeError'); +}, 'if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error'); promise_test(() => { const ws = new WritableStream(); @@ -607,8 +607,8 @@ promise_test(t => { const writePromise2 = writer.write('a'); return Promise.all([ - promise_rejects(t, new TypeError(), writePromise2, 'writePromise2 must reject with an error indicating abort'), - promise_rejects(t, new TypeError(), writer.ready, 'writer.ready must reject with an error indicating abort'), + promise_rejects(t, error1, writePromise2, 'writePromise2 must reject with the error from abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must reject with the error from abort'), flushAsyncEvents() ]); }).then(() => { @@ -620,8 +620,8 @@ promise_test(t => { promise_rejects(t, error2, writePromise, 'writePromise must reject with the error returned from the sink\'s write method'), abortPromise, - promise_rejects(t, new TypeError(), writer.closed, - 'writer.closed must reject with an error indicating abort'), + promise_rejects(t, error1, writer.closed, + 'writer.closed must reject with the error from abort'), flushAsyncEvents() ]); }).then(() => { @@ -631,9 +631,9 @@ promise_test(t => { const writePromise3 = writer.write('a'); return Promise.all([ - promise_rejects(t, new TypeError(), writePromise3, - 'writePromise3 must reject with an error indicating abort'), - promise_rejects(t, new TypeError(), writer.ready, + promise_rejects(t, error1, writePromise3, + 'writePromise3 must reject with the error from abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must be still rejected with the error indicating abort') ]); }).then(() => { @@ -686,8 +686,8 @@ promise_test(t => { const writePromise2 = writer.write('a'); return Promise.all([ - promise_rejects(t, new TypeError(), writePromise2, 'writePromise2 must reject with an error indicating abort'), - promise_rejects(t, new TypeError(), writer.ready, 'writer.ready must reject with an error indicating abort'), + promise_rejects(t, error1, writePromise2, 'writePromise2 must reject with the error from abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must reject with the error from abort'), flushAsyncEvents() ]); }).then(() => { @@ -699,9 +699,9 @@ promise_test(t => { const writePromise3 = writer.write('a'); return Promise.all([ - promise_rejects(t, new TypeError(), writePromise3, - 'writePromise3 must reject with an error indicating abort'), - promise_rejects(t, new TypeError(), writer.ready, + promise_rejects(t, error1, writePromise3, + 'writePromise3 must reject with the error from abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must be still rejected with the error indicating abort'), flushAsyncEvents() ]); @@ -716,8 +716,8 @@ promise_test(t => { return Promise.all([ writePromise, abortPromise, - promise_rejects(t, new TypeError(), writer.closed, - 'writer.closed must reject with an error indicating abort'), + promise_rejects(t, error1, writer.closed, + 'writer.closed must reject with the error from abort'), flushAsyncEvents() ]); }).then(() => { @@ -728,9 +728,9 @@ promise_test(t => { return Promise.all([ writePromise, - promise_rejects(t, new TypeError(), writePromise4, - 'writePromise4 must reject with an error indicating abort'), - promise_rejects(t, new TypeError(), writer.ready, + promise_rejects(t, error1, writePromise4, + 'writePromise4 must reject with the error from abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must be still rejected with the error indicating abort') ]); }).then(() => { @@ -785,7 +785,7 @@ promise_test(t => { return Promise.all([ promise_rejects(t, new TypeError(), writer.close(), 'writer.close() must reject with an error indicating already closing'), - promise_rejects(t, new TypeError(), writer.ready, 'writer.ready must reject with an error indicating abort'), + promise_rejects(t, error1, writer.ready, 'writer.ready must reject with the error from abort'), flushAsyncEvents() ]); }).then(() => { @@ -796,7 +796,7 @@ promise_test(t => { return Promise.all([ promise_rejects(t, new TypeError(), writer.close(), 'writer.close() must reject with an error indicating already closing'), - promise_rejects(t, new TypeError(), writer.ready, + promise_rejects(t, error1, writer.ready, 'writer.ready must be still rejected with the error indicating abort'), flushAsyncEvents() ]); @@ -821,7 +821,7 @@ promise_test(t => { return Promise.all([ promise_rejects(t, new TypeError(), writer.close(), 'writer.close() must reject with an error indicating already closing'), - promise_rejects(t, new TypeError(), writer.ready, + promise_rejects(t, error1, writer.ready, 'writer.ready must be still rejected with the error indicating abort') ]); }).then(() => { @@ -1125,11 +1125,11 @@ promise_test(t => { const ws = new WritableStream(); const writer = ws.getWriter(); const writerReady1 = writer.ready; - writer.abort('a'); + writer.abort(error1); const writerReady2 = writer.ready; assert_not_equals(writerReady1, writerReady2, 'abort() should replace the ready promise with a rejected one'); return Promise.all([writerReady1, - promise_rejects(t, new TypeError(), writerReady2, 'writerReady2 should reject')]); + promise_rejects(t, error1, writerReady2, 'writerReady2 should reject')]); }, 'writer abort() during sink start() should replace the writer.ready promise synchronously'); promise_test(t => { @@ -1137,7 +1137,7 @@ promise_test(t => { const ws = recordingWritableStream(); const writer = ws.getWriter(); const writePromise1 = writer.write(1); - const abortPromise = writer.abort('a'); + const abortPromise = writer.abort(error1); const writePromise2 = writer.write(2); const closePromise = writer.close(); writePromise1.catch(() => events.push('write1')); @@ -1145,15 +1145,15 @@ promise_test(t => { writePromise2.catch(() => events.push('write2')); closePromise.catch(() => events.push('close')); return Promise.all([ - promise_rejects(t, new TypeError(), writePromise1, 'first write() should reject'), + promise_rejects(t, error1, writePromise1, 'first write() should reject'), abortPromise, - promise_rejects(t, new TypeError(), writePromise2, 'second write() should reject'), - promise_rejects(t, new TypeError(), closePromise, 'close() should reject') + promise_rejects(t, error1, writePromise2, 'second write() should reject'), + promise_rejects(t, error1, closePromise, 'close() should reject') ]) .then(() => { assert_array_equals(events, ['write2', 'write1', 'abort', 'close'], 'promises should resolve in the standard order'); - assert_array_equals(ws.events, ['abort', 'a'], 'underlying sink write() should not be called'); + assert_array_equals(ws.events, ['abort', error1], 'underlying sink write() should not be called'); }); }, 'promises returned from other writer methods should be rejected when writer abort() happens during sink start()'); @@ -1224,7 +1224,7 @@ promise_test(t => { return Promise.all([ promise_rejects(t, error1, writePromise, 'write should reject'), abortPromise, - promise_rejects(t, new TypeError(), writer.closed, 'closed should reject with TypeError') + promise_rejects(t, error2, writer.closed, 'closed should reject with error2') ]); }).then(() => { assert_array_equals(ws.events, ['write', '1', 'abort', error2], 'abort sink method should be called'); @@ -1243,7 +1243,7 @@ promise_test(() => { }); }, 'when start errors after stream abort(), underlying sink abort() should be called anyway'); -promise_test(t => { +promise_test(() => { const ws = new WritableStream(); const abortPromise1 = ws.abort(); const abortPromise2 = ws.abort(); @@ -1253,7 +1253,7 @@ promise_test(t => { v => assert_equals(v, undefined, 'abort() should fulfill with undefined')); }, 'when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined'); -promise_test(t => { +promise_test(() => { const ws = new WritableStream(); const abortPromise1 = ws.abort(); @@ -1345,4 +1345,31 @@ promise_test(t => { }); }, 'sink abort() should not be called if stream was erroring due to bad strategy before abort() was called'); +promise_test(t => { + const ws = new WritableStream(); + return ws.abort().then(() => { + const writer = ws.getWriter(); + return writer.closed.then(t.unreached_func('closed promise should not fulfill'), + e => assert_equals(e, undefined, 'e should be undefined')); + }); +}, 'abort with no arguments should set the stored error to undefined'); + +promise_test(t => { + const ws = new WritableStream(); + return ws.abort(undefined).then(() => { + const writer = ws.getWriter(); + return writer.closed.then(t.unreached_func('closed promise should not fulfill'), + e => assert_equals(e, undefined, 'e should be undefined')); + }); +}, 'abort with an undefined argument should set the stored error to undefined'); + +promise_test(t => { + const ws = new WritableStream(); + return ws.abort('string argument').then(() => { + const writer = ws.getWriter(); + return writer.closed.then(t.unreached_func('closed promise should not fulfill'), + e => assert_equals(e, 'string argument', 'e should be \'string argument\'')); + }); +}, 'abort with a string argument should set the stored error to that argument'); + done(); diff --git a/tests/wpt/web-platform-tests/streams/writable-streams/bad-underlying-sinks.js b/tests/wpt/web-platform-tests/streams/writable-streams/bad-underlying-sinks.js index 6cc1b0cc441..2c7c44831d1 100644 --- a/tests/wpt/web-platform-tests/streams/writable-streams/bad-underlying-sinks.js +++ b/tests/wpt/web-platform-tests/streams/writable-streams/bad-underlying-sinks.js @@ -189,7 +189,7 @@ promise_test(t => { const writer = ws.getWriter(); return promise_rejects(t, error1, writer.abort(abortReason), 'abort should reject with the thrown error') - .then(() => promise_rejects(t, new TypeError(), writer.closed, 'closed should reject with a TypeError')); + .then(() => promise_rejects(t, abortReason, writer.closed, 'closed should reject with abortReason')); }, 'abort: throwing method should cause abort() and closed to reject'); done(); diff --git a/tests/wpt/web-platform-tests/streams/writable-streams/close.js b/tests/wpt/web-platform-tests/streams/writable-streams/close.js index bf9472ef3bb..5cbe5701ba5 100644 --- a/tests/wpt/web-platform-tests/streams/writable-streams/close.js +++ b/tests/wpt/web-platform-tests/streams/writable-streams/close.js @@ -361,8 +361,8 @@ promise_test(t => { 'closePromise must reject with the error returned from the sink\'s close method'), promise_rejects(t, error1, abortPromise, 'abortPromise must reject with the error returned from the sink\'s close method'), - promise_rejects(t, new TypeError(), writer.closed, - 'writer.closed must reject with a TypeError indicating the stream was aborted') + promise_rejects(t, error2, writer.closed, + 'writer.closed must reject with error2') ]).then(() => { assert_array_equals(events, ['closePromise', 'abortPromise', 'closed'], 'promises must fulfill/reject in the expected order'); diff --git a/tests/wpt/web-platform-tests/streams/writable-streams/general.js b/tests/wpt/web-platform-tests/streams/writable-streams/general.js index 1702479337a..7187572f78f 100644 --- a/tests/wpt/web-platform-tests/streams/writable-streams/general.js +++ b/tests/wpt/web-platform-tests/streams/writable-streams/general.js @@ -165,8 +165,8 @@ promise_test(() => { promise_test(t => { function functionWithOverloads() {} - functionWithOverloads.apply = () => assert_unreached('apply() should not be called'); - functionWithOverloads.call = () => assert_unreached('call() should not be called'); + functionWithOverloads.apply = t.unreached_func('apply() should not be called'); + functionWithOverloads.call = t.unreached_func('call() should not be called'); const underlyingSink = { start: functionWithOverloads, write: functionWithOverloads, @@ -180,9 +180,12 @@ promise_test(t => { writer1.close(); // Test abort(). + const abortError = new Error(); + abortError.name = 'abort error'; + const ws2 = new WritableStream(underlyingSink); const writer2 = ws2.getWriter(); - writer2.abort(); + writer2.abort(abortError); // Test abort() with a close underlying sink method present. (Historical; see // https://github.com/whatwg/streams/issues/620#issuecomment-263483953 for what used to be @@ -193,11 +196,11 @@ promise_test(t => { close: functionWithOverloads }); const writer3 = ws3.getWriter(); - writer3.abort(); + writer3.abort(abortError); return writer1.closed - .then(() => promise_rejects(t, new TypeError(), writer2.closed, 'writer2.closed should be rejected')) - .then(() => promise_rejects(t, new TypeError(), writer3.closed, 'writer3.closed should be rejected')); + .then(() => promise_rejects(t, abortError, writer2.closed, 'writer2.closed should be rejected')) + .then(() => promise_rejects(t, abortError, writer3.closed, 'writer3.closed should be rejected')); }, 'methods should not not have .apply() or .call() called'); promise_test(() => { diff --git a/tests/wpt/web-platform-tests/streams/writable-streams/reentrant-strategy.js b/tests/wpt/web-platform-tests/streams/writable-streams/reentrant-strategy.js index 0dc9786ff7b..6e1b52c986c 100644 --- a/tests/wpt/web-platform-tests/streams/writable-streams/reentrant-strategy.js +++ b/tests/wpt/web-platform-tests/streams/writable-streams/reentrant-strategy.js @@ -114,16 +114,16 @@ promise_test(t => { let writer; const strategy = { size() { - writer.abort('nice'); + writer.abort(error1); return 1; } }; const ws = recordingWritableStream({}, strategy); writer = ws.getWriter(); - return promise_rejects(t, new TypeError(), writer.write('a'), 'write() promise should reject') + return promise_rejects(t, error1, writer.write('a'), 'write() promise should reject') .then(() => { - assert_array_equals(ws.events, ['abort', 'nice'], 'sink.write() should not be called'); + assert_array_equals(ws.events, ['abort', error1], 'sink.write() should not be called'); }); }, 'abort() should work when called from within strategy.size()'); diff --git a/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/containing-block.html b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/containing-block.html new file mode 100644 index 00000000000..da0728c96b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/containing-block.html @@ -0,0 +1,46 @@ +<!doctype HTML> +<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#embedded-ForeignObjectElement"/> +<style> + * { + margin: 5px; + } + .el { + background: lightblue; + width: 50px; + height: 60px; + } + .pos { + top: 5px; + left: 6px; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<svg> + <foreignObject id="first" width=100 height=100> + <div id=contained class="el" style="width: 50px; height: 60px;"></div> + <div id=containedrel class="el pos" style="position: relative"></div> + <div id=containedabs class="el pos" style="position: absolute"></div> + <div id=containedfixed class="el pos" style="position: fixed"></div> + </foreignObject> +</svg> +<script> +function checkPosition(el, offsetLeftVal, offsetTopVal, boundingRectLeft, boundingRectTop) { + assert_equals(el.offsetLeft, offsetLeftVal, "offsetLeft"); + assert_equals(el.offsetTop, offsetTopVal, "offsetTop"); + assert_equals(el.getBoundingClientRect().left, boundingRectLeft, "boundingRectLeft"); + assert_equals(el.getBoundingClientRect().top, boundingRectTop, "boundingRectTop"); +} + +test(function() { + // Test that #first is a containing block for all descendants. + var contained = document.getElementById('contained'); + var containedrel = document.getElementById('containedrel'); + var containedabs = document.getElementById('containedabs'); + var containedfixed = document.getElementById('containedfixed'); + checkPosition(contained, 5, 5, 20, 20); + checkPosition(containedrel, 11, 75, 26, 90); + checkPosition(containedabs, 11, 10, 26, 25); + checkPosition(containedfixed, 11, 10, 26, 25); +}, "position"); +</script> diff --git a/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context-expected.html b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context-expected.html new file mode 100644 index 00000000000..28e7e310c07 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context-expected.html @@ -0,0 +1,18 @@ +<!doctype HTML> +<style> + * { + margin: 0; + } + .el { + width: 50px; + height: 60px; + } + +</style> +<div style="isolation: isolate"> + <div class="el" + style="position: absolute; z-index: 1; top: 40px; left: 10px; border: 1px solid black; background: lightblue"></div> + <div class="el" + style="position: absolute; z-index: 2; top: 5px; left: 5px; border: 1px solid black; background: lightgreen"></div> +</div> +<div id=top class="el" style="position: relative; background: lightgray; top: 50px"></div> diff --git a/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context.html b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context.html new file mode 100644 index 00000000000..c60a111f633 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/extensibility/foreignObject/stacking-context.html @@ -0,0 +1,26 @@ +<!doctype HTML> +<title>Test that the foreignObject element is a stacking context</title> +<link rel="match" href="stacking-context-expected.html"> +<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#embedded-ForeignObjectElement"/> +<style> + * { + margin: 0; + } + .el { + width: 50px; + height: 60px; + } + +</style> + <!-- Test that the <foreignObject> root element is a stacking context, so z-index here + has no effect on order w.r.t. #top, but still does for stacking under + foreignObject --> +<svg style="width: 50px; height: 50px; overflow: visible; display: block"> + <foreignObject width=100 height=200> + <div class="el" + style="position: absolute; z-index: 1; top: 40px; left: 10px; border: 1px solid black; background: lightblue"></div> + <div class="el" + style="position: absolute; z-index: 2; top: 5px; left: 5px; border: 1px solid black; background: lightgreen"></div> + </foreignObject> +</svg> +<div id=top class="el" style="position: relative; background: lightgray"></div> diff --git a/tests/wpt/web-platform-tests/testharness_runner.html b/tests/wpt/web-platform-tests/testharness_runner.html new file mode 100644 index 00000000000..1cc80a270e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/testharness_runner.html @@ -0,0 +1,6 @@ +<!doctype html> +<title></title> +<script> +var timeout_multiplier = 1; +var win = null; +</script> diff --git a/tests/wpt/web-platform-tests/tools/.coveragerc b/tests/wpt/web-platform-tests/tools/.coveragerc new file mode 100644 index 00000000000..6c49e5135e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/.coveragerc @@ -0,0 +1,26 @@ +[run] +branch = True +parallel = True +omit = + html5lib/* + py/* + pytest/* + pywebsocket/* + six/* + webdriver/* + wptserve/* + */site-packages/* + */lib_pypy/* + +[paths] +html5lib = + html5lib/html5lib + .tox/**/site-packages/html5lib + +pytest = + pytest/_pytest + .tox/**/site-packages/_pytest + +py = + py/py + .tox/**/site-packages/py diff --git a/tests/wpt/web-platform-tests/tools/.gitignore b/tests/wpt/web-platform-tests/tools/.gitignore index cd45bceafee..034e3ccb760 100644 --- a/tests/wpt/web-platform-tests/tools/.gitignore +++ b/tests/wpt/web-platform-tests/tools/.gitignore @@ -1,5 +1,6 @@ *# -.coverage* +.coverage +.coverage.* htmlcov/ coverage.xml .tox/ diff --git a/tests/wpt/web-platform-tests/tools/ci/check_stability.py b/tests/wpt/web-platform-tests/tools/ci/check_stability.py index 322a52140a2..b215e3c9e1d 100644 --- a/tests/wpt/web-platform-tests/tools/ci/check_stability.py +++ b/tests/wpt/web-platform-tests/tools/ci/check_stability.py @@ -22,7 +22,7 @@ from tools.wpt import markdown from tools import localpaths logger = None -run, write_inconsistent, write_results = None, None, None +stability_run, write_inconsistent, write_results = None, None, None wptrunner = None def setup_logging(): @@ -37,8 +37,9 @@ def setup_logging(): def do_delayed_imports(): - global run, write_inconsistent, write_results, wptrunner - from tools.wpt.stability import run, write_inconsistent, write_results + global stability_run, write_inconsistent, write_results, wptrunner + from tools.wpt.stability import run as stability_run + from tools.wpt.stability import write_inconsistent, write_results from wptrunner import wptrunner @@ -172,22 +173,6 @@ def get_parser(): return parser -def set_default_args(kwargs): - kwargs.set_if_none("sauce_platform", - os.environ.get("PLATFORM")) - kwargs.set_if_none("sauce_build", - os.environ.get("TRAVIS_BUILD_NUMBER")) - python_version = os.environ.get("TRAVIS_PYTHON_VERSION") - kwargs.set_if_none("sauce_tags", - [python_version] if python_version else []) - kwargs.set_if_none("sauce_tunnel_id", - os.environ.get("TRAVIS_JOB_NUMBER")) - kwargs.set_if_none("sauce_user", - os.environ.get("SAUCE_USERNAME")) - kwargs.set_if_none("sauce_key", - os.environ.get("SAUCE_ACCESS_KEY")) - - def pr(): pr = os.environ.get("TRAVIS_PULL_REQUEST", "false") return pr if pr != "false" else None @@ -270,12 +255,9 @@ def main(): def run(venv, wpt_args, **kwargs): - global logger - do_delayed_imports() retcode = 0 - parser = get_parser() wpt_args = create_parser().parse_args(wpt_args) @@ -301,10 +283,6 @@ def run(venv, wpt_args, **kwargs): browser_name = wpt_args.product.split(":")[0] - if browser_name == "sauce" and not wpt_args.sauce_key: - logger.warning("Cannot run tests on Sauce Labs. No access key.") - return retcode - pr_number = pr() with TravisFold("browser_setup"): @@ -338,8 +316,6 @@ def run(venv, wpt_args, **kwargs): wpt_kwargs["test_list"] = list(tests_changed | files_affected) - set_default_args(wpt_kwargs) - do_delayed_imports() wpt_kwargs["stability"] = True @@ -357,7 +333,7 @@ def run(venv, wpt_args, **kwargs): wpt_logger = wptrunner.logger - iterations, results, inconsistent = run(venv, wpt_logger, **wpt_kwargs) + iterations, results, inconsistent = stability_run(venv, wpt_logger, **wpt_kwargs) if results: if inconsistent: @@ -375,16 +351,17 @@ def run(venv, wpt_args, **kwargs): status="failed" if inconsistent else "passed") else: logger.info("No tests run.") + # Be conservative and only return errors when we know for sure tests are changed. + if tests_changed: + retcode = 3 return retcode if __name__ == "__main__": try: - retcode = main() + sys.exit(main()) except Exception: import traceback traceback.print_exc() sys.exit(1) - else: - sys.exit(retcode) diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh b/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh index fd28db5b7e6..ff1e224843d 100755 --- a/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh +++ b/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh @@ -8,13 +8,12 @@ cd $WPT_ROOT main() { cd $WPT_ROOT pip install -U tox - pip install --requirement tools/wpt/requirements.txt ./wpt install firefox browser --destination $HOME ./wpt install firefox webdriver --destination $HOME/firefox export PATH=$HOME/firefox:$PATH cd $WPT_ROOT/resources/test - tox + tox -- --binary=$HOME/browsers/firefox/firefox } main diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh b/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh index 1b814ee58e3..a23b0573853 100755 --- a/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh +++ b/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh @@ -8,15 +8,23 @@ cd $WPT_ROOT source tools/ci/lib.sh test_stability() { - ./wpt check-stability $PRODUCT --output-bytes $((1024 * 1024 * 3)) --metadata ~/meta/ --install-fonts + local extra_arg=$1 + ./wpt check-stability $PRODUCT $extra_arg --output-bytes $((1024 * 1024 * 3)) --metadata ~/meta/ --install-fonts } main() { hosts_fixup + local extra_arg="" if [ $(echo $PRODUCT | grep '^chrome:') ]; then - install_chrome $(echo $PRODUCT | grep --only-matching '\w\+$') + local channel=$(echo $PRODUCT | grep --only-matching '\w\+$') + if [[ $channel == "dev" ]]; then + # The package name for Google Chrome Dev uses "unstable", not "dev". + channel="unstable" + fi + install_chrome $channel + extra_arg="--binary=$(which google-chrome-$channel)" fi - test_stability + test_stability $extra_arg } main diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh b/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh index 2e572b2a65b..2b634137605 100755 --- a/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh +++ b/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh @@ -10,7 +10,7 @@ source tools/ci/lib.sh main() { git fetch --unshallow https://github.com/w3c/web-platform-tests.git +refs/heads/*:refs/remotes/origin/* hosts_fixup - install_chrome dev + install_chrome unstable pip install -U tox codecov cd tools/wpt tox diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh b/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh index cb03b7063ae..d6d6803974f 100755 --- a/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh +++ b/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh @@ -11,6 +11,8 @@ test_infrastructure() { local ARGS=""; if [ $PRODUCT == "firefox" ]; then ARGS="--install-browser" + else + ARGS=$1 fi ./wpt run --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/ } @@ -24,9 +26,11 @@ main() { hosts_fixup fi if [ "$PRODUCT" == "chrome" ]; then - install_chrome dev + install_chrome unstable + test_infrastructure "--binary=$(which google-chrome-unstable)" + else + test_infrastructure fi - test_infrastructure done } diff --git a/tests/wpt/web-platform-tests/tools/ci/lib.sh b/tests/wpt/web-platform-tests/tools/ci/lib.sh index 2273793ba32..7c0b8253a90 100644 --- a/tests/wpt/web-platform-tests/tools/ci/lib.sh +++ b/tests/wpt/web-platform-tests/tools/ci/lib.sh @@ -15,12 +15,8 @@ hosts_fixup() { install_chrome() { channel=$1 - # The package name for Google Chrome Dev uses "unstable", not "dev". - if [[ $channel == "dev" ]]; then - channel="unstable" - fi deb_archive=google-chrome-${channel}_current_amd64.deb - wget https://dl.google.com/linux/direct/$deb_archive + wget -q https://dl.google.com/linux/direct/$deb_archive # If the environment provides an installation of Google Chrome, the # existing binary may take precedence over the one introduced in this diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py index e3610452a2b..7eb3d4ac7ec 100644 --- a/tests/wpt/web-platform-tests/tools/lint/lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/lint.py @@ -59,9 +59,13 @@ you could add the following line to the lint.whitelist file. %s: %s""" -def all_filesystem_paths(repo_root): +def all_filesystem_paths(repo_root, subdir=None): path_filter = PathFilter(repo_root, extras=[".git/*"]) - for dirpath, dirnames, filenames in os.walk(repo_root): + if subdir: + expanded_path = subdir + else: + expanded_path = repo_root + for dirpath, dirnames, filenames in os.walk(expanded_path): for filename in filenames: path = os.path.relpath(os.path.join(dirpath, filename), repo_root) if path_filter(path): @@ -148,7 +152,7 @@ def check_git_ignore(repo_root, paths): _, _, filter_string = match_filter.split(':') # If the matching filter reported by check-ignore is a special-case exception, # that's fine. Otherwise, it requires a new special-case exception. - if filter_string != '!' + path: + if filter_string[0] != '!': errors += [("IGNORED PATH", "%s matches an ignore filter in .gitignore - " "please add a .gitignore exception" % path, path, None)] except subprocess.CalledProcessError as e: @@ -747,14 +751,20 @@ def changed_files(wpt_root): def lint_paths(kwargs, wpt_root): if kwargs.get("paths"): - r = os.path.realpath(wpt_root) - paths = [os.path.relpath(os.path.realpath(x), r) for x in kwargs["paths"]] + paths = [] + for path in kwargs.get("paths"): + if os.path.isdir(path): + path_dir = list(all_filesystem_paths(wpt_root, path)) + paths.extend(path_dir) + elif os.path.isfile(path): + paths.append(os.path.relpath(os.path.abspath(path), wpt_root)) + + elif kwargs["all"]: paths = list(all_filesystem_paths(wpt_root)) else: changed_paths = changed_files(wpt_root) force_all = False - # If we changed the lint itself ensure that we retest everything for path in changed_paths: path = path.replace(os.path.sep, "/") if path == "lint.whitelist" or path.startswith("tools/lint/"): diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py index ed552472733..0a96b2968bb 100644 --- a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py @@ -398,12 +398,14 @@ def test_main_with_args(): orig_argv = sys.argv try: sys.argv = ['./lint', 'a', 'b', 'c'] - with _mock_lint('lint', return_value=True) as m: - lint_mod.main(**vars(create_parser().parse_args())) - m.assert_called_once_with(repo_root, - [os.path.relpath(os.path.join(os.getcwd(), x), repo_root) - for x in ['a', 'b', 'c']], - "normal") + with mock.patch(lint_mod.__name__ + ".os.path.isfile") as mock_isfile: + mock_isfile.return_value = True + with _mock_lint('lint', return_value=True) as m: + lint_mod.main(**vars(create_parser().parse_args())) + m.assert_called_once_with(repo_root, + [os.path.relpath(os.path.join(os.getcwd(), x), repo_root) + for x in ['a', 'b', 'c']], + "normal") finally: sys.argv = orig_argv diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py index bb403e27529..388140b2a83 100644 --- a/tests/wpt/web-platform-tests/tools/serve/serve.py +++ b/tests/wpt/web-platform-tests/tools/serve/serve.py @@ -387,19 +387,19 @@ class ServerProc(object): self.daemon = None self.stop = Event() - def start(self, init_func, host, port, paths, routes, bind_hostname, config, + def start(self, init_func, host, port, paths, routes, bind_address, config, ssl_config, **kwargs): self.proc = Process(target=self.create_daemon, - args=(init_func, host, port, paths, routes, bind_hostname, + args=(init_func, host, port, paths, routes, bind_address, config, ssl_config), kwargs=kwargs) self.proc.daemon = True self.proc.start() - def create_daemon(self, init_func, host, port, paths, routes, bind_hostname, + def create_daemon(self, init_func, host, port, paths, routes, bind_address, config, ssl_config, **kwargs): try: - self.daemon = init_func(host, port, paths, routes, bind_hostname, config, + self.daemon = init_func(host, port, paths, routes, bind_address, config, ssl_config, **kwargs) except socket.error: print("Socket error on port %s" % port, file=sys.stderr) @@ -432,12 +432,12 @@ class ServerProc(object): return self.proc.is_alive() -def check_subdomains(host, paths, bind_hostname, ssl_config, aliases): +def check_subdomains(host, paths, bind_address, ssl_config, aliases): port = get_port() subdomains = get_subdomains(host) wrapper = ServerProc() - wrapper.start(start_http_server, host, port, paths, build_routes(aliases), bind_hostname, + wrapper.start(start_http_server, host, port, paths, build_routes(aliases), bind_address, None, ssl_config) connected = False @@ -490,7 +490,7 @@ def make_hosts_file(config, host): return "".join(rv) -def start_servers(host, ports, paths, routes, bind_hostname, config, ssl_config, +def start_servers(host, ports, paths, routes, bind_address, config, ssl_config, **kwargs): servers = defaultdict(list) for scheme, ports in ports.iteritems(): @@ -505,21 +505,21 @@ def start_servers(host, ports, paths, routes, bind_hostname, config, ssl_config, "wss":start_wss_server}[scheme] server_proc = ServerProc() - server_proc.start(init_func, host, port, paths, routes, bind_hostname, + server_proc.start(init_func, host, port, paths, routes, bind_address, config, ssl_config, **kwargs) servers[scheme].append((port, server_proc)) return servers -def start_http_server(host, port, paths, routes, bind_hostname, config, ssl_config, +def start_http_server(host, port, paths, routes, bind_address, config, ssl_config, **kwargs): return wptserve.WebTestHttpd(host=host, port=port, doc_root=paths["doc_root"], routes=routes, rewrites=rewrites, - bind_hostname=bind_hostname, + bind_address=bind_address, config=config, use_ssl=False, key_file=None, @@ -527,14 +527,14 @@ def start_http_server(host, port, paths, routes, bind_hostname, config, ssl_conf latency=kwargs.get("latency")) -def start_https_server(host, port, paths, routes, bind_hostname, config, ssl_config, +def start_https_server(host, port, paths, routes, bind_address, config, ssl_config, **kwargs): return wptserve.WebTestHttpd(host=host, port=port, doc_root=paths["doc_root"], routes=routes, rewrites=rewrites, - bind_hostname=bind_hostname, + bind_address=bind_address, config=config, use_ssl=True, key_file=ssl_config["key_path"], @@ -544,7 +544,7 @@ def start_https_server(host, port, paths, routes, bind_hostname, config, ssl_con class WebSocketDaemon(object): - def __init__(self, host, port, doc_root, handlers_root, log_level, bind_hostname, + def __init__(self, host, port, doc_root, handlers_root, log_level, bind_address, ssl_config): self.host = host cmd_args = ["-p", port, @@ -569,7 +569,7 @@ class WebSocketDaemon(object): "--certificate", ssl_config["cert_path"], "--tls-module", tls_module] - if (bind_hostname): + if (bind_address): cmd_args = ["-H", host] + cmd_args opts, args = pywebsocket._parse_args_and_config(cmd_args) opts.cgi_directories = [] @@ -608,25 +608,25 @@ class WebSocketDaemon(object): self.server = None -def start_ws_server(host, port, paths, routes, bind_hostname, config, ssl_config, +def start_ws_server(host, port, paths, routes, bind_address, config, ssl_config, **kwargs): return WebSocketDaemon(host, str(port), repo_root, paths["ws_doc_root"], "debug", - bind_hostname, + bind_address, ssl_config = None) -def start_wss_server(host, port, paths, routes, bind_hostname, config, ssl_config, +def start_wss_server(host, port, paths, routes, bind_address, config, ssl_config, **kwargs): return WebSocketDaemon(host, str(port), repo_root, paths["ws_doc_root"], "debug", - bind_hostname, + bind_address, ssl_config) @@ -646,7 +646,12 @@ def get_ports(config, ssl_environment): def normalise_config(config, ports): - host = config["host"] + if "host" in config: + logger.warning("host in config is deprecated; use browser_host instead") + host = config["host"] + else: + host = config["browser_host"] + domains = get_subdomains(host) not_domains = get_not_subdomains(host) @@ -662,9 +667,11 @@ def normalise_config(config, ports): domains[""] = host - ports_ = {} - for scheme, ports_used in ports.iteritems(): - ports_[scheme] = ports_used + if "bind_hostname" in config: + logger.warning("bind_hostname in config is deprecated; use bind_address instead") + bind_address = config["bind_hostname"] + else: + bind_address = config["bind_address"] # make a (shallow) copy of the config and update that, so that the # normalized config can be used in place of the original one. @@ -672,6 +679,9 @@ def normalise_config(config, ports): config_["domains"] = domains config_["not_domains"] = not_domains config_["ports"] = ports_ + config_["bind_address"] = bind_address + if config.get("server_host", None) is None: + config_["server_host"] = host return config_ @@ -689,13 +699,13 @@ def get_ssl_config(config, ssl_environment): def start(config, ssl_environment, routes, **kwargs): - host = config.get("host_ip") or config["host"] + host = config["server_host"] ports = get_ports(config, ssl_environment) paths = get_paths(config) - bind_hostname = config["bind_hostname"] + bind_address = config["bind_address"] ssl_config = get_ssl_config(config, ssl_environment) - servers = start_servers(host, ports, paths, routes, bind_hostname, config, + servers = start_servers(host, ports, paths, routes, bind_address, config, ssl_config, **kwargs) return servers @@ -812,16 +822,16 @@ def run(**kwargs): with get_ssl_environment(config) as ssl_env: ports = get_ports(config, ssl_env) config = normalise_config(config, ports) - host = config["host"] - bind_hostname = config["bind_hostname"] + host = config["browser_host"] + bind_address = config["bind_address"] if config["check_subdomains"]: paths = get_paths(config) ssl_config = get_ssl_config(config, ssl_env) - check_subdomains(host, paths, bind_hostname, ssl_config, config["aliases"]) + check_subdomains(host, paths, bind_address, ssl_config, config["aliases"]) stash_address = None - if bind_hostname: + if bind_address: stash_address = (host, get_port()) with stash.StashServer(stash_address, authkey=str(uuid.uuid4())): diff --git a/tests/wpt/web-platform-tests/tools/six/documentation/index.rst b/tests/wpt/web-platform-tests/tools/six/documentation/index.rst index 7851421a90e..9827e6695b5 100644 --- a/tests/wpt/web-platform-tests/tools/six/documentation/index.rst +++ b/tests/wpt/web-platform-tests/tools/six/documentation/index.rst @@ -104,7 +104,7 @@ Here's example usage of the module:: Object model compatibility >>>>>>>>>>>>>>>>>>>>>>>>>> -Python 3 renamed the attributes of several intepreter data structures. The +Python 3 renamed the attributes of several interpreter data structures. The following accessors are available. Note that the recommended way to inspect functions and methods is the stdlib :mod:`py3:inspect` module. @@ -459,7 +459,7 @@ For the most part, :mod:`six.moves` aliases are the names of the modules in Python 3. When the new Python 3 name is a package, the components of the name are separated by underscores. For example, ``html.parser`` becomes ``html_parser``. In some cases where several modules have been combined, the -Python 2 name is retained. This is so the appropiate modules can be found when +Python 2 name is retained. This is so the appropriate modules can be found when running on Python 2. For example, ``BaseHTTPServer`` which is in ``http.server`` in Python 3 is aliased as ``BaseHTTPServer``. diff --git a/tests/wpt/web-platform-tests/tools/third_party/funcsigs/.coveragerc b/tests/wpt/web-platform-tests/tools/third_party/funcsigs/.coveragerc new file mode 100644 index 00000000000..d83bfc220b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/third_party/funcsigs/.coveragerc @@ -0,0 +1,6 @@ +[run] +source=funcsigs +omit=funcsigs/odict* + +[report] +include=funcsigs* diff --git a/tests/wpt/web-platform-tests/tools/third_party/pytest/.coveragerc b/tests/wpt/web-platform-tests/tools/third_party/pytest/.coveragerc new file mode 100644 index 00000000000..61ff66749dc --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/third_party/pytest/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + # standlonetemplate is read dynamically and tested by test_genscript + *standalonetemplate.py diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index 04a4104c186..d52feb03576 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -65,29 +65,10 @@ class Firefox(Browser): """ product = "firefox" - binary = "firefox/firefox" - platform_ini = "firefox/platform.ini" + binary = "browsers/firefox/firefox" + platform_ini = "browsers/firefox/platform.ini" requirements = "requirements_firefox.txt" - def platform_string(self): - platform = { - "Linux": "linux", - "Windows": "win", - "Darwin": "mac" - }.get(uname[0]) - - if platform is None: - raise ValueError("Unable to construct a valid Firefox package name for current platform") - - if platform == "linux": - bits = "-%s" % uname[4] - elif platform == "win": - bits = "64" if uname[4] == "x86_64" else "32" - else: - bits = "" - - return "%s%s" % (platform, bits) - def platform_string_geckodriver(self): platform = { "Linux": "linux", @@ -111,38 +92,69 @@ class Firefox(Browser): from mozdownload import FactoryScraper import mozinstall + platform = { + "Linux": "linux", + "Windows": "win", + "Darwin": "mac" + }.get(uname[0]) + + if platform is None: + raise ValueError("Unable to construct a valid Firefox package name for current platform") + if dest is None: - dest = os.getcwd() + # os.getcwd() doesn't include the venv path + dest = os.path.join(os.getcwd(), "_venv") - filename = FactoryScraper('daily', branch='mozilla-central', destination=dest).download() + dest = os.path.join(dest, "browsers") + + filename = FactoryScraper("daily", branch="mozilla-central", destination=dest).download() try: mozinstall.install(filename, dest) except mozinstall.mozinstall.InstallError as e: - if uname[0] == "Darwin": - # mozinstall will fail here if nightly is already installed in the venv - # This only occurs on macOS because shutil.copy_tree() is called in - # mozinstall._install_dmg and will fail if the file already exists. - # copytree isn't used while installing on Windows/linux, so the same error - # won't be thrown if we try to rewrite there. - mozinstall.uninstall(dest+'/Firefox Nightly.app') + if platform == "mac" and os.path.exists(os.path.join(dest, "Firefox Nightly.app")): + # mozinstall will fail if nightly is already installed in the venv because + # mac installation uses shutil.copy_tree + mozinstall.uninstall(os.path.join(dest, "Firefox Nightly.app")) mozinstall.install(filename, dest) else: raise os.remove(filename) - return find_executable("firefox", os.path.join(dest, "firefox")) + return self.find_binary_path(dest) + + def find_binary_path(self, path=None): + """Looks for the firefox binary in the virtual environment""" - def find_binary(self): platform = { "Linux": "linux", "Windows": "win", - "Darwin": "macos" + "Darwin": "mac" }.get(uname[0]) - path = find_executable("firefox") + if path is None: + #os.getcwd() doesn't include the venv path + path = os.path.join(os.getcwd(), "_venv", "browsers") - if not path and platform == "macos": + binary = None + + if platform == "linux": + binary = find_executable("firefox", os.path.join(path, "firefox")) + elif platform == "win": + import mozinstall + binary = mozinstall.get_binary(path, "firefox") + elif platform == "mac": + binary = find_executable("firefox", os.path.join(path, "Firefox Nightly.app", "Contents", "MacOS")) + + return binary + + def find_binary(self, venv_path=None): + if venv_path is None: + venv_path = os.path.join(os.getcwd(), venv_path) + + binary = self.find_binary_path(os.path.join(venv_path, "browsers")) + + if not binary and uname[0] == "Darwin": macpaths = ["/Applications/FirefoxNightly.app/Contents/MacOS", os.path.expanduser("~/Applications/FirefoxNightly.app/Contents/MacOS"), "/Applications/Firefox Developer Edition.app/Contents/MacOS", @@ -151,7 +163,10 @@ class Firefox(Browser): os.path.expanduser("~/Applications/Firefox.app/Contents/MacOS")] return find_executable("firefox", os.pathsep.join(macpaths)) - return path + if binary is None: + return find_executable("firefox") + + return binary def find_certutil(self): path = find_executable("certutil") @@ -444,8 +459,37 @@ class Servo(Browser): product = "servo" requirements = "requirements_servo.txt" + def platform_components(self): + platform = { + "Linux": "linux", + "Windows": "win", + "Darwin": "mac" + }.get(uname[0]) + + if platform is None: + raise ValueError("Unable to construct a valid Servo package for current platform") + + if platform == "linux": + extension = ".tar.gz" + decompress = untar + elif platform == "win" or platform == "mac": + raise ValueError("Unable to construct a valid Servo package for current platform") + + return (platform, extension, decompress) + def install(self, dest=None): - raise NotImplementedError + """Install latest Browser Engine.""" + if dest is None: + dest = os.pwd + + platform, extension, decompress = self.platform_components() + url = "https://download.servo.org/nightly/%s/servo-latest%s" % (platform, extension) + + decompress(get(url).raw, dest=dest) + path = find_executable("servo", os.path.join(dest, "servo")) + st = os.stat(path) + os.chmod(path, st.st_mode | stat.S_IEXEC) + return path def find_binary(self): return find_executable("servo") @@ -457,7 +501,9 @@ class Servo(Browser): raise NotImplementedError def version(self, root): - return None + """Retrieve the release version of the installed browser.""" + output = call(self.binary, "--version") + return re.search(r"[0-9\.]+( [a-z]+)?$", output.strip()).group(0) class Sauce(Browser): diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py index d0a7925e79b..2b872e6f8f9 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/run.py @@ -96,10 +96,11 @@ otherwise install OpenSSL and ensure that it's on your $PATH.""") def check_environ(product): if product not in ("firefox", "servo"): - expected_hosts = {".".join(x) - for x in serve.get_subdomains("web-platform.test").values()} - expected_hosts |= {".".join(x) - for x in serve.get_not_subdomains("web-platform.test").values()} + config = serve.load_config(os.path.join(wpt_root, "config.default.json"), + os.path.join(wpt_root, "config.json")) + config = serve.normalise_config(config, {}) + expected_hosts = (set(config["domains"].itervalues()) ^ + set(config["not_domains"].itervalues())) missing_hosts = set(expected_hosts) if platform.uname()[0] != "Windows": hosts_path = "/etc/hosts" @@ -163,7 +164,7 @@ class Firefox(BrowserSetup): def setup_kwargs(self, kwargs): if kwargs["binary"] is None: - binary = self.browser.find_binary() + binary = self.browser.find_binary(self.venv.path) if binary is None: raise WptrunError("""Firefox binary not found on $PATH. @@ -352,7 +353,8 @@ class Servo(BrowserSetup): browser_cls = browser.Servo def install(self, venv): - raise NotImplementedError + if self.prompt_install(self.name): + return self.browser.install(venv.path) def setup_kwargs(self, kwargs): if kwargs["binary"] is None: diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py index fade7024f4a..5d6280d7230 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py +++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py @@ -65,8 +65,6 @@ def test_help(): @pytest.mark.slow @pytest.mark.remote_network -@pytest.mark.xfail(sys.platform == "darwin", - reason="https://github.com/w3c/web-platform-tests/issues/9090") @pytest.mark.xfail(sys.platform == "win32", reason="Tests currently don't work on Windows for path reasons") def test_run_firefox(manifest_dir): @@ -77,7 +75,10 @@ def test_run_firefox(manifest_dir): os.environ["MOZ_HEADLESS"] = "1" try: - fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "firefox") + if sys.platform == "darwin": + fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "Firefox Nightly.app") + else: + fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "firefox") if os.path.exists(fx_path): shutil.rmtree(fx_path) with pytest.raises(SystemExit) as excinfo: @@ -122,12 +123,14 @@ def test_install_chromedriver(): @pytest.mark.slow @pytest.mark.remote_network -@pytest.mark.xfail(sys.platform == "darwin", - reason="https://github.com/w3c/web-platform-tests/issues/9090") @pytest.mark.xfail(sys.platform == "win32", reason="Tests currently don't work on Windows for path reasons") def test_install_firefox(): - fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "firefox") + + if sys.platform == "darwin": + fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "Firefox Nightly.app") + else: + fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "firefox") if os.path.exists(fx_path): shutil.rmtree(fx_path) with pytest.raises(SystemExit) as excinfo: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/README.rst b/tests/wpt/web-platform-tests/tools/wptrunner/README.rst index 4890e3a6e03..89179228272 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/README.rst +++ b/tests/wpt/web-platform-tests/tools/wptrunner/README.rst @@ -179,7 +179,7 @@ Simple key-value pairs are of the form:: key: value -Note that unlike ini files, only `:` is a valid seperator; `=` will +Note that unlike ini files, only `:` is a valid separator; `=` will not work as expected. Key-value pairs may also have conditional values of the form:: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome_android.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome_android.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome_android.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_chrome_android.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt index e2098cf59da..b5e48068722 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt @@ -1,2 +1,2 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt index c076d75bac7..e0ae7e262c5 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt @@ -1,3 +1,3 @@ mozprocess == 0.26 -selenium==3.10.0 +selenium==3.11.0 requests==2.18.4 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py index 37da191dd44..7acb0f7d924 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py @@ -122,10 +122,8 @@ def env_options(): # domains to localhost without relying on the network stack. # # https://github.com/w3c/web-platform-tests/pull/9480 - return {"host_ip": "127.0.0.1", - "host": "web-platform.test", - "bind_hostname": False, - "certificate_domain": "web-platform.test", + return {"server_host": "127.0.0.1", + "bind_address": False, "supports_debugger": True} @@ -304,12 +302,15 @@ class FirefoxBrowser(Browser): def on_output(self, line): """Write a line of output from the firefox process to the log""" - data = line.decode("utf8", "replace") - if self.stack_fixer: - data = self.stack_fixer(data) - self.logger.process_output(self.pid(), - data, - command=" ".join(self.runner.command)) + if "GLib-GObject-CRITICAL" in line: + return + if line: + data = line.decode("utf8", "replace") + if self.stack_fixer: + data = self.stack_fixer(data) + self.logger.process_output(self.pid(), + data, + command=" ".join(self.runner.command)) def is_alive(self): if self.runner: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py index 81b80e41640..dd54fb0525e 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py @@ -52,9 +52,8 @@ def env_extras(**kwargs): def env_options(): - return {"host": "web-platform.test", - "host_ip": "127.0.0.1", - "bind_hostname": False, + return {"server_host": "127.0.0.1", + "bind_address": False, "testharnessreport": "testharnessreport-servo.js", "supports_debugger": True} diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py index 2578fb64365..f2ee00a7ab0 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py @@ -53,8 +53,7 @@ def env_extras(**kwargs): def env_options(): - return {"host_ip": "127.0.0.1", - "host": "web-platform.test", + return {"server_host": "127.0.0.1", "testharnessreport": "testharnessreport-servodriver.js", "supports_debugger": True} diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py index b5fdb052849..7d95d4355d5 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py @@ -61,7 +61,7 @@ def env_extras(**kwargs): def env_options(): - return {"bind_hostname": "true"} + return {} class WebKitBrowser(Browser): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py index bd5838fd008..f53919978b8 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py @@ -147,16 +147,16 @@ class TestEnvironment(object): "ssl": {} } - if "host" in self.options: - local_config["host"] = self.options["host"] + if "browser_host" in self.options: + local_config["browser_host"] = self.options["browser_host"] - if "bind_hostname" in self.options: - local_config["bind_hostname"] = self.options["bind_hostname"] + if "bind_address" in self.options: + local_config["bind_address"] = self.options["bind_address"] with open(default_config_path) as f: default_config = json.load(f) - local_config["host_ip"] = self.options.get("host_ip", None) + local_config["server_host"] = self.options.get("server_host", None) local_config["ssl"]["encrypt_after_connect"] = self.options.get("encrypt_after_connect", False) config = serve.merge_json(default_config, local_config) @@ -165,7 +165,7 @@ class TestEnvironment(object): if not self.ssl_env.ssl_enabled: config["ports"]["https"] = [None] - host = self.options.get("certificate_domain", config["host"]) + host = config["browser_host"] hosts = [host] hosts.extend("%s.%s" % (item[0], host) for item in serve.get_subdomains(host).values()) key_file, certificate = self.ssl_env.host_cert_path(hosts) @@ -240,7 +240,7 @@ class TestEnvironment(object): def test_servers(self): failed = [] - host = self.config.get("host_ip") or self.config.get("host") + host = self.config["server_host"] for scheme, servers in self.servers.iteritems(): for port, server in servers: if self.test_server_port: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py index 7178b2e28c3..708903f5dcd 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py @@ -8,6 +8,7 @@ import urlparse from abc import ABCMeta, abstractmethod from ..testrunner import Stop +from protocol import Protocol here = os.path.split(__file__)[0] @@ -171,7 +172,7 @@ class TestExecutor(object): def server_url(self, protocol): return "%s://%s:%s" % (protocol, - self.server_config["host"], + self.server_config["browser_host"], self.server_config["ports"][protocol][0]) def test_url(self, test): @@ -199,6 +200,9 @@ class TestExecutor(object): message += traceback.format_exc(e) return test.result_cls(status, message), [] + def wait(self): + self.protocol.base.wait() + class TestharnessExecutor(TestExecutor): convert_result = testharness_result_converter @@ -367,25 +371,6 @@ class WdspecExecutor(TestExecutor): from . import pytestrunner -class Protocol(object): - def __init__(self, executor, browser): - self.executor = executor - self.browser = browser - - @property - def logger(self): - return self.executor.logger - - def setup(self, runner): - pass - - def teardown(self): - pass - - def wait(self): - pass - - class WdspecRun(object): def __init__(self, func, session, path, timeout): self.func = func @@ -426,6 +411,14 @@ class WdspecRun(object): self.result_flag.set() +class ConnectionlessProtocol(Protocol): + def connect(self): + pass + + def after_connect(self): + pass + + class WebDriverProtocol(Protocol): server_cls = None @@ -437,24 +430,21 @@ class WebDriverProtocol(Protocol): self.session_config = None self.server = None - def setup(self, runner): + def connect(self): """Connect to browser via the HTTP server.""" - try: - self.server = self.server_cls( - self.logger, - binary=self.webdriver_binary, - args=self.webdriver_args) - self.server.start(block=False) - self.logger.info( - "WebDriver HTTP server listening at %s" % self.server.url) - self.session_config = {"host": self.server.host, - "port": self.server.port, - "capabilities": self.capabilities} - except Exception: - self.logger.error(traceback.format_exc()) - self.executor.runner.send_message("init_failed") - else: - self.executor.runner.send_message("init_succeeded") + self.server = self.server_cls( + self.logger, + binary=self.webdriver_binary, + args=self.webdriver_args) + self.server.start(block=False) + self.logger.info( + "WebDriver HTTP server listening at %s" % self.server.url) + self.session_config = {"host": self.server.host, + "port": self.server.port, + "capabilities": self.capabilities} + + def after_connect(self): + pass def teardown(self): if self.server is not None and self.server.is_alive: @@ -476,3 +466,80 @@ class WebDriverProtocol(Protocol): conn.request("HEAD", self.server.base_path + "invalid") res = conn.getresponse() return res.status == 404 + + +class CallbackHandler(object): + """Handle callbacks from testdriver-using tests. + + The default implementation here makes sense for things that are roughly like + WebDriver. Things that are more different to WebDriver may need to create a + fully custom implementation.""" + + def __init__(self, logger, protocol, test_window): + self.protocol = protocol + self.test_window = test_window + self.logger = logger + self.callbacks = { + "action": self.process_action, + "complete": self.process_complete + } + + self.actions = { + "click": ClickAction(self.logger, self.protocol) + } + + def __call__(self, result): + url, command, payload = result + self.logger.debug("Got async callback: %s" % result[1]) + try: + callback = self.callbacks[command] + except KeyError: + raise ValueError("Unknown callback type %r" % result[1]) + return callback(url, payload) + + def process_complete(self, url, payload): + rv = [url] + payload + return True, rv + + def process_action(self, url, payload): + parent = self.protocol.base.current_window + try: + self.protocol.base.set_window(self.test_window) + action = payload["action"] + self.logger.debug("Got action: %s" % action) + try: + action_handler = self.actions[action] + except KeyError: + raise ValueError("Unknown action %s" % action) + try: + action_handler(payload) + except Exception as e: + self.logger.warning("Action %s failed" % action) + self.logger.warning(traceback.format_exc()) + self._send_message("complete", "failure") + else: + self.logger.debug("Action %s completed" % action) + self._send_message("complete", "success") + finally: + self.protocol.base.set_window(parent) + + return False, None + + def _send_message(self, message_type, status, message=None): + self.protocol.testdriver.send_message(message_type, status, message=message) + + +class ClickAction(object): + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + selector = payload["selector"] + elements = self.protocol.select.elements_by_selector(selector) + if len(elements) == 0: + raise ValueError("Selector matches no elements") + elif len(elements) > 1: + raise ValueError("Selector matches multiple elements") + self.logger.debug("Clicking element: %s" % selector) + self.protocol.click.element(elements[0]) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index faf087b7a96..1c49ab2572c 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -1,3 +1,4 @@ +import json import os import socket import threading @@ -11,8 +12,8 @@ pytestrunner = None here = os.path.join(os.path.split(__file__)[0]) -from .base import (ExecutorException, - Protocol, +from .base import (CallbackHandler, + ExecutorException, RefTestExecutor, RefTestImplementation, TestExecutor, @@ -24,12 +25,18 @@ from .base import (ExecutorException, testharness_result_converter, reftest_result_converter, strip_server) - +from .protocol import (BaseProtocolPart, + TestharnessProtocolPart, + PrefsProtocolPart, + Protocol, + StorageProtocolPart, + SelectorProtocolPart, + ClickProtocolPart, + TestDriverProtocolPart) from ..testrunner import Stop from ..webdriver_server import GeckoDriverServer - def do_delayed_imports(): global errors, marionette @@ -42,92 +49,78 @@ def do_delayed_imports(): from marionette_driver import marionette, errors -class MarionetteProtocol(Protocol): - def __init__(self, executor, browser, capabilities=None, timeout_multiplier=1): - do_delayed_imports() - - Protocol.__init__(self, executor, browser) - self.marionette = None - self.marionette_port = browser.marionette_port - self.capabilities = capabilities - self.timeout_multiplier = timeout_multiplier +class MarionetteBaseProtocolPart(BaseProtocolPart): + def __init__(self, parent): + super(MarionetteBaseProtocolPart, self).__init__(parent) self.timeout = None - self.runner_handle = None - - def setup(self, runner): - """Connect to browser via Marionette.""" - Protocol.setup(self, runner) - self.logger.debug("Connecting to Marionette on port %i" % self.marionette_port) - startup_timeout = marionette.Marionette.DEFAULT_STARTUP_TIMEOUT * self.timeout_multiplier - self.marionette = marionette.Marionette(host='localhost', - port=self.marionette_port, - socket_timeout=None, - startup_timeout=startup_timeout) - try: - self.logger.debug("Waiting for Marionette connection") - while True: - try: - self.marionette.raise_for_port() - break - except IOError: - # When running in a debugger wait indefinitely for Firefox to start - if self.executor.debug_info is None: - raise + def setup(self): + self.marionette = self.parent.marionette - self.logger.debug("Starting Marionette session") - self.marionette.start_session() - self.logger.debug("Marionette session started") + def execute_script(self, script, async=False): + method = self.marionette.execute_async_script if async else self.marionette.execute_script + return method(script, new_sandbox=False) - except Exception as e: - self.logger.warning("Failed to start a Marionette session: %s" % e) - self.executor.runner.send_message("init_failed") + def set_timeout(self, timeout): + """Set the Marionette script timeout. - else: - try: - self.after_connect() - except Exception: - self.logger.warning("Post-connection steps failed") - self.logger.error(traceback.format_exc()) - self.executor.runner.send_message("init_failed") - else: - self.executor.runner.send_message("init_succeeded") + :param timeout: Script timeout in seconds - def teardown(self): - try: - self.marionette._request_in_app_shutdown() - self.marionette.delete_session(send_request=False) - except Exception: - # This is typically because the session never started - pass - if self.marionette is not None: - del self.marionette + """ + if timeout != self.timeout: + self.marionette.timeout.script = timeout + self.timeout = timeout @property - def is_alive(self): - """Check if the Marionette connection is still active.""" + def current_window(self): + return self.marionette.current_window_handle + + def set_window(self, handle): + self.marionette.switch_to_window(handle) + + def wait(self): try: - self.marionette.current_window_handle - except Exception: - return False - return True + socket_timeout = self.marionette.client.socket_timeout + except AttributeError: + # This can happen if there was a crash + return + if socket_timeout: + try: + self.marionette.timeout.script = socket_timeout / 2 + except (socket.error, IOError): + self.logger.debug("Socket closed") + return - def after_connect(self): - self.load_runner(self.executor.last_environment["protocol"]) + while True: + try: + self.marionette.execute_async_script("") + except errors.NoSuchWindowException: + # The window closed + break + except errors.ScriptTimeoutException: + self.logger.debug("Script timed out") + pass + except (socket.timeout, IOError): + self.logger.debug("Socket closed") + break + except Exception as e: + self.logger.warning(traceback.format_exc(e)) + break - def set_timeout(self, timeout): - """Set the Marionette script timeout. - :param timeout: Script timeout in seconds +class MarionetteTestharnessProtocolPart(TestharnessProtocolPart): + def __init__(self, parent): + super(MarionetteTestharnessProtocolPart, self).__init__(parent) + self.runner_handle = None - """ - self.marionette.timeout.script = timeout - self.timeout = timeout + def setup(self): + self.marionette = self.parent.marionette - def load_runner(self, protocol): + def load_runner(self, url_protocol): # Check if we previously had a test window open, and if we did make sure it's closed - self.marionette.execute_script("if (window.wrappedJSObject.win) {window.wrappedJSObject.win.close()}") - url = urlparse.urljoin(self.executor.server_url(protocol), "/testharness_runner.html") + self.marionette.execute_script("if (window.win) {window.win.close()}") + url = urlparse.urljoin(self.parent.executor.server_url(url_protocol), + "/testharness_runner.html") self.logger.debug("Loading %s" % url) self.runner_handle = self.marionette.current_window_handle try: @@ -142,7 +135,7 @@ class MarionetteProtocol(Protocol): self.marionette.execute_script( "document.title = '%s'" % threading.current_thread().name.replace("'", '"')) - def close_old_windows(self, protocol): + def close_old_windows(self, url_protocol): handles = self.marionette.window_handles runner_handle = None try: @@ -168,7 +161,8 @@ class MarionetteProtocol(Protocol): self.marionette.switch_to_window(runner_handle) if runner_handle != self.runner_handle: - self.load_runner(protocol) + self.load_runner(url_protocol) + return self.runner_handle def dismiss_alert(self, f): while True: @@ -183,50 +177,36 @@ class MarionetteProtocol(Protocol): else: break - def wait(self): - try: - socket_timeout = self.marionette.client.socket_timeout - except AttributeError: - # This can happen if there was a crash - return - if socket_timeout: - try: - self.marionette.timeout.script = socket_timeout / 2 - except (socket.error, IOError): - self.logger.debug("Socket closed") - return - - self.marionette.switch_to_window(self.runner_handle) - while True: + def get_test_window(self, window_id, parent): + test_window = None + if window_id: try: - self.marionette.execute_async_script("") - except errors.NoSuchWindowException: - # The window closed - break - except errors.ScriptTimeoutException: - self.logger.debug("Script timed out") + # Try this, it's in Level 1 but nothing supports it yet + win_s = self.marionette.execute_script("return window['%s'];" % self.window_id) + win_obj = json.loads(win_s) + test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] + except Exception: pass - except (socket.timeout, IOError): - self.logger.debug("Socket closed") - break - except Exception as e: - self.logger.warning(traceback.format_exc(e)) - break - def on_environment_change(self, old_environment, new_environment): - #Unset all the old prefs - for name in old_environment.get("prefs", {}).iterkeys(): - value = self.executor.original_pref_values[name] - if value is None: - self.clear_user_pref(name) + if test_window is None: + after = self.marionette.window_handles + if len(after) == 2: + test_window = next(iter(set(after) - set([parent]))) + elif after[0] == parent and len(after) > 2: + # Hope the first one here is the test window + test_window = after[1] else: - self.set_pref(name, value) + raise Exception("unable to find test window") + + assert test_window != parent + return test_window - for name, value in new_environment.get("prefs", {}).iteritems(): - self.executor.original_pref_values[name] = self.get_pref(name) - self.set_pref(name, value) - def set_pref(self, name, value): +class MarionettePrefsProtocolPart(PrefsProtocolPart): + def setup(self): + self.marionette = self.parent.marionette + + def set(self, name, value): if value.lower() not in ("true", "false"): try: int(value) @@ -258,7 +238,7 @@ class MarionetteProtocol(Protocol): with self.marionette.using_context(self.marionette.CONTEXT_CHROME): self.marionette.execute_script(script) - def clear_user_pref(self, name): + def clear(self, name): self.logger.info("Clearing pref %s" % (name)) script = """ let prefInterface = Components.classes["@mozilla.org/preferences-service;1"] @@ -269,7 +249,7 @@ class MarionetteProtocol(Protocol): with self.marionette.using_context(self.marionette.CONTEXT_CHROME): self.marionette.execute_script(script) - def get_pref(self, name): + def get(self, name): script = """ let prefInterface = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); @@ -289,6 +269,11 @@ class MarionetteProtocol(Protocol): with self.marionette.using_context(self.marionette.CONTEXT_CHROME): self.marionette.execute_script(script) + +class MarionetteStorageProtocolPart(StorageProtocolPart): + def setup(self): + self.marionette = self.parent.marionette + def clear_origin(self, url): self.logger.info("Clearing origin %s" % (url)) script = """ @@ -307,12 +292,118 @@ class MarionetteProtocol(Protocol): self.marionette.execute_script(script) +class MarionetteSelectorProtocolPart(SelectorProtocolPart): + def setup(self): + self.marionette = self.parent.marionette + + def elements_by_selector(self, selector): + return self.marionette.find_elements("css selector", selector) + + +class MarionetteClickProtocolPart(ClickProtocolPart): + def setup(self): + self.marionette = self.parent.marionette + + def element(self, element): + return element.click() + + +class MarionetteTestDriverProtocolPart(TestDriverProtocolPart): + def setup(self): + self.marionette = self.parent.marionette + + def send_message(self, message_type, status, message=None): + obj = { + "type": "testdriver-%s" % str(message_type), + "status": str(status) + } + if message: + obj["message"] = str(message) + self.marionette.execute_script("window.postMessage(%s, '*')" % json.dumps(obj)) + + +class MarionetteProtocol(Protocol): + implements = [MarionetteBaseProtocolPart, + MarionetteTestharnessProtocolPart, + MarionettePrefsProtocolPart, + MarionetteStorageProtocolPart, + MarionetteSelectorProtocolPart, + MarionetteClickProtocolPart, + MarionetteTestDriverProtocolPart] + + def __init__(self, executor, browser, capabilities=None, timeout_multiplier=1): + do_delayed_imports() + + super(MarionetteProtocol, self).__init__(executor, browser) + self.marionette = None + self.marionette_port = browser.marionette_port + self.capabilities = capabilities + self.timeout_multiplier = timeout_multiplier + self.runner_handle = None + + def connect(self): + self.logger.debug("Connecting to Marionette on port %i" % self.marionette_port) + startup_timeout = marionette.Marionette.DEFAULT_STARTUP_TIMEOUT * self.timeout_multiplier + self.marionette = marionette.Marionette(host='localhost', + port=self.marionette_port, + socket_timeout=None, + startup_timeout=startup_timeout) + + self.logger.debug("Waiting for Marionette connection") + while True: + try: + self.marionette.raise_for_port() + break + except IOError: + # When running in a debugger wait indefinitely for Firefox to start + if self.executor.debug_info is None: + raise + + self.logger.debug("Starting Marionette session") + self.marionette.start_session() + self.logger.debug("Marionette session started") + + def after_connect(self): + self.testharness.load_runner(self.executor.last_environment["protocol"]) + + def teardown(self): + try: + self.marionette._request_in_app_shutdown() + self.marionette.delete_session(send_request=False) + except Exception: + # This is typically because the session never started + pass + if self.marionette is not None: + del self.marionette + super(MarionetteProtocol, self).teardown() + + @property + def is_alive(self): + try: + self.marionette.current_window_handle + except Exception: + return False + return True + + def on_environment_change(self, old_environment, new_environment): + #Unset all the old prefs + for name in old_environment.get("prefs", {}).iterkeys(): + value = self.executor.original_pref_values[name] + if value is None: + self.prefs.clear(name) + else: + self.prefs.set(name, value) + + for name, value in new_environment.get("prefs", {}).iteritems(): + self.executor.original_pref_values[name] = self.get_pref(name) + self.prefs.set(name, value) + + class ExecuteAsyncScriptRun(object): def __init__(self, logger, func, protocol, url, timeout): self.logger = logger self.result = (None, None) self.protocol = protocol - self.marionette = protocol.marionette self.func = func self.url = url self.timeout = timeout @@ -322,19 +413,18 @@ class ExecuteAsyncScriptRun(object): index = self.url.rfind("/storage/") if index != -1: # Clear storage - self.protocol.clear_origin(self.url) + self.protocol.storage.clear_origin(self.url) timeout = self.timeout try: if timeout is not None: - if timeout + extra_timeout != self.protocol.timeout: - self.protocol.set_timeout(timeout + extra_timeout) + self.protocol.base.set_timeout(timeout + extra_timeout) else: # We just want it to never time out, really, but marionette doesn't # make that possible. It also seems to time out immediately if the # timeout is set too high. This works at least. - self.protocol.set_timeout(2**28 - 1) + self.protocol.base.set_timeout(2**28 - 1) except IOError: self.logger.error("Lost marionette connection before starting test") return Stop @@ -363,7 +453,7 @@ class ExecuteAsyncScriptRun(object): def _run(self): try: - self.result = True, self.func(self.marionette, self.url, self.timeout) + self.result = True, self.func(self.protocol, self.url, self.timeout) except errors.ScriptTimeoutException: self.logger.debug("Got a marionette timeout") self.result = False, ("EXTERNAL-TIMEOUT", None) @@ -384,6 +474,8 @@ class ExecuteAsyncScriptRun(object): class MarionetteTestharnessExecutor(TestharnessExecutor): + supports_testdriver = True + def __init__(self, browser, server_config, timeout_multiplier=1, close_after_done=True, debug_info=None, capabilities=None, **kwargs): @@ -394,6 +486,7 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): self.protocol = MarionetteProtocol(self, browser, capabilities, timeout_multiplier) self.script = open(os.path.join(here, "testharness_marionette.js")).read() + self.script_resume = open(os.path.join(here, "testharness_marionette_resume.js")).read() self.close_after_done = close_after_done self.window_id = str(uuid.uuid4()) @@ -409,7 +502,7 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): self.protocol.on_environment_change(self.last_environment, new_environment) if new_environment["protocol"] != self.last_environment["protocol"]: - self.protocol.load_runner(new_environment["protocol"]) + self.protocol.testharness.load_runner(new_environment["protocol"]) def do_test(self, test): timeout = (test.timeout * self.timeout_multiplier if self.debug_info is None @@ -425,24 +518,34 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): return (test.result_cls(*data), []) - def do_testharness(self, marionette, url, timeout): - if self.close_after_done: - marionette.execute_script("if (window.wrappedJSObject.win) {window.wrappedJSObject.win.close()}") - self.protocol.close_old_windows(self.protocol) + def do_testharness(self, protocol, url, timeout): + protocol.base.execute_script("if (window.win) {window.win.close()}") + parent_window = protocol.testharness.close_old_windows(protocol) if timeout is not None: timeout_ms = str(timeout * 1000) else: timeout_ms = "null" - script = self.script % {"abs_url": url, - "url": strip_server(url), - "window_id": self.window_id, - "timeout_multiplier": self.timeout_multiplier, - "timeout": timeout_ms, - "explicit_timeout": timeout is None} + format_map = {"abs_url": url, + "url": strip_server(url), + "window_id": self.window_id, + "timeout_multiplier": self.timeout_multiplier, + "timeout": timeout_ms, + "explicit_timeout": timeout is None} + + script = self.script % format_map + + rv = protocol.base.execute_script(script) + test_window = protocol.testharness.get_test_window(self.window_id, parent_window) - rv = marionette.execute_async_script(script, new_sandbox=False) + handler = CallbackHandler(self.logger, protocol, test_window) + while True: + result = protocol.base.execute_script( + self.script_resume % format_map, async=True) + done, rv = handler(result) + if done: + break return rv @@ -506,8 +609,8 @@ class MarionetteRefTestExecutor(RefTestExecutor): self.has_window = False if not self.has_window: - self.protocol.marionette.execute_script(self.script) - self.protocol.marionette.switch_to_window(self.protocol.marionette.window_handles[-1]) + self.protocol.base.execute_script(self.script) + self.protocol.base.set_window(self.protocol.marionette.window_handles[-1]) self.has_window = True result = self.implementation.run_test(test) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py index f905fac81e1..0b7118993d8 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -8,12 +8,18 @@ import traceback import urlparse import uuid -from .base import (Protocol, +from .base import (CallbackHandler, RefTestExecutor, RefTestImplementation, TestharnessExecutor, extra_timeout, strip_server) +from .protocol import (BaseProtocolPart, + TestharnessProtocolPart, + Protocol, + SelectorProtocolPart, + ClickProtocolPart, + TestDriverProtocolPart) from ..testrunner import Stop here = os.path.join(os.path.split(__file__)[0]) @@ -32,45 +38,142 @@ def do_delayed_imports(): from selenium.webdriver.remote.remote_connection import RemoteConnection +class SeleniumBaseProtocolPart(BaseProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def execute_script(self, script, async=False): + method = self.webdriver.execute_async_script if async else self.webdriver.execute_script + return method(script) + + def set_timeout(self, timeout): + self.webdriver.set_script_timeout(timeout * 1000) + + @property + def current_window(self): + return self.webdriver.current_window_handle + + def set_window(self, handle): + self.webdriver.switch_to_window(handle) + + def wait(self): + while True: + try: + self.webdriver.execute_async_script("") + except exceptions.TimeoutException: + pass + except (socket.timeout, exceptions.NoSuchWindowException, + exceptions.ErrorInResponseException, IOError): + break + except Exception as e: + self.logger.error(traceback.format_exc(e)) + break + + +class SeleniumTestharnessProtocolPart(TestharnessProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def load_runner(self, url_protocol): + url = urlparse.urljoin(self.parent.executor.server_url(url_protocol), + "/testharness_runner.html") + self.logger.debug("Loading %s" % url) + self.webdriver.get(url) + self.webdriver.execute_script("document.title = '%s'" % + threading.current_thread().name.replace("'", '"')) + + def close_old_windows(self): + exclude = self.webdriver.current_window_handle + handles = [item for item in self.webdriver.window_handles if item != exclude] + for handle in handles: + try: + self.webdriver.switch_to_window(handle) + self.webdriver.close() + except exceptions.NoSuchWindowException: + pass + self.webdriver.switch_to_window(exclude) + return exclude + + def get_test_window(self, window_id, parent): + test_window = None + if window_id: + try: + # Try this, it's in Level 1 but nothing supports it yet + win_s = self.webdriver.execute_script("return window['%s'];" % self.window_id) + win_obj = json.loads(win_s) + test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] + except Exception: + pass + + if test_window is None: + after = self.webdriver.window_handles + if len(after) == 2: + test_window = next(iter(set(after) - set([parent]))) + elif after[0] == parent and len(after) > 2: + # Hope the first one here is the test window + test_window = after[1] + else: + raise Exception("unable to find test window") + + assert test_window != parent + return test_window + + +class SeleniumSelectorProtocolPart(SelectorProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def elements_by_selector(self, selector): + return self.webdriver.find_elements_by_css_selector(selector) + + +class SeleniumClickProtocolPart(ClickProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def element(self, element): + return element.click() + + +class SeleniumTestDriverProtocolPart(TestDriverProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def send_message(self, message_type, status, message=None): + obj = { + "type": "testdriver-%s" % str(message_type), + "status": str(status) + } + if message: + obj["message"] = str(message) + self.webdriver.execute_script("window.postMessage(%s, '*')" % json.dumps(obj)) + + class SeleniumProtocol(Protocol): + implements = [SeleniumBaseProtocolPart, + SeleniumTestharnessProtocolPart, + SeleniumSelectorProtocolPart, + SeleniumClickProtocolPart, + SeleniumTestDriverProtocolPart] + def __init__(self, executor, browser, capabilities, **kwargs): do_delayed_imports() - Protocol.__init__(self, executor, browser) + super(SeleniumProtocol, self).__init__(executor, browser) self.capabilities = capabilities self.url = browser.webdriver_url self.webdriver = None - def setup(self, runner): + def connect(self): """Connect to browser via Selenium's WebDriver implementation.""" - self.runner = runner self.logger.debug("Connecting to Selenium on URL: %s" % self.url) - session_started = False - try: - self.webdriver = webdriver.Remote(command_executor=RemoteConnection(self.url.strip("/"), - resolve_ip=False), - desired_capabilities=self.capabilities) - except Exception: - self.logger.warning( - "Connecting to Selenium failed:\n%s" % traceback.format_exc()) - else: - self.logger.debug("Selenium session started") - session_started = True - - if not session_started: - self.logger.warning("Failed to connect to Selenium") - self.executor.runner.send_message("init_failed") - else: - try: - self.after_connect() - except Exception: - print >> sys.stderr, traceback.format_exc() - self.logger.warning( - "Failed to connect to navigate initial page") - self.executor.runner.send_message("init_failed") - else: - self.executor.runner.send_message("init_succeeded") + self.webdriver = webdriver.Remote(command_executor=RemoteConnection(self.url.strip("/"), + resolve_ip=False), + desired_capabilities=self.capabilities) + + def after_conect(self): + pass def teardown(self): self.logger.debug("Hanging up on Selenium session") @@ -90,35 +193,14 @@ class SeleniumProtocol(Protocol): return True def after_connect(self): - self.load_runner("http") - - def load_runner(self, protocol): - url = urlparse.urljoin(self.executor.server_url(protocol), - "/testharness_runner.html") - self.logger.debug("Loading %s" % url) - self.webdriver.get(url) - self.webdriver.execute_script("document.title = '%s'" % - threading.current_thread().name.replace("'", '"')) - - def wait(self): - while True: - try: - self.webdriver.execute_async_script("") - except exceptions.TimeoutException: - pass - except (socket.timeout, exceptions.NoSuchWindowException, - exceptions.ErrorInResponseException, IOError): - break - except Exception as e: - self.logger.error(traceback.format_exc(e)) - break + self.testharness.load_runner(self.executor.last_environment["protocol"]) class SeleniumRun(object): - def __init__(self, func, webdriver, url, timeout): + def __init__(self, func, protocol, url, timeout): self.func = func self.result = None - self.webdriver = webdriver + self.protocol = protocol self.url = url self.timeout = timeout self.result_flag = threading.Event() @@ -127,7 +209,7 @@ class SeleniumRun(object): timeout = self.timeout try: - self.webdriver.set_script_timeout((timeout + extra_timeout) * 1000) + self.protocol.base.set_timeout((timeout + extra_timeout)) except exceptions.ErrorInResponseException: self.logger.error("Lost WebDriver connection") return Stop @@ -144,7 +226,7 @@ class SeleniumRun(object): def _run(self): try: - self.result = True, self.func(self.webdriver, self.url, self.timeout) + self.result = True, self.func(self.protocol, self.url, self.timeout) except exceptions.TimeoutException: self.result = False, ("EXTERNAL-TIMEOUT", None) except (socket.timeout, exceptions.ErrorInResponseException): @@ -182,13 +264,13 @@ class SeleniumTestharnessExecutor(TestharnessExecutor): def on_environment_change(self, new_environment): if new_environment["protocol"] != self.last_environment["protocol"]: - self.protocol.load_runner(new_environment["protocol"]) + self.protocol.testharness.load_runner(new_environment["protocol"]) def do_test(self, test): url = self.test_url(test) success, data = SeleniumRun(self.do_testharness, - self.protocol.webdriver, + self.protocol, url, test.timeout * self.timeout_multiplier).run() @@ -197,111 +279,28 @@ class SeleniumTestharnessExecutor(TestharnessExecutor): return (test.result_cls(*data), []) - def do_testharness(self, webdriver, url, timeout): + def do_testharness(self, protocol, url, timeout): format_map = {"abs_url": url, "url": strip_server(url), "window_id": self.window_id, "timeout_multiplier": self.timeout_multiplier, "timeout": timeout * 1000} - parent = webdriver.current_window_handle - handles = [item for item in webdriver.window_handles if item != parent] - for handle in handles: - try: - webdriver.switch_to_window(handle) - webdriver.close() - except exceptions.NoSuchWindowException: - pass - webdriver.switch_to_window(parent) + parent_window = protocol.testharness.close_old_windows() + # Now start the test harness + protocol.base.execute_script(self.script % format_map) + test_window = protocol.testharness.get_test_window(webdriver, parent_window) - webdriver.execute_script(self.script % format_map) - try: - # Try this, it's in Level 1 but nothing supports it yet - win_s = webdriver.execute_script("return window['%s'];" % self.window_id) - win_obj = json.loads(win_s) - test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] - except Exception: - after = webdriver.window_handles - if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) - elif after[0] == parent and len(after) > 2: - # Hope the first one here is the test window - test_window = after[1] - else: - raise Exception("unable to find test window") - assert test_window != parent - - handler = CallbackHandler(webdriver, test_window, self.logger) + handler = CallbackHandler(self.logger, protocol, test_window) while True: - result = webdriver.execute_async_script( - self.script_resume % format_map) + result = protocol.base.execute_script( + self.script_resume % format_map, async=True) done, rv = handler(result) if done: break return rv -class CallbackHandler(object): - def __init__(self, webdriver, test_window, logger): - self.webdriver = webdriver - self.test_window = test_window - self.logger = logger - - def __call__(self, result): - self.logger.debug("Got async callback: %s" % result[1]) - try: - attr = getattr(self, "process_%s" % result[1]) - except AttributeError: - raise ValueError("Unknown callback type %r" % result[1]) - else: - return attr(result) - - def process_complete(self, result): - rv = [result[0]] + result[2] - return True, rv - - def process_action(self, result): - parent = self.webdriver.current_window_handle - try: - self.webdriver.switch_to.window(self.test_window) - action = result[2]["action"] - self.logger.debug("Got action: %s" % action) - if action == "click": - selector = result[2]["selector"] - elements = self.webdriver.find_elements_by_css_selector(selector) - if len(elements) == 0: - raise ValueError("Selector matches no elements") - elif len(elements) > 1: - raise ValueError("Selector matches multiple elements") - self.logger.debug("Clicking element: %s" % selector) - try: - elements[0].click() - except (exceptions.ElementNotInteractableException, - exceptions.ElementNotVisibleException) as e: - self._send_message("complete", - "failure", - e) - self.logger.debug("Clicking element failed: %s" % str(e)) - else: - self._send_message("complete", - "success") - self.logger.debug("Clicking element succeeded") - finally: - self.webdriver.switch_to.window(parent) - - return False, None - - def _send_message(self, message_type, status, message=None): - obj = { - "type": "testdriver-%s" % str(message_type), - "status": str(status) - } - if message: - obj["message"] = str(message) - self.webdriver.execute_script("window.postMessage(%s, '*')" % json.dumps(obj)) - - - class SeleniumRefTestExecutor(RefTestExecutor): def __init__(self, browser, server_config, timeout_multiplier=1, screenshot_cache=None, close_after_done=True, @@ -342,11 +341,12 @@ class SeleniumRefTestExecutor(RefTestExecutor): assert dpi is None return SeleniumRun(self._screenshot, - self.protocol.webdriver, + self.protocol, self.test_url(test), test.timeout).run() - def _screenshot(self, webdriver, url, timeout): + def _screenshot(self, protocol, url, timeout): + webdriver = protocol.webdriver webdriver.get(url) webdriver.execute_async_script(self.wait_script) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py index e66d34170a1..fb79cf24d93 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py @@ -16,11 +16,12 @@ from mozprocess import ProcessHandler from serve.serve import make_hosts_file from .base import (ExecutorException, - Protocol, + ConnectionlessProtocol, RefTestImplementation, testharness_result_converter, reftest_result_converter, - WdspecExecutor, WebDriverProtocol) + WdspecExecutor, + WebDriverProtocol) from .process import ProcessTestExecutor from ..browsers.base import browser_command from ..wpttest import WdspecResult, WdspecSubtestResult @@ -50,7 +51,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor): self.pause_after_test = pause_after_test self.result_data = None self.result_flag = None - self.protocol = Protocol(self, browser) + self.protocol = ConnectionlessProtocol(self, browser) self.hosts_path = write_hosts_file(server_config) def teardown(self): @@ -181,7 +182,7 @@ class ServoRefTestExecutor(ProcessTestExecutor): timeout_multiplier=timeout_multiplier, debug_info=debug_info) - self.protocol = Protocol(self, browser) + self.protocol = ConnectionlessProtocol(self, browser) self.screenshot_cache = screenshot_cache self.implementation = RefTestImplementation(self) self.tempdir = tempfile.mkdtemp() @@ -284,5 +285,6 @@ class ServoRefTestExecutor(ProcessTestExecutor): class ServoDriverProtocol(WebDriverProtocol): server_cls = ServoDriverServer + class ServoWdspecExecutor(WdspecExecutor): protocol_cls = ServoDriverProtocol diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py index ed7afaf1028..8f2964a7d3a 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py @@ -33,28 +33,15 @@ class ServoWebDriverProtocol(Protocol): self.port = browser.webdriver_port self.session = None - def setup(self, runner): + def connect(self): """Connect to browser via WebDriver.""" - self.runner = runner - url = "http://%s:%d" % (self.host, self.port) - session_started = False - try: - self.session = webdriver.Session(self.host, self.port, - extension=webdriver.servo.ServoCommandExtensions) - self.session.start() - except Exception: - self.logger.warning( - "Connecting with WebDriver failed:\n%s" % traceback.format_exc()) - else: - self.logger.debug("session started") - session_started = True - - if not session_started: - self.logger.warning("Failed to connect via WebDriver") - self.executor.runner.send_message("init_failed") - else: - self.executor.runner.send_message("init_succeeded") + self.session = webdriver.Session(self.host, self.port, + extension=webdriver.servo.ServoCommandExtensions) + self.session.start() + + def after_connect(self): + pass def teardown(self): self.logger.debug("Hanging up on WebDriver session") @@ -72,9 +59,6 @@ class ServoWebDriverProtocol(Protocol): return False return True - def after_connect(self): - pass - def wait(self): while True: try: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py new file mode 100644 index 00000000000..dc69d24f523 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py @@ -0,0 +1,278 @@ +import traceback +from abc import ABCMeta, abstractmethod + + +class Protocol(object): + """Backend for a specific browser-control protocol. + + Each Protocol is composed of a set of ProtocolParts that implement + the APIs required for specific interactions. This reflects the fact + that not all implementaions will support exactly the same feature set. + Each ProtocolPart is exposed directly on the protocol through an accessor + attribute with a name given by its `name` property. + + :param Executor executor: The Executor instance that's using this Protocol + :param Browser browser: The Browser using this protocol""" + __metaclass__ = ABCMeta + + implements = [] + + def __init__(self, executor, browser): + self.executor = executor + self.browser = browser + + for cls in self.implements: + name = cls.name + assert not hasattr(self, name) + setattr(self, name, cls(self)) + + @property + def logger(self): + """:returns: Current logger""" + return self.executor.logger + + @property + def is_alive(self): + """Is the browser connection still active + + :returns: A boolean indicating whether the connection is still active.""" + return True + + def setup(self, runner): + """Handle protocol setup, and send a message to the runner to indicate + success or failure.""" + msg = None + try: + msg = "Failed to start protocol connection" + self.connect() + + msg = None + + for cls in self.implements: + getattr(self, cls.name).setup() + + msg = "Post-connection steps failed" + self.after_connect() + except Exception: + if msg is not None: + self.logger.warning(msg) + self.logger.error(traceback.format_exc()) + self.executor.runner.send_message("init_failed") + return + else: + self.executor.runner.send_message("init_succeeded") + + @abstractmethod + def connect(self): + """Make a connection to the remote browser""" + pass + + @abstractmethod + def after_connect(self): + """Run any post-connection steps. This happens after the ProtocolParts are + initalized so can depend on a fully-populated object.""" + pass + + def teardown(self): + """Run cleanup steps after the tests are finished.""" + for cls in self.implements: + getattr(self, cls.name).teardown() + + +class ProtocolPart(object): + """Base class for all ProtocolParts. + + :param Protocol parent: The parent protocol""" + __metaclass__ = ABCMeta + + name = None + + def __init__(self, parent): + self.parent = parent + + @property + def logger(self): + """:returns: Current logger""" + return self.parent.logger + + def setup(self): + """Run any setup steps required for the ProtocolPart.""" + pass + + def teardown(self): + """Run any teardown steps required for the ProtocolPart.""" + pass + + +class BaseProtocolPart(ProtocolPart): + """Generic bits of protocol that are required for multiple test types""" + __metaclass__ = ABCMeta + + name = "base" + + @abstractmethod + def execute_script(self, script, async=False): + """Execute javascript in the current Window. + + :param str script: The js source to execute. This is implicitly wrapped in a function. + :param bool async: Whether the script is asynchronous in the webdriver + sense i.e. whether the return value is the result of + the initial function call or if it waits for some callback. + :returns: The result of the script execution. + """ + pass + + @abstractmethod + def set_timeout(self, timeout): + """Set the timeout for script execution. + + :param timeout: Script timeout in seconds""" + pass + + @abstractmethod + def wait(self): + """Wait indefinitely for the browser to close""" + pass + + @property + def current_window(self): + """Return a handle identifying the current top level browsing context + + :returns: A protocol-specific handle""" + pass + + @abstractmethod + def set_window(self, handle): + """Set the top level browsing context to one specified by a given handle. + + :param handle: A protocol-specific handle identifying a top level browsing + context.""" + pass + + +class TestharnessProtocolPart(ProtocolPart): + """Protocol part required to run testharness tests.""" + __metaclass__ = ABCMeta + + name = "testharness" + + @abstractmethod + def load_runner(self, url_protocol): + """Load the initial page used to control the tests. + + :param str url_protocol: "https" or "http" depending on the test metadata. + """ + pass + + @abstractmethod + def close_old_windows(self, url_protocol): + """Close existing windows except for the initial runner window. + After calling this method there must be exactly one open window that + contains the initial runner page. + + :param str url_protocol: "https" or "http" depending on the test metadata. + """ + pass + + @abstractmethod + def get_test_window(self, window_id, parent): + """Get the window handle dorresponding to the window containing the + currently active test. + + :param window_id: A string containing the DOM name of the Window that + contains the test, or None. + :param parent: The handle of the runner window. + :returns: A protocol-specific window handle. + """ + pass + + +class PrefsProtocolPart(ProtocolPart): + """Protocol part that allows getting and setting browser prefs.""" + __metaclass__ = ABCMeta + + name = "prefs" + + @abstractmethod + def set(self, name, value): + """Set the named pref to value. + + :param name: A pref name of browser-specific type + :param value: A pref value of browser-specific type""" + pass + + @abstractmethod + def get(self, name): + """Get the current value of a named pref + + :param name: A pref name of browser-specific type + :returns: A pref value of browser-specific type""" + pass + + @abstractmethod + def clear(self, name): + """Reset the value of a named pref back to the default. + + :param name: A pref name of browser-specific type""" + pass + + +class StorageProtocolPart(ProtocolPart): + """Protocol part for manipulating browser storage.""" + __metaclass__ = ABCMeta + + name = "storage" + + @abstractmethod + def clear_origin(self, url): + """Clear all the storage for a specified origin. + + :param url: A url belonging to the origin""" + pass + + +class SelectorProtocolPart(ProtocolPart): + """Protocol part for selecting elements on the page.""" + __metaclass__ = ABCMeta + + name = "select" + + @abstractmethod + def elements_by_selector(self, selector): + """Select elements matching a CSS selector + + :param str selector: The CSS selector + :returns: A list of protocol-specific handles to elements""" + pass + + +class ClickProtocolPart(ProtocolPart): + """Protocol part for performing trusted clicks""" + __metaclass__ = ABCMeta + + name = "click" + + @abstractmethod + def element(self, element): + """Perform a trusted click somewhere on a specific element. + + :param element: A protocol-specific handle to an element.""" + pass + + +class TestDriverProtocolPart(ProtocolPart): + """Protocol part that implements the basic functionality required for + all testdriver-based tests.""" + __metaclass__ = ABCMeta + + name = "testdriver" + + @abstractmethod + def send_message(self, message_type, status, message=None): + """Send a testdriver message to the browser. + + :param str message_type: The kind of the message. + :param str status: Either "failure" or "success" depending on whether the + previous command succeeded. + :param str message: Additional data to add to the message.""" + pass diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js index e2b70a0ad8f..049caa4688c 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js @@ -1,31 +1,24 @@ -window.wrappedJSObject.timeout_multiplier = %(timeout_multiplier)d; -window.wrappedJSObject.explicit_timeout = %(explicit_timeout)d; +window.timeout_multiplier = %(timeout_multiplier)d; +window.explicit_timeout = %(explicit_timeout)d; -window.wrappedJSObject.addEventListener("message", function listener(event) { - if (event.data.type != "complete") { - return; - } - window.wrappedJSObject.removeEventListener("message", listener); - clearTimeout(timer); - var tests = event.data.tests; - var status = event.data.status; +window.message_queue = []; - var subtest_results = tests.map(function (x) { - return [x.name, x.status, x.message, x.stack] - }); +window.setMessageListener = function(func) { + window.current_listener = func; + window.addEventListener( + "message", + func, + false + ); +}; - marionetteScriptFinished(["%(url)s", - status.status, - status.message, - status.stack, - subtest_results]); -}, false); +window.setMessageListener(function(event) { + window.message_queue.push(event); +}); -window.wrappedJSObject.win = window.open("%(abs_url)s", "%(window_id)s"); +window.win = window.open("%(abs_url)s", "%(window_id)s"); -var timer = null; -if (%(timeout)s) { - timer = setTimeout(function() { - window.wrappedJSObject.win.timeout(); - }, %(timeout)s); -} +window.timer = setTimeout(function() { + window.win.timeout(); + window.win.close(); +}, %(timeout)s); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js new file mode 100644 index 00000000000..7a2df98ed4e --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js @@ -0,0 +1,46 @@ +var callback = arguments[arguments.length - 1]; + +function process_event(event) { + var data = event.data; + + var payload = undefined; + + switch(data.type) { + case "complete": + var tests = event.data.tests; + var status = event.data.status; + + var subtest_results = tests.map(function(x) { + return [x.name, x.status, x.message, x.stack]; + }); + payload = [status.status, + status.message, + status.stack, + subtest_results]; + clearTimeout(window.timer); + break; + + case "action": + window.setMessageListener(function(event) { + window.message_queue.push(event); + }); + payload = data; + break; + default: + return; + } + + callback(["%(url)s", data.type, payload]); +} + +window.removeEventListener("message", window.current_listener); +if (window.message_queue.length) { + var next = window.message_queue.shift(); + process_event(next); +} else { + window.addEventListener( + "message", function f(event) { + window.removeEventListener("message", f); + process_event(event); + }, false); +} diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js index 7229777b32e..7a2df98ed4e 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js @@ -26,6 +26,8 @@ function process_event(event) { }); payload = data; break; + default: + return; } callback(["%(url)s", data.type, payload]); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py index 16623f76867..1d2d768bfa7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -108,7 +108,7 @@ class TestRunner(object): raise def wait(self): - self.executor.protocol.wait() + self.executor.wait() self.send_message("wait_finished") def send_message(self, command, *args): @@ -304,6 +304,7 @@ class TestRunnerManager(threading.Thread): # This is started in the actual new thread self.logger = None + self.test_count = 0 self.unexpected_count = 0 # This may not really be what we want @@ -569,6 +570,7 @@ class TestRunnerManager(threading.Thread): if self.browser.check_for_crashes(): status = "CRASH" + self.test_count += 1 is_unexpected = expected != status if is_unexpected: self.unexpected_count += 1 @@ -789,5 +791,8 @@ class ManagerGroup(object): self.stop_flag.set() self.logger.debug("Stop flag set in ManagerGroup") + def test_count(self): + return sum(item.test_count for item in self.pool) + def unexpected_count(self): return sum(item.unexpected_count for item in self.pool) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py index 7eef2c69013..c7109c525fd 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py @@ -58,6 +58,8 @@ def test_server_start_config(product): start.assert_called_once() args = start.call_args config = args[0][0] - if "host" in env_options: - assert config["host"] == env_options["host"] - assert isinstance(config["bind_hostname"], bool) + if "server_host" in env_options: + assert config["server_host"] == env_options["server_host"] + else: + assert config["server_host"] == config["browser_host"] + assert isinstance(config["bind_address"], bool) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py index 17fb2f0a04d..75e5d8aca43 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -4,6 +4,7 @@ import os import sys from collections import OrderedDict from distutils.spawn import find_executable +from datetime import datetime, timedelta import config import wpttest @@ -82,6 +83,36 @@ scheme host and port.""") mode_group.add_argument("--verify-log-full", action="store_true", default=False, help="Output per-iteration test results when running verify") + mode_group.add_argument("--verify-repeat-loop", action="store", + default=10, + help="Number of iterations for a run that reloads each test without restart.", + type=int) + mode_group.add_argument("--verify-repeat-restart", action="store", + default=5, + help="Number of iterations, for a run that restarts the runner between each iteration", + type=int) + chaos_mode_group = mode_group.add_mutually_exclusive_group() + chaos_mode_group.add_argument("--verify-no-chaos-mode", action="store_false", + default=True, + dest="verify_chaos_mode", + help="Disable chaos mode when running on Firefox") + chaos_mode_group.add_argument("--verify-chaos-mode", action="store_true", + default=True, + dest="verify_chaos_mode", + help="Enable chaos mode when running on Firefox") + mode_group.add_argument("--verify-max-time", action="store", + default=None, + help="The maximum number of minutes for the job to run", + type=lambda x: timedelta(minutes=float(x))) + output_results_group = mode_group.add_mutually_exclusive_group() + output_results_group.add_argument("--verify-no-output-results", action="store_false", + dest="verify_output_results", + default=True, + help="Prints individuals test results and messages") + output_results_group.add_argument("--verify-output-results", action="store_true", + dest="verify_output_results", + default=True, + help="Disable printing individuals test results and messages") test_selection_group = parser.add_argument_group("Test Selection") test_selection_group.add_argument("--test-types", action="store", diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py index d3d9d074254..40863d8d862 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py @@ -173,6 +173,7 @@ def run_tests(config, test_paths, product, **kwargs): logger.info("Using %i client processes" % kwargs["processes"]) + test_total = 0 unexpected_total = 0 kwargs["pause_after_test"] = get_pause_after_test(test_loader, **kwargs) @@ -200,6 +201,7 @@ def run_tests(config, test_paths, product, **kwargs): elif repeat > 1: logger.info("Repetition %i / %i" % (repeat_count, repeat)) + test_count = 0 unexpected_count = 0 logger.suite_start(test_loader.test_ids, name='web-platform-test', run_info=run_info) for test_type in kwargs["test_types"]: @@ -267,20 +269,32 @@ def run_tests(config, test_paths, product, **kwargs): logger.critical("Main thread got signal") manager_group.stop() raise + test_count += manager_group.test_count() unexpected_count += manager_group.unexpected_count() + test_total += test_count unexpected_total += unexpected_count logger.info("Got %i unexpected results" % unexpected_count) if repeat_until_unexpected and unexpected_total > 0: break logger.suite_end() + + if test_total == 0: + logger.error("No tests ran") + return False + return unexpected_total == 0 def check_stability(**kwargs): import stability - return stability.check_stability(logger, **kwargs) - + return stability.check_stability(logger, + max_time=kwargs['verify_max_time'], + chaos_mode=kwargs['verify_chaos_mode'], + repeat_loop=kwargs['verify_repeat_loop'], + repeat_restart=kwargs['verify_repeat_restart'], + output_results=kwargs['verify_output_results'], + **kwargs) def start(**kwargs): if kwargs["list_test_groups"]: diff --git a/tests/wpt/web-platform-tests/tools/wptserve/.coveragerc b/tests/wpt/web-platform-tests/tools/wptserve/.coveragerc new file mode 100644 index 00000000000..0e00c079f64 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptserve/.coveragerc @@ -0,0 +1,11 @@ +[run] +branch = True +parallel = True +omit = + */site-packages/* + */lib_pypy/* + +[paths] +wptserve = + wptserve + .tox/**/site-packages/wptserve diff --git a/tests/wpt/web-platform-tests/tools/wptserve/docs/stash.rst b/tests/wpt/web-platform-tests/tools/wptserve/docs/stash.rst index 821c2d34455..49846f21061 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/docs/stash.rst +++ b/tests/wpt/web-platform-tests/tools/wptserve/docs/stash.rst @@ -3,7 +3,7 @@ Stash Object for storing cross-request state. This is unusual in that keys must be UUIDs, in order to prevent different clients setting the same -key, and values are write-once, read-once to minimise the chances of +key, and values are write-once, read-once to minimize the chances of state persisting indefinitely. The stash defines two operations; `put`, to add state and `take` to remove state. Furthermore, the view of the stash is path-specific; by default a request will only see the diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py index 534afed6b6d..126a68e32eb 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py @@ -398,6 +398,8 @@ def template(request, content, escape_type="html"): value = request.server.config['not_domains'] else: value = request.server.config['domains'] + elif field == "host": + value = request.server.config["browser_host"] elif field in request.server.config: value = request.server.config[tokens[0][1]] elif field == "location": diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py index f9ed238624b..d1ef750861c 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py @@ -111,7 +111,7 @@ class WebTestServer(ThreadingMixIn, BaseHTTPServer.HTTPServer): daemon_threads = True def __init__(self, server_address, request_handler_cls, - router, rewriter, bind_hostname, + router, rewriter, bind_address, config=None, use_ssl=False, key_file=None, certificate=None, encrypt_after_connect=False, latency=None, **kwargs): """Server for HTTP(s) Requests @@ -141,10 +141,10 @@ class WebTestServer(ThreadingMixIn, BaseHTTPServer.HTTPServer): This enables the server to act as a self-proxy. - :param bind_hostname True to bind the server to both the hostname and - port specified in the server_address parameter. - False to bind the server only to the port in the - server_address parameter, but not to the hostname. + :param bind_address True to bind the server to both the IP address and + port specified in the server_address parameter. + False to bind the server only to the port in the + server_address parameter, but not to the address. :param latency: Delay in ms to wait before seving each response, or callable that returns a delay in ms """ @@ -156,7 +156,7 @@ class WebTestServer(ThreadingMixIn, BaseHTTPServer.HTTPServer): self.latency = latency - if bind_hostname: + if bind_address: hostname_port = server_address else: hostname_port = ("",server_address[1]) @@ -168,7 +168,8 @@ class WebTestServer(ThreadingMixIn, BaseHTTPServer.HTTPServer): Server.config = config else: self.logger.debug("Using default configuration") - Server.config = {"host": server_address[0], + Server.config = {"browser_host": server_address[0], + "server_host": server_address[0], "domains": {"": server_address[0]}, "ports": {"http": [self.server_address[1]]}} @@ -343,7 +344,7 @@ class WebTestHttpd(object): :param rewrites: List of rewrites with which to initialize the rewriter_cls :param config: Dictionary holding environment configuration settings for handlers to read, or None to use the default values. - :param bind_hostname: Boolean indicating whether to bind server to hostname. + :param bind_address: Boolean indicating whether to bind server to IP address. :param latency: Delay in ms to wait before seving each response, or callable that returns a delay in ms @@ -381,7 +382,7 @@ class WebTestHttpd(object): server_cls=None, handler_cls=WebTestRequestHandler, use_ssl=False, key_file=None, certificate=None, encrypt_after_connect=False, router_cls=Router, doc_root=os.curdir, routes=None, - rewriter_cls=RequestRewriter, bind_hostname=True, rewrites=None, + rewriter_cls=RequestRewriter, bind_address=True, rewrites=None, latency=None, config=None): if routes is None: @@ -409,7 +410,7 @@ class WebTestHttpd(object): self.router, self.rewriter, config=config, - bind_hostname=bind_hostname, + bind_address=bind_address, use_ssl=use_ssl, key_file=key_file, certificate=certificate, diff --git a/tests/wpt/web-platform-tests/user-timing/invoke_with_timing_attributes.html b/tests/wpt/web-platform-tests/user-timing/invoke_with_timing_attributes.html index dc355a9ab99..6c06f5e9d52 100644 --- a/tests/wpt/web-platform-tests/user-timing/invoke_with_timing_attributes.html +++ b/tests/wpt/web-platform-tests/user-timing/invoke_with_timing_attributes.html @@ -24,8 +24,8 @@ for (var i in timingAttributes) { function emit_test2(attrName) { test(function() { - assert_throws("SyntaxError", function() { window.performance.measure(attrName); }); - }, "performance.measure should throw if used with timing attribute " + attrName); + window.performance.measure(attrName); + }, "performance.measure should not throw if used with timing attribute " + attrName); } for (var i in timingAttributes) { emit_test2(timingAttributes[i]); diff --git a/tests/wpt/web-platform-tests/user-timing/measure_exceptions_navigation_timing.html b/tests/wpt/web-platform-tests/user-timing/measure_exceptions_navigation_timing.html index 77c1e48e3f9..1633221198c 100644 --- a/tests/wpt/web-platform-tests/user-timing/measure_exceptions_navigation_timing.html +++ b/tests/wpt/web-platform-tests/user-timing/measure_exceptions_navigation_timing.html @@ -59,7 +59,7 @@ test(function () { "attribute with a value of 0, throws a InvalidAccessError exception."); </script> </head> - <body onload="onload_test();"> + <body> <h1>Description</h1> <p><code>window.performance.measure()</code> method throws a InvalidAccessError whenever a navigation timing attribute with a value of zero is provided as the startMark or endMark. diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html b/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html index c2e9702cb73..142d49d265c 100644 --- a/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html @@ -20,13 +20,13 @@ test(t => { iterations: 10, iterationComposite: 'accumulate' }); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).alignContent, 'flex-end', 'Animated align-content style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).alignContent, 'flex-start', 'Animated align-content style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).alignContent, 'flex-end', 'Animated align-content style at 50s of the third iteration'); }, 'iteration composition of discrete type animation (align-content)'); @@ -41,13 +41,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '5px', 'Animated margin-left style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).marginLeft, '20px', 'Animated margin-left style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '25px', 'Animated margin-left style at 50s of the third iteration'); }, 'iteration composition of <length> type animation'); @@ -66,13 +66,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '25px', 'Animated width style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).width, '100px', 'Animated width style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '125px', 'Animated width style at 50s of the third iteration'); }, 'iteration composition of <percentage> type animation'); @@ -87,13 +87,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).color, 'rgb(60, 60, 60)', 'Animated color style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).color, 'rgb(240, 240, 240)', 'Animated color style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).color, 'rgb(255, 255, 255)', 'Animated color style at 50s of the third iteration'); }, 'iteration composition of <color> type animation'); @@ -108,13 +108,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).color, 'rgb(30, 90, 30)', 'Animated color style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).color, 'rgb(120, 240, 120)', 'Animated color style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; // The green color is (240 + 180) / 2 = 210 assert_equals(getComputedStyle(div).color, 'rgb(150, 210, 150)', 'Animated color style at 50s of the third iteration'); @@ -131,13 +131,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).flexGrow, '5', 'Animated flex-grow style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).flexGrow, '20', 'Animated flex-grow style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).flexGrow, '25', 'Animated flex-grow style at 50s of the third iteration'); }, 'iteration composition of <number> type animation'); @@ -154,13 +154,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).clip, 'rect(5px, 5px, 5px, 5px)', 'Animated clip style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).clip, 'rect(20px, 20px, 20px, 20px)', 'Animated clip style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).clip, 'rect(25px, 25px, 25px, 25px)', 'Animated clip style at 50s of the third iteration'); }, 'iteration composition of <shape> type animation'); @@ -175,13 +175,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '5px', 'Animated calc width style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).width, '20px', 'Animated calc width style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '25px', 'Animated calc width style at 50s of the third iteration'); }, 'iteration composition of <calc()> value animation'); @@ -200,15 +200,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '10px', // 100px * 5% + 5px 'Animated calc width style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).width, '40px', // 100px * (10% + 10%) + (10px + 10px) 'Animated calc width style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).width, '50px', // (40px + 60px) / 2 'Animated calc width style at 50s of the third iteration'); @@ -225,13 +225,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).opacity, '0.2', 'Animated opacity style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).opacity, '0.8', 'Animated opacity style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).opacity, '1', // (0.8 + 1.2) * 0.5 'Animated opacity style at 50s of the third iteration'); }, 'iteration composition of opacity animation'); @@ -247,15 +247,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).boxShadow, 'rgb(60, 60, 60) 5px 5px 5px 0px', 'Animated box-shadow style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).boxShadow, 'rgb(240, 240, 240) 20px 20px 20px 0px', 'Animated box-shadow style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).boxShadow, 'rgb(255, 255, 255) 25px 25px 25px 0px', 'Animated box-shadow style at 50s of the third iteration'); @@ -271,13 +271,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'blur(5px)', 'Animated filter blur style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'blur(20px)', 'Animated filter blur style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'blur(25px)', 'Animated filter blur style at 50s of the third iteration'); }, 'iteration composition of filter blur animation'); @@ -293,15 +293,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(1.4)', 'Animated filter brightness style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'brightness(2.6)', // brightness(1) + brightness(0.8) + brightness(0.8) 'Animated filter brightness style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(3)', // (brightness(2.6) + brightness(3.4)) * 0.5 'Animated filter brightness style at 50s of the third iteration'); @@ -318,15 +318,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(0.5)', 'Animated filter brightness style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'brightness(0)', // brightness(1) is an identity element, not accumulated. 'Animated filter brightness style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(0.5)', // brightness(1) is an identity element, not accumulated. 'Animated filter brightness style at 50s of the third iteration'); @@ -343,15 +343,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'drop-shadow(rgb(60, 60, 60) 5px 5px 5px)', 'Animated filter drop-shadow style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'drop-shadow(rgb(240, 240, 240) 20px 20px 20px)', 'Animated filter drop-shadow style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'drop-shadow(rgb(255, 255, 255) 25px 25px 25px)', 'Animated filter drop-shadow style at 50s of the third iteration'); @@ -368,15 +368,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(1.5) contrast(1.5)', 'Animated filter list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'brightness(3) contrast(3)', 'Animated filter list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'brightness(3.5) contrast(3.5)', 'Animated filter list at 50s of the third iteration'); @@ -393,18 +393,18 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'contrast(2) brightness(2)', // discrete 'Animated filter list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, // We can't accumulate 'contrast(2) brightness(2)' onto // the first list 'brightness(1) contrast(1)' because of // mismatch of the order. 'brightness(1) contrast(1)', 'Animated filter list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, // We *can* accumulate 'contrast(2) brightness(2)' onto // the same list 'contrast(2) brightness(2)' here. @@ -424,15 +424,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'sepia(0.5) contrast(1.5)', 'Animated filter list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).filter, 'sepia(2) contrast(3)', 'Animated filter list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).filter, 'sepia(2.5) contrast(3.5)', 'Animated filter list at 50s of the third iteration'); @@ -448,15 +448,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0, 1, -1, 0, 0, 0)', // rotate(90deg) 'Animated transform(rotate) style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(1, 0, 0, 1, 0, 0)', // rotate(360deg) 'Animated transform(rotate) style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0, 1, -1, 0, 0, 0)', // rotate(450deg) 'Animated transform(rotate) style at 50s of the third iteration'); @@ -472,16 +472,16 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0.5, 0, 0, 0.5, 0, 0)', // scale(0.5) 'Animated transform(scale) style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0, 0, 0, 0, 0, 0)', // scale(0); scale(1) is an identity element, // not accumulated. 'Animated transform(scale) style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0.5, 0, 0, 0.5, 0, 0)', // scale(0.5); scale(1) an identity // element, not accumulated. @@ -498,15 +498,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(1.5, 0, 0, 1.5, 0, 0)', // scale(1.5) 'Animated transform(scale) style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(3, 0, 0, 3, 0, 0)', // scale(1 + (2 -1) + (2 -1)) 'Animated transform(scale) style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(3.5, 0, 0, 3.5, 0, 0)', // (scale(3) + scale(4)) * 0.5 'Animated transform(scale) style at 50s of the third iteration'); @@ -522,15 +522,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(1, 0, 0, 1, 0, 0)', // scale(1) 'Animated transform(scale) style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(2, 0, 0, 2, 0, 0)', // (scale(0) + scale(2-1)*2) 'Animated transform(scale) style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(3, 0, 0, 3, 0, 0)', // (scale(2) + scale(4)) * 0.5 'Animated transform(scale) style at 50s of the third iteration'); @@ -547,15 +547,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0, 1, -1, 0, 0, 5)', // rotate(90deg) translateX(5px) 'Animated transform list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(1, 0, 0, 1, 20, 0)', // rotate(360deg) translateX(20px) 'Animated transform list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(0, 1, -1, 0, 0, 25)', // rotate(450deg) translateX(25px) 'Animated transform list at 50s of the third iteration'); @@ -572,16 +572,16 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix(2.5, 0, 0, 2.5, 15, 0)', 'Animated transform of matrix function at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, // scale(2) + (scale(3-1)*2) + translateX(30px)*2 'matrix(6, 0, 0, 6, 60, 0)', 'Animated transform of matrix function at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // from: matrix(6, 0, 0, 6, 60, 0) // to: matrix(7, 0, 0, 7, 90, 0) @@ -601,20 +601,20 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // Interpolate between matrix(2, 0, 0, 2, 0, 0) = translateX(0px) scale(2) // and matrix(3, 0, 0, 3, 30, 0) = scale(3) translateX(10px) 'matrix(2.5, 0, 0, 2.5, 15, 0)', 'Animated transform list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, // 'from' and 'to' value are mismatched, so accumulate // matrix(2, 0, 0, 2, 0, 0) onto matrix(3, 0, 0, 3, 30, 0) * 2 // = scale(2) + (scale(3-1)*2) + translateX(30px)*2 'matrix(6, 0, 0, 6, 60, 0)', 'Animated transform list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // Interpolate between matrix(6, 0, 0, 6, 60, 0) // and matrix(7, 0, 0, 7, 210, 0) = scale(7) translate(30px) @@ -636,20 +636,20 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // Interpolate between matrix(1, 0, 0, 1, 0, 0) = translateX(0px) // and matrix(2, 0, 0, 2, 20, 0) = scale(2) translateX(10px) 'matrix(1.5, 0, 0, 1.5, 10, 0)', 'Animated transform list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, // 'from' and 'to' value are mismatched, so accumulate // matrix(1, 0, 0, 1, 0, 0) onto matrix(2, 0, 0, 2, 20, 0) * 2 // = scale(1) + (scale(2-1)*2) + translateX(20px)*2 'matrix(3, 0, 0, 3, 40, 0)', 'Animated transform list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // Interpolate between matrix(3, 0, 0, 3, 40, 0) // and matrix(4, 0, 0, 4, 120, 0) = @@ -670,17 +670,17 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // translateX(none) -> translateX(10px) @ 50% 'matrix(1, 0, 0, 1, 5, 0)', 'Animated transform list at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, // translateX(10px * 2 + none) -> translateX(10px * 2 + 10px) @ 0% 'matrix(1, 0, 0, 1, 20, 0)', 'Animated transform list at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // translateX(10px * 2 + none) -> translateX(10px * 2 + 10px) @ 50% 'matrix(1, 0, 0, 1, 25, 0)', @@ -704,16 +704,16 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 40, 1)', 'Animated transform of matrix3d function at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, // translateZ(30px) + (translateZ(50px)*2) 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 130, 1)', 'Animated transform of matrix3d function at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, // from: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 130, 1) // to: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 150, 1) @@ -736,11 +736,11 @@ test(t => { assert_matrix_equals(getComputedStyle(div).transform, 'matrix(1, 0, 0, 1, 0, 0)', // Actually not rotated at all. 'Animated transform of rotate3d function at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_matrix_equals(getComputedStyle(div).transform, rotate3dToMatrix3d(1, 1, 0, Math.PI), // 180deg 'Animated transform of rotate3d function at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_matrix_equals(getComputedStyle(div).transform, rotate3dToMatrix3d(1, 1, 0, 225 * Math.PI / 180), //((270 + 180) * 0.5)deg 'Animated transform of rotate3d function at 50s of the third iteration'); @@ -756,13 +756,13 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '15px', 'Animated margin-left style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).marginLeft, '50px', // 10px + 20px + 20px 'Animated margin-left style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '55px', // (50px + 60px) * 0.5 'Animated margin-left style at 50s of the third iteration'); }, 'iteration composition starts with non-zero value animation'); @@ -777,15 +777,15 @@ test(t => { iterationComposite: 'accumulate' }); anim.pause(); - anim.currentTime = anim.effect.timing.duration / 2; + anim.currentTime = anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '0px', 'Animated margin-left style at 50s of the first iteration'); - anim.currentTime = anim.effect.timing.duration * 2; + anim.currentTime = anim.effect.getComputedTiming().duration * 2; assert_equals(getComputedStyle(div).marginLeft, '-10px', // 10px + -10px + -10px 'Animated margin-left style at 0s of the third iteration'); - anim.currentTime += anim.effect.timing.duration / 2; + anim.currentTime += anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '-20px', // (-10px + -30px) * 0.5 'Animated margin-left style at 50s of the third iteration'); @@ -801,17 +801,22 @@ test(t => { anim.pause(); anim.currentTime = - anim.effect.timing.duration * 2 + anim.effect.timing.duration / 2; + anim.effect.getComputedTiming().duration * 2 + + anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '25px', 'Animated style at 50s of the third iteration'); // double its duration. - anim.effect.timing.duration = anim.effect.timing.duration * 2; + anim.effect.updateTiming({ + duration: anim.effect.getComputedTiming().duration * 2 + }); assert_equals(getComputedStyle(div).marginLeft, '12.5px', 'Animated style at 25s of the first iteration'); // half of original. - anim.effect.timing.duration = anim.effect.timing.duration / 4; + anim.effect.updateTiming({ + duration: anim.effect.getComputedTiming().duration / 4 + }); assert_equals(getComputedStyle(div).marginLeft, '50px', 'Animated style at 50s of the fourth iteration'); }, 'duration changes with an iteration composition operation of accumulate'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html index 36c4ee148e8..c7b7b25a75c 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html @@ -8,6 +8,8 @@ <script src="../../resources/easing-tests.js"></script> <script src="../../resources/keyframe-utils.js"></script> <script src="../../resources/keyframe-tests.js"></script> +<script src="../../resources/timing-utils.js"></script> +<script src="../../resources/timing-tests.js"></script> <body> <div id="log"></div> <iframe width="10" height="10" id="iframe"></iframe> @@ -17,8 +19,7 @@ // Tests on Element test(t => { - const div = createDiv(t); - const anim = div.animate(null); + const anim = createDiv(t).animate(null); assert_class_string(anim, 'Animation', 'Returned object is an Animation'); }, 'Element.animate() creates an Animation object'); @@ -57,26 +58,9 @@ test(t => { }, 'Element.animate() creates an Animation object with a KeyframeEffect' + ' that is created in the relevant realm of the target element'); -test(t => { - const iframe = window.frames[0]; - const div = createDiv(t, iframe.document); - const anim = div.animate(null); - assert_equals(Object.getPrototypeOf(anim.effect.timing), - iframe.AnimationEffectTiming.prototype, - 'The prototype of the created AnimationEffectTiming is that' - + ' defined on the relevant global for the target element'); - assert_not_equals(Object.getPrototypeOf(anim.effect.timing), - AnimationEffectTiming.prototype, - 'The prototype of the created AnimationEffectTiming is NOT' - + ' that of the current global'); -}, 'Element.animate() creates an Animation object with a KeyframeEffect' - + ' whose AnimationEffectTiming object is created in the relevant realm' - + ' of the target element'); - for (const subtest of gEmptyKeyframeListTests) { test(t => { - const div = createDiv(t); - const anim = div.animate(subtest, 2000); + const anim = createDiv(t).animate(subtest, 2000); assert_not_equals(anim, null); }, 'Element.animate() accepts empty keyframe lists ' + `(input: ${JSON.stringify(subtest)})`); @@ -84,8 +68,7 @@ for (const subtest of gEmptyKeyframeListTests) { for (const subtest of gKeyframesTests) { test(t => { - const div = createDiv(t); - const anim = div.animate(subtest.input, 2000); + const anim = createDiv(t).animate(subtest.input, 2000); assert_frame_lists_equal(anim.effect.getKeyframes(), subtest.output); }, `Element.animate() accepts ${subtest.desc}`); } @@ -99,54 +82,101 @@ for (const subtest of gInvalidKeyframesTests) { }, `Element.animate() does not accept ${subtest.desc}`); } -for (const invalidEasing of gInvalidEasings) { - test(t => { - const div = createDiv(t); - assert_throws(new TypeError, () => { - div.animate({ easing: invalidEasing }, 2000); - }); - }, `Element.animate() does not accept invalid easing: '${invalidEasing}'`); -} - test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_equals(anim.effect.timing.duration, 2000); - // Also check that unspecified parameters receive their default values - assert_equals(anim.effect.timing.fill, 'auto'); + const anim = createDiv(t).animate(null, 2000); + assert_equals(anim.effect.getTiming().duration, 2000); + assert_default_timing_except(anim.effect, ['duration']); }, 'Element.animate() accepts a double as an options argument'); test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { duration: Infinity, fill: 'forwards' }); - assert_equals(anim.effect.timing.duration, Infinity); - assert_equals(anim.effect.timing.fill, 'forwards'); - // Also check that unspecified parameters receive their default values - assert_equals(anim.effect.timing.direction, 'normal'); + const anim = createDiv(t).animate(null, + { duration: Infinity, fill: 'forwards' }); + assert_equals(anim.effect.getTiming().duration, Infinity); + assert_equals(anim.effect.getTiming().fill, 'forwards'); + assert_default_timing_except(anim.effect, ['duration', 'fill']); }, 'Element.animate() accepts a KeyframeAnimationOptions argument'); test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }); - assert_equals(anim.effect.timing.duration, 'auto'); + const anim = createDiv(t).animate(null); + assert_default_timing_except(anim.effect, []); }, 'Element.animate() accepts an absent options argument'); +for (const invalid of gBadDelayValues) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, { delay: invalid }); + }); + }, `Element.animate() does not accept invalid delay value: ${invalid}`); +} + test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); + const anim = createDiv(t).animate(null, { duration: 'auto' }); + assert_equals(anim.effect.getTiming().duration, 'auto', 'set duration \'auto\''); + assert_equals(anim.effect.getComputedTiming().duration, 0, + 'getComputedTiming() after set duration \'auto\''); +}, 'Element.animate() accepts a duration of \'auto\' using a dictionary' + + ' object'); + +for (const invalid of gBadDurationValues) { + if (typeof invalid === 'string' && !isNaN(parseFloat(invalid))) { + continue; + } + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, invalid); + }); + }, 'Element.animate() does not accept invalid duration value: ' + + (typeof invalid === 'string' ? `"${invalid}"` : invalid)); +} + +for (const invalid of gBadDurationValues) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, { duration: invalid }); + }); + }, 'Element.animate() does not accept invalid duration value: ' + + (typeof invalid === 'string' ? `"${invalid}"` : invalid) + + ' using a dictionary object'); +} + +for (const invalidEasing of gInvalidEasings) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate({ easing: invalidEasing }, 2000); + }); + }, `Element.animate() does not accept invalid easing: '${invalidEasing}'`); +} + +for (const invalid of gBadIterationStartValues) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, { iterationStart: invalid }); + }); + }, 'Element.animate() does not accept invalid iterationStart value: ' + + invalid); +} + +for (const invalid of gBadIterationsValues) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, { iterations: invalid }); + }); + }, 'Element.animate() does not accept invalid iterations value: ' + + invalid); +} + +test(t => { + const anim = createDiv(t).animate(null, 2000); assert_equals(anim.id, ''); }, 'Element.animate() correctly sets the id attribute when no id is specified'); test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, { id: 'test' }); + const anim = createDiv(t).animate(null, { id: 'test' }); assert_equals(anim.id, 'test'); }, 'Element.animate() correctly sets the id attribute'); test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); + const anim = createDiv(t).animate(null, 2000); assert_equals(anim.timeline, document.timeline); }, 'Element.animate() correctly sets the Animation\'s timeline'); @@ -157,7 +187,7 @@ async_test(t => { iframe.addEventListener('load', t.step_func(() => { const div = createDiv(t, iframe.contentDocument); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); + const anim = div.animate(null, 2000); assert_equals(anim.timeline, iframe.contentDocument.timeline); iframe.remove(); t.done(); @@ -168,8 +198,7 @@ async_test(t => { 'triggered on an element in a different document'); test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); + const anim = createDiv(t).animate(null, 2000); assert_equals(anim.playState, 'running'); }, 'Element.animate() calls play on the Animation'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html index d05e2aa50b9..182b5cbe533 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html @@ -75,12 +75,14 @@ test(t => { assert_array_equals(div.getAnimations(), [], 'Animation should not be returned when it is finished'); - animation.effect.timing.duration += 100 * MS_PER_SEC; + animation.effect.updateTiming({ + duration: animation.effect.getTiming().duration + 100 * MS_PER_SEC, + }); assert_array_equals(div.getAnimations(), [animation], 'Animation should be returned after extending the' + ' duration'); - animation.effect.timing.duration = 0; + animation.effect.updateTiming({ duration: 0 }); assert_array_equals(div.getAnimations(), [], 'Animation should not be returned after setting the' + ' duration to zero'); @@ -91,13 +93,13 @@ test(t => { const div = createDiv(t); const animation = div.animate(null, 100 * MS_PER_SEC); - animation.effect.timing.endDelay = -200 * MS_PER_SEC; + animation.effect.updateTiming({ endDelay: -200 * MS_PER_SEC }); assert_array_equals(div.getAnimations(), [], 'Animation should not be returned after setting a' + ' negative end delay such that the end time is less' + ' than the current time'); - animation.effect.timing.endDelay = 100 * MS_PER_SEC; + animation.effect.updateTiming({ endDelay: 100 * MS_PER_SEC }); assert_array_equals(div.getAnimations(), [animation], 'Animation should be returned after setting a positive' + ' end delay such that the end time is more than the' @@ -113,17 +115,17 @@ test(t => { assert_array_equals(div.getAnimations(), [], 'Animation should not be returned when it is finished'); - animation.effect.timing.iterations = 10; + animation.effect.updateTiming({ iterations: 10 }); assert_array_equals(div.getAnimations(), [animation], 'Animation should be returned after inreasing the' + ' number of iterations'); - animation.effect.timing.iterations = 0; + animation.effect.updateTiming({ iterations: 0 }); assert_array_equals(div.getAnimations(), [], 'Animations should not be returned after setting the' + ' iteration count to zero'); - animation.effect.timing.iterations = Infinity; + animation.effect.updateTiming({ iterations: Infinity }); assert_array_equals(div.getAnimations(), [animation], 'Animation should be returned after inreasing the' + ' number of iterations to infinity'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/cancel.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/cancel.html index be1bb5d7847..711a33905a9 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/cancel.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/cancel.html @@ -29,7 +29,7 @@ test(t => { const div = createDiv(t); const animation = div.animate({ marginLeft: ['100px', '200px'] }, 100 * MS_PER_SEC); - animation.effect.timing.easing = 'linear'; + animation.effect.updateTiming({ easing: 'linear' }); animation.cancel(); assert_equals(getComputedStyle(div).marginLeft, '0px', 'margin-left style is not animated after cancelling'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/constructor.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/constructor.html index c00c66ea1d4..fcbaab1e8db 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/constructor.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/constructor.html @@ -14,7 +14,7 @@ const gTarget = document.getElementById('target'); function createEffect() { - return new KeyframeEffectReadOnly(gTarget, { opacity: [0, 1] }); + return new KeyframeEffect(gTarget, { opacity: [0, 1] }); } function createNull() { @@ -82,10 +82,9 @@ for (const args of gTestArguments) { } test(t => { - const effect = new KeyframeEffectReadOnly(null, - { left: ['10px', '20px'] }, - { duration: 10000, - fill: 'forwards' }); + const effect = new KeyframeEffect(null, + { left: ['10px', '20px'] }, + { duration: 10000, fill: 'forwards' }); const anim = new Animation(effect, document.timeline); anim.pause(); assert_equals(effect.getComputedTiming().progress, 0.0); @@ -100,7 +99,7 @@ async_test(t => { iframe.addEventListener('load', t.step_func(() => { const div = createDiv(t, iframe.contentDocument); - const effect = new KeyframeEffectReadOnly(div, null, 10000); + const effect = new KeyframeEffect(div, null, 10000); const anim = new Animation(effect); assert_equals(anim.timeline, document.timeline); iframe.remove(); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/effect.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/effect.html index 175fc31341b..cb8bc09c366 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/effect.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/effect.html @@ -14,7 +14,7 @@ test(t => { const anim = new Animation(); assert_equals(anim.effect, null, 'initial effect is null'); - const newEffect = new KeyframeEffectReadOnly(createDiv(t), null); + const newEffect = new KeyframeEffect(createDiv(t), null); anim.effect = newEffect; assert_equals(anim.effect, newEffect, 'new effect is set'); }, 'effect is set correctly.'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/finished.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/finished.html index 79700f317ec..563d4ba6dd4 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/finished.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/finished.html @@ -189,7 +189,7 @@ promise_test(t => { animation.currentTime = HALF_DUR; return animation.ready.then(() => { currentTimeBeforeShortening = animation.currentTime; - animation.effect.timing.duration = QUARTER_DUR; + animation.effect.updateTiming({ duration: QUARTER_DUR }); // Below we use gotNextFrame to check that shortening of the animation // duration causes the finished promise to resolve, rather than it just // getting resolved on the next animation frame. This relies on the fact @@ -206,7 +206,7 @@ promise_test(t => { assert_equals(animation.currentTime, currentTimeBeforeShortening, 'currentTime should be unchanged when duration shortened'); const previousFinishedPromise = animation.finished; - animation.effect.timing.duration = 100 * MS_PER_SEC; + animation.effect.updateTiming({ duration: 100 * MS_PER_SEC }); assert_not_equals(animation.finished, previousFinishedPromise, 'Finished promise should change after lengthening the ' + 'duration causes the animation to become active'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/idlharness.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/idlharness.html index bf7c9f39beb..20fca1361e7 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/idlharness.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/idlharness.html @@ -10,11 +10,11 @@ <script type="text/plain" id="Animation-IDL"> enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" }; -[Constructor (optional AnimationEffectReadOnly? effect = null, +[Constructor (optional AnimationEffect? effect = null, optional AnimationTimeline? timeline)] interface Animation : EventTarget { attribute DOMString id; - attribute AnimationEffectReadOnly? effect; + attribute AnimationEffect? effect; attribute AnimationTimeline? timeline; attribute double? startTime; attribute double? currentTime; diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/getComputedTiming.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffect/getComputedTiming.html index 9a92880a606..e0e4fc2f84f 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/getComputedTiming.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffect/getComputedTiming.html @@ -195,7 +195,5 @@ for (const stest of gEndTimeTests) { }, `getComputedTiming().endTime for ${stest.desc}`); } - -done(); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffect/updateTiming.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffect/updateTiming.html new file mode 100644 index 00000000000..746f0d74f19 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffect/updateTiming.html @@ -0,0 +1,475 @@ +<!doctype html> +<meta charset=utf-8> +<title>AnimationEffect.updateTiming</title> +<link rel="help" href="https://drafts.csswg.org/web-animations-1/#dom-animationeffect-updatetiming"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../testcommon.js"></script> +<script src="../../resources/easing-tests.js"></script> +<script src="../../resources/timing-tests.js"></script> +<body> +<div id="log"></div> +<script> +'use strict'; + +// ------------------------------ +// delay +// ------------------------------ + +test(t => { + const anim = createDiv(t).animate(null, 100); + anim.effect.updateTiming({ delay: 100 }); + assert_equals(anim.effect.getTiming().delay, 100, 'set delay 100'); + assert_equals(anim.effect.getComputedTiming().delay, 100, + 'getComputedTiming() after set delay 100'); +}, 'Allows setting the delay to a positive number'); + +test(t => { + const anim = createDiv(t).animate(null, 100); + anim.effect.updateTiming({ delay: -100 }); + assert_equals(anim.effect.getTiming().delay, -100, 'set delay -100'); + assert_equals(anim.effect.getComputedTiming().delay, -100, + 'getComputedTiming() after set delay -100'); +}, 'Allows setting the delay to a negative number'); + +test(t => { + const anim = createDiv(t).animate(null, 100); + anim.effect.updateTiming({ delay: 100 }); + assert_equals(anim.effect.getComputedTiming().progress, null); + assert_equals(anim.effect.getComputedTiming().currentIteration, null); +}, 'Allows setting the delay of an animation in progress: positive delay that' + + ' causes the animation to be no longer in-effect'); + +test(t => { + const anim = createDiv(t).animate(null, { fill: 'both', duration: 100 }); + anim.effect.updateTiming({ delay: -50 }); + assert_equals(anim.effect.getComputedTiming().progress, 0.5); +}, 'Allows setting the delay of an animation in progress: negative delay that' + + ' seeks into the active interval'); + +test(t => { + const anim = createDiv(t).animate(null, { fill: 'both', duration: 100 }); + anim.effect.updateTiming({ delay: -100 }); + assert_equals(anim.effect.getComputedTiming().progress, 1); + assert_equals(anim.effect.getComputedTiming().currentIteration, 0); +}, 'Allows setting the delay of an animation in progress: large negative delay' + + ' that causes the animation to be finished'); + +for (const invalid of gBadDelayValues) { + test(t => { + const anim = createDiv(t).animate(null); + assert_throws({ name: 'TypeError' }, () => { + anim.effect.updateTiming({ delay: invalid }); + }); + }, `Throws when setting invalid delay value: ${invalid}`); +} + + +// ------------------------------ +// endDelay +// ------------------------------ + +test(t => { + const anim = createDiv(t).animate(null, 2000); + anim.effect.updateTiming({ endDelay: 123.45 }); + assert_time_equals_literal(anim.effect.getTiming().endDelay, 123.45, + 'set endDelay 123.45'); + assert_time_equals_literal(anim.effect.getComputedTiming().endDelay, 123.45, + 'getComputedTiming() after set endDelay 123.45'); +}, 'Allows setting the endDelay to a positive number'); + +test(t => { + const anim = createDiv(t).animate(null, 2000); + anim.effect.updateTiming({ endDelay: -1000 }); + assert_equals(anim.effect.getTiming().endDelay, -1000, 'set endDelay -1000'); + assert_equals(anim.effect.getComputedTiming().endDelay, -1000, + 'getComputedTiming() after set endDelay -1000'); +}, 'Allows setting the endDelay to a negative number'); + +test(t => { + const anim = createDiv(t).animate(null, 2000); + assert_throws({ name: 'TypeError' }, () => { + anim.effect.updateTiming({ endDelay: Infinity }); + }); +}, 'Throws when setting the endDelay to infinity'); + +test(t => { + const anim = createDiv(t).animate(null, 2000); + assert_throws({ name: 'TypeError' }, () => { + anim.effect.updateTiming({ endDelay: -Infinity }); + }); +}, 'Throws when setting the endDelay to negative infinity'); + + +// ------------------------------ +// fill +// ------------------------------ + +for (const fill of ['none', 'forwards', 'backwards', 'both']) { + test(t => { + const anim = createDiv(t).animate(null, 100); + anim.effect.updateTiming({ fill }); + assert_equals(anim.effect.getTiming().fill, fill, 'set fill ' + fill); + assert_equals(anim.effect.getComputedTiming().fill, fill, + 'getComputedTiming() after set fill ' + fill); + }, `Allows setting the fill to '${fill}'`); +} + + +// ------------------------------ +// iterationStart +// ------------------------------ + +test(t => { + const anim = createDiv(t).animate(null, + { iterationStart: 0.2, + iterations: 1, + fill: 'both', + duration: 100, + delay: 1 }); + anim.effect.updateTiming({ iterationStart: 2.5 }); + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); + assert_equals(anim.effect.getComputedTiming().currentIteration, 2); +}, 'Allows setting the iterationStart of an animation in progress:' + + ' backwards-filling'); + +test(t => { + const anim = createDiv(t).animate(null, + { iterationStart: 0.2, + iterations: 1, + fill: 'both', + duration: 100, + delay: 0 }); + anim.effect.updateTiming({ iterationStart: 2.5 }); + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); + assert_equals(anim.effect.getComputedTiming().currentIteration, 2); +}, 'Allows setting the iterationStart of an animation in progress:' + + ' active phase'); + +test(t => { + const anim = createDiv(t).animate(null, + { iterationStart: 0.2, + iterations: 1, + fill: 'both', + duration: 100, + delay: 0 }); + anim.finish(); + anim.effect.updateTiming({ iterationStart: 2.5 }); + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); + assert_equals(anim.effect.getComputedTiming().currentIteration, 3); +}, 'Allows setting the iterationStart of an animation in progress:' + + ' forwards-filling'); + +for (const invalid of gBadIterationStartValues) { + test(t => { + const anim = createDiv(t).animate(null); + assert_throws({ name: 'TypeError' }, () => { + anim.effect.updateTiming({ iterationStart: invalid }); + }, `setting ${invalid}`); + }, `Throws when setting invalid iterationStart value: ${invalid}`); +} + +// ------------------------------ +// iterations +// ------------------------------ + +test(t => { + const anim = createDiv(t).animate(null, 2000); + anim.effect.updateTiming({ iterations: 2 }); + assert_equals(anim.effect.getTiming().iterations, 2, 'set duration 2'); + assert_equals(anim.effect.getComputedTiming().iterations, 2, + 'getComputedTiming() after set iterations 2'); +}, 'Allows setting iterations to a double value'); + +test(t => { + const anim = createDiv(t).animate(null, 2000); + anim.effect.updateTiming({ iterations: Infinity }); + assert_equals(anim.effect.getTiming().iterations, Infinity, + 'set duration Infinity'); + assert_equals(anim.effect.getComputedTiming().iterations, Infinity, + 'getComputedTiming() after set iterations Infinity'); +}, 'Allows setting iterations to infinity'); + +for (const invalid of gBadIterationsValues) { + test(t => { + const anim = createDiv(t).animate(null); + assert_throws({ name: 'TypeError' }, () => { + anim.effect.updateTiming({ iterations: invalid }); + }); + }, `Throws when setting invalid iterations value: ${invalid}`); +} + +test(t => { + const anim = createDiv(t).animate(null, { duration: 100000, fill: 'both' }); + + anim.finish(); + + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress when animation is finished'); + assert_equals(anim.effect.getComputedTiming().currentIteration, 0, + 'current iteration when animation is finished'); + + anim.effect.updateTiming({ iterations: 2 }); + + assert_time_equals_literal(anim.effect.getComputedTiming().progress, + 0, + 'progress after adding an iteration'); + assert_time_equals_literal(anim.effect.getComputedTiming().currentIteration, + 1, + 'current iteration after adding an iteration'); + + anim.effect.updateTiming({ iterations: 0 }); + + assert_equals(anim.effect.getComputedTiming().progress, 0, + 'progress after setting iterations to zero'); + assert_equals(anim.effect.getComputedTiming().currentIteration, 0, + 'current iteration after setting iterations to zero'); + + anim.effect.updateTiming({ iterations: Infinity }); + + assert_equals(anim.effect.getComputedTiming().progress, 0, + 'progress after setting iterations to Infinity'); + assert_equals(anim.effect.getComputedTiming().currentIteration, 1, + 'current iteration after setting iterations to Infinity'); +}, 'Allows setting the iterations of an animation in progress'); + + +// ------------------------------ +// duration +// ------------------------------ + +for (const duration of gGoodDurationValues) { + test(t => { + const anim = createDiv(t).animate(null, 2000); + anim.effect.updateTiming({ duration: duration.specified }); + if (typeof duration.specified === 'number') { + assert_time_equals_literal(anim.effect.getTiming().duration, + duration.specified, + 'Updates specified duration'); + } else { + assert_equals(anim.effect.getTiming().duration, duration.specified, + 'Updates specified duration'); + } + assert_time_equals_literal(anim.effect.getComputedTiming().duration, + duration.computed, + 'Updates computed duration'); + }, `Allows setting the duration to ${duration.specified}`); +} + +for (const invalid of gBadDurationValues) { + test(t => { + assert_throws(new TypeError, () => { + createDiv(t).animate(null, { duration: invalid }); + }); + }, 'Throws when setting invalid duration: ' + + (typeof invalid === 'string' ? `"${invalid}"` : invalid)); +} + +test(t => { + const anim = createDiv(t).animate(null, { duration: 100000, fill: 'both' }); + anim.finish(); + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress when animation is finished'); + anim.effect.updateTiming({ duration: anim.effect.getTiming().duration * 2 }); + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5, + 'progress after doubling the duration'); + anim.effect.updateTiming({ duration: 0 }); + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress after setting duration to zero'); + anim.effect.updateTiming({ duration: 'auto' }); + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress after setting duration to \'auto\''); +}, 'Allows setting the duration of an animation in progress'); + +promise_test(t => { + const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); + return anim.ready.then(() => { + const originalStartTime = anim.startTime; + const originalCurrentTime = anim.currentTime; + assert_time_equals_literal( + anim.effect.getComputedTiming().duration, + 100 * MS_PER_SEC, + 'Initial duration should be as set on KeyframeEffect' + ); + + anim.effect.updateTiming({ duration: 200 * MS_PER_SEC }); + assert_time_equals_literal( + anim.effect.getComputedTiming().duration, + 200 * MS_PER_SEC, + 'Effect duration should have been updated' + ); + assert_times_equal(anim.startTime, originalStartTime, + 'startTime should be unaffected by changing effect ' + + 'duration'); + assert_times_equal(anim.currentTime, originalCurrentTime, + 'currentTime should be unaffected by changing effect ' + + 'duration'); + }); +}, 'Allows setting the duration of an animation in progress such that the' + + ' the start and current time do not change'); + + +// ------------------------------ +// direction +// ------------------------------ + +test(t => { + const anim = createDiv(t).animate(null, 2000); + + const directions = ['normal', 'reverse', 'alternate', 'alternate-reverse']; + for (const direction of directions) { + anim.effect.updateTiming({ direction: direction }); + assert_equals(anim.effect.getTiming().direction, direction, + `set direction to ${direction}`); + } +}, 'Allows setting the direction to each of the possible keywords'); + +test(t => { + const anim = createDiv(t).animate(null, { + duration: 10000, + direction: 'normal', + }); + anim.currentTime = 7000; + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, + 'progress before updating direction'); + + anim.effect.updateTiming({ direction: 'reverse' }); + + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, + 'progress after updating direction'); +}, 'Allows setting the direction of an animation in progress from \'normal\' to' + + ' \'reverse\''); + +test(t => { + const anim = createDiv(t).animate(null, + { duration: 10000, direction: 'normal' }); + assert_equals(anim.effect.getComputedTiming().progress, 0, + 'progress before updating direction'); + + anim.effect.updateTiming({ direction: 'reverse' }); + + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress after updating direction'); +}, 'Allows setting the direction of an animation in progress from \'normal\' to' + + ' \'reverse\' while at start of active interval'); + +test(t => { + const anim = createDiv(t).animate(null, + { fill: 'backwards', + duration: 10000, + delay: 10000, + direction: 'normal' }); + assert_equals(anim.effect.getComputedTiming().progress, 0, + 'progress before updating direction'); + + anim.effect.updateTiming({ direction: 'reverse' }); + + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'progress after updating direction'); +}, 'Allows setting the direction of an animation in progress from \'normal\' to' + + ' \'reverse\' while filling backwards'); + +test(t => { + const anim = createDiv(t).animate(null, + { iterations: 2, + duration: 10000, + direction: 'normal' }); + anim.currentTime = 17000; + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, + 'progress before updating direction'); + + anim.effect.updateTiming({ direction: 'alternate' }); + + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, + 'progress after updating direction'); +}, 'Allows setting the direction of an animation in progress from \'normal\' to' + + ' \'alternate\''); + +test(t => { + const anim = createDiv(t).animate(null, + { iterations: 2, + duration: 10000, + direction: 'alternate' }); + anim.currentTime = 17000; + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, + 'progress before updating direction'); + + anim.effect.updateTiming({ direction: 'alternate-reverse' }); + + assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, + 'progress after updating direction'); +}, 'Allows setting the direction of an animation in progress from \'alternate\'' + + ' to \'alternate-reverse\''); + + +// ------------------------------ +// easing +// ------------------------------ + +function assert_progress(animation, currentTime, easingFunction) { + animation.currentTime = currentTime; + const portion = currentTime / animation.effect.getTiming().duration; + assert_approx_equals(animation.effect.getComputedTiming().progress, + easingFunction(portion), + 0.01, + 'The progress of the animation should be approximately' + + ` ${easingFunction(portion)} at ${currentTime}ms`); +} + +for (const options of gEasingTests) { + test(t => { + const target = createDiv(t); + const anim = target.animate(null, + { duration: 1000 * MS_PER_SEC, + fill: 'forwards' }); + anim.effect.updateTiming({ easing: options.easing }); + assert_equals(anim.effect.getTiming().easing, + options.serialization || options.easing); + + const easing = options.easingFunction; + assert_progress(anim, 0, easing); + assert_progress(anim, 250 * MS_PER_SEC, easing); + assert_progress(anim, 500 * MS_PER_SEC, easing); + assert_progress(anim, 750 * MS_PER_SEC, easing); + assert_progress(anim, 1000 * MS_PER_SEC, easing); + }, `Allows setting the easing to a ${options.desc}`); +} + +for (const easing of gRoundtripEasings) { + test(t => { + const anim = createDiv(t).animate(null); + anim.effect.updateTiming({ easing: easing }); + assert_equals(anim.effect.getTiming().easing, easing); + }, `Updates the specified value when setting the easing to '${easing}'`); +} + +test(t => { + const delay = 1000 * MS_PER_SEC; + + const target = createDiv(t); + const anim = target.animate(null, + { duration: 1000 * MS_PER_SEC, + fill: 'both', + delay: delay, + easing: 'steps(2, start)' }); + + anim.effect.updateTiming({ easing: 'steps(2, end)' }); + assert_equals(anim.effect.getComputedTiming().progress, 0, + 'easing replace to steps(2, end) at before phase'); + + anim.currentTime = delay + 750 * MS_PER_SEC; + assert_equals(anim.effect.getComputedTiming().progress, 0.5, + 'change currentTime to active phase'); + + anim.effect.updateTiming({ easing: 'steps(2, start)' }); + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'easing replace to steps(2, start) at active phase'); + + anim.currentTime = delay + 1500 * MS_PER_SEC; + anim.effect.updateTiming({ easing: 'steps(2, end)' }); + assert_equals(anim.effect.getComputedTiming().progress, 1, + 'easing replace to steps(2, end) again at after phase'); +}, 'Allows setting the easing of an animation in progress'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/delay.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/delay.html deleted file mode 100644 index 41f099b86b2..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/delay.html +++ /dev/null @@ -1,78 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.delay</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-delay"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.delay, 0); -}, 'Has the default value 0'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 100); - anim.effect.timing.delay = 100; - assert_equals(anim.effect.timing.delay, 100, 'set delay 100'); - assert_equals(anim.effect.getComputedTiming().delay, 100, - 'getComputedTiming() after set delay 100'); -}, 'Can be set to a positive number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 100); - anim.effect.timing.delay = -100; - assert_equals(anim.effect.timing.delay, -100, 'set delay -100'); - assert_equals(anim.effect.getComputedTiming().delay, -100, - 'getComputedTiming() after set delay -100'); -}, 'Can be set to a negative number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 100); - anim.effect.timing.delay = 100; - assert_equals(anim.effect.getComputedTiming().progress, null); - assert_equals(anim.effect.getComputedTiming().currentIteration, null); -}, 'Can set a positive delay on an animation without a backwards fill to' - + ' make it no longer active'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { fill: 'both', - duration: 100 }); - anim.effect.timing.delay = -50; - assert_equals(anim.effect.getComputedTiming().progress, 0.5); -}, 'Can set a negative delay to seek into the active interval'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { fill: 'both', - duration: 100 }); - anim.effect.timing.delay = -100; - assert_equals(anim.effect.getComputedTiming().progress, 1); - assert_equals(anim.effect.getComputedTiming().currentIteration, 0); -}, 'Can set a large negative delay to finishing an animation'); - -test(t => { - const div = createDiv(t); - const anim = div.animate(null); - for (let invalid of [NaN, Infinity]) { - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.delay = invalid; - }, `setting ${invalid}`); - assert_throws({ name: 'TypeError' }, () => { - div.animate({}, { delay: invalid }); - }, `animate() with ${invalid}`); - } -}, 'Throws when setting invalid values'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/direction.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/direction.html deleted file mode 100644 index 3238f5d7a5e..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/direction.html +++ /dev/null @@ -1,108 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.direction</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-direction"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.direction, 'normal'); -}, 'Has the default value \'normal\''); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - - const directions = ['normal', 'reverse', 'alternate', 'alternate-reverse']; - for (const direction of directions) { - anim.effect.timing.direction = direction; - assert_equals(anim.effect.timing.direction, direction, - `set direction to ${direction}`); - } -}, 'Can be set to each of the possible keywords'); - -test(t => { - const div = createDiv(t); - const anim = div.animate(null, { duration: 10000, direction: 'normal' }); - anim.currentTime = 7000; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, - 'progress before updating direction'); - - anim.effect.timing.direction = 'reverse'; - - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, - 'progress after updating direction'); -}, 'Can be changed from \'normal\' to \'reverse\' while in progress'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { duration: 10000, - direction: 'normal' }); - assert_equals(anim.effect.getComputedTiming().progress, 0, - 'progress before updating direction'); - - anim.effect.timing.direction = 'reverse'; - - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress after updating direction'); -}, 'Can be changed from \'normal\' to \'reverse\' while at start of active' - + ' interval'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { fill: 'backwards', - duration: 10000, - delay: 10000, - direction: 'normal' }); - assert_equals(anim.effect.getComputedTiming().progress, 0, - 'progress before updating direction'); - - anim.effect.timing.direction = 'reverse'; - - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress after updating direction'); -}, 'Can be changed from \'normal\' to \'reverse\' while filling backwards'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { iterations: 2, - duration: 10000, - direction: 'normal' }); - anim.currentTime = 17000; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, - 'progress before updating direction'); - - anim.effect.timing.direction = 'alternate'; - - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, - 'progress after updating direction'); -}, 'Can be changed from \'normal\' to \'alternate\' while in progress'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { iterations: 2, - duration: 10000, - direction: 'alternate' }); - anim.currentTime = 17000; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3, - 'progress before updating direction'); - - anim.effect.timing.direction = 'alternate-reverse'; - - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7, - 'progress after updating direction'); -}, 'Can be changed from \'alternate\' to \'alternate-reverse\' while in' - + ' progress'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/duration.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/duration.html deleted file mode 100644 index 42913f552dd..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/duration.html +++ /dev/null @@ -1,190 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.duration</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-duration"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.duration, 'auto'); -}, 'Has the default value \'auto\''); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.duration = 123.45; - assert_time_equals_literal(anim.effect.timing.duration, 123.45, - 'set duration 123.45'); - assert_time_equals_literal(anim.effect.getComputedTiming().duration, 123.45, - 'getComputedTiming() after set duration 123.45'); -}, 'Can be set to a double value'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.duration = 'auto'; - assert_equals(anim.effect.timing.duration, 'auto', 'set duration \'auto\''); - assert_equals(anim.effect.getComputedTiming().duration, 0, - 'getComputedTiming() after set duration \'auto\''); -}, 'Can be set to the string \'auto\''); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, { duration: 'auto' }); - assert_equals(anim.effect.timing.duration, 'auto', 'set duration \'auto\''); - assert_equals(anim.effect.getComputedTiming().duration, 0, - 'getComputedTiming() after set duration \'auto\''); -}, 'Can be set to \'auto\' using a dictionary object'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.duration = Infinity; - assert_equals(anim.effect.timing.duration, Infinity, 'set duration Infinity'); - assert_equals(anim.effect.getComputedTiming().duration, Infinity, - 'getComputedTiming() after set duration Infinity'); -}, 'Can be set to Infinity'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, -1); - }); -}, 'animate() throws when passed a negative number'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, -Infinity); - }); -}, 'animate() throws when passed negative Infinity'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, NaN); - }); -}, 'animate() throws when passed a NaN value'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, { duration: -1 }); - }); -}, 'animate() throws when passed a negative number using a dictionary object'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, { duration: -Infinity }); - }); -}, 'animate() throws when passed negative Infinity using a dictionary object'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, { duration: NaN }); - }); -}, 'animate() throws when passed a NaN value using a dictionary object'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, { duration: 'abc' }); - }); -}, 'animate() throws when passed a string other than \'auto\' using a' - + ' dictionary object'); - -test(t => { - const div = createDiv(t); - assert_throws({ name: 'TypeError' }, () => { - div.animate({ opacity: [ 0, 1 ] }, { duration: '100' }); - }); -}, 'animate() throws when passed a string containing a number using a' - + ' dictionary object'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.duration = -1; - }); -}, 'Throws when setting a negative number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.duration = -Infinity; - }); -}, 'Throws when setting negative infinity'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.duration = NaN; - }); -}, 'Throws when setting a NaN value'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.duration = 'abc'; - }); -}, 'Throws when setting a string other than \'auto\''); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.duration = '100'; - }); -}, 'Throws when setting a string containing a number'); - -promise_test(t => { - const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); - return anim.ready.then(() => { - const originalStartTime = anim.startTime; - const originalCurrentTime = anim.currentTime; - assert_equals(anim.effect.getComputedTiming().duration, 100 * MS_PER_SEC, - 'Initial duration should be as set on KeyframeEffect'); - - anim.effect.timing.duration = 200 * MS_PER_SEC; - assert_equals(anim.effect.getComputedTiming().duration, 200 * MS_PER_SEC, - 'Effect duration should have been updated'); - assert_times_equal(anim.startTime, originalStartTime, - 'startTime should be unaffected by changing effect ' + - 'duration'); - assert_times_equal(anim.currentTime, originalCurrentTime, - 'currentTime should be unaffected by changing effect ' + - 'duration'); - }); -}, 'Extending an effect\'s duration does not change the start or current time'); - -test(t => { - const div = createDiv(t); - const anim = div.animate(null, { duration: 100000, fill: 'both' }); - anim.finish(); - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress when animation is finished'); - anim.effect.timing.duration *= 2; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5, - 'progress after doubling the duration'); - anim.effect.timing.duration = 0; - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress after setting duration to zero'); - anim.effect.timing.duration = 'auto'; - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress after setting duration to \'auto\''); -}, 'Can be updated while the animation is in progress'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/easing.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/easing.html deleted file mode 100644 index ec2b239fe52..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/easing.html +++ /dev/null @@ -1,96 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.easing</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-easing"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<script src="../../resources/easing-tests.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.easing, 'linear'); -}, 'Has the default value \'linear\''); - -function assert_progress(animation, currentTime, easingFunction) { - animation.currentTime = currentTime; - const portion = currentTime / animation.effect.timing.duration; - assert_approx_equals(animation.effect.getComputedTiming().progress, - easingFunction(portion), - 0.01, - 'The progress of the animation should be approximately' - + ` ${easingFunction(portion)} at ${currentTime}ms`); -} - -for (const options of gEasingTests) { - test(t => { - const target = createDiv(t); - const anim = target.animate([ { opacity: 0 }, { opacity: 1 } ], - { duration: 1000 * MS_PER_SEC, - fill: 'forwards' }); - anim.effect.timing.easing = options.easing; - assert_equals(anim.effect.timing.easing, - options.serialization || options.easing); - - const easing = options.easingFunction; - assert_progress(anim, 0, easing); - assert_progress(anim, 250 * MS_PER_SEC, easing); - assert_progress(anim, 500 * MS_PER_SEC, easing); - assert_progress(anim, 750 * MS_PER_SEC, easing); - assert_progress(anim, 1000 * MS_PER_SEC, easing); - }, options.desc); -} - -for (const invalidEasing of gInvalidEasings) { - test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 100 * MS_PER_SEC); - assert_throws({ name: 'TypeError' }, - () => { - anim.effect.timing.easing = invalidEasing; - }); - }, `Throws on invalid easing: '${invalidEasing}'`); -} - -for (const easing of gRoundtripEasings) { - test(t => { - const anim = createDiv(t).animate(null); - anim.effect.timing.easing = easing; - assert_equals(anim.effect.timing.easing, easing); - }, `Canonical easing '${easing}' is returned as set`); -} - -test(t => { - const delay = 1000 * MS_PER_SEC; - - const target = createDiv(t); - const anim = target.animate([ { opacity: 0 }, { opacity: 1 } ], - { duration: 1000 * MS_PER_SEC, - fill: 'both', - delay: delay, - easing: 'steps(2, start)' }); - - anim.effect.timing.easing = 'steps(2, end)'; - assert_equals(anim.effect.getComputedTiming().progress, 0, - 'easing replace to steps(2, end) at before phase'); - - anim.currentTime = delay + 750 * MS_PER_SEC; - assert_equals(anim.effect.getComputedTiming().progress, 0.5, - 'change currentTime to active phase'); - - anim.effect.timing.easing = 'steps(2, start)'; - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'easing replace to steps(2, start) at active phase'); - - anim.currentTime = delay + 1500 * MS_PER_SEC; - anim.effect.timing.easing = 'steps(2, end)'; - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'easing replace to steps(2, end) again at after phase'); -}, 'Allows the easing to be changed while the animation is in progress'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/endDelay.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/endDelay.html deleted file mode 100644 index 3062c8c1565..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/endDelay.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.endDelay</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-enddelay"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.endDelay, 0); -}, 'Has the default value 0'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.endDelay = 123.45; - assert_time_equals_literal(anim.effect.timing.endDelay, 123.45, - 'set endDelay 123.45'); - assert_time_equals_literal(anim.effect.getComputedTiming().endDelay, 123.45, - 'getComputedTiming() after set endDelay 123.45'); -}, 'Can be set to a positive number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.endDelay = -1000; - assert_equals(anim.effect.timing.endDelay, -1000, 'set endDelay -1000'); - assert_equals(anim.effect.getComputedTiming().endDelay, -1000, - 'getComputedTiming() after set endDelay -1000'); -}, 'Can be set to a negative number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.endDelay = Infinity; - }, 'we can not assign Infinity to timing.endDelay'); -}, 'Throws when setting infinity'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.endDelay = -Infinity; - }, 'we can not assign negative Infinity to timing.endDelay'); -}, 'Throws when setting negative infinity'); - -async_test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { duration: 100000, endDelay: 50000 }); - anim.onfinish = t.step_func(event => { - assert_unreached('finish event should not be fired'); - }); - - anim.ready.then(() => { - anim.currentTime = 100000; - return waitForAnimationFrames(2); - }).then(t.step_func(() => { - t.done(); - })); -}, 'finish event is not fired at the end of the active interval when the' - + ' endDelay has not expired'); - -async_test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { duration: 100000, endDelay: 30000 }); - anim.ready.then(() => { - anim.currentTime = 110000; // during endDelay - anim.onfinish = t.step_func(event => { - assert_unreached('onfinish event should not be fired during endDelay'); - }); - return waitForAnimationFrames(2); - }).then(t.step_func(() => { - anim.onfinish = t.step_func(event => { - t.done(); - }); - anim.currentTime = 130000; // after endTime - })); -}, 'finish event is fired after the endDelay has expired'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html deleted file mode 100644 index 01739478f47..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.fill</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-fill"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.fill, 'auto'); -}, 'Has the default value \'auto\''); - -for (const fill of ['none', 'forwards', 'backwards', 'both']) { - test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 100); - anim.effect.timing.fill = fill; - assert_equals(anim.effect.timing.fill, fill, 'set fill ' + fill); - assert_equals(anim.effect.getComputedTiming().fill, fill, - 'getComputedTiming() after set fill ' + fill); - }, `Can set fill to ${fill}`); -} - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/idlharness.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/idlharness.html deleted file mode 100644 index 7e537d1dd83..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/idlharness.html +++ /dev/null @@ -1,80 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>AnimationEffectTiming and AnimationEffectTimingReadOnly IDL</title> -<link rel="help" - href="https://drafts.csswg.org/web-animations/#animationeffecttiming"> -<link rel="help" - href="https://drafts.csswg.org/web-animations/#animationeffecttimingreadonly"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> -<div id="log"></div> -<script type="text/plain" id="AnimationEffectTimingReadOnly-IDL"> -enum FillMode { "none", "forwards", "backwards", "both", "auto" }; -enum PlaybackDirection { - "normal", - "reverse", - "alternate", - "alternate-reverse" -}; - -dictionary AnimationEffectTimingProperties { - double delay = 0.0; - double endDelay = 0.0; - FillMode fill = "auto"; - double iterationStart = 0.0; - unrestricted double iterations = 1.0; - (unrestricted double or DOMString) duration = "auto"; - PlaybackDirection direction = "normal"; - DOMString easing = "linear"; -}; - -[Exposed=Window] -interface AnimationEffectTimingReadOnly { - readonly attribute double delay; - readonly attribute double endDelay; - readonly attribute FillMode fill; - readonly attribute double iterationStart; - readonly attribute unrestricted double iterations; - readonly attribute (unrestricted double or DOMString) duration; - readonly attribute PlaybackDirection direction; - readonly attribute DOMString easing; -}; -</script> -<script type="text/plain" id="AnimationEffectTiming-IDL"> -[Exposed=Window] -interface AnimationEffectTiming : AnimationEffectTimingReadOnly { - inherit attribute double delay; - inherit attribute double endDelay; - inherit attribute FillMode fill; - inherit attribute double iterationStart; - inherit attribute unrestricted double iterations; - inherit attribute (unrestricted double or DOMString) duration; - inherit attribute PlaybackDirection direction; - inherit attribute DOMString easing; -}; -</script> -<script> -'use strict'; - -const idlArray = new IdlArray(); - -idlArray.add_idls( - document.getElementById('AnimationEffectTimingReadOnly-IDL').textContent -); -idlArray.add_idls( - document.getElementById('AnimationEffectTiming-IDL').textContent -); - -idlArray.add_objects({ - AnimationEffectTiming: [ - '(new KeyframeEffect(null, null)).timing' - ], - AnimationEffectTimingReadOnly: [ - '(new KeyframeEffectReadOnly(null, null)).timing' - ], -}); -idlArray.test(); - -</script> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterationStart.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterationStart.html deleted file mode 100644 index 73bc4810da1..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterationStart.html +++ /dev/null @@ -1,72 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.iterationStart</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-iterationstart"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.iterationStart, 0); -}, 'Has the default value 0'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { iterationStart: 0.2, - iterations: 1, - fill: 'both', - duration: 100, - delay: 1 }); - anim.effect.timing.iterationStart = 2.5; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); - assert_equals(anim.effect.getComputedTiming().currentIteration, 2); -}, 'Changing the value updates computed timing when backwards-filling'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { iterationStart: 0.2, - iterations: 1, - fill: 'both', - duration: 100, - delay: 0 }); - anim.effect.timing.iterationStart = 2.5; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); - assert_equals(anim.effect.getComputedTiming().currentIteration, 2); -}, 'Changing the value updates computed timing during the active phase'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, - { iterationStart: 0.2, - iterations: 1, - fill: 'both', - duration: 100, - delay: 0 }); - anim.finish(); - anim.effect.timing.iterationStart = 2.5; - assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); - assert_equals(anim.effect.getComputedTiming().currentIteration, 3); -}, 'Changing the value updates computed timing when forwards-filling'); - -test(t => { - const div = createDiv(t); - const anim = div.animate(null); - for (let invalid of [-1, NaN, Infinity]) { - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.iterationStart = invalid; - }, `setting ${invalid}`); - assert_throws({ name: 'TypeError' }, () => { - div.animate({}, { iterationStart: invalid }); - }, `animate() with ${invalid}`); - } -}, 'Throws when setting invalid values'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterations.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterations.html deleted file mode 100644 index 3bfaf8e9920..00000000000 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/iterations.html +++ /dev/null @@ -1,96 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>AnimationEffectTiming.iterations</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-iterations"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../../testcommon.js"></script> -<body> -<div id="log"></div> -<script> -'use strict'; - -test(t => { - const anim = createDiv(t).animate(null); - assert_equals(anim.effect.timing.iterations, 1); -}, 'Has the default value 1'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.iterations = 2; - assert_equals(anim.effect.timing.iterations, 2, 'set duration 2'); - assert_equals(anim.effect.getComputedTiming().iterations, 2, - 'getComputedTiming() after set iterations 2'); -}, 'Can be set to a double value'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - anim.effect.timing.iterations = Infinity; - assert_equals(anim.effect.timing.iterations, Infinity, 'set duration Infinity'); - assert_equals(anim.effect.getComputedTiming().iterations, Infinity, - 'getComputedTiming() after set iterations Infinity'); -}, 'Can be set to infinity'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.iterations = -1; - }); -}, 'Throws when setting a negative number'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.iterations = -Infinity; - }); -}, 'Throws when setting negative infinity'); - -test(t => { - const div = createDiv(t); - const anim = div.animate({ opacity: [ 0, 1 ] }, 2000); - assert_throws({ name: 'TypeError' }, () => { - anim.effect.timing.iterations = NaN; - }); -}, 'Throws when setting a NaN value'); - -test(t => { - const div = createDiv(t); - const anim = div.animate(null, { duration: 100000, fill: 'both' }); - - anim.finish(); - - assert_equals(anim.effect.getComputedTiming().progress, 1, - 'progress when animation is finished'); - assert_equals(anim.effect.getComputedTiming().currentIteration, 0, - 'current iteration when animation is finished'); - - anim.effect.timing.iterations = 2; - - assert_time_equals_literal(anim.effect.getComputedTiming().progress, - 0, - 'progress after adding an iteration'); - assert_time_equals_literal(anim.effect.getComputedTiming().currentIteration, - 1, - 'current iteration after adding an iteration'); - - anim.effect.timing.iterations = 0; - - assert_equals(anim.effect.getComputedTiming().progress, 0, - 'progress after setting iterations to zero'); - assert_equals(anim.effect.getComputedTiming().currentIteration, 0, - 'current iteration after setting iterations to zero'); - - anim.effect.timing.iterations = Infinity; - - assert_equals(anim.effect.getComputedTiming().progress, 0, - 'progress after setting iterations to Infinity'); - assert_equals(anim.effect.getComputedTiming().currentIteration, 1, - 'current iteration after setting iterations to Infinity'); -}, 'Can be updated while the animation is in progress'); - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html index 165626decc9..3a1d7beb9ec 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html @@ -42,7 +42,7 @@ test(t => { }, 'Test the order of document.getAnimations with script generated animations') test(t => { - const effect = new KeyframeEffectReadOnly(null, gKeyFrames, 100 * MS_PER_SEC); + const effect = new KeyframeEffect(null, gKeyFrames, 100 * MS_PER_SEC); const anim = new Animation(effect, document.timeline); anim.play(); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor.html index dfdebde2072..250a8c7a836 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset=utf-8> -<title>KeyframeEffect and KeyframeEffectReadOnly constructor</title> +<title>KeyframeEffect constructor</title> <link rel="help" href="https://drafts.csswg.org/web-animations/#dom-keyframeeffect-keyframeeffect"> <link rel="help" @@ -21,49 +21,48 @@ const target = document.getElementById('target'); test(t => { for (const frames of gEmptyKeyframeListTests) { - assert_equals(new KeyframeEffectReadOnly(target, frames) - .getKeyframes().length, + assert_equals(new KeyframeEffect(target, frames).getKeyframes().length, 0, `number of frames for ${JSON.stringify(frames)}`); } -}, 'A KeyframeEffectReadOnly can be constructed with no frames'); +}, 'A KeyframeEffect can be constructed with no frames'); test(t => { for (const subtest of gEasingParsingTests) { const easing = subtest[0]; const expected = subtest[1]; - const effect = new KeyframeEffectReadOnly(target, { + const effect = new KeyframeEffect(target, { left: ['10px', '20px'] }, { easing: easing }); - assert_equals(effect.timing.easing, expected, + assert_equals(effect.getTiming().easing, expected, `resulting easing for '${easing}'`); } }, 'easing values are parsed correctly when passed to the ' + - 'KeyframeEffectReadOnly constructor in KeyframeEffectOptions'); + 'KeyframeEffect constructor in KeyframeEffectOptions'); test(t => { for (const invalidEasing of gInvalidEasings) { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, null, { easing: invalidEasing }); + new KeyframeEffect(target, null, { easing: invalidEasing }); }, `TypeError is thrown for easing '${invalidEasing}'`); } }, 'Invalid easing values are correctly rejected when passed to the ' + - 'KeyframeEffectReadOnly constructor in KeyframeEffectOptions'); + 'KeyframeEffect constructor in KeyframeEffectOptions'); test(t => { const getKeyframe = composite => ({ left: [ '10px', '20px' ], composite: composite }); for (const composite of gGoodKeyframeCompositeValueTests) { - const effect = new KeyframeEffectReadOnly(target, getKeyframe(composite)); + const effect = new KeyframeEffect(target, getKeyframe(composite)); assert_equals(effect.getKeyframes()[0].composite, composite, `resulting composite for '${composite}'`); } for (const composite of gBadKeyframeCompositeValueTests) { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, getKeyframe(composite)); + new KeyframeEffect(target, getKeyframe(composite)); }); } }, 'composite values are parsed correctly when passed to the ' + - 'KeyframeEffectReadOnly constructor in property-indexed keyframes'); + 'KeyframeEffect constructor in property-indexed keyframes'); test(t => { const getKeyframes = composite => @@ -72,29 +71,29 @@ test(t => { { offset: 1, left: '20px' } ]; for (const composite of gGoodKeyframeCompositeValueTests) { - const effect = new KeyframeEffectReadOnly(target, getKeyframes(composite)); + const effect = new KeyframeEffect(target, getKeyframes(composite)); assert_equals(effect.getKeyframes()[0].composite, composite, `resulting composite for '${composite}'`); } for (const composite of gBadKeyframeCompositeValueTests) { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, getKeyframes(composite)); + new KeyframeEffect(target, getKeyframes(composite)); }); } }, 'composite values are parsed correctly when passed to the ' + - 'KeyframeEffectReadOnly constructor in regular keyframes'); + 'KeyframeEffect constructor in regular keyframes'); test(t => { for (const composite of gGoodOptionsCompositeValueTests) { - const effect = new KeyframeEffectReadOnly(target, { + const effect = new KeyframeEffect(target, { left: ['10px', '20px'] - }, { composite: composite }); + }, { composite }); assert_equals(effect.getKeyframes()[0].composite, null, `resulting composite for '${composite}'`); } for (const composite of gBadOptionsCompositeValueTests) { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, { + new KeyframeEffect(target, { left: ['10px', '20px'] }, { composite: composite }); }); @@ -104,32 +103,30 @@ test(t => { for (const subtest of gKeyframesTests) { test(t => { - const effect = new KeyframeEffectReadOnly(target, subtest.input); + const effect = new KeyframeEffect(target, subtest.input); assert_frame_lists_equal(effect.getKeyframes(), subtest.output); - }, `A KeyframeEffectReadOnly can be constructed with ${subtest.desc}`); + }, `A KeyframeEffect can be constructed with ${subtest.desc}`); test(t => { - const effect = new KeyframeEffectReadOnly(target, subtest.input); - const secondEffect = - new KeyframeEffectReadOnly(target, effect.getKeyframes()); + const effect = new KeyframeEffect(target, subtest.input); + const secondEffect = new KeyframeEffect(target, effect.getKeyframes()); assert_frame_lists_equal(secondEffect.getKeyframes(), effect.getKeyframes()); - }, `A KeyframeEffectReadOnly constructed with ${subtest.desc} roundtrips`); + }, `A KeyframeEffect constructed with ${subtest.desc} roundtrips`); } for (const subtest of gInvalidKeyframesTests) { test(t => { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, subtest.input); + new KeyframeEffect(target, subtest.input); }); - }, `KeyframeEffectReadOnly constructor throws with ${subtest.desc}`); + }, `KeyframeEffect constructor throws with ${subtest.desc}`); } test(t => { - const effect = new KeyframeEffectReadOnly(target, - { left: ['10px', '20px'] }); + const effect = new KeyframeEffect(target, { left: ['10px', '20px'] }); - const timing = effect.timing; + const timing = effect.getTiming(); assert_equals(timing.delay, 0, 'default delay'); assert_equals(timing.endDelay, 0, 'default endDelay'); assert_equals(timing.fill, 'auto', 'default fill'); @@ -142,14 +139,12 @@ test(t => { assert_equals(effect.composite, 'replace', 'default composite'); assert_equals(effect.iterationComposite, 'replace', 'default iterationComposite'); -}, 'A KeyframeEffectReadOnly constructed without any ' + - 'KeyframeEffectOptions object'); +}, 'A KeyframeEffect constructed without any KeyframeEffectOptions object'); for (const subtest of gKeyframeEffectOptionTests) { test(t => { - const effect = new KeyframeEffectReadOnly(target, - { left: ['10px', '20px'] }, - subtest.input); + const effect = new KeyframeEffect(target, { left: ['10px', '20px'] }, + subtest.input); // Helper function to provide default expected values when the test does // not supply them. @@ -157,7 +152,7 @@ for (const subtest of gKeyframeEffectOptionTests) { return field in subtest.expected ? subtest.expected[field] : defaultValue; }; - const timing = effect.timing; + const timing = effect.getTiming(); assert_equals(timing.delay, expected('delay', 0), 'timing delay'); assert_equals(timing.fill, expected('fill', 'auto'), @@ -169,27 +164,24 @@ for (const subtest of gKeyframeEffectOptionTests) { assert_equals(timing.direction, expected('direction', 'normal'), 'timing direction'); - }, `A KeyframeEffectReadOnly constructed by ${subtest.desc}`); + }, `A KeyframeEffect constructed by ${subtest.desc}`); } for (const subtest of gInvalidKeyframeEffectOptionTests) { test(t => { assert_throws(new TypeError, () => { - new KeyframeEffectReadOnly(target, - { left: ['10px', '20px'] }, - subtest.input); + new KeyframeEffect(target, { left: ['10px', '20px'] }, subtest.input); }); - }, `Invalid KeyframeEffectReadOnly option by ${subtest.desc}`); + }, `Invalid KeyframeEffect option by ${subtest.desc}`); } test(t => { - const effect = new KeyframeEffectReadOnly(null, - { left: ['10px', '20px'] }, - { duration: 100 * MS_PER_SEC, - fill: 'forwards' }); + const effect = new KeyframeEffect(null, { left: ['10px', '20px'] }, + { duration: 100 * MS_PER_SEC, + fill: 'forwards' }); assert_equals(effect.target, null, 'Effect created with null target has correct target'); -}, 'A KeyframeEffectReadOnly constructed with null target'); +}, 'A KeyframeEffect constructed with null target'); test(t => { const test_error = { name: 'test' }; diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor.html index c4e8a8ec37c..e3bc0db00a7 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset=utf-8> -<title>KeyframeEffect and KeyframeEffectReadOnly copy constructor</title> +<title>KeyframeEffect copy constructor</title> <link rel="help" href="https://drafts.csswg.org/web-animations/#dom-keyframeeffect-keyframeeffect-source"> <link rel="help" @@ -14,21 +14,21 @@ 'use strict'; test(t => { - const effect = new KeyframeEffectReadOnly(createDiv(t), null); - const copiedEffect = new KeyframeEffectReadOnly(effect); + const effect = new KeyframeEffect(createDiv(t), null); + const copiedEffect = new KeyframeEffect(effect); assert_equals(copiedEffect.target, effect.target, 'same target'); -}, 'Copied KeyframeEffectReadOnly has the same target'); +}, 'Copied KeyframeEffect has the same target'); test(t => { const effect = - new KeyframeEffectReadOnly(null, - [ { marginLeft: '0px' }, - { marginLeft: '-20px', easing: 'ease-in', - offset: 0.1 }, - { marginLeft: '100px', easing: 'ease-out' }, - { marginLeft: '50px' } ]); + new KeyframeEffect(null, + [ { marginLeft: '0px' }, + { marginLeft: '-20px', easing: 'ease-in', + offset: 0.1 }, + { marginLeft: '100px', easing: 'ease-out' }, + { marginLeft: '50px' } ]); - const copiedEffect = new KeyframeEffectReadOnly(effect); + const copiedEffect = new KeyframeEffect(effect); const keyframesA = effect.getKeyframes(); const keyframesB = copiedEffect.getKeyframes(); assert_equals(keyframesA.length, keyframesB.length, 'same keyframes length'); @@ -50,34 +50,33 @@ test(t => { assert_equals(keyframesA[i].marginLeft, keyframesB[i].marginLeft, `Keyframe ${i} has the same property value pair`); } -}, 'Copied KeyframeEffectReadOnly has the same keyframes'); +}, 'Copied KeyframeEffect has the same keyframes'); test(t => { const effect = - new KeyframeEffectReadOnly(null, null, - { iterationComposite: 'accumulate' }); + new KeyframeEffect(null, null, { iterationComposite: 'accumulate' }); - const copiedEffect = new KeyframeEffectReadOnly(effect); + const copiedEffect = new KeyframeEffect(effect); assert_equals(copiedEffect.iterationComposite, effect.iterationComposite, 'same iterationCompositeOperation'); assert_equals(copiedEffect.composite, effect.composite, 'same compositeOperation'); -}, 'Copied KeyframeEffectReadOnly has the same KeyframeEffectOptions'); +}, 'Copied KeyframeEffect has the same KeyframeEffectOptions'); test(t => { - const effect = new KeyframeEffectReadOnly(null, null, - { duration: 100 * MS_PER_SEC, - delay: -1 * MS_PER_SEC, - endDelay: 2 * MS_PER_SEC, - fill: 'forwards', - iterationStart: 2, - iterations: 20, - easing: 'ease-out', - direction: 'alternate' } ); + const effect = new KeyframeEffect(null, null, + { duration: 100 * MS_PER_SEC, + delay: -1 * MS_PER_SEC, + endDelay: 2 * MS_PER_SEC, + fill: 'forwards', + iterationStart: 2, + iterations: 20, + easing: 'ease-out', + direction: 'alternate' } ); - const copiedEffect = new KeyframeEffectReadOnly(effect); - const timingA = effect.timing; - const timingB = copiedEffect.timing; + const copiedEffect = new KeyframeEffect(effect); + const timingA = effect.getTiming(); + const timingB = copiedEffect.getTiming(); assert_not_equals(timingA, timingB, 'different timing objects'); assert_equals(timingA.delay, timingB.delay, 'same delay'); assert_equals(timingA.endDelay, timingB.endDelay, 'same endDelay'); @@ -88,19 +87,7 @@ test(t => { assert_equals(timingA.duration, timingB.duration, 'same duration'); assert_equals(timingA.direction, timingB.direction, 'same direction'); assert_equals(timingA.easing, timingB.easing, 'same easing'); -}, 'Copied KeyframeEffectReadOnly has the same timing content'); - -test(t => { - const effect = new KeyframeEffectReadOnly(createDiv(t), null); - assert_equals(effect.constructor.name, 'KeyframeEffectReadOnly'); - assert_equals(effect.timing.constructor.name, - 'AnimationEffectTimingReadOnly'); - - // Make a mutable copy - const copiedEffect = new KeyframeEffect(effect); - assert_equals(copiedEffect.constructor.name, 'KeyframeEffect'); - assert_equals(copiedEffect.timing.constructor.name, 'AnimationEffectTiming'); -}, 'KeyframeEffect constructed from a KeyframeEffectReadOnly is mutable'); +}, 'Copied KeyframeEffect has the same timing content'); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness.html index 5056a875e43..0340a19d31c 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness.html @@ -9,7 +9,7 @@ <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> <div id="log"></div> -<script type="text/plain" id="AnimationEffectTimingReadOnly-IDL"> +<script type="text/plain" id="AnimationEffect-IDL"> enum FillMode { "none", "forwards", "backwards", "both", "auto" }; enum PlaybackDirection { "normal", @@ -18,7 +18,7 @@ enum PlaybackDirection { "alternate-reverse" }; -dictionary AnimationEffectTimingProperties { +dictionary EffectTiming { double delay = 0.0; double endDelay = 0.0; FillMode fill = "auto"; @@ -29,38 +29,37 @@ dictionary AnimationEffectTimingProperties { DOMString easing = "linear"; }; -[Exposed=Window] -interface AnimationEffectTimingReadOnly { - readonly attribute double delay; - readonly attribute double endDelay; - readonly attribute FillMode fill; - readonly attribute double iterationStart; - readonly attribute unrestricted double iterations; - readonly attribute (unrestricted double or DOMString) duration; - readonly attribute PlaybackDirection direction; - readonly attribute DOMString easing; +dictionary OptionalEffectTiming { + double delay; + double endDelay; + FillMode fill; + double iterationStart; + unrestricted double iterations; + (unrestricted double or DOMString) duration; + PlaybackDirection direction; + DOMString easing; }; -</script> -<script type="text/plain" id="AnimationEffectReadOnly-IDL"> -dictionary ComputedTimingProperties : AnimationEffectTimingProperties { - unrestricted double endTime; - unrestricted double activeDuration; - double? localTime; - double? progress; - unrestricted double? currentIteration; + +dictionary ComputedEffectTiming : EffectTiming { + unrestricted double endTime = 0.0; + unrestricted double activeDuration = 0.0; + double? localTime = null; + double? progress = null; + unrestricted double? currentIteration = null; }; [Exposed=Window] -interface AnimationEffectReadOnly { - readonly attribute AnimationEffectTimingReadOnly timing; - ComputedTimingProperties getComputedTiming(); +interface AnimationEffect { + EffectTiming getTiming(); + ComputedEffectTiming getComputedTiming(); + void updateTiming(optional OptionalEffectTiming timing); }; </script> -<script type="text/plain" id="KeyframeEffectReadOnly-IDL"> +<script type="text/plain" id="KeyframeEffect-IDL"> enum IterationCompositeOperation { "replace", "accumulate" }; enum CompositeOperation { "replace", "add", "accumulate" }; -dictionary KeyframeEffectOptions : AnimationEffectTimingProperties { +dictionary KeyframeEffectOptions : EffectTiming { IterationCompositeOperation iterationComposite = "replace"; CompositeOperation composite = "replace"; }; @@ -69,24 +68,13 @@ dictionary KeyframeEffectOptions : AnimationEffectTimingProperties { Constructor ((Element or CSSPseudoElement)? target, object? keyframes, optional (unrestricted double or KeyframeEffectOptions) options), - Constructor (KeyframeEffectReadOnly source)] -interface KeyframeEffectReadOnly : AnimationEffectReadOnly { - readonly attribute (Element or CSSPseudoElement)? target; - readonly attribute IterationCompositeOperation iterationComposite; - readonly attribute CompositeOperation composite; + Constructor (KeyframeEffect source)] +interface KeyframeEffect : AnimationEffect { + attribute (Element or CSSPseudoElement)? target; + attribute IterationCompositeOperation iterationComposite; + attribute CompositeOperation composite; + sequence<object> getKeyframes (); -}; -</script> -<script type="text/plain" id="KeyframeEffect-IDL"> -[Exposed=Window, - Constructor ((Element or CSSPseudoElement)? target, - object? keyframes, - optional (unrestricted double or KeyframeEffectOptions) options), - Constructor (KeyframeEffectReadOnly source)] -interface KeyframeEffect : KeyframeEffectReadOnly { - inherit attribute (Element or CSSPseudoElement)? target; - inherit attribute IterationCompositeOperation iterationComposite; - inherit attribute CompositeOperation composite; void setKeyframes (object? keyframes); }; </script> @@ -98,20 +86,13 @@ const idlArray = new IdlArray(); idlArray.add_untested_idls('interface CSSPseudoElement {};'); idlArray.add_untested_idls('interface Element {};'); idlArray.add_untested_idls( - document.getElementById('AnimationEffectTimingReadOnly-IDL').textContent -); -idlArray.add_idls( - document.getElementById('AnimationEffectReadOnly-IDL').textContent -); -idlArray.add_idls( - document.getElementById('KeyframeEffectReadOnly-IDL').textContent + document.getElementById('AnimationEffect-IDL').textContent ); idlArray.add_idls( document.getElementById('KeyframeEffect-IDL').textContent ); idlArray.add_objects({ KeyframeEffect: ['new KeyframeEffect(null, null)'], - KeyframeEffectReadOnly: ['new KeyframeEffectReadOnly(null, null)'], }); idlArray.test(); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/iterationComposite.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/iterationComposite.html index de2afa7c2b8..bbb8ee2a326 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/iterationComposite.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/iterationComposite.html @@ -19,7 +19,8 @@ test(t => { anim.pause(); anim.currentTime = - anim.effect.timing.duration * 2 + anim.effect.timing.duration / 2; + anim.effect.getComputedTiming().duration * 2 + + anim.effect.getComputedTiming().duration / 2; assert_equals(getComputedStyle(div).marginLeft, '25px', 'Animated style at 50s of the third iteration'); diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html index 523019d2913..133fd579041 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html @@ -13,7 +13,7 @@ 'use strict'; // This file only tests the KeyframeEffect constructor since it is -// assumed that the implementation of the KeyframeEffectReadOnly constructor, +// assumed that the implementation of the KeyframeEffect constructor, // Animatable.animate() method, and KeyframeEffect.setKeyframes() method will // all share common machinery and it is not necessary to test each method. diff --git a/tests/wpt/web-platform-tests/web-animations/resources/timing-tests.js b/tests/wpt/web-platform-tests/web-animations/resources/timing-tests.js new file mode 100644 index 00000000000..4b0f021f74e --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/resources/timing-tests.js @@ -0,0 +1,46 @@ +'use strict'; + +// ================================= +// +// Common timing parameter test data +// +// ================================= + + +// ------------------------------ +// Delay values +// ------------------------------ + +const gBadDelayValues = [ + NaN, Infinity, -Infinity +]; + +// ------------------------------ +// Duration values +// ------------------------------ + +const gGoodDurationValues = [ + { specified: 123.45, computed: 123.45 }, + { specified: 'auto', computed: 0 }, + { specified: Infinity, computed: Infinity }, +]; + +const gBadDurationValues = [ + -1, NaN, -Infinity, 'abc', '100' +]; + +// ------------------------------ +// iterationStart values +// ------------------------------ + +const gBadIterationStartValues = [ + -1, NaN, Infinity, -Infinity +]; + +// ------------------------------ +// iterations values +// ------------------------------ + +const gBadIterationsValues = [ + -1, -Infinity, NaN +]; diff --git a/tests/wpt/web-platform-tests/web-animations/resources/timing-utils.js b/tests/wpt/web-platform-tests/web-animations/resources/timing-utils.js new file mode 100644 index 00000000000..d7267f94f2d --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/resources/timing-utils.js @@ -0,0 +1,39 @@ +'use strict'; + +// ======================================= +// +// Utility functions for testing timing +// +// ======================================= + + +// ------------------------------ +// Helper functions +// ------------------------------ + +// Utility function to check that a subset of timing properties have their +// default values. +function assert_default_timing_except(effect, propertiesToSkip) { + const defaults = { + delay: 0, + endDelay: 0, + fill: 'auto', + iterationStart: 0, + iterations: 1, + duration: 'auto', + direction: 'normal', + easing: 'linear', + }; + + for (const prop of Object.keys(defaults)) { + if (propertiesToSkip.includes(prop)) { + continue; + } + + assert_equals( + effect.getTiming()[prop], + defaults[prop], + `${prop} parameter has default value:` + ); + } +} diff --git a/tests/wpt/web-platform-tests/web-animations/testcommon.js b/tests/wpt/web-platform-tests/web-animations/testcommon.js index bb5acc2869f..46f2356e8ef 100644 --- a/tests/wpt/web-platform-tests/web-animations/testcommon.js +++ b/tests/wpt/web-platform-tests/web-animations/testcommon.js @@ -29,7 +29,11 @@ if (!window.assert_times_equal) { // a time value based on its precision requirements with a fixed value. if (!window.assert_time_equals_literal) { window.assert_time_equals_literal = (actual, expected, description) => { - assert_approx_equals(actual, expected, TIME_PRECISION, description); + if (Math.abs(expected) === Infinity) { + assert_equals(actual, expected, description); + } else { + assert_approx_equals(actual, expected, TIME_PRECISION, description); + } } } @@ -283,4 +287,4 @@ function assert_rotate3d_equals(actual, expected, description) { assert_approx_equals(actualRotationVector[i], expectedRotationVector[i], 0.0001, `expected ${expected} but got ${actual}: ${description}`); } -}
\ No newline at end of file +} diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/phases-and-states.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/phases-and-states.html index ac3732fe673..b62726c7e64 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/phases-and-states.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/phases-and-states.html @@ -22,7 +22,7 @@ function assert_phase_at_time(animation, phase, currentTime) { if (phase === 'active') { // If the fill mode is 'none', then progress will only be non-null if we // are in the active phase. - animation.effect.timing.fill = 'none'; + animation.effect.updateTiming({ fill: 'none' }); assert_not_equals(animation.effect.getComputedTiming().progress, null, 'Animation effect is in active phase when current time' + ` is ${currentTime}ms`); @@ -31,15 +31,15 @@ function assert_phase_at_time(animation, phase, currentTime) { // phase is to toggle the fill mode. For example, if the progress is null // will the fill node is 'none' but non-null when the fill mode is // 'backwards' then we are in the before phase. - animation.effect.timing.fill = 'none'; + animation.effect.updateTiming({ fill: 'none' }); assert_equals(animation.effect.getComputedTiming().progress, null, `Animation effect is in ${phase} phase when current time` + ` is ${currentTime}ms` + ' (progress is null with \'none\' fill mode)'); - animation.effect.timing.fill = phase === 'before' - ? 'backwards' - : 'forwards'; + animation.effect.updateTiming({ + fill: phase === 'before' ? 'backwards' : 'forwards', + }); assert_not_equals(animation.effect.getComputedTiming().progress, null, `Animation effect is in ${phase} phase when current time` + ` is ${currentTime}ms` diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html index b479db9b93e..833f074d40e 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html @@ -196,7 +196,7 @@ promise_test(async t => { }, 'Finishing an animation resolves the finished promise synchronously'); promise_test(async t => { - const effect = new KeyframeEffectReadOnly(null, null, 100 * MS_PER_SEC); + const effect = new KeyframeEffect(null, null, 100 * MS_PER_SEC); const animation = new Animation(effect, document.timeline); let resolvedFinished = false; animation.finished.then(() => { diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html index 04589ffa001..b1fc43e7952 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html @@ -11,6 +11,39 @@ <script> 'use strict'; +test(t => { + const anim = new Animation(); + assert_equals(anim.playState, 'idle'); + assert_equals(anim.currentTime, null); + + // This should not throw because the currentTime is already null. + anim.currentTime = null; +}, 'Setting the current time of a pending animation to unresolved does not' + + ' throw a TypeError'); + +promise_test(async t => { + const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); + await anim.ready; + + assert_greater_than_equal(anim.currentTime, 0); + assert_throws({ name: 'TypeError' }, () => { + anim.currentTime = null; + }); +}, 'Setting the current time of a playing animation to unresolved throws a' + + ' TypeError'); + +promise_test(async t => { + const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); + await anim.ready; + anim.pause(); + + assert_greater_than_equal(anim.currentTime, 0); + assert_throws({ name: 'TypeError' }, () => { + anim.currentTime = null; + }); +}, 'Setting the current time of a paused animation to unresolved throws a' + + ' TypeError'); + promise_test(async t => { const anim = createDiv(t).animate(null, 100 * MS_PER_SEC); await anim.ready; diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html index 184804d6702..daa73f59c2f 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html @@ -36,9 +36,9 @@ promise_test(async t => { anim.pause(); assert_true(anim.pending); - anim.effect = new KeyframeEffectReadOnly(createDiv(t), - { marginLeft: [ '0px', '100px' ] }, - 100 * MS_PER_SEC); + anim.effect = new KeyframeEffect(createDiv(t), + { marginLeft: [ '0px', '100px' ] }, + 100 * MS_PER_SEC); assert_true(anim.pending); await anim.ready; @@ -52,9 +52,9 @@ promise_test(async t => { anim.play(); assert_true(anim.pending); - anim.effect = new KeyframeEffectReadOnly(createDiv(t), - { marginLeft: [ '0px', '100px' ] }, - 100 * MS_PER_SEC); + anim.effect = new KeyframeEffect(createDiv(t), + { marginLeft: [ '0px', '100px' ] }, + 100 * MS_PER_SEC); assert_true(anim.pending); await anim.ready; diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html index 7059423b363..8e02fed1528 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html @@ -141,7 +141,9 @@ promise_test(async t => { 'Hold time is initially set'); // Then extend the duration so that the hold time is cleared and on // the next tick the current time will increase. - anim.effect.timing.duration *= 2; + anim.effect.updateTiming({ + duration: anim.effect.getComputedTiming().duration * 2, + }); await waitForNextFrame(); assert_greater_than(anim.currentTime, 100 * MS_PER_SEC, @@ -247,7 +249,7 @@ promise_test(async t => { anim.cancel(); // Trigger a change that will cause the "update the finished state" // procedure to run. - anim.effect.timing.duration = 200 * MS_PER_SEC; + anim.effect.updateTiming({ duration: 200 * MS_PER_SEC }); assert_equals(anim.currentTime, null, 'The animation hold time / start time should not be updated'); // The "update the finished state" procedure is supposed to run after any @@ -273,7 +275,7 @@ test(t => { // is greater than the target end. At this point the "update the finished // state" procedure should run and if we fail to check for a pending task // we will set the hold time to the target end, i.e. 50ms. - anim.effect.timing.duration = 50 * MS_PER_SEC; + anim.effect.updateTiming({ duration: 50 * MS_PER_SEC }); assert_equals(anim.currentTime, 75 * MS_PER_SEC, 'Hold time should not be updated'); }, 'Updating the finished state when there is a pending task'); @@ -289,7 +291,7 @@ promise_test(async t => { anim.currentTime = 150 * MS_PER_SEC; // Trigger a change that will cause the "update the finished state" // procedure to run (did seek = false). - anim.effect.timing.duration = 200 * MS_PER_SEC; + anim.effect.updateTiming({ duration: 200 * MS_PER_SEC }); await waitForAnimationFrames(1); assert_equals(anim.currentTime, 150 * MS_PER_SEC, @@ -348,7 +350,7 @@ promise_test(async t => { }, 'Finish notification steps run when the animation completes normally'); promise_test(async t => { - const effect = new KeyframeEffectReadOnly(null, null, 1); + const effect = new KeyframeEffect(null, null, 1); const animation = new Animation(effect, document.timeline); animation.play(); await animation.ready; @@ -417,5 +419,38 @@ async_test(t => { }; }, 'Animation finish event is fired again after replaying from start'); +async_test(t => { + const anim = createDiv(t).animate(null, + { duration: 100000, endDelay: 50000 }); + anim.onfinish = t.step_func(event => { + assert_unreached('finish event should not be fired'); + }); + + anim.ready.then(() => { + anim.currentTime = 100000; + return waitForAnimationFrames(2); + }).then(t.step_func(() => { + t.done(); + })); +}, 'finish event is not fired at the end of the active interval when the' + + ' endDelay has not expired'); + +async_test(t => { + const anim = createDiv(t).animate(null, + { duration: 100000, endDelay: 30000 }); + anim.ready.then(() => { + anim.currentTime = 110000; // during endDelay + anim.onfinish = t.step_func(event => { + assert_unreached('onfinish event should not be fired during endDelay'); + }); + return waitForAnimationFrames(2); + }).then(t.step_func(() => { + anim.onfinish = t.step_func(event => { + t.done(); + }); + anim.currentTime = 130000; // after endTime + })); +}, 'finish event is fired after the endDelay has expired'); + </script> </body> diff --git a/tests/wpt/web-platform-tests/webaudio/idlharness.https.html b/tests/wpt/web-platform-tests/webaudio/idlharness.https.html new file mode 100644 index 00000000000..a8be8d0ea53 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/idlharness.https.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>WebAudio IDL tests</title> +<link rel="help" href="https://webaudio.github.io/web-audio-api/"/> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="/resources/idlharness.js"></script> +<script> +'use strict'; + +promise_test(async t => { + const [html, dom, mediacapture, webaudio] = await Promise.all([ + // Needed for EventTarget, HTMLMediaElement + '/interfaces/html.idl', + + // Needed for Event, EventListener + '/interfaces/dom.idl', + + // Needed for MediaStream, MediaStreamTrack + '/interfaces/mediacapture-main.idl', + + '/interfaces/webaudio.idl' + ].map(url => fetch(url).then(response => response.text()))); + + const idl_array = new IdlArray(); + + + idl_array.add_untested_idls('interface LinkStyle {};'); // Dependency of HTML + idl_array.add_untested_idls(html); + idl_array.add_untested_idls(dom); + idl_array.add_untested_idls(mediacapture); + idl_array.add_untested_idls('interface Worklet {};'); + idl_array.add_idls(webaudio); + + const sample_rate = 44100; + const context = new AudioContext; + const buffer = new AudioBuffer({length: 1, sampleRate: sample_rate}); + await context.audioWorklet.addModule( + 'the-audio-api/the-audioworklet-interface/processors/dummy-processor.js'); + const worklet_node = new AudioWorkletNode(context, 'dummy'); + + idl_array.add_objects({ + BaseAudioContext: [], + AudioContext: [context], + OfflineAudioContext: [new OfflineAudioContext(1, 1, sample_rate)], + OfflineAudioCompletionEvent: [ + new OfflineAudioCompletionEvent('', {renderedBuffer: buffer})], + AudioBuffer: [buffer], + AudioNode: [], + AudioParam: [new AudioBufferSourceNode(context).playbackRate], + AudioScheduledSourceNode: [], + AnalyserNode: [new AnalyserNode(context)], + AudioBufferSourceNode: [new AudioBufferSourceNode(context)], + AudioDestinationNode: [context.destination], + AudioListener: [context.listener], + AudioProcessingEvent: [new AudioProcessingEvent('', { + playbackTime: 0, inputBuffer: buffer, outputBuffer: buffer + })], + BiquadFilterNode: [new BiquadFilterNode(context)], + ChannelMergerNode: [new ChannelMergerNode(context)], + ChannelSplitterNode: [new ChannelSplitterNode(context)], + ConstantSourceNode: [new ConstantSourceNode(context)], + ConvolverNode: [new ConvolverNode(context)], + DelayNode: [new DelayNode(context)], + DynamicsCompressorNode: [new DynamicsCompressorNode(context)], + GainNode: [new GainNode(context)], + IIRFilterNode: [ + new IIRFilterNode(context, {feedforward: [1], feedback: [1]})], + MediaElementAudioSourceNode: [ + new MediaElementAudioSourceNode(context, {mediaElement: new Audio})], + MediaStreamAudioDestinationNode: [ + new MediaStreamAudioDestinationNode(context)], + MediaStreamAudioSourceNode: [], + MediaStreamTrackAudioSourceNode: [], + OscillatorNode: [new OscillatorNode(context)], + PannerNode: [new PannerNode(context)], + PeriodicWave: [new PeriodicWave(context)], + ScriptProcessorNode: [context.createScriptProcessor()], + StereoPannerNode: [new StereoPannerNode(context)], + WaveShaperNode: [new WaveShaperNode(context)], + AudioWorklet: [context.audioWorklet], + AudioWorkletGlobalScope: [], + AudioParamMap: [worklet_node.parameters], + AudioWorkletNode: [worklet_node], + AudioWorkletProcessor: [], + }); + idl_array.test(); + +}, 'Test driver'); +</script> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html new file mode 100644 index 00000000000..c58502af011 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> + <head> + <title> + Test AudioWorkletNode's Disconnected Input Array Length + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/webaudio/resources/audit.js"></script> + <script src="/webaudio/resources/audit-util.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + // Arbitrary numbers used to align the test with render quantum boundary. + // The sample rate is a power of two to eliminate roundoff in computing + // the suspend time needed for the test. + let sampleRate = 16384; + let renderLength = 8 * RENDER_QUANTUM_FRAMES; + let context; + + let filePath = 'processors/input-length-processor.js'; + + let testChannelValues = [1, 2, 3]; + + // Creates a 3-channel buffer and play with BufferSourceNode. The source + // goes through a bypass AudioWorkletNode (gain value of 1). + audit.define( + { + label: 'test', + description: + 'Input array length should be zero for disconnected input' + }, + (task, should) => { + context = new OfflineAudioContext({ + numberOfChannels: 1, + length: renderLength, + sampleRate: sampleRate + }); + + context.audioWorklet.addModule(filePath).then(() => { + let sourceNode = new ConstantSourceNode(context); + let workletNode = + new AudioWorkletNode(context, 'input-length-processor'); + + workletNode.connect(context.destination); + + // Connect the source now. + let connectFrame = RENDER_QUANTUM_FRAMES; + + context.suspend(connectFrame / sampleRate) + .then(() => { + sourceNode.connect(workletNode); + }) + .then(() => context.resume()); + ; + + // Then disconnect the source after a few renders + let disconnectFrame = 3 * RENDER_QUANTUM_FRAMES; + context.suspend(disconnectFrame / sampleRate) + .then(() => { + sourceNode.disconnect(workletNode); + }) + .then(() => context.resume()); + + sourceNode.start(); + context.startRendering() + .then(resultBuffer => { + let data = resultBuffer.getChannelData(0); + + should( + data.slice(0, connectFrame), + 'Before connecting the source: Input array length') + .beConstantValueOf(0); + + // Find where the output is no longer 0. + let nonZeroIndex = data.findIndex(x => x > 0); + should(nonZeroIndex, 'First non-zero output') + .beEqualTo(connectFrame); + + should( + data.slice( + nonZeroIndex, + nonZeroIndex + (disconnectFrame - connectFrame)), + 'While source is connected: Input array length') + .beConstantValueOf(RENDER_QUANTUM_FRAMES); + should( + data.slice(disconnectFrame), + 'After disconnecting the source: Input array length') + .beConstantValueOf(0); + }) + .then(() => task.done()); + }); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js new file mode 100644 index 00000000000..cc0968d738c --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/input-length-processor.js @@ -0,0 +1,25 @@ +/** + * @class InputLengthProcessor + * @extends AudioWorkletProcessor + * + * This processor class just sets the output to the length of the + * input array for verifying that the input length changes when the + * input is disconnected. + */ +class InputLengthProcessor extends AudioWorkletProcessor { + constructor() { + super(); + } + + process(inputs, outputs, parameters) { + let input = inputs[0]; + let output = outputs[0]; + + // Set output channel to the length of the input channel array. + output[0].fill(input[0].length); + + return true; + } +} + +registerProcessor('input-length-processor', InputLengthProcessor); diff --git a/tests/wpt/web-platform-tests/webdriver/tests/cookies/add_cookie.py b/tests/wpt/web-platform-tests/webdriver/tests/cookies/add_cookie.py index 1aa9db2fdf3..88b79fba8f6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/cookies/add_cookie.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/cookies/add_cookie.py @@ -36,7 +36,7 @@ def test_add_domain_cookie(session, url, server_config): assert cookie["name"] == "hello" assert cookie["value"] == "world" - assert cookie["domain"] == ".%s" % server_config["domains"][""] + assert cookie["domain"] == ".%s" % server_config["domains"][""] or cookie["domain"] == "%s" % server_config["domains"][""] def test_add_cookie_for_ip(session, url, server_config, configuration): session.url = "http://127.0.0.1:%s/common/blank.html" % (server_config["ports"]["http"][0]) @@ -175,4 +175,4 @@ def test_add_session_cookie_with_leading_dot_character_in_domain(session, url, s assert cookie["name"] == "hello" assert cookie["value"] == "world" - assert cookie["domain"] == ".%s" % server_config["domains"][""] + assert cookie["domain"] == ".%s" % server_config["domains"][""] or cookie["domain"] == "%s" % server_config["domains"][""] diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_element_from_element.py b/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_element_from_element.py index d79d512a13c..2de03835186 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_element_from_element.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_element_from_element.py @@ -76,7 +76,17 @@ def test_xhtml_namespace(session, using, value): def test_parent_htmldocument(session): session.url = inline("") + from_element = session.execute_script("""return document.querySelector("body")""") + expected = session.execute_script("return document.documentElement") + + response = find_element(session, from_element.id, "xpath", "..") + value = assert_success(response) + assert_same_element(session, value, expected) + + +def test_parent_of_document_node_errors(session): + session.url = inline("") from_element = session.execute_script("return document.documentElement") response = find_element(session, from_element.id, "xpath", "..") - assert_success(response) + assert_error(response, "invalid selector") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_elements_from_element.py b/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_elements_from_element.py index 486d7cb7aee..2edc0406c66 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_elements_from_element.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_elements_from_element.py @@ -79,9 +79,21 @@ def test_xhtml_namespace(session, using, value): def test_parent_htmldocument(session): session.url = inline("") - from_element = session.execute_script("return document.documentElement") + from_element = session.execute_script("""return document.querySelector("body")""") + expected = session.execute_script("return document.documentElement") response = find_elements(session, from_element.id, "xpath", "..") value = assert_success(response) assert isinstance(value, list) assert len(value) == 1 + + found_element = value[0] + assert_same_element(session, found_element, expected) + + +def test_parent_of_document_node_errors(session): + session.url = inline("") + from_element = session.execute_script("return document.documentElement") + + response = find_elements(session, from_element.id, "xpath", "..") + assert_error(response, "invalid selector") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py index c497b5504c2..c20219ae7b3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py @@ -4,6 +4,7 @@ import json import os import urlparse import re +import sys import webdriver @@ -179,7 +180,8 @@ def new_session(configuration, request): global _current_session if _current_session is not None and _current_session.session_id: _current_session.end() - _current_session = None + + _current_session = None def create_session(body): global _current_session diff --git a/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/workers.html b/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/workers.html index 7ccbd395778..861b5504752 100644 --- a/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/workers.html +++ b/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/workers.html @@ -105,4 +105,20 @@ async_test(t => { }, 'Closing and re-opening a channel works.'); +async_test(t => { + function workerCode() { + close(); + var bc = new BroadcastChannel('worker-test'); + postMessage(true); + } + + var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); + + var w = new Worker(URL.createObjectURL(workerBlob)); + w.onmessage = function(e) { + assert_true(e.data, "BroadcastChannel created on worker shutdown."); + t.done(); + } +}, 'BroadcastChannel created after a worker self.close()'); + </script> diff --git a/tests/wpt/web-platform-tests/webmessaging/event.origin.sub.htm b/tests/wpt/web-platform-tests/webmessaging/event.origin.sub.htm index ea3c9e40eb6..5b1ab3e3c37 100644 --- a/tests/wpt/web-platform-tests/webmessaging/event.origin.sub.htm +++ b/tests/wpt/web-platform-tests/webmessaging/event.origin.sub.htm @@ -42,13 +42,23 @@ window.onmessage = t.step_func(function(e) { - // testharness.js uses postMessage so we must check what data we want to receive - if (e.data.toString() === "#1" || e.data.toString() === "#2") { - ActualResult.push(e.data, e.origin); - if (ActualResult.length === ExpectedResult.length) { - assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); - t.done(); - } + // Messages from TARGET1 and TARGET2 can come in any order + // (since one of them is cross-origin and can run in parallel). + // To make the tests immune to message reordering, always + // put the response from TARGET1 at the start of the list. + if (e.data.toString() === "#1") + { + ActualResult = [e.data, e.origin].concat(ActualResult); + } + else if (e.data.toString() === "#2") + { + ActualResult = ActualResult.concat([e.data, e.origin]); + } + + if (ActualResult.length >= ExpectedResult.length) + { + assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); + t.done(); } }); </script> diff --git a/tests/wpt/web-platform-tests/webmessaging/message-channels/worker.html b/tests/wpt/web-platform-tests/webmessaging/message-channels/worker.html new file mode 100644 index 00000000000..0502021fff1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/message-channels/worker.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<link rel="help" href="https://html.spec.whatwg.org/multipage/comms.html#messageevent"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + +async_test(t => { + function workerCode() { + close(); + var mc = new MessageChannel(); + mc.port1.postMessage(42); + mc.port2.postMessage(42); + postMessage(true); + } + + var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); + + var w = new Worker(URL.createObjectURL(workerBlob)); + w.onmessage = function(e) { + assert_true(e.data, "MessageChannel created on worker shutdown."); + t.done(); + } +}, 'MessageChannel/MessagePort created and used after a worker self.close()'); + +</script> diff --git a/tests/wpt/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm b/tests/wpt/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm index a12524625a7..532f28251cb 100644 --- a/tests/wpt/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm +++ b/tests/wpt/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm @@ -42,7 +42,18 @@ window.onmessage = t.step_func(function(e) { - ActualResult.push(e.data, e.origin); + // Messages from TARGET1 and TARGET2 can come in any order + // (since one of them is cross-origin and can run in parallel). + // To make the tests immune to message reordering, always + // put the response from TARGET1 at the start of the list. + if (e.data.toString() === "#1") + { + ActualResult = [e.data, e.origin].concat(ActualResult); + } + else if (e.data.toString() === "#2") + { + ActualResult = ActualResult.concat([e.data, e.origin]); + } if (ActualResult.length >= ExpectedResult.length) { diff --git a/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-helper.js index 23c01d9f756..70fc6917225 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-helper.js @@ -14,7 +14,7 @@ // Connect the PeerConnection to another PC and wait until it is // properly connected, so that DTMF can be sent. function createDtmfSender(pc = new RTCPeerConnection()) { - var dtmfSender; + let dtmfSender; return getTrackFromUserMedia('audio') .then(([track, mediaStream]) => { const sender = pc.addTrack(track, mediaStream); @@ -28,6 +28,9 @@ function createDtmfSender(pc = new RTCPeerConnection()) { exchangeIceCandidates(pc, pc2); return doSignalingHandshake(pc, pc2); }).then(() => { + if (!('canInsertDTMF' in dtmfSender)) { + return Promise.resolve(); + } // Wait until dtmfSender.canInsertDTMF becomes true. // Up to 150 ms has been observed in test. Wait 1 second // in steps of 10 ms. @@ -35,7 +38,7 @@ function createDtmfSender(pc = new RTCPeerConnection()) { // make test return a clear error message on failure. return new Promise((resolve, reject) => { let counter = 0; - let checkfunc = function() { + step_timeout(function checkCanInsertDTMF() { if (dtmfSender.canInsertDTMF) { resolve(); } else { @@ -44,14 +47,11 @@ function createDtmfSender(pc = new RTCPeerConnection()) { return; } ++counter; - step_timeout(checkfunc, 10); + step_timeout(checkCanInsertDTMF, 10); } - }; - checkfunc(); + }, 0); }); }).then(() => { - assert_true(dtmfSender.canInsertDTMF, - 'Failed to create usable dtmfSender:'); return dtmfSender; }); } diff --git a/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https.html b/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https.html index e49a79e4aa0..383977c52e1 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https.html @@ -162,4 +162,22 @@ }); }, 'insertDTMF() should set toneBuffer to provided tones normalized, with old tones overridden'); + promise_test(t => { + let dtmfSender; + let sender; + let pc = new RTCPeerConnection(); + return getTrackFromUserMedia('audio') + .then(([track, mediaStream]) => { + sender = pc.addTrack(track, mediaStream); + return pc.createOffer(); + }).then(offer => { + pc.setLocalDescription(offer); + dtmfSender = sender.dtmf; + pc.removeTrack(sender); + pc.close(); + assert_throws('InvalidStateError', () => + dtmfSender.insertDTMF('123')); + }); + }, 'insertDTMF() after remove and close should reject'); + </script> diff --git a/tests/wpt/web-platform-tests/websockets/Create-on-worker-shutdown.html b/tests/wpt/web-platform-tests/websockets/Create-on-worker-shutdown.html new file mode 100644 index 00000000000..2bdf5498900 --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/Create-on-worker-shutdown.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> + <title>W3C WebSocket API - Create WebSocket - on a worker after self.close()</title> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript" src="websocket.sub.js"></script> +</head> +<body> + <div id="log"></div> + <script type="text/javascript"> + +async_test(t => { + function workerCode() { + close(); + var ws = new WebSocket(self.location.origin.replace('http', 'ws')); + postMessage(ws.readyState == WebSocket.CONNECTING); + } + + var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); + + var w = new Worker(URL.createObjectURL(workerBlob)); + w.onmessage = function(e) { + assert_true(e.data, "WebSocket created on worker shutdown."); + t.done(); + } +}, 'WebSocket created after a worker self.close()'); + + </script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/webvr/idlharness.https.html b/tests/wpt/web-platform-tests/webvr/idlharness.https.html index 96c63d5e0c4..df59441abd1 100644 --- a/tests/wpt/web-platform-tests/webvr/idlharness.https.html +++ b/tests/wpt/web-platform-tests/webvr/idlharness.https.html @@ -203,10 +203,6 @@ partial interface Window { attribute EventHandler onvrdisplaypresentchange; }; -partial interface HTMLIFrameElement { - attribute boolean allowvr; -}; - partial interface Gamepad { readonly attribute unsigned long displayId; }; diff --git a/tests/wpt/web-platform-tests/webvtt/api/interfaces.html b/tests/wpt/web-platform-tests/webvtt/api/interfaces.html index 5e112dafd2e..5222256d617 100644 --- a/tests/wpt/web-platform-tests/webvtt/api/interfaces.html +++ b/tests/wpt/web-platform-tests/webvtt/api/interfaces.html @@ -116,53 +116,23 @@ dictionary GetRootNodeOptions { }; </script> -<script type=text/plain id=tested> -enum AutoKeyword { "auto" }; -typedef (double or AutoKeyword) LineAndPositionSetting; -enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; -enum LineAlignSetting { "start", "center", "end" }; -enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; -enum AlignSetting { "start", "center", "end", "left", "right" }; -[Exposed=Window, - Constructor(double startTime, double endTime, DOMString text)] -interface VTTCue : TextTrackCue { - attribute VTTRegion? region; - attribute DirectionSetting vertical; - attribute boolean snapToLines; - attribute LineAndPositionSetting line; - attribute LineAlignSetting lineAlign; - attribute LineAndPositionSetting position; - attribute PositionAlignSetting positionAlign; - attribute double size; - attribute AlignSetting align; - attribute DOMString text; - DocumentFragment getCueAsHTML(); -}; - -enum ScrollSetting { "" /* none */, "up" }; -[Exposed=Window, - Constructor] -interface VTTRegion { - attribute DOMString id; - attribute double width; - attribute long lines; - attribute double regionAnchorX; - attribute double regionAnchorY; - attribute double viewportAnchorX; - attribute double viewportAnchorY; - attribute ScrollSetting scroll; -}; -</script> <script> "use strict"; -setup(function() { + +// https://w3c.github.io/webvtt/ + +promise_test(async () => { + const webvttIDL = await fetch('/interfaces/webvtt.idl').then(response => + response.text(), + ); var idlArray = new IdlArray(); - idlArray.add_untested_idls(document.getElementById("untested").textContent); - idlArray.add_idls(document.getElementById("tested").textContent); + idlArray.add_untested_idls(document.getElementById('untested').textContent); + idlArray.add_idls(webvttIDL); idlArray.add_objects({ VTTCue: ['new VTTCue(0, 0, "")'], VTTRegion: ['new VTTRegion()'], }); idlArray.test(); -}); + done(); +}, 'webvtt interfaces.'); </script> diff --git a/tests/wpt/web-platform-tests/xhr/responsexml-document-properties.htm b/tests/wpt/web-platform-tests/xhr/responsexml-document-properties.htm index f67ea10e24b..b008348e58f 100644 --- a/tests/wpt/web-platform-tests/xhr/responsexml-document-properties.htm +++ b/tests/wpt/web-platform-tests/xhr/responsexml-document-properties.htm @@ -25,11 +25,8 @@ location:null, defaultView:null, body:null, - images: undefined, doctype:null, - forms:undefined, all:undefined, - links: undefined, cookie:'' } @@ -94,13 +91,19 @@ assert_equals(client.responseXML.cookie, "") }, 'cookie (after setting it)') - test(function() { - assert_equals(typeof(client.responseXML.styleSheets), "object") - }, 'styleSheets') + var objectProps = [ + "styleSheets", + "implementation", + "images", + "forms", + "links", + ]; - test(function() { - assert_equals(typeof(client.responseXML.implementation), "object") - }, 'implementation') + for (let prop of objectProps) { + test(function() { + assert_equals(typeof(client.responseXML[prop]), "object") + }, prop + " should be an object") + } </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html b/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html new file mode 100644 index 00000000000..5c8142f23ae --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html @@ -0,0 +1,32 @@ +<!-- +self.close() +var xhr = new XMLHttpRequest(); +xhr.open("GET", "/resources/testharness.js"); +xhr.send(42); +postMessage(xhr.readyState) +/*--> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <title>XHR used when worker is closing itself</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <div id="log"></div> + <script> + var test = async_test(); + test.step(function() { + var worker = new Worker('#') + worker.onmessage = function(e) { + test.step(function() { + assert_equals(e.data, XMLHttpRequest.OPENED, 'XHR.readyState') + }) + test.done() + } + }) + </script> + </body> +</html> +<!--*/ //--> |