aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock577
-rw-r--r--README.md24
-rw-r--r--components/bluetooth_traits/Cargo.toml2
-rw-r--r--components/canvas/Cargo.toml2
-rw-r--r--components/canvas/webgl_thread.rs152
-rw-r--r--components/canvas_traits/Cargo.toml2
-rw-r--r--components/canvas_traits/webgl.rs105
-rw-r--r--components/dom_struct/Cargo.toml8
-rw-r--r--components/dom_struct/lib.rs42
-rw-r--r--components/gfx/platform/freetype/android/font_list.rs1
-rw-r--r--components/layout/display_list/builder.rs11
-rw-r--r--components/malloc_size_of/Cargo.toml2
-rw-r--r--components/profile/Cargo.toml2
-rw-r--r--components/script/Cargo.toml4
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py108
-rw-r--r--components/script/dom/bindings/inheritance.rs5
-rw-r--r--components/script/dom/bindings/iterable.rs4
-rw-r--r--components/script/dom/bindings/trace.rs3
-rw-r--r--components/script/dom/filereadersync.rs7
-rw-r--r--components/script/dom/htmlimageelement.rs70
-rw-r--r--components/script/dom/webgl2renderingcontext.rs30
-rw-r--r--components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs92
-rw-r--r--components/script/dom/webgl_extensions/ext/mod.rs1
-rw-r--r--components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs22
-rw-r--r--components/script/dom/webgl_extensions/extensions.rs31
-rw-r--r--components/script/dom/webglprogram.rs129
-rw-r--r--components/script/dom/webglrenderbuffer.rs2
-rw-r--r--components/script/dom/webglrenderingcontext.rs716
-rw-r--r--components/script/dom/webglshader.rs42
-rw-r--r--components/script/dom/webglvertexarrayobjectoes.rs26
-rw-r--r--components/script/dom/webidls/ANGLEInstancedArrays.webidl15
-rw-r--r--components/script/dom/webidls/CSSStyleDeclaration.webidl8
-rw-r--r--components/script/dom/webidls/WebGL2RenderingContext.webidl6
-rw-r--r--components/script/dom/webidls/WebGLRenderingContext.webidl2
-rw-r--r--components/script/test.rs4
-rw-r--r--components/script_layout_interface/Cargo.toml2
-rw-r--r--components/script_plugins/unrooted_must_root.rs7
-rw-r--r--components/script_plugins/utils.rs2
-rw-r--r--components/selectors/Cargo.toml2
-rw-r--r--components/selectors/builder.rs49
-rw-r--r--components/selectors/matching.rs2
-rw-r--r--components/selectors/parser.rs129
-rw-r--r--components/style/Cargo.toml6
-rw-r--r--components/style/build_gecko.rs21
-rw-r--r--components/style/element_state.rs3
-rw-r--r--components/style/gecko/global_style_data.rs7
-rw-r--r--components/style/gecko/media_queries.rs367
-rw-r--r--components/style/gecko/non_ts_pseudo_class_list.rs1
-rw-r--r--components/style/gecko/selector_parser.rs3
-rw-r--r--components/style/gecko/wrapper.rs17
-rw-r--r--components/style/gecko_bindings/sugar/ns_css_shadow_item.rs23
-rw-r--r--components/style/media_queries/media_condition.rs192
-rw-r--r--components/style/media_queries/media_list.rs8
-rw-r--r--components/style/media_queries/media_query.rs79
-rw-r--r--components/style/media_queries/mod.rs6
-rw-r--r--components/style/properties/gecko.mako.rs82
-rw-r--r--components/style/properties/helpers.mako.rs2
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs10
-rw-r--r--components/style/properties/longhands/font.mako.rs502
-rw-r--r--components/style/properties/longhands/inherited_box.mako.rs93
-rw-r--r--components/style/properties/longhands/position.mako.rs7
-rw-r--r--components/style/properties/properties.mako.rs99
-rw-r--r--components/style/properties/shorthands/background.mako.rs1
-rw-r--r--components/style/properties/shorthands/box.mako.rs1
-rw-r--r--components/style/properties/shorthands/font.mako.rs1
-rw-r--r--components/style/properties/shorthands/svg.mako.rs2
-rw-r--r--components/style/properties/shorthands/text.mako.rs1
-rw-r--r--components/style/selector_map.rs51
-rw-r--r--components/style/servo/media_queries.rs53
-rw-r--r--components/style/stylesheets/font_feature_values_rule.rs1
-rw-r--r--components/style/stylesheets/keyframes_rule.rs38
-rw-r--r--components/style/stylesheets/rule_parser.rs120
-rw-r--r--components/style/values/animated/color.rs5
-rw-r--r--components/style/values/animated/effects.rs6
-rw-r--r--components/style/values/computed/effects.rs6
-rw-r--r--components/style/values/generics/counters.rs1
-rw-r--r--components/style/values/specified/effects.rs29
-rw-r--r--components/style/values/specified/source_size_list.rs8
-rw-r--r--components/style_traits/Cargo.toml2
-rw-r--r--components/style_traits/lib.rs4
-rw-r--r--components/webdriver_server/Cargo.toml4
-rw-r--r--ports/servo/Cargo.toml4
-rw-r--r--ports/servo/glutin_app/keyutils.rs2
-rw-r--r--ports/servo/glutin_app/window.rs84
-rw-r--r--python/servo/bootstrap_commands.py108
-rw-r--r--python/servo/build_commands.py4
-rw-r--r--python/servo/command_base.py17
-rw-r--r--python/servo/package_commands.py18
-rw-r--r--python/servo/post_build_commands.py32
-rw-r--r--python/servo/testing_commands.py87
-rw-r--r--python/servo/util.py38
-rw-r--r--resources/servo64.pngbin0 -> 7952 bytes
-rw-r--r--rust-toolchain2
-rw-r--r--servo-tidy.toml8
-rw-r--r--tests/unit/script/Cargo.toml1
-rw-r--r--tests/unit/script/htmlimageelement.rs97
-rw-r--r--tests/unit/script/lib.rs1
-rw-r--r--tests/unit/style/Cargo.toml2
-rw-r--r--tests/unit/style/lib.rs14
-rw-r--r--tests/unit/style/media_queries.rs398
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json69
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html.ini770
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html.ini347
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini4
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html.ini11
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini26
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html.ini11
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html.ini8
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html.ini8
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html.ini14
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html.ini9
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html.ini7
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html.ini6
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html.ini6
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini8
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini8
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/program-test.html.ini6
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html.ini6
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html.ini9
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini5
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini131
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini3
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html.ini9
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html.ini6
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/context/methods-2.html.ini107
-rw-r--r--tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/rendering/instanced-arrays.html.ini53
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html63
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html1
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/js-test-pre.js5
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js2
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html63
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html10
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html2
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/js-test-pre.js5
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-input-validation.js4
-rw-r--r--tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/webgl-test-harness.js2
-rwxr-xr-xtests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py8
-rw-r--r--tests/wpt/mozilla/tests/webgl/tools/timeout.patch108
175 files changed, 3394 insertions, 3865 deletions
diff --git a/.gitignore b/.gitignore
index 65e048a001d..94acd5b1d03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
/.cargo/*
!/.cargo/config.*
/.servobuild
+/android-toolchains
/target
/ports/android/bin
/ports/android/libs
diff --git a/Cargo.lock b/Cargo.lock
index 91783d22f14..df3db1b0b57 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,14 +1,14 @@
[[package]]
name = "adler32"
-version = "1.0.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "aho-corasick"
-version = "0.6.3"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -64,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
]
@@ -86,9 +86,9 @@ source = "git+https://github.com/servo/rust-azure#1ca68f302f5e914e2c63b0ec5b72af
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.30000014.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.30000014.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -100,7 +100,7 @@ dependencies = [
"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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
]
@@ -111,7 +111,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -139,20 +139,20 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.36.1"
+version = "0.37.4"
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.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.10 (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)",
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -198,7 +198,7 @@ version = "0.0.1"
dependencies = [
"embedder_traits 0.0.1",
"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)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -271,7 +271,7 @@ dependencies = [
"azure 0.29.0 (git+https://github.com/servo/rust-azure)",
"canvas_traits 0.0.1",
"compositing 0.0.1",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -289,7 +289,7 @@ dependencies = [
name = "canvas_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -305,10 +305,10 @@ dependencies = [
[[package]]
name = "caseless"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -336,7 +336,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gleam 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -351,11 +351,11 @@ dependencies = [
[[package]]
name = "clang-sys"
-version = "0.22.0"
+version = "0.23.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -390,7 +390,7 @@ name = "clipboard-win"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -403,13 +403,13 @@ dependencies = [
[[package]]
name = "cocoa"
-version = "0.14.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -428,7 +428,7 @@ dependencies = [
"gleam 0.5.1 (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.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
@@ -495,7 +495,16 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "core-foundation-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -503,10 +512,15 @@ name = "core-foundation-sys"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
+name = "core-foundation-sys"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "core-graphics"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -514,7 +528,18 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core-graphics"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.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.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -525,7 +550,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -561,7 +586,7 @@ dependencies = [
[[package]]
name = "cssparser"
-version = "0.23.10"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -569,12 +594,12 @@ dependencies = [
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -633,7 +658,7 @@ name = "dbus"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -650,7 +675,7 @@ name = "deflate"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -722,6 +747,10 @@ dependencies = [
[[package]]
name = "dom_struct"
version = "0.0.1"
+dependencies = [
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
[[package]]
name = "domobject_derive"
@@ -732,6 +761,11 @@ dependencies = [
]
[[package]]
+name = "downcast-rs"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "dtoa"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -752,7 +786,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -797,7 +831,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -816,7 +850,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -824,7 +858,7 @@ name = "energymon-sys"
version = "0.3.0"
source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0fd358aa9d300a46dc3e97c"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -837,13 +871,13 @@ dependencies = [
[[package]]
name = "env_logger"
-version = "0.5.6"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -886,7 +920,7 @@ name = "flate2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -901,7 +935,7 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -923,7 +957,7 @@ name = "freetype"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -963,7 +997,7 @@ name = "gaol"
version = "0.0.1"
source = "git+https://github.com/servo/gaol#227ff0bae1eb1b44a273c6c5610debfe214991ee"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1001,7 +1035,7 @@ dependencies = [
"harfbuzz-sys 0.2.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"net_traits 0.0.1",
@@ -1045,6 +1079,15 @@ dependencies = [
]
[[package]]
+name = "gif"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "gl_generator"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1069,24 +1112,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "glutin"
-version = "0.13.1"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cgl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "cocoa 0.14.0 (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)",
+ "cocoa 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.14.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "winit 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11-dl 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winit 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1095,7 +1138,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1122,7 +1165,7 @@ dependencies = [
name = "hashglobe"
version = "0.1.0"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1132,7 +1175,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1141,7 +1184,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1249,6 +1292,23 @@ dependencies = [
]
[[package]]
+name = "image"
+version = "0.19.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)",
+ "gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "jpeg-decoder 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "immeta"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1263,7 +1323,15 @@ name = "inflate"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "inflate"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1284,7 +1352,7 @@ dependencies = [
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.5.1 (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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1292,7 +1360,7 @@ name = "iovec"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1304,7 +1372,7 @@ dependencies = [
"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 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)",
+ "libc 0.2.42 (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.66 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1330,7 +1398,7 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1384,7 +1452,7 @@ dependencies = [
"gfx_traits 0.0.1",
"html5ever 0.22.3 (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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"msg 0.0.1",
@@ -1431,7 +1499,7 @@ dependencies = [
"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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"metrics 0.0.1",
@@ -1498,7 +1566,7 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.39"
+version = "0.2.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -1515,7 +1583,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1532,7 +1600,7 @@ dependencies = [
"devtools 0.0.1",
"devtools_traits 0.0.1",
"embedder_traits 0.0.1",
- "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
@@ -1566,7 +1634,7 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (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)",
]
@@ -1602,7 +1670,7 @@ name = "malloc_buf"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1610,7 +1678,7 @@ name = "malloc_size_of"
version = "0.0.1"
dependencies = [
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"hashglobe 0.1.0",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1669,10 +1737,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "memchr"
-version = "1.0.1"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1680,8 +1748,8 @@ name = "memmap"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1746,7 +1814,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1759,7 +1827,7 @@ dependencies = [
"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.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
@@ -1799,20 +1867,20 @@ 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)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.51.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozjs_sys 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozjs_sys"
-version = "0.51.2"
+version = "0.51.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bindgen 0.36.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.37.4 (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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1891,7 +1959,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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
]
@@ -1939,6 +2007,18 @@ dependencies = [
]
[[package]]
+name = "nix"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "nodrop"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1949,6 +2029,17 @@ version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "num-derive"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "num-integer"
version = "0.1.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1992,7 +2083,7 @@ name = "num_cpus"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2037,7 +2128,7 @@ dependencies = [
"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)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2066,7 +2157,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 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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.27 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2076,7 +2167,7 @@ version = "0.9.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (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)",
]
@@ -2121,10 +2212,10 @@ name = "parking_lot_core"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2200,6 +2291,17 @@ dependencies = [
]
[[package]]
+name = "png"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "precomputed-hash"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2233,10 +2335,10 @@ dependencies = [
"influent 0.4.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (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)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
@@ -2297,7 +2399,7 @@ 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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2307,8 +2409,8 @@ version = "0.4.2"
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)",
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2337,7 +2439,7 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2367,20 +2469,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "regex"
-version = "0.2.2"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex-syntax"
-version = "0.4.1"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
[[package]]
name = "ron"
@@ -2442,7 +2555,7 @@ name = "same-file"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2466,11 +2579,11 @@ dependencies = [
"bluetooth_traits 0.0.1",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
- "caseless 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "caseless 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"deny_public_fields 0.0.1",
"devtools_traits 0.0.1",
"dom_struct 0.0.1",
@@ -2489,7 +2602,7 @@ dependencies = [
"itertools 0.7.6 (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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
@@ -2510,7 +2623,7 @@ dependencies = [
"profile_traits 0.0.1",
"ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"script_layout_interface 0.0.1",
"script_plugins 0.0.1",
"script_traits 0.0.1",
@@ -2547,12 +2660,12 @@ dependencies = [
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"html5ever 0.22.3 (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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
@@ -2590,7 +2703,6 @@ dependencies = [
"msg 0.0.1",
"script 0.0.1",
"servo_url 0.0.1",
- "style 0.0.1",
]
[[package]]
@@ -2607,7 +2719,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)",
"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)",
+ "libc 0.2.42 (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",
@@ -2629,7 +2741,7 @@ name = "selectors"
version = "0.19.0"
dependencies = [
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2692,7 +2804,7 @@ dependencies = [
"euclid 0.17.3 (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.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libservo 0.0.1",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2703,7 +2815,7 @@ dependencies = [
"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)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winit 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winit 0.16.1 (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)",
]
@@ -2713,7 +2825,7 @@ name = "servo-egl"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2721,7 +2833,7 @@ name = "servo-fontconfig"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2746,7 +2858,7 @@ dependencies = [
[[package]]
name = "servo-skia"
-version = "0.30000014.0"
+version = "0.30000014.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cgl 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2754,10 +2866,10 @@ dependencies = [
"euclid 0.17.3 (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.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glutin 0.17.0 (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.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
@@ -2810,7 +2922,7 @@ version = "0.0.1"
dependencies = [
"android_injected_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"embedder_traits 0.0.1",
- "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2878,7 +2990,7 @@ version = "0.1.8"
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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2916,6 +3028,23 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "smithay-client-toolkit"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "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)",
+ "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)",
+ "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-protocols 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "stable_deref_trait"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2963,11 +3092,11 @@ 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.36.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.37.4 (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)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fallible 0.0.1",
@@ -2991,7 +3120,7 @@ dependencies = [
"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)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.19.0",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_arc 0.1.1",
@@ -3028,7 +3157,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3050,7 +3179,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
@@ -3107,14 +3236,14 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "2.2.0"
+version = "3.0.2"
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.39 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.4.2 (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)",
+ "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3140,7 +3269,7 @@ name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
]
@@ -3178,7 +3307,7 @@ 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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
]
@@ -3189,15 +3318,10 @@ version = "3.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "token_store"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "toml"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3226,6 +3350,11 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "ucd-util"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "uluru"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3359,47 +3488,45 @@ version = "2.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wayland-client"
-version = "0.12.5"
+version = "0.20.10"
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.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)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-scanner 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "wayland-kbd"
-version = "0.13.1"
+name = "wayland-commons"
+version = "0.20.10"
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.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)",
+ "downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wayland-protocols"
-version = "0.12.5"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 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)",
- "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)",
+ "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-commons 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-scanner 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-sys 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "wayland-scanner"
-version = "0.12.5"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3407,7 +3534,7 @@ dependencies = [
[[package]]
name = "wayland-sys"
-version = "0.12.5"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3415,27 +3542,17 @@ dependencies = [
]
[[package]]
-name = "wayland-window"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "webdriver"
-version = "0.33.0"
+version = "0.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.37 (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)",
]
@@ -3452,14 +3569,14 @@ dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
- "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"script_traits 0.0.1",
"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.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "webdriver 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "webdriver 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3547,7 +3664,7 @@ name = "which"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3557,11 +3674,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
-version = "0.3.3"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi-i686-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-x86_64-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3571,12 +3688,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-i686-pc-windows-gnu"
-version = "0.3.2"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
-version = "0.3.2"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -3584,28 +3701,29 @@ name = "wincolor"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winit"
-version = "0.11.3"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cocoa 0.14.0 (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)",
+ "cocoa 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-graphics 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "image 0.19.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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (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)",
+ "parking_lot 0.5.4 (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)",
- "wayland-kbd 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "wayland-window 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11-dl 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smithay-client-toolkit 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3646,7 +3764,7 @@ name = "x11"
version = "2.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3661,11 +3779,11 @@ dependencies = [
[[package]]
name = "x11-dl"
-version = "2.17.3"
+version = "2.18.0"
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.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3674,7 +3792,7 @@ name = "xcb"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3708,8 +3826,8 @@ dependencies = [
]
[metadata]
-"checksum adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ff33fe13a08dbce05bcefa2c68eea4844941437e33d6f808240b54d7157b9cd"
-"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
+"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c"
+"checksum aho-corasick 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0ba20154ea1f47ce2793322f049c5646cc6d0fa9759d5f333f286e507bf8080"
"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"
@@ -3726,7 +3844,7 @@ dependencies = [
"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 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0"
-"checksum bindgen 0.36.1 (registry+https://github.com/rust-lang/crates.io-index)" = "acc8fa644dc2b6f6c2d391ccea460da1ad9bf2271c4e9ffaad88d2dd727a7295"
+"checksum bindgen 0.37.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1b25ab82877ea8fe6ce1ce1f8ac54361f0218bad900af9eb11803994bf67c221"
"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"
@@ -3739,28 +3857,31 @@ dependencies = [
"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.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 caseless 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f"
"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.2 (registry+https://github.com/rust-lang/crates.io-index)" = "80f05e25f9631fdee56693110feda284a49308ca1e768857a0ad3906cfc1502a"
"checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6"
-"checksum clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "939a1a34310b120d26eba35c29475933128b0ec58e24b43327f8dbe6036fc538"
+"checksum clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7f7c04e52c35222fffcc3a115b5daf5f7e2bfb71c13c4e2321afe1fc71859c2"
"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"
"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb"
-"checksum cocoa 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0c23085dde1ef4429df6e5896b89356d35cdd321fb43afe3e378d010bb5adc6"
+"checksum cocoa 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b44bd25bd275e9d74a5dff8ca55f2fb66c9ad5e12170d58697701df21a56e0e"
"checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
"checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb"
"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980"
+"checksum core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7caa6cb9e76ddddbea09a03266d6b3bc98cd41e9fb9b017c473e7cca593ec25"
"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa"
+"checksum core-foundation-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2a53cce0ddcf7e7e1f998738d757d5a3bf08bf799a180e50ebe50d298f52f5a"
"checksum core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb0ed45fdc32f9ab426238fba9407dfead7bacd7900c9b4dd3f396f46eafdae3"
+"checksum core-graphics 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e54c4ab33705fa1fc8af375bb7929d68e1c1546c1ecef408966d8c3e49a1d84a"
"checksum core-text 9.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd581c37283d0c23311d179aefbb891f2324ee0405da58a26e8594ab76e5748"
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
-"checksum cssparser 0.23.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1c74d99b0f489cc546336b911452562ebfd4aec034b0c526cb77a3a02d3790"
+"checksum cssparser 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "495beddc39b1987b8e9f029354eccbd5ef88eb5f1cd24badb764dce338acf2e0"
"checksum cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f3a5383ae18dbfdeb569ed62019f5bddb2a95cd2d3833313c475a0d014777805"
"checksum darling 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a78af487e4eb8f4421a1770687b328af6bb4494ca93435210678c6eea875c11"
"checksum darling_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b315f49c7b6db3708bca6e6913c194581a44ec619b7a39e131d4dd63733a3698"
@@ -3770,6 +3891,7 @@ dependencies = [
"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.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a"
+"checksum downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "18df8ce4470c189d18aa926022da57544f31e154631eb4cfe796aea97051fe6c"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum dtoa-short 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe6f727b406462fd57c95fed84d1b0dbfb5f0136fcac005adba9ea0367c05cc8"
"checksum dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b26e30aaa6bf31ec830db15fec14ed04f0f2ecfcc486ecfce88c55d3389b237f"
@@ -3781,7 +3903,7 @@ dependencies = [
"checksum energymon-default-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "<none>"
"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.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0561146661ae44c579e993456bc76d11ce1e0c7d745e57b2fa7146b6e49fa2ad"
+"checksum env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0e6e40ebb0e66918a37b38c7acab4e10d299e0463fe2af5d29b9cc86710cfd2a"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c95fd0d455f114291a3109286bd387bd423770058474a2d3f38b712cd661df60"
"checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1"
@@ -3798,11 +3920,12 @@ dependencies = [
"checksum gaol 0.0.1 (git+https://github.com/servo/gaol)" = "<none>"
"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.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c"
"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.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12b793fcf40a23dd372f184c228ab3eb96f88c50bb4fba8319c483aa025a4e45"
"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 glutin 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a70c5fe78efbd5a3b243a804ea1032053c584510f8822819f94cfb29b2100317"
"checksum glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "63a6e7c2846e12626455f45ebaff9d92161436dd0fa703d9d198012e528ca7b9"
"checksum gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1334b94d8ce67319ddc44663daef53d8c1538629a11562530c981dbd9085b9a"
"checksum half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f"
@@ -3819,8 +3942,10 @@ dependencies = [
"checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "545f000e8aa4e569e93f49c446987133452e0091c2494ac3efd3606aa3d309f2"
+"checksum image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebdff791af04e30089bde8ad2a632b86af433b40c04db8d70ad4b21487db7a6a"
"checksum immeta 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1aaaa557fbc7323c857871ce15f2b2c08d90548cba4aabda4251fac1b4778337"
"checksum inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10ec05638adf7c5c788bc0cfa608cd479a13572beda20feb4898fe1d85d2c64b"
+"checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245"
"checksum influent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a22b311b83431be3ab9af96ca9ea41554bb4a8551ea871ae44c3ce0c57e55f2c"
"checksum io-surface 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6b506cf08070106ec8d802dd7c3b4290bf1f844e4cf6b0aaff68ede2a58b5922"
"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
@@ -3836,7 +3961,7 @@ dependencies = [
"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.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
+"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
"checksum libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8720f9274907052cb50313f91201597868da9d625f8dd125f2aca5bddb7e83a1"
"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"
@@ -3847,7 +3972,7 @@ dependencies = [
"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
"checksum markup5ever 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c220b3a3d75543b76e5c1fcab6635a8430ab5f9bfa011d003c3787ae0abf4ffa"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
-"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
+"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
"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"
@@ -3858,14 +3983,16 @@ dependencies = [
"checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f"
"checksum mozangle 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1f0583e6792917f498bb3a7440f777a59353102063445ab7f5e9d1dc4ed593aa"
"checksum mozjs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9c59044218be40e6f412b32e845ce841f34e7d7bfc532ac046fcc5720152e55"
-"checksum mozjs_sys 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e169fe5b3c63c4de27dc0cb9902f9f317b39683631f0f81d7dc3196f725454c"
+"checksum mozjs_sys 0.51.4 (registry+https://github.com/rust-lang/crates.io-index)" = "74fd4388f18e64881a63ff773edd77dec47adf63bfd6a3055e5f106e1f7c9eaf"
"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"
"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67"
"checksum new-ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8ccbebba6fb53a6d2bdcfaf79cb339bc136dee3bfff54dc337a334bafe36476a"
"checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4"
+"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
"checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
+"checksum num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2c31b75c36a993d30c7a13d70513cb93f02acafdd5b7ba250f9b0e18615de7"
"checksum num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac0ea58d64a89d9d6b7688031b3be9358d6c919badcf7fbb0527ccfd891ee45"
"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
"checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44"
@@ -3895,6 +4022,7 @@ dependencies = [
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum plane-split 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7079b8485b4f9d9560dee7a69ca8f6ca781f9f284ff9d2bf27255d440b03e4af"
"checksum png 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f0b0cabbbd20c2d7f06dbf015e06aad59b6ca3d9ed14848783e98af9aaf19925"
+"checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4"
"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6"
@@ -3910,8 +4038,9 @@ dependencies = [
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
"checksum ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b5ceb840e4009da4841ed22a15eb49f64fdd00a2138945c5beacf506b2fb5ed"
"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 regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13c93d55961981ba9226a213b385216f83ab43bd6ac53ab16b2eeb47e337cf4e"
+"checksum regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05b06a75f5217880fc5e905952a42750bf44787e56a6c6d6852ed0992f5e1d54"
+"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
"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"
@@ -3931,7 +4060,7 @@ dependencies = [
"checksum servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "93f799b649b4a2bf362398910eca35240704c7e765e780349b2bb1070d892262"
"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.30000014.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb39ffad573e5696b37bf4fad0b1a33ef3d3b8c92dcbdc04b550023ea97c4c8"
+"checksum servo-skia 0.30000014.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb2d8f7ba5e5ed5278d947f18de7fabfabafd09a58e7a8a7675c559e2b67798b"
"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.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8254bf098ce4d8d7cc7cc6de438c5488adc5297e5b7ffef88816c0a91bd289c1"
@@ -3941,6 +4070,7 @@ dependencies = [
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
"checksum smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c63726029f0069f88467873e47f392575f28f9f16b72ac65465263db4b3a13c"
"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
+"checksum smithay-client-toolkit 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "428d6c019bb92753be9670367e3f483e4fcef396180a9b59e813b69b20014881"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423"
"checksum string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "35293b05cf1494e8ddd042a7df6756bf18d07f42d234f32e71dce8a7aabb0191"
@@ -3950,7 +4080,7 @@ dependencies = [
"checksum syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59"
"checksum syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d"
"checksum synstructure 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "98cad891cd238c98e1f0aec9f7c0f620aa696e4e5f7daba56ac67b5e86a6b049"
-"checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0"
+"checksum tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "47776f63b85777d984a50ce49d6b9e58826b6a3766a449fc95bc66cd5663c15b"
"checksum tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9de21546595a0873061940d994bbbc5c35f024ae4fd61ec5c5b159115684f508"
"checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83"
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
@@ -3960,12 +4090,12 @@ dependencies = [
"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.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.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"
"checksum ucd 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe4fa6e588762366f1eb4991ce59ad1b93651d0b769dfb4e4d1c5c4b943d1159"
+"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "519130f0ea964ba540a9d8af1373738c2226f1d465eda07e61db29feb5479db9"
"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"
"checksum unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"
@@ -3985,29 +4115,28 @@ dependencies = [
"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"
"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
-"checksum wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2b90adf943117ee4930d7944fe103dcb6f36ba05421f46521cb5adbf6bf0fbc8"
-"checksum wayland-kbd 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe0fb1c9917da9529d781659e456d84a693d74fe873d1658109758444616f76"
-"checksum wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb5942dd2fc79d934db437c9ea3aabffceb49b546046ea453bcba531005e5537"
-"checksum wayland-scanner 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dcffa55a621e6f2c3d436de64d840fc325e1d0a467b92ee5e7292e17552e08ad"
-"checksum wayland-sys 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)" = "377a2f83063c463e801ca10ae8cb9666e6e597eecac0049ac36cc7b9a83b0db3"
-"checksum wayland-window 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2d94d3c23f8f2e0a09d82c6ca765da3c1efe65ef0280f750d74a6c6c6bb4ca8f"
-"checksum webdriver 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6577005cf83a9df4ba39910f8baf3b835b5e4a0a5e9a0d71f3eceae6214ebf28"
+"checksum wayland-client 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0f3ed65542a0be13ea0fdcc55c9a011fcc44c3882e6e1a9b4dfddb25182897dd"
+"checksum wayland-commons 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4ac5c79f1d050f4047a82ddce77acda026c142c0023e7b7e20eea5ad76fb7dbf"
+"checksum wayland-protocols 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "be56e3d80559177a70bc78f9396fbe1705b7baed4951ae6e34d28bb59681b1a8"
+"checksum wayland-scanner 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "93cf4ef48caedf3fc1a9b2bf0df64e6d425bd628b85830a08432dd25b61de17c"
+"checksum wayland-sys 0.20.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d2dbe7b51c16b8a8153806aaa21f346333074482bb57bc5cb059cc828f8c6842"
+"checksum webdriver 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c6d14048509ec30805ee10b9d610d3d1987e560f5d3be5c599c2c812a34bbfe"
"checksum webrender 0.57.2 (git+https://github.com/servo/webrender)" = "<none>"
"checksum webrender_api 0.57.2 (git+https://github.com/servo/webrender)" = "<none>"
"checksum which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4be6cfa54dab45266e98b5d7be2f8ce959ddd49abd141a05d52dce4b07f803bb"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b09fb3b6f248ea4cd42c9a65113a847d612e17505d6ebd1f7357ad68a8bf8693"
+"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
-"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 winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767"
-"checksum winit 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f1a29847ed6928d6cbabe6b2d5b11dd0ce63380af53a8dcd41775d27d104d285"
+"checksum winit 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b8fcc11afa052cfa71e5cf0c54094ea0f931fe05798c278e663ba0edb0d83ce"
"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.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 x11-dl 2.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "931d8584b49771143af0c422f372d8aef4280afd5920dad39b0a95a8e51df1e9"
"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"
diff --git a/README.md b/README.md
index 507d3f4c55d..f86d2a2d44d 100644
--- a/README.md
+++ b/README.md
@@ -183,8 +183,8 @@ list of installed components. It is not on by default. Visual Studio 2017 MUST i
#### Cross-compilation for Android
-Pre-installed Android tools are needed. See wiki for
-[details](https://github.com/servo/servo/wiki/Building-for-Android)
+Run `./mach bootstrap-android` to get Android-specific tools. See wiki for
+[details](https://github.com/servo/servo/wiki/Building-for-Android).
## The Rust compiler
@@ -240,26 +240,18 @@ though of course it doesn’t produce a binary you can run.
### Building for Android target
-``` sh
-git clone https://github.com/servo/servo
-cd servo
-
-export ANDROID_SDK="/path/to/sdk"
-export ANDROID_NDK="/path/to/ndk"
-export ANDROID_TOOLCHAIN="/path/to/toolchain"
-export PATH="$PATH:/path/to/toolchain/bin"
+For ARM (`armv7-linux-androideabi`, most phones):
+``` sh
./mach build --release --android
./mach package --release --android
```
-Rather than setting the `ANDROID_*` environment variables every time, you can
-also create a `.servobuild` file and then edit it to contain the correct paths
-to the Android SDK/NDK tools:
+For x86 (typically for the emulator):
-```
-cp servobuild.example .servobuild
-# edit .servobuild
+```sh
+./mach build --release --target i686-linux-android
+./mach package --release --target i686-linux-android
```
## Running
diff --git a/components/bluetooth_traits/Cargo.toml b/components/bluetooth_traits/Cargo.toml
index c0d01079449..6d432e060d0 100644
--- a/components/bluetooth_traits/Cargo.toml
+++ b/components/bluetooth_traits/Cargo.toml
@@ -11,7 +11,7 @@ path = "lib.rs"
[dependencies]
ipc-channel = "0.10"
-regex = "0.2"
+regex = "1.0"
serde = "1.0"
embedder_traits = { path = "../embedder_traits" }
diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml
index 2c2a928e233..e0a6db7fb2c 100644
--- a/components/canvas/Cargo.toml
+++ b/components/canvas/Cargo.toml
@@ -13,7 +13,7 @@ path = "lib.rs"
azure = {git = "https://github.com/servo/rust-azure"}
canvas_traits = {path = "../canvas_traits"}
compositing = {path = "../compositing"}
-cssparser = "0.23.0"
+cssparser = "0.24"
euclid = "0.17"
fnv = "1.0"
gleam = "0.5"
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 8ab129680de..a90c996f8bb 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -740,14 +740,10 @@ impl WebGLImpl {
Self::active_attrib(ctx.gl(), program_id, index, chan),
WebGLCommand::GetActiveUniform(program_id, index, ref chan) =>
Self::active_uniform(ctx.gl(), program_id, index, chan),
- WebGLCommand::GetAttribLocation(program_id, ref name, ref chan) =>
- Self::attrib_location(ctx.gl(), program_id, name, chan),
WebGLCommand::GetRenderbufferParameter(target, pname, ref chan) =>
Self::get_renderbuffer_parameter(ctx.gl(), target, pname, chan),
WebGLCommand::GetFramebufferAttachmentParameter(target, attachment, pname, ref chan) =>
Self::get_framebuffer_attachment_parameter(ctx.gl(), target, attachment, pname, chan),
- WebGLCommand::GetVertexAttribOffset(index, pname, ref chan) =>
- Self::vertex_attrib_offset(ctx.gl(), index, pname, chan),
WebGLCommand::GetShaderPrecisionFormat(shader_type, precision_type, ref chan) =>
Self::shader_precision_format(ctx.gl(), shader_type, precision_type, chan),
WebGLCommand::GetExtensions(ref chan) =>
@@ -792,8 +788,6 @@ impl WebGLImpl {
ctx.gl().bind_renderbuffer(target, id.map_or(0, WebGLRenderbufferId::get)),
WebGLCommand::BindTexture(target, id) =>
ctx.gl().bind_texture(target, id.map_or(0, WebGLTextureId::get)),
- WebGLCommand::LinkProgram(program_id) =>
- ctx.gl().link_program(program_id.get()),
WebGLCommand::Uniform1f(uniform_id, v) =>
ctx.gl().uniform_1f(uniform_id, v),
WebGLCommand::Uniform1fv(uniform_id, ref v) =>
@@ -832,8 +826,6 @@ impl WebGLImpl {
ctx.gl().uniform_matrix_3fv(uniform_id, transpose, v),
WebGLCommand::UniformMatrix4fv(uniform_id, transpose, ref v) =>
ctx.gl().uniform_matrix_4fv(uniform_id, transpose, v),
- WebGLCommand::UseProgram(program_id) =>
- ctx.gl().use_program(program_id.get()),
WebGLCommand::ValidateProgram(program_id) =>
ctx.gl().validate_program(program_id.get()),
WebGLCommand::VertexAttrib(attrib_id, x, y, z, w) =>
@@ -893,6 +885,13 @@ impl WebGLImpl {
}
sender.send(value[0]).unwrap()
}
+ WebGLCommand::GetParameterInt2(param, ref sender) => {
+ let mut value = [0; 2];
+ unsafe {
+ ctx.gl().get_integer_v(param as u32, &mut value);
+ }
+ sender.send(value).unwrap()
+ }
WebGLCommand::GetParameterInt4(param, ref sender) => {
let mut value = [0; 4];
unsafe {
@@ -921,17 +920,17 @@ impl WebGLImpl {
}
sender.send(value).unwrap()
}
- WebGLCommand::GetProgramParameterBool(program, param, ref sender) => {
+ WebGLCommand::GetProgramValidateStatus(program, ref sender) => {
let mut value = [0];
unsafe {
- ctx.gl().get_program_iv(program.get(), param as u32, &mut value);
+ ctx.gl().get_program_iv(program.get(), gl::VALIDATE_STATUS, &mut value);
}
sender.send(value[0] != 0).unwrap()
}
- WebGLCommand::GetProgramParameterInt(program, param, ref sender) => {
+ WebGLCommand::GetProgramActiveUniforms(program, ref sender) => {
let mut value = [0];
unsafe {
- ctx.gl().get_program_iv(program.get(), param as u32, &mut value);
+ ctx.gl().get_program_iv(program.get(), gl::ACTIVE_UNIFORMS, &mut value);
}
sender.send(value[0]).unwrap()
}
@@ -949,56 +948,12 @@ impl WebGLImpl {
}
sender.send(value[0]).unwrap()
}
- WebGLCommand::GetVertexAttribBool(index, param, ref sender) => {
- // FIXME(nox): https://github.com/servo/servo/issues/20608
- let mut max = [0];
- unsafe {
- ctx.gl().get_integer_v(gl::MAX_VERTEX_ATTRIBS, &mut max);
- }
- let result = if index >= max[0] as u32 {
- Err(WebGLError::InvalidValue)
- } else {
- let mut value = [0];
- unsafe {
- ctx.gl().get_vertex_attrib_iv(index, param as u32, &mut value);
- }
- Ok(value[0] != 0)
- };
- sender.send(result).unwrap();
- }
- WebGLCommand::GetVertexAttribInt(index, param, ref sender) => {
- // FIXME(nox): https://github.com/servo/servo/issues/20608
- let mut max = [0];
- unsafe {
- ctx.gl().get_integer_v(gl::MAX_VERTEX_ATTRIBS, &mut max);
- }
- let result = if index >= max[0] as u32 {
- Err(WebGLError::InvalidValue)
- } else {
- let mut value = [0];
- unsafe {
- ctx.gl().get_vertex_attrib_iv(index, param as u32, &mut value);
- }
- Ok(value[0])
- };
- sender.send(result).unwrap();
- }
- WebGLCommand::GetVertexAttribFloat4(index, param, ref sender) => {
- // FIXME(nox): https://github.com/servo/servo/issues/20608
- let mut max = [0];
+ WebGLCommand::GetCurrentVertexAttrib(index, ref sender) => {
+ let mut value = [0.; 4];
unsafe {
- ctx.gl().get_integer_v(gl::MAX_VERTEX_ATTRIBS, &mut max);
+ ctx.gl().get_vertex_attrib_fv(index, gl::CURRENT_VERTEX_ATTRIB, &mut value);
}
- let result = if index >= max[0] as u32 {
- Err(WebGLError::InvalidValue)
- } else {
- let mut value = [0.; 4];
- unsafe {
- ctx.gl().get_vertex_attrib_fv(index, param as u32, &mut value);
- }
- Ok(value)
- };
- sender.send(result).unwrap();
+ sender.send(value).unwrap();
}
WebGLCommand::GetTexParameterFloat(target, param, ref sender) => {
sender.send(ctx.gl().get_tex_parameter_fv(target, param as u32)).unwrap();
@@ -1012,6 +967,21 @@ impl WebGLImpl {
WebGLCommand::TexParameterf(target, param, value) => {
ctx.gl().tex_parameter_f(target, param as u32, value)
}
+ WebGLCommand::LinkProgram(program_id, ref sender) => {
+ return sender.send(Self::link_program(ctx.gl(), program_id)).unwrap();
+ }
+ WebGLCommand::UseProgram(program_id) => {
+ ctx.gl().use_program(program_id.map_or(0, |p| p.get()))
+ }
+ WebGLCommand::DrawArraysInstanced { mode, first, count, primcount } => {
+ ctx.gl().draw_arrays_instanced(mode, first, count, primcount)
+ }
+ WebGLCommand::DrawElementsInstanced { mode, count, type_, offset, primcount } => {
+ ctx.gl().draw_elements_instanced(mode, count, type_, offset, primcount)
+ }
+ WebGLCommand::VertexAttribDivisor { index, divisor } => {
+ ctx.gl().vertex_attrib_divisor(index, divisor)
+ }
}
// TODO: update test expectations in order to enable debug assertions
@@ -1022,6 +992,45 @@ impl WebGLImpl {
assert_eq!(error, gl::NO_ERROR, "Unexpected WebGL error: 0x{:x} ({})", error, error);
}
+ #[allow(unsafe_code)]
+ fn link_program(gl: &gl::Gl, program: WebGLProgramId) -> ProgramLinkInfo {
+ gl.link_program(program.get());
+ let mut linked = [0];
+ unsafe {
+ gl.get_program_iv(program.get(), gl::LINK_STATUS, &mut linked);
+ }
+ if linked[0] == 0 {
+ return ProgramLinkInfo {
+ linked: false,
+ active_attribs: vec![].into(),
+ }
+ }
+
+ let mut num_active_attribs = [0];
+ unsafe {
+ gl.get_program_iv(program.get(), gl::ACTIVE_ATTRIBUTES, &mut num_active_attribs);
+ }
+ let active_attribs = (0..num_active_attribs[0] as u32).map(|i| {
+ let (size, type_, name) = gl.get_active_attrib(program.get(), i);
+ let location = if name.starts_with("gl_") {
+ -1
+ } else {
+ gl.get_attrib_location(program.get(), &name)
+ };
+ ActiveAttribInfo {
+ name: from_name_in_compiled_shader(&name),
+ size,
+ type_,
+ location,
+ }
+ }).collect::<Vec<_>>().into();
+
+ ProgramLinkInfo {
+ linked: true,
+ active_attribs,
+ }
+ }
+
fn read_pixels(
gl: &gl::Gl,
x: i32,
@@ -1072,34 +1081,11 @@ impl WebGLImpl {
chan.send(result).unwrap();
}
- fn attrib_location(gl: &gl::Gl,
- program_id: WebGLProgramId,
- name: &str,
- chan: &WebGLSender<Option<i32>> ) {
- let attrib_location = gl.get_attrib_location(program_id.get(), name);
-
- let attrib_location = if attrib_location == -1 {
- None
- } else {
- Some(attrib_location)
- };
-
- chan.send(attrib_location).unwrap();
- }
-
fn finish(gl: &gl::Gl, chan: &WebGLSender<()>) {
gl.finish();
chan.send(()).unwrap();
}
- fn vertex_attrib_offset(gl: &gl::Gl,
- index: u32,
- pname: u32,
- chan: &WebGLSender<isize>) {
- let result = gl.get_vertex_attrib_pointer_v(index, pname);
- chan.send(result).unwrap();
- }
-
fn shader_precision_format(gl: &gl::Gl,
shader_type: u32,
precision_type: u32,
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml
index 226acf76dff..8ec09cadbdd 100644
--- a/components/canvas_traits/Cargo.toml
+++ b/components/canvas_traits/Cargo.toml
@@ -10,7 +10,7 @@ name = "canvas_traits"
path = "lib.rs"
[dependencies]
-cssparser = "0.23.0"
+cssparser = "0.24.0"
euclid = "0.17"
ipc-channel = "0.10"
gleam = "0.5.1"
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index 2f39cbada27..793f687698b 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -209,9 +209,7 @@ pub enum WebGLCommand {
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>>),
- GetVertexAttribOffset(u32, u32, WebGLSender<isize>),
GetShaderInfoLog(WebGLShaderId, WebGLSender<String>),
GetProgramInfoLog(WebGLProgramId, WebGLSender<String>),
GetFramebufferAttachmentParameter(u32, u32, u32, WebGLSender<i32>),
@@ -231,7 +229,7 @@ pub enum WebGLCommand {
IsEnabled(u32, WebGLSender<bool>),
LineWidth(f32),
PixelStorei(u32, i32),
- LinkProgram(WebGLProgramId),
+ LinkProgram(WebGLProgramId, WebGLSender<ProgramLinkInfo>),
Uniform1f(i32, f32),
Uniform1fv(i32, Vec<f32>),
Uniform1i(i32, i32),
@@ -251,7 +249,7 @@ pub enum WebGLCommand {
UniformMatrix2fv(i32, bool, Vec<f32>),
UniformMatrix3fv(i32, bool, Vec<f32>),
UniformMatrix4fv(i32, bool, Vec<f32>),
- UseProgram(WebGLProgramId),
+ UseProgram(Option<WebGLProgramId>),
ValidateProgram(WebGLProgramId),
VertexAttrib(u32, f32, f32, f32, f32),
VertexAttribPointer(u32, i32, u32, bool, i32, u32),
@@ -270,21 +268,23 @@ pub enum WebGLCommand {
GetParameterBool(ParameterBool, WebGLSender<bool>),
GetParameterBool4(ParameterBool4, WebGLSender<[bool; 4]>),
GetParameterInt(ParameterInt, WebGLSender<i32>),
+ GetParameterInt2(ParameterInt2, WebGLSender<[i32; 2]>),
GetParameterInt4(ParameterInt4, WebGLSender<[i32; 4]>),
GetParameterFloat(ParameterFloat, WebGLSender<f32>),
GetParameterFloat2(ParameterFloat2, WebGLSender<[f32; 2]>),
GetParameterFloat4(ParameterFloat4, WebGLSender<[f32; 4]>),
- GetProgramParameterBool(WebGLProgramId, ProgramParameterBool, WebGLSender<bool>),
- GetProgramParameterInt(WebGLProgramId, ProgramParameterInt, WebGLSender<i32>),
+ GetProgramValidateStatus(WebGLProgramId, WebGLSender<bool>),
+ GetProgramActiveUniforms(WebGLProgramId, WebGLSender<i32>),
GetShaderParameterBool(WebGLShaderId, ShaderParameterBool, WebGLSender<bool>),
GetShaderParameterInt(WebGLShaderId, ShaderParameterInt, WebGLSender<i32>),
- GetVertexAttribBool(u32, VertexAttribBool, WebGLSender<WebGLResult<bool>>),
- GetVertexAttribInt(u32, VertexAttribInt, WebGLSender<WebGLResult<i32>>),
- GetVertexAttribFloat4(u32, VertexAttribFloat4, WebGLSender<WebGLResult<[f32; 4]>>),
+ GetCurrentVertexAttrib(u32, WebGLSender<[f32; 4]>),
GetTexParameterFloat(u32, TexParameterFloat, WebGLSender<f32>),
GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>),
TexParameteri(u32, TexParameterInt, i32),
TexParameterf(u32, TexParameterFloat, f32),
+ DrawArraysInstanced { mode: u32, first: i32, count: i32, primcount: i32 },
+ DrawElementsInstanced { mode: u32, count: i32, type_: u32, offset: u32, primcount: i32 },
+ VertexAttribDivisor { index: u32, divisor: u32 },
}
macro_rules! define_resource_id_struct {
@@ -418,6 +418,28 @@ pub enum DOMToTextureCommand {
Lock(PipelineId, usize, WebGLSender<Option<(u32, Size2D<i32>)>>),
}
+/// Information about a WebGL program linking operation.
+#[derive(Clone, Deserialize, Serialize)]
+pub struct ProgramLinkInfo {
+ /// Whether the program was linked successfully.
+ pub linked: bool,
+ /// The list of active attributes.
+ pub active_attribs: Box<[ActiveAttribInfo]>,
+}
+
+/// Description of a single active attribute.
+#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
+pub struct ActiveAttribInfo {
+ /// The name of the attribute.
+ pub name: String,
+ /// The size of the attribute.
+ pub size: i32,
+ /// The type of the attribute.
+ pub type_: u32,
+ /// The location of the attribute.
+ pub location: i32,
+}
+
macro_rules! parameters {
($name:ident { $(
$variant:ident($kind:ident { $(
@@ -504,6 +526,9 @@ parameters! {
SubpixelBits = gl::SUBPIXEL_BITS,
UnpackAlignment = gl::UNPACK_ALIGNMENT,
}),
+ Int2(ParameterInt2 {
+ MaxViewportDims = gl::MAX_VIEWPORT_DIMS,
+ }),
Int4(ParameterInt4 {
ScissorBox = gl::SCISSOR_BOX,
Viewport = gl::VIEWPORT,
@@ -529,21 +554,6 @@ parameters! {
}
parameters! {
- ProgramParameter {
- Bool(ProgramParameterBool {
- DeleteStatus = gl::DELETE_STATUS,
- LinkStatus = gl::LINK_STATUS,
- ValidateStatus = gl::VALIDATE_STATUS,
- }),
- Int(ProgramParameterInt {
- AttachedShaders = gl::ATTACHED_SHADERS,
- ActiveAttributes = gl::ACTIVE_ATTRIBUTES,
- ActiveUniforms = gl::ACTIVE_UNIFORMS,
- }),
- }
-}
-
-parameters! {
ShaderParameter {
Bool(ShaderParameterBool {
DeleteStatus = gl::DELETE_STATUS,
@@ -569,19 +579,38 @@ parameters! {
}
}
-parameters! {
- VertexAttrib {
- Bool(VertexAttribBool {
- VertexAttribArrayEnabled = gl::VERTEX_ATTRIB_ARRAY_ENABLED,
- VertexAttribArrayNormalized = gl::VERTEX_ATTRIB_ARRAY_NORMALIZED,
- }),
- Int(VertexAttribInt {
- VertexAttribArraySize = gl::VERTEX_ATTRIB_ARRAY_SIZE,
- VertexAttribArrayStride = gl::VERTEX_ATTRIB_ARRAY_STRIDE,
- VertexAttribArrayType = gl::VERTEX_ATTRIB_ARRAY_TYPE,
- }),
- Float4(VertexAttribFloat4 {
- CurrentVertexAttrib = gl::CURRENT_VERTEX_ATTRIB,
- }),
+/// 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.
+const ANGLE_NAME_PREFIX: &'static str = "_u";
+
+pub 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);
+ })
+}
+
+pub 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
}
diff --git a/components/dom_struct/Cargo.toml b/components/dom_struct/Cargo.toml
index 7a76375ac06..319d01c39af 100644
--- a/components/dom_struct/Cargo.toml
+++ b/components/dom_struct/Cargo.toml
@@ -1,9 +1,13 @@
[package]
-name = "dom_struct"
-version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
+name = "dom_struct"
publish = false
+version = "0.0.1"
+
+[dependencies]
+quote = "0.6.3"
+syn = { version = "0.14.2", features = ["full"] }
[lib]
path = "lib.rs"
diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs
index 8eacafddeaf..a9d9204c534 100644
--- a/components/dom_struct/lib.rs
+++ b/components/dom_struct/lib.rs
@@ -7,7 +7,12 @@
extern crate proc_macro;
-use proc_macro::{TokenStream, quote};
+#[macro_use]
+extern crate quote;
+extern crate syn;
+
+use proc_macro::TokenStream;
+use syn::*;
#[proc_macro_attribute]
pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
@@ -23,5 +28,38 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
// Work around https://github.com/rust-lang/rust/issues/46489
let attributes: TokenStream = attributes.to_string().parse().unwrap();
- attributes.into_iter().chain(input.into_iter()).collect()
+
+ let output: TokenStream = attributes.into_iter().chain(input.into_iter()).collect();
+
+ let item: Item = syn::parse(output).unwrap();
+
+ if let Item::Struct(s) = item {
+ let s2 = s.clone();
+ if s.generics.params.len() > 0 {
+ return quote!(#s2).into();
+ }
+ if let Fields::Named(ref f) = s.fields {
+ let f = f.named.first().expect("Must have at least one field").into_value();
+ let ident = f.ident.as_ref().expect("Must have named fields");
+ let name = &s.ident;
+ let ty = &f.ty;
+
+ quote! (
+ #s2
+
+ impl ::dom::bindings::inheritance::HasParent for #name {
+ type Parent = #ty;
+ /// This is used in a type assertion to ensure that
+ /// the source and webidls agree as to what the parent type is
+ fn as_parent(&self) -> &#ty {
+ &self.#ident
+ }
+ }
+ ).into()
+ } else {
+ panic!("#[dom_struct] only applies to structs with named fields");
+ }
+ } else {
+ panic!("#[dom_struct] only applies to structs");
+ }
}
diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs
index e26e6c84e60..3c52e854112 100644
--- a/components/gfx/platform/freetype/android/font_list.rs
+++ b/components/gfx/platform/freetype/android/font_list.rs
@@ -436,7 +436,6 @@ pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
pub fn for_each_variation<F>(family_name: &str, mut callback: F)
where F: FnMut(String)
{
- println!("Variatioooon {:?}", family_name);
if let Some(family) = FONT_LIST.find_family(family_name) {
for font in &family.fonts {
callback(FontList::font_absolute_path(&font.filename));
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs
index 3887f141f52..9d0de5c3f41 100644
--- a/components/layout/display_list/builder.rs
+++ b/components/layout/display_list/builder.rs
@@ -1219,11 +1219,7 @@ impl FragmentDisplayListBuilding for Fragment {
state.add_display_item(DisplayItem::BoxShadow(Box::new(BoxShadowDisplayItem {
base: base,
box_bounds: absolute_bounds.to_layout(),
- color: box_shadow
- .base
- .color
- .unwrap_or(style.get_color().color)
- .to_layout(),
+ color: style.resolve_color(box_shadow.base.color).to_layout(),
offset: LayoutVector2D::new(
box_shadow.base.horizontal.px(),
box_shadow.base.vertical.px(),
@@ -2038,10 +2034,7 @@ impl FragmentDisplayListBuilding for Fragment {
base: base.clone(),
shadow: webrender_api::Shadow {
offset: LayoutVector2D::new(shadow.horizontal.px(), shadow.vertical.px()),
- color: shadow
- .color
- .unwrap_or(self.style().get_color().color)
- .to_layout(),
+ color: self.style.resolve_color(shadow.color).to_layout(),
blur_radius: shadow.blur.px(),
},
},
diff --git a/components/malloc_size_of/Cargo.toml b/components/malloc_size_of/Cargo.toml
index 92376a6cd61..67718409311 100644
--- a/components/malloc_size_of/Cargo.toml
+++ b/components/malloc_size_of/Cargo.toml
@@ -24,7 +24,7 @@ servo = [
[dependencies]
app_units = "0.6"
-cssparser = "0.23.0"
+cssparser = "0.24.0"
euclid = "0.17"
hashglobe = { path = "../hashglobe" }
hyper = { version = "0.10", optional = true }
diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml
index ff9b4788fb0..a27ee87ee6b 100644
--- a/components/profile/Cargo.toml
+++ b/components/profile/Cargo.toml
@@ -27,7 +27,7 @@ time = "0.1.12"
task_info = {path = "../../support/rust-task_info"}
[target.'cfg(target_os = "linux")'.dependencies]
-regex = "0.2"
+regex = "1.0"
[target.'cfg(not(target_os = "windows"))'.dependencies]
libc = "0.2"
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 40dc8d99be7..d05f6e72da6 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -37,7 +37,7 @@ canvas_traits = {path = "../canvas_traits"}
caseless = "0.2"
cookie = "0.10"
chrono = "0.4"
-cssparser = "0.23.0"
+cssparser = "0.24"
deny_public_fields = {path = "../deny_public_fields"}
devtools_traits = {path = "../devtools_traits"}
dom_struct = {path = "../dom_struct"}
@@ -74,7 +74,7 @@ phf = "0.7.18"
profile_traits = {path = "../profile_traits"}
ref_filter_map = "1.0.1"
ref_slice = "1.0"
-regex = "0.2"
+regex = "1.0"
script_layout_interface = {path = "../script_layout_interface"}
script_plugins = {path = "../script_plugins"}
script_traits = {path = "../script_traits"}
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 01b52d916ae..6015a4b126a 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -744,7 +744,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
if defaultValue:
assert isinstance(defaultValue, IDLNullValue)
dictionary, = dictionaries
- default = "%s::%s(%s::%s::empty(cx))" % (
+ default = "%s::%s(%s::%s::empty())" % (
union_native_type(type),
dictionary.name,
CGDictionary.makeModuleName(dictionary.inner),
@@ -1148,7 +1148,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
typeName = "%s::%s" % (CGDictionary.makeModuleName(type.inner),
CGDictionary.makeDictionaryName(type.inner))
declType = CGGeneric(typeName)
- empty = "%s::empty(cx)" % typeName
+ empty = "%s::empty()" % typeName
if type_needs_tracing(type):
declType = CGTemplatedType("RootedTraceableBox", declType)
@@ -2116,6 +2116,10 @@ class CGDOMJSClass(CGThing):
self.descriptor = descriptor
def define(self):
+ parentName = self.descriptor.getParentName()
+ if not parentName:
+ parentName = "::dom::bindings::reflector::Reflector"
+
args = {
"domClass": DOMClass(self.descriptor),
"enumerateHook": "None",
@@ -2161,7 +2165,51 @@ static Class: DOMJSClass = DOMJSClass {
reserved: [0 as *mut _; 3],
},
dom_class: %(domClass)s
-};""" % args
+};
+""" % args
+
+
+class CGAssertInheritance(CGThing):
+ """
+ Generate a type assertion for inheritance
+ """
+ def __init__(self, descriptor):
+ CGThing.__init__(self)
+ self.descriptor = descriptor
+
+ def define(self):
+ parent = self.descriptor.interface.parent
+ parentName = ""
+ if parent:
+ parentName = parent.identifier.name
+ else:
+ parentName = "::dom::bindings::reflector::Reflector"
+
+ selfName = self.descriptor.interface.identifier.name
+
+ if selfName == "PaintRenderingContext2D":
+ # PaintRenderingContext2D embeds a CanvasRenderingContext2D
+ # instead of a Reflector as an optimization,
+ # but this is fine since CanvasRenderingContext2D
+ # also has a reflector
+ #
+ # FIXME *RenderingContext2D should use Inline
+ parentName = "::dom::canvasrenderingcontext2d::CanvasRenderingContext2D"
+ args = {
+ "parentName": parentName,
+ "selfName": selfName,
+ }
+
+ return """\
+impl %(selfName)s {
+ fn __assert_parent_type(&self) {
+ use dom::bindings::inheritance::HasParent;
+ // If this type assertion fails, make sure the first field of your
+ // DOM struct is of the correct type -- it must be the parent class.
+ let _: &%(parentName)s = self.as_parent();
+ }
+}
+""" % args
def str_to_const_array(s):
@@ -6011,6 +6059,8 @@ class CGDescriptor(CGThing):
pass
else:
cgThings.append(CGDOMJSClass(descriptor))
+ if not descriptor.interface.isIteratorInterface():
+ cgThings.append(CGAssertInheritance(descriptor))
pass
if descriptor.isGlobal():
@@ -6224,12 +6274,7 @@ class CGDictionary(CGThing):
return string.Template(
"impl ${selfName} {\n"
- " pub unsafe fn empty(cx: *mut JSContext) -> ${actualType} {\n"
- " match ${selfName}::new(cx, HandleValue::null()) {\n"
- " Ok(ConversionResult::Success(v)) => v,\n"
- " _ => unreachable!(),\n"
- " }\n"
- " }\n"
+ "${empty}\n"
" pub unsafe fn new(cx: *mut JSContext, val: HandleValue) \n"
" -> Result<ConversionResult<${actualType}>, ()> {\n"
" let object = if val.get().is_null_or_undefined() {\n"
@@ -6265,6 +6310,7 @@ class CGDictionary(CGThing):
"}\n").substitute({
"selfName": selfName,
"actualType": actualType,
+ "empty": CGIndenter(CGGeneric(self.makeEmpty()), indentLevel=4).define(),
"initParent": CGIndenter(CGGeneric(initParent), indentLevel=12).define(),
"initMembers": CGIndenter(memberInits, indentLevel=12).define(),
"insertMembers": CGIndenter(memberInserts, indentLevel=8).define(),
@@ -6330,6 +6376,50 @@ class CGDictionary(CGThing):
return CGGeneric(conversion)
+ def makeEmpty(self):
+ if self.hasRequiredFields(self.dictionary):
+ return ""
+ parentTemplate = "parent: %s::%s::empty(),\n"
+ fieldTemplate = "%s: %s,\n"
+ functionTemplate = (
+ "pub fn empty() -> Self {\n"
+ " Self {\n"
+ "%s"
+ " }\n"
+ "}"
+ )
+ if self.membersNeedTracing():
+ parentTemplate = "dictionary.parent = %s::%s::empty();\n"
+ fieldTemplate = "dictionary.%s = %s;\n"
+ functionTemplate = (
+ "pub fn empty() -> RootedTraceableBox<Self> {\n"
+ " let mut dictionary = RootedTraceableBox::new(Self::default());\n"
+ "%s"
+ " dictionary\n"
+ "}"
+ )
+ s = ""
+ if self.dictionary.parent:
+ s += parentTemplate % (self.makeModuleName(self.dictionary.parent),
+ self.makeClassName(self.dictionary.parent))
+ for member, info in self.memberInfo:
+ if not member.optional:
+ return ""
+ default = info.default
+ if not default:
+ default = "None"
+ s += fieldTemplate % (self.makeMemberName(member.identifier.name), default)
+ return functionTemplate % CGIndenter(CGGeneric(s), 12).define()
+
+ def hasRequiredFields(self, dictionary):
+ if dictionary.parent:
+ if self.hasRequiredFields(dictionary.parent):
+ return True
+ for member in dictionary.members:
+ if not member.optional:
+ return True
+ return False
+
@staticmethod
def makeMemberName(name):
# Can't use Rust keywords as member names.
diff --git a/components/script/dom/bindings/inheritance.rs b/components/script/dom/bindings/inheritance.rs
index d97843bf42a..c017a806b6e 100644
--- a/components/script/dom/bindings/inheritance.rs
+++ b/components/script/dom/bindings/inheritance.rs
@@ -41,3 +41,8 @@ pub trait Castable: IDLInterface + DomObject + Sized {
}
}
}
+
+pub trait HasParent {
+ type Parent;
+ fn as_parent(&self) -> &Self::Parent;
+}
diff --git a/components/script/dom/bindings/iterable.rs b/components/script/dom/bindings/iterable.rs
index 15ccd554c2a..87ee05541fa 100644
--- a/components/script/dom/bindings/iterable.rs
+++ b/components/script/dom/bindings/iterable.rs
@@ -115,7 +115,7 @@ fn dict_return(cx: *mut JSContext,
mut result: MutableHandleObject,
done: bool,
value: HandleValue) -> Fallible<()> {
- let mut dict = unsafe { IterableKeyOrValueResult::empty(cx) };
+ let mut dict = IterableKeyOrValueResult::empty();
dict.done = done;
dict.value.set(value.get());
rooted!(in(cx) let mut dict_value = UndefinedValue());
@@ -130,7 +130,7 @@ fn key_and_value_return(cx: *mut JSContext,
mut result: MutableHandleObject,
key: HandleValue,
value: HandleValue) -> Fallible<()> {
- let mut dict = unsafe { IterableKeyAndValueResult::empty(cx) };
+ let mut dict = IterableKeyAndValueResult::empty();
dict.done = false;
dict.value = Some(vec![key, value]
.into_iter()
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 794a3618820..06892ec8478 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -32,7 +32,7 @@
use app_units::Au;
use canvas_traits::canvas::{CanvasGradientStop, CanvasId, LinearGradientStyle, RadialGradientStyle};
use canvas_traits::canvas::{CompositionOrBlending, LineCapStyle, LineJoinStyle, RepetitionStyle};
-use canvas_traits::webgl::{WebGLBufferId, WebGLFramebufferId, WebGLProgramId, WebGLRenderbufferId};
+use canvas_traits::webgl::{ActiveAttribInfo, WebGLBufferId, WebGLFramebufferId, WebGLProgramId, WebGLRenderbufferId};
use canvas_traits::webgl::{WebGLChan, WebGLContextShareMode, WebGLError, WebGLPipeline, WebGLMsgSender};
use canvas_traits::webgl::{WebGLReceiver, WebGLSender, WebGLShaderId, WebGLTextureId, WebGLVertexArrayId};
use canvas_traits::webgl::{WebGLSLVersion, WebGLVersion};
@@ -342,6 +342,7 @@ unsafe impl<A: JSTraceable, B: JSTraceable, C: JSTraceable> JSTraceable for (A,
}
}
+unsafe_no_jsmanaged_fields!(ActiveAttribInfo);
unsafe_no_jsmanaged_fields!(bool, f32, f64, String, AtomicBool, AtomicUsize, Uuid, char);
unsafe_no_jsmanaged_fields!(usize, u8, u16, u32, u64);
unsafe_no_jsmanaged_fields!(isize, i8, i16, i32, i64);
diff --git a/components/script/dom/filereadersync.rs b/components/script/dom/filereadersync.rs
index cc9a821a073..10095db4961 100644
--- a/components/script/dom/filereadersync.rs
+++ b/components/script/dom/filereadersync.rs
@@ -5,11 +5,10 @@
use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
use dom::bindings::codegen::Bindings::FileReaderSyncBinding::{FileReaderSyncBinding, FileReaderSyncMethods};
use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::reflect_dom_object;
+use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::blob::Blob;
-use dom::eventtarget::EventTarget;
use dom::filereader::FileReaderSharedFunctionality;
use dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
@@ -20,13 +19,13 @@ use std::ptr::NonNull;
#[dom_struct]
pub struct FileReaderSync {
- eventtarget: EventTarget,
+ reflector: Reflector,
}
impl FileReaderSync {
pub fn new_inherited() -> FileReaderSync {
FileReaderSync {
- eventtarget: EventTarget::new_inherited(),
+ reflector: Reflector::new(),
}
}
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 61acecda71d..b37199ca0db 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::{Au, AU_PER_PX};
-use cssparser::{Parser, ParserInput};
use document_loader::{LoadType, LoadBlocker};
use dom::activation::Activatable;
use dom::attr::Attr;
@@ -58,13 +57,7 @@ use std::default::Default;
use std::i32;
use std::sync::{Arc, Mutex};
use style::attr::{AttrValue, LengthOrPercentageOrAuto, parse_double, parse_unsigned_integer};
-use style::context::QuirksMode;
-use style::media_queries::MediaQuery;
-use style::parser::ParserContext;
use style::str::is_ascii_digit;
-use style::values::specified::{Length, ViewportPercentageLength};
-use style::values::specified::length::NoCalcLength;
-use style_traits::ParsingMode;
use task_source::TaskSource;
enum ParseState {
@@ -94,12 +87,6 @@ enum State {
Broken,
}
-#[derive(Debug, PartialEq)]
-pub struct Size {
- pub query: Option<MediaQuery>,
- pub length: Length,
-}
-
#[derive(Clone, Copy, JSTraceable, MallocSizeOf)]
enum ImageRequestPhase {
Pending,
@@ -758,63 +745,6 @@ impl LayoutHTMLImageElementHelpers for LayoutDom<HTMLImageElement> {
}
}
-//https://html.spec.whatwg.org/multipage/#parse-a-sizes-attribute
-pub fn parse_a_sizes_attribute(input: DOMString, width: Option<u32>) -> Vec<Size> {
- let mut sizes = Vec::<Size>::new();
- for unparsed_size in input.split(',') {
- let whitespace = unparsed_size.chars().rev().take_while(|c| char::is_whitespace(*c)).count();
- let trimmed: String = unparsed_size.chars().take(unparsed_size.chars().count() - whitespace).collect();
-
- if trimmed.is_empty() {
- continue;
- }
- let mut input = ParserInput::new(&trimmed);
- let url = ServoUrl::parse("about:blank").unwrap();
- let context = ParserContext::new_for_cssom(
- &url,
- None,
- ParsingMode::empty(),
- QuirksMode::NoQuirks,
- None,
- );
- let mut parser = Parser::new(&mut input);
- let length = parser.try(|i| Length::parse_non_negative(&context, i));
- match length {
- Ok(len) => sizes.push(Size {
- length: len,
- query: None
- }),
- Err(_) => {
- let mut media_query_parser = parser;
- let media_query = media_query_parser.try(|i| MediaQuery::parse(&context, i));
- if let Ok(query) = media_query {
- let length = Length::parse_non_negative(&context, &mut media_query_parser);
- if let Ok(length) = length {
- sizes.push(Size {
- length: length,
- query: Some(query)
- })
- }
- }
- },
- }
- }
- if sizes.is_empty() {
- let size = match width {
- Some(w) => Size {
- length: Length::from_px(w as f32),
- query: None
- },
- None => Size {
- length: Length::NoCalc(NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vw(100.))),
- query: None
- },
- };
- sizes.push(size);
- }
- sizes
-}
-
impl HTMLImageElementMethods for HTMLImageElement {
// https://html.spec.whatwg.org/multipage/#dom-img-alt
make_getter!(Alt, "alt");
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index cb5e17dfe26..deb82e9ced2 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -594,7 +594,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
}
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
- fn LinkProgram(&self, program: Option<&WebGLProgram>) {
+ fn LinkProgram(&self, program: &WebGLProgram) {
self.base.LinkProgram(program)
}
@@ -937,6 +937,34 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
) -> Option<Vec<DomRoot<WebGLShader>>> {
self.base.GetAttachedShaders(program)
}
+
+ /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
+ fn DrawArraysInstanced(
+ &self,
+ mode: u32,
+ first: i32,
+ count: i32,
+ primcount: i32,
+ ) {
+ self.base.draw_arrays_instanced(mode, first, count, primcount);
+ }
+
+ /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
+ fn DrawElementsInstanced(
+ &self,
+ mode: u32,
+ count: i32,
+ type_: u32,
+ offset: i64,
+ primcount: i32,
+ ) {
+ self.base.draw_elements_instanced(mode, count, type_, offset, primcount);
+ }
+
+ /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
+ fn VertexAttribDivisor(&self, index: u32, divisor: u32) {
+ self.base.vertex_attrib_divisor(index, divisor);
+ }
}
diff --git a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
new file mode 100644
index 00000000000..f35abaf15af
--- /dev/null
+++ b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
@@ -0,0 +1,92 @@
+/* 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 canvas_traits::webgl::WebGLVersion;
+use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding;
+use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
+use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysMethods;
+use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use dom::bindings::root::{Dom, DomRoot};
+use dom::webglrenderingcontext::WebGLRenderingContext;
+use dom_struct::dom_struct;
+use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
+
+#[dom_struct]
+pub struct ANGLEInstancedArrays {
+ reflector_: Reflector,
+ ctx: Dom<WebGLRenderingContext>,
+}
+
+impl ANGLEInstancedArrays {
+ fn new_inherited(ctx: &WebGLRenderingContext) -> Self {
+ Self {
+ reflector_: Reflector::new(),
+ ctx: Dom::from_ref(ctx),
+ }
+ }
+}
+
+impl WebGLExtension for ANGLEInstancedArrays {
+ type Extension = Self;
+
+ fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
+ reflect_dom_object(
+ Box::new(ANGLEInstancedArrays::new_inherited(ctx)),
+ &*ctx.global(),
+ ANGLEInstancedArraysBinding::Wrap,
+ )
+ }
+
+ fn spec() -> WebGLExtensionSpec {
+ WebGLExtensionSpec::Specific(WebGLVersion::WebGL1)
+ }
+
+ fn is_supported(ext: &WebGLExtensions) -> bool {
+ ext.supports_any_gl_extension(&[
+ "GL_ANGLE_instanced_arrays",
+ "GL_ARB_instanced_arrays",
+ "GL_EXT_instanced_arrays",
+ "GL_NV_instanced_arrays",
+ ])
+ }
+
+ fn enable(ext: &WebGLExtensions) {
+ ext.enable_get_vertex_attrib_name(
+ ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE,
+ );
+ }
+
+ fn name() -> &'static str {
+ "ANGLE_instanced_arrays"
+ }
+}
+
+impl ANGLEInstancedArraysMethods for ANGLEInstancedArrays {
+ // https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+ fn DrawArraysInstancedANGLE(
+ &self,
+ mode: u32,
+ first: i32,
+ count: i32,
+ primcount: i32,
+ ) {
+ self.ctx.draw_arrays_instanced(mode, first, count, primcount);
+ }
+
+ // https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+ fn DrawElementsInstancedANGLE(
+ &self,
+ mode: u32,
+ count: i32,
+ type_: u32,
+ offset: i64,
+ primcount: i32,
+ ) {
+ self.ctx.draw_elements_instanced(mode, count, type_, offset, primcount);
+ }
+
+ fn VertexAttribDivisorANGLE(&self, index: u32, divisor: u32) {
+ self.ctx.vertex_attrib_divisor(index, divisor);
+ }
+}
diff --git a/components/script/dom/webgl_extensions/ext/mod.rs b/components/script/dom/webgl_extensions/ext/mod.rs
index bdf19d5327a..62f75cb048a 100644
--- a/components/script/dom/webgl_extensions/ext/mod.rs
+++ b/components/script/dom/webgl_extensions/ext/mod.rs
@@ -5,6 +5,7 @@
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use super::{ext_constants, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
+pub mod angleinstancedarrays;
pub mod extblendminmax;
pub mod extshadertexturelod;
pub mod exttexturefilteranisotropic;
diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
index a6e8739862e..9ec3065af49 100644
--- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
+++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
@@ -50,7 +50,13 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
self.ctx.send_command(WebGLCommand::CreateVertexArray(sender));
let result = receiver.recv().unwrap();
- result.map(|vao_id| WebGLVertexArrayObjectOES::new(&self.global(), vao_id))
+ result.map(|vao_id| {
+ WebGLVertexArrayObjectOES::new(
+ &self.global(),
+ vao_id,
+ self.ctx.limits().max_vertex_attribs,
+ )
+ })
}
// https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
@@ -69,8 +75,8 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
}
// Remove VAO references from buffers
- for (_, &(_, ref buffer)) in vao.bound_attrib_buffers().borrow().iter() {
- if let Some(ref buffer) = *buffer {
+ for attrib_data in &*vao.vertex_attribs().borrow() {
+ if let Some(buffer) = attrib_data.buffer() {
buffer.remove_vao_reference(vao.id());
}
}
@@ -94,9 +100,9 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
fn BindVertexArrayOES(&self, vao: Option<&WebGLVertexArrayObjectOES>) {
if let Some(bound_vao) = self.bound_vao.get() {
// Store buffers attached to attrib pointers
- bound_vao.bound_attrib_buffers().set_from(&self.ctx.bound_attrib_buffers());
- for (_, (_, ref buffer)) in bound_vao.bound_attrib_buffers().borrow().iter() {
- if let Some(ref buffer) = *buffer {
+ bound_vao.vertex_attribs().clone_from(&self.ctx.vertex_attribs());
+ for attrib_data in &*bound_vao.vertex_attribs().borrow() {
+ if let Some(buffer) = attrib_data.buffer() {
buffer.add_vao_reference(bound_vao.id());
}
}
@@ -119,13 +125,13 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
self.bound_vao.set(Some(&vao));
// Restore WebGLRenderingContext current bindings
- self.ctx.bound_attrib_buffers().set_from(&vao.bound_attrib_buffers());
+ self.ctx.vertex_attribs().clone_from(&vao.vertex_attribs());
let element_array = vao.bound_buffer_element_array();
self.ctx.set_bound_buffer_element_array(element_array.as_ref().map(|buffer| &**buffer));
} else {
self.ctx.send_command(WebGLCommand::BindVertexArray(None));
self.bound_vao.set(None);
- self.ctx.bound_attrib_buffers().clear();
+ self.ctx.vertex_attribs().clear();
}
}
}
diff --git a/components/script/dom/webgl_extensions/extensions.rs b/components/script/dom/webgl_extensions/extensions.rs
index c5413ea1eb2..b3812f51cf5 100644
--- a/components/script/dom/webgl_extensions/extensions.rs
+++ b/components/script/dom/webgl_extensions/extensions.rs
@@ -4,6 +4,7 @@
use canvas_traits::webgl::{WebGLError, WebGLVersion};
use dom::bindings::cell::DomRefCell;
+use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
@@ -54,6 +55,13 @@ const DEFAULT_DISABLED_GET_TEX_PARAMETER_NAMES_WEBGL1: [GLenum; 1] = [
EXTTextureFilterAnisotropicConstants::TEXTURE_MAX_ANISOTROPY_EXT,
];
+// Param names that are implemented for glGetVertexAttrib in a WebGL 1.0 context
+// but must trigger a InvalidEnum error until the related WebGL Extensions are enabled.
+// Example: https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+const DEFAULT_DISABLED_GET_VERTEX_ATTRIB_NAMES_WEBGL1: [GLenum; 1] = [
+ ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE,
+];
+
/// WebGL features that are enabled/disabled by WebGL Extensions.
#[derive(JSTraceable, MallocSizeOf)]
struct WebGLExtensionFeatures {
@@ -68,6 +76,8 @@ struct WebGLExtensionFeatures {
disabled_get_parameter_names: FnvHashSet<GLenum>,
/// WebGL GetTexParameter() names enabled by extensions.
disabled_get_tex_parameter_names: FnvHashSet<GLenum>,
+ /// WebGL GetAttribVertex() names enabled by extensions.
+ disabled_get_vertex_attrib_names: FnvHashSet<GLenum>,
/// WebGL OES_element_index_uint extension.
element_index_uint_enabled: bool,
/// WebGL EXT_blend_minmax extension.
@@ -80,6 +90,7 @@ impl WebGLExtensionFeatures {
disabled_tex_types,
disabled_get_parameter_names,
disabled_get_tex_parameter_names,
+ disabled_get_vertex_attrib_names,
element_index_uint_enabled,
blend_minmax_enabled,
) = match webgl_version {
@@ -88,12 +99,20 @@ impl WebGLExtensionFeatures {
DEFAULT_DISABLED_TEX_TYPES_WEBGL1.iter().cloned().collect(),
DEFAULT_DISABLED_GET_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(),
DEFAULT_DISABLED_GET_TEX_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(),
+ DEFAULT_DISABLED_GET_VERTEX_ATTRIB_NAMES_WEBGL1.iter().cloned().collect(),
false,
false,
)
},
WebGLVersion::WebGL2 => {
- (Default::default(), Default::default(), Default::default(), true, true)
+ (
+ Default::default(),
+ Default::default(),
+ Default::default(),
+ Default::default(),
+ true,
+ true,
+ )
}
};
Self {
@@ -105,6 +124,7 @@ impl WebGLExtensionFeatures {
hint_targets: Default::default(),
disabled_get_parameter_names,
disabled_get_tex_parameter_names,
+ disabled_get_vertex_attrib_names,
element_index_uint_enabled,
blend_minmax_enabled,
}
@@ -269,7 +289,16 @@ impl WebGLExtensions {
!self.features.borrow().disabled_get_tex_parameter_names.contains(&name)
}
+ pub fn enable_get_vertex_attrib_name(&self, name: GLenum) {
+ self.features.borrow_mut().disabled_get_vertex_attrib_names.remove(&name);
+ }
+
+ pub fn is_get_vertex_attrib_name_enabled(&self, name: GLenum) -> bool {
+ !self.features.borrow().disabled_get_vertex_attrib_names.contains(&name)
+ }
+
fn register_all_extensions(&self) {
+ self.register::<ext::angleinstancedarrays::ANGLEInstancedArrays>();
self.register::<ext::extblendminmax::EXTBlendMinmax>();
self.register::<ext::extshadertexturelod::EXTShaderTextureLod>();
self.register::<ext::exttexturefilteranisotropic::EXTTextureFilterAnisotropic>();
diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs
index d710568d1ca..d5902e1afff 100644
--- a/components/script/dom/webglprogram.rs
+++ b/components/script/dom/webglprogram.rs
@@ -3,8 +3,10 @@
* 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 canvas_traits::webgl::{WebGLCommand, WebGLError, WebGLMsgSender, WebGLProgramId, WebGLResult};
-use canvas_traits::webgl::webgl_channel;
+use canvas_traits::webgl::{ActiveAttribInfo, WebGLCommand, WebGLError, WebGLMsgSender};
+use canvas_traits::webgl::{WebGLProgramId, WebGLResult, from_name_in_compiled_shader};
+use canvas_traits::webgl::{to_name_in_compiled_shader, webgl_channel};
+use dom::bindings::cell::DomRefCell;
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
@@ -16,7 +18,8 @@ use dom::webglrenderingcontext::MAX_UNIFORM_AND_ATTRIBUTE_LEN;
use dom::webglshader::WebGLShader;
use dom::window::Window;
use dom_struct::dom_struct;
-use std::cell::Cell;
+use fnv::FnvHashSet;
+use std::cell::{Cell, Ref};
#[dom_struct]
pub struct WebGLProgram {
@@ -29,46 +32,7 @@ pub struct WebGLProgram {
vertex_shader: MutNullableDom<WebGLShader>,
#[ignore_malloc_size_of = "Defined in ipc-channel"]
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
+ active_attribs: DomRefCell<Box<[ActiveAttribInfo]>>,
}
impl WebGLProgram {
@@ -84,6 +48,7 @@ impl WebGLProgram {
fragment_shader: Default::default(),
vertex_shader: Default::default(),
renderer: renderer,
+ active_attribs: DomRefCell::new(vec![].into()),
}
}
@@ -142,7 +107,7 @@ impl WebGLProgram {
return Err(WebGLError::InvalidOperation);
}
self.linked.set(false);
- self.link_called.set(true);
+ *self.active_attribs.borrow_mut() = vec![].into();
match self.fragment_shader.get() {
Some(ref shader) if shader.successfully_compiled() => {},
@@ -154,24 +119,38 @@ impl WebGLProgram {
_ => return Ok(()), // callers use gl.LINK_STATUS to check link errors
}
- self.linked.set(true);
- self.renderer.send(WebGLCommand::LinkProgram(self.id)).unwrap();
- Ok(())
- }
-
- /// glUseProgram
- pub fn use_program(&self) -> WebGLResult<()> {
- if self.is_deleted() {
- return Err(WebGLError::InvalidOperation);
- }
- if !self.linked.get() {
- return Err(WebGLError::InvalidOperation);
+ let (sender, receiver) = webgl_channel().unwrap();
+ self.renderer.send(WebGLCommand::LinkProgram(self.id, sender)).unwrap();
+ let link_info = receiver.recv().unwrap();
+
+ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.31
+ let mut used_locs = FnvHashSet::default();
+ for active_attrib in &*link_info.active_attribs {
+ if active_attrib.location == -1 {
+ continue;
+ }
+ let columns = match active_attrib.type_ {
+ constants::FLOAT_MAT2 => 2,
+ constants::FLOAT_MAT3 => 3,
+ constants::FLOAT_MAT4 => 4,
+ _ => 1,
+ };
+ for column in 0..columns {
+ if !used_locs.insert(active_attrib.location as u32 + column) {
+ return Ok(());
+ }
+ }
}
- self.renderer.send(WebGLCommand::UseProgram(self.id)).unwrap();
+ self.linked.set(link_info.linked);
+ *self.active_attribs.borrow_mut() = link_info.active_attribs;
Ok(())
}
+ pub fn active_attribs(&self) -> Ref<[ActiveAttribInfo]> {
+ Ref::map(self.active_attribs.borrow(), |attribs| &**attribs)
+ }
+
/// glValidateProgram
pub fn validate(&self) -> WebGLResult<()> {
if self.is_deleted() {
@@ -281,19 +260,18 @@ impl WebGLProgram {
if self.is_deleted() {
return Err(WebGLError::InvalidValue);
}
- let (sender, receiver) = webgl_channel().unwrap();
- self.renderer
- .send(WebGLCommand::GetActiveAttrib(self.id, index, sender))
- .unwrap();
-
- 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)
- })
+ let attribs = self.active_attribs.borrow();
+ let data = attribs.get(index as usize).ok_or(WebGLError::InvalidValue)?;
+ Ok(WebGLActiveInfo::new(
+ self.global().as_window(),
+ data.size,
+ data.type_,
+ data.name.clone().into(),
+ ))
}
/// glGetAttribLocation
- pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<Option<i32>> {
+ pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<i32> {
if !self.is_linked() || self.is_deleted() {
return Err(WebGLError::InvalidOperation);
}
@@ -303,21 +281,20 @@ impl WebGLProgram {
// Check if the name is reserved
if name.starts_with("gl_") {
- return Ok(None);
+ return Ok(-1);
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#GLSL_CONSTRUCTS
if name.starts_with("webgl_") || name.starts_with("_webgl_") {
- return Ok(None);
+ return Ok(-1);
}
- let name = to_name_in_compiled_shader(&name);
-
- let (sender, receiver) = webgl_channel().unwrap();
- self.renderer
- .send(WebGLCommand::GetAttribLocation(self.id, name, sender))
- .unwrap();
- Ok(receiver.recv().unwrap())
+ let location = self.active_attribs
+ .borrow()
+ .iter()
+ .find(|attrib| attrib.name == &*name)
+ .map_or(-1, |attrib| attrib.location);
+ Ok(location)
}
/// glGetUniformLocation
diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs
index a672f9faa72..9e21d78fe5a 100644
--- a/components/script/dom/webglrenderbuffer.rs
+++ b/components/script/dom/webglrenderbuffer.rs
@@ -106,8 +106,6 @@ impl WebGLRenderbuffer {
_ => return Err(WebGLError::InvalidEnum),
};
- // FIXME: Check that w/h are < MAX_RENDERBUFFER_SIZE
-
// FIXME: Invalidate completeness after the call
let msg = WebGLCommand::RenderbufferStorage(constants::RENDERBUFFER, internal_format, width, height);
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 7079bbcc76b..34d085d7f6b 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -4,14 +4,15 @@
use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use canvas_traits::canvas::{byte_swap, multiply_u8_pixel};
-use canvas_traits::webgl::{DOMToTextureCommand, Parameter, ProgramParameter};
-use canvas_traits::webgl::{ShaderParameter, TexParameter, VertexAttrib, WebGLCommand};
+use canvas_traits::webgl::{ActiveAttribInfo, DOMToTextureCommand, Parameter};
+use canvas_traits::webgl::{ShaderParameter, TexParameter, WebGLCommand};
use canvas_traits::webgl::{WebGLContextShareMode, WebGLError};
use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender};
use canvas_traits::webgl::{WebGLResult, WebGLSLVersion, WebGLVersion};
use canvas_traits::webgl::{WebVRCommand, webgl_channel};
use canvas_traits::webgl::WebGLError::*;
use dom::bindings::cell::DomRefCell;
+use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
@@ -52,9 +53,10 @@ use euclid::Size2D;
use fnv::FnvHashMap;
use half::f16;
use js::jsapi::{JSContext, JSObject, Type};
-use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal, NullValue, UndefinedValue};
+use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal};
+use js::jsval::{ObjectValue, NullValue, UndefinedValue};
use js::rust::CustomAutoRooterGuard;
-use js::typedarray::ArrayBufferView;
+use js::typedarray::{ArrayBufferView, CreateWith, Float32Array, Int32Array, Uint32Array};
use net_traits::image::base::PixelFormat;
use net_traits::image_cache::ImageResponse;
use offscreen_gl_context::{GLContextAttributes, GLLimits};
@@ -63,7 +65,7 @@ use script_layout_interface::HTMLCanvasDataSource;
use servo_config::prefs::PREFS;
use std::cell::{Cell, Ref};
use std::cmp;
-use std::ptr::NonNull;
+use std::ptr::{self, NonNull};
use webrender_api;
type ImagePixelResult = Result<(Vec<u8>, Size2D<i32>, bool), ()>;
@@ -193,7 +195,7 @@ pub struct WebGLRenderingContext {
bound_texture_unit: Cell<u32>,
bound_buffer_array: MutNullableDom<WebGLBuffer>,
bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
- bound_attrib_buffers: BoundAttribBuffers,
+ vertex_attribs: VertexAttribs,
current_program: MutNullableDom<WebGLProgram>,
#[ignore_malloc_size_of = "Because it's small"]
current_vertex_attrib_0: Cell<(f32, f32, f32, f32)>,
@@ -234,6 +236,7 @@ impl WebGLRenderingContext {
share_mode: ctx_data.share_mode,
webgl_version,
glsl_version: ctx_data.glsl_version,
+ vertex_attribs: VertexAttribs::new(ctx_data.limits.max_vertex_attribs),
limits: ctx_data.limits,
canvas: Dom::from_ref(canvas),
last_error: Cell::new(None),
@@ -244,13 +247,12 @@ impl WebGLRenderingContext {
bound_texture_unit: Cell::new(constants::TEXTURE0),
bound_buffer_array: MutNullableDom::new(None),
bound_buffer_element_array: MutNullableDom::new(None),
- bound_attrib_buffers: Default::default(),
bound_renderbuffer: MutNullableDom::new(None),
current_program: MutNullableDom::new(None),
current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)),
current_scissor: Cell::new((0, 0, size.width, size.height)),
current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)),
- extension_manager: WebGLExtensions::new(webgl_version)
+ extension_manager: WebGLExtensions::new(webgl_version),
}
})
}
@@ -312,8 +314,8 @@ impl WebGLRenderingContext {
})
}
- pub fn bound_attrib_buffers(&self) -> &BoundAttribBuffers {
- &self.bound_attrib_buffers
+ pub fn vertex_attribs(&self) -> &VertexAttribs {
+ &self.vertex_attribs
}
pub fn bound_buffer_element_array(&self) -> Option<DomRoot<WebGLBuffer>> {
@@ -1155,6 +1157,142 @@ impl WebGLRenderingContext {
}
}
+ // https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+ pub fn draw_arrays_instanced(
+ &self,
+ mode: u32,
+ first: i32,
+ count: i32,
+ primcount: i32,
+ ) {
+ match mode {
+ constants::POINTS | constants::LINE_STRIP |
+ constants::LINE_LOOP | constants::LINES |
+ constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN |
+ constants::TRIANGLES => {},
+ _ => {
+ return self.webgl_error(InvalidEnum);
+ }
+ }
+ if first < 0 || count < 0 || primcount < 0 {
+ return self.webgl_error(InvalidValue);
+ }
+
+ let current_program = handle_potential_webgl_error!(
+ self,
+ self.current_program.get().ok_or(InvalidOperation),
+ return
+ );
+
+ let required_len = if count > 0 {
+ handle_potential_webgl_error!(
+ self,
+ first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation),
+ return
+ )
+ } else {
+ 0
+ };
+
+ handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.validate_for_draw(required_len, primcount as u32, &current_program.active_attribs()),
+ return
+ );
+
+ if !self.validate_framebuffer_complete() {
+ return;
+ }
+
+ self.send_command(
+ WebGLCommand::DrawArraysInstanced { mode, first, count, primcount },
+ );
+ self.mark_as_dirty();
+ }
+
+ // https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+ pub fn draw_elements_instanced(
+ &self,
+ mode: u32,
+ count: i32,
+ type_: u32,
+ offset: i64,
+ primcount: i32,
+ ) {
+ match mode {
+ constants::POINTS | constants::LINE_STRIP |
+ constants::LINE_LOOP | constants::LINES |
+ constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN |
+ constants::TRIANGLES => {},
+ _ => {
+ return self.webgl_error(InvalidEnum);
+ }
+ }
+ if count < 0 || offset < 0 || primcount < 0 {
+ return self.webgl_error(InvalidValue);
+ }
+ let type_size = match type_ {
+ constants::UNSIGNED_BYTE => 1,
+ constants::UNSIGNED_SHORT => 2,
+ _ => return self.webgl_error(InvalidEnum),
+ };
+ if offset % type_size != 0 {
+ return self.webgl_error(InvalidOperation);
+ }
+
+ let current_program = handle_potential_webgl_error!(
+ self,
+ self.current_program.get().ok_or(InvalidOperation),
+ return
+ );
+
+ if count > 0 && primcount > 0 {
+ if let Some(array_buffer) = self.bound_buffer_element_array.get() {
+ // WebGL Spec: check buffer overflows, must be a valid multiple of the size.
+ let val = offset as u64 + (count as u64 * type_size as u64);
+ if val > array_buffer.capacity() as u64 {
+ return self.webgl_error(InvalidOperation);
+ }
+ } else {
+ // From the WebGL spec
+ //
+ // a non-null WebGLBuffer must be bound to the ELEMENT_ARRAY_BUFFER binding point
+ // or an INVALID_OPERATION error will be generated.
+ //
+ return self.webgl_error(InvalidOperation);
+ }
+ }
+
+ // TODO(nox): Pass the correct number of vertices required.
+ handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.validate_for_draw(0, primcount as u32, &current_program.active_attribs()),
+ return
+ );
+
+ if !self.validate_framebuffer_complete() {
+ return;
+ }
+
+ self.send_command(WebGLCommand::DrawElementsInstanced {
+ mode,
+ count,
+ type_,
+ offset: offset as u32,
+ primcount,
+ });
+ self.mark_as_dirty();
+ }
+
+ pub fn vertex_attrib_divisor(&self, index: u32, divisor: u32) {
+ if index >= self.limits.max_vertex_attribs {
+ return self.webgl_error(InvalidValue);
+ }
+
+ self.vertex_attribs.set_divisor(index, divisor);
+ self.send_command(WebGLCommand::VertexAttribDivisor { index, divisor });
+ }
+
// Used by HTMLCanvasElement.toDataURL
//
// This emits errors quite liberally, but the spec says that this operation
@@ -1331,6 +1469,16 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return Int32Value(constants::UNSIGNED_BYTE as i32);
}
}
+ constants::COMPRESSED_TEXTURE_FORMATS => {
+ // FIXME(nox): https://github.com/servo/servo/issues/20594
+ rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
+ let _ = Uint32Array::create(
+ cx,
+ CreateWith::Slice(&[]),
+ rval.handle_mut(),
+ ).unwrap();
+ return ObjectValue(rval.get());
+ }
constants::VERSION => {
rooted!(in(cx) let mut rval = UndefinedValue());
"WebGL 1.0".to_jsval(cx, rval.handle_mut());
@@ -1422,13 +1570,27 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
self.send_command(WebGLCommand::GetParameterInt(param, sender));
Int32Value(receiver.recv().unwrap())
}
+ Parameter::Int2(param) => {
+ let (sender, receiver) = webgl_channel().unwrap();
+ self.send_command(WebGLCommand::GetParameterInt2(param, sender));
+ rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
+ let _ = Int32Array::create(
+ cx,
+ CreateWith::Slice(&receiver.recv().unwrap()),
+ rval.handle_mut(),
+ ).unwrap();
+ ObjectValue(rval.get())
+ }
Parameter::Int4(param) => {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterInt4(param, sender));
- // FIXME(nox): https://github.com/servo/servo/issues/20655
- rooted!(in(cx) let mut rval = UndefinedValue());
- receiver.recv().unwrap().to_jsval(cx, rval.handle_mut());
- rval.get()
+ rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
+ let _ = Int32Array::create(
+ cx,
+ CreateWith::Slice(&receiver.recv().unwrap()),
+ rval.handle_mut(),
+ ).unwrap();
+ ObjectValue(rval.get())
}
Parameter::Float(param) => {
let (sender, receiver) = webgl_channel().unwrap();
@@ -1438,18 +1600,24 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Parameter::Float2(param) => {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterFloat2(param, sender));
- // FIXME(nox): https://github.com/servo/servo/issues/20655
- rooted!(in(cx) let mut rval = UndefinedValue());
- receiver.recv().unwrap().to_jsval(cx, rval.handle_mut());
- rval.get()
+ rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
+ let _ = Float32Array::create(
+ cx,
+ CreateWith::Slice(&receiver.recv().unwrap()),
+ rval.handle_mut(),
+ ).unwrap();
+ ObjectValue(rval.get())
}
Parameter::Float4(param) => {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterFloat4(param, sender));
- // FIXME(nox): https://github.com/servo/servo/issues/20655
- rooted!(in(cx) let mut rval = UndefinedValue());
- receiver.recv().unwrap().to_jsval(cx, rval.handle_mut());
- rval.get()
+ rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
+ let _ = Float32Array::create(
+ cx,
+ CreateWith::Slice(&receiver.recv().unwrap()),
+ rval.handle_mut(),
+ ).unwrap();
+ ObjectValue(rval.get())
}
}
}
@@ -2021,7 +2189,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
fn CompileShader(&self, shader: &WebGLShader) {
handle_potential_webgl_error!(
self,
- shader.compile(self.webgl_version, self.glsl_version, &self.extension_manager)
+ shader.compile(
+ self.webgl_version,
+ self.glsl_version,
+ &self.limits,
+ &self.extension_manager,
+ )
)
}
@@ -2075,7 +2248,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// Remove deleted buffer from bound attrib buffers.
- self.bound_attrib_buffers.remove_buffer(buffer);
+ self.vertex_attribs.delete_buffer(buffer);
// Delete buffer.
handle_object_deletion!(self, self.bound_buffer_array, buffer,
@@ -2193,22 +2366,28 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
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);
- }
- }
- {
- // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
- let buffers = self.bound_attrib_buffers.borrow();
- if buffers.iter().any(|(_, &(enabled, ref buffer))| enabled && buffer.is_none()) {
- return self.webgl_error(InvalidOperation);
- }
- }
+ let current_program = handle_potential_webgl_error!(
+ self,
+ self.current_program.get().ok_or(InvalidOperation),
+ return
+ );
+
+ let required_len = if count > 0 {
+ handle_potential_webgl_error!(
+ self,
+ first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation),
+ return
+ )
+ } else {
+ 0
+ };
+
+ handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.validate_for_draw(required_len, 1, &current_program.active_attribs()),
+ return
+ );
if !self.validate_framebuffer_complete() {
return;
@@ -2250,15 +2429,11 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return self.webgl_error(InvalidValue);
}
- if self.current_program.get().is_none() {
- // From the WebGL spec
- //
- // If the CURRENT_PROGRAM is null, an INVALID_OPERATION error will be generated.
- // WebGL performs additional error checking beyond that specified
- // in OpenGL ES 2.0 during calls to drawArrays and drawElements.
- //
- return self.webgl_error(InvalidOperation);
- }
+ let current_program = handle_potential_webgl_error!(
+ self,
+ self.current_program.get().ok_or(InvalidOperation),
+ return
+ );
if count > 0 {
if let Some(array_buffer) = self.bound_buffer_element_array.get() {
@@ -2277,13 +2452,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
}
- {
- // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
- let buffers = self.bound_attrib_buffers.borrow();
- if buffers.iter().any(|(_, &(enabled, ref buffer))| enabled && buffer.is_none()) {
- return self.webgl_error(InvalidOperation);
- }
- }
+ // TODO(nox): Pass the correct number of vertices required.
+ handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.validate_for_draw(0, 1, &current_program.active_attribs()),
+ return
+ );
if !self.validate_framebuffer_complete() {
return;
@@ -2299,7 +2473,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return self.webgl_error(InvalidValue);
}
- self.bound_attrib_buffers.enabled(attrib_id, true);
+ self.vertex_attribs.enabled_as_array(attrib_id, true);
self.send_command(WebGLCommand::EnableVertexAttribArray(attrib_id));
}
@@ -2309,7 +2483,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return self.webgl_error(InvalidValue);
}
- self.bound_attrib_buffers.enabled(attrib_id, false);
+ self.vertex_attribs.enabled_as_array(attrib_id, false);
self.send_command(WebGLCommand::DisableVertexAttribArray(attrib_id));
}
@@ -2326,18 +2500,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn GetActiveAttrib(&self, program: &WebGLProgram, index: u32) -> Option<DomRoot<WebGLActiveInfo>> {
- match program.get_active_attrib(index) {
- Ok(ret) => Some(ret),
- Err(e) => {
- self.webgl_error(e);
- return None;
- }
- }
+ handle_potential_webgl_error!(self, program.get_active_attrib(index).map(Some), None)
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn GetAttribLocation(&self, program: &WebGLProgram, name: DOMString) -> i32 {
- handle_potential_webgl_error!(self, program.get_attrib_location(name), None).unwrap_or(-1)
+ handle_potential_webgl_error!(self, program.get_attrib_location(name), -1)
}
#[allow(unsafe_code)]
@@ -2509,23 +2677,39 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
#[allow(unsafe_code)]
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
unsafe fn GetProgramParameter(&self, _: *mut JSContext, program: &WebGLProgram, param: u32) -> JSVal {
- match handle_potential_webgl_error!(self, ProgramParameter::from_u32(param), return NullValue()) {
- ProgramParameter::Bool(param) => {
+ // FIXME(nox): INVALID_OPERATION if program comes from a different context.
+ match param {
+ constants::DELETE_STATUS => BooleanValue(program.is_deleted()),
+ constants::LINK_STATUS => BooleanValue(program.is_linked()),
+ constants::VALIDATE_STATUS => {
+ // FIXME(nox): This could be cached on the DOM side when we call validateProgram
+ // but I'm not sure when the value should be reset.
let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetProgramParameterBool(program.id(), param, sender));
+ self.send_command(WebGLCommand::GetProgramValidateStatus(program.id(), sender));
BooleanValue(receiver.recv().unwrap())
}
- ProgramParameter::Int(param) => {
+ constants::ATTACHED_SHADERS => {
+ // FIXME(nox): This allocates a vector and roots a couple of shaders for nothing.
+ Int32Value(program.attached_shaders().map(|shaders| shaders.len() as i32).unwrap_or(0))
+ }
+ constants::ACTIVE_ATTRIBUTES => Int32Value(program.active_attribs().len() as i32),
+ constants::ACTIVE_UNIFORMS => {
+ // FIXME(nox): We'll need to cache that on the DOM side at some point.
let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetProgramParameterInt(program.id(), param, sender));
+ self.send_command(WebGLCommand::GetProgramActiveUniforms(program.id(), sender));
Int32Value(receiver.recv().unwrap())
}
+ _ => {
+ self.webgl_error(InvalidEnum);
+ NullValue()
+ }
}
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString> {
- shader.info_log().map(DOMString::from)
+ // TODO(nox): https://github.com/servo/servo/issues/21133
+ Some(shader.info_log())
}
#[allow(unsafe_code)]
@@ -2591,43 +2775,55 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
#[allow(unsafe_code)]
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
unsafe fn GetVertexAttrib(&self, cx: *mut JSContext, index: u32, param: u32) -> JSVal {
- if index == 0 && param == constants::CURRENT_VERTEX_ATTRIB {
- rooted!(in(cx) let mut result = UndefinedValue());
- let (x, y, z, w) = self.current_vertex_attrib_0.get();
- let attrib = vec![x, y, z, w];
- attrib.to_jsval(cx, result.handle_mut());
- return result.get()
+ let data = handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.get(index).ok_or(InvalidValue),
+ return NullValue()
+ );
+ if param == constants::CURRENT_VERTEX_ATTRIB {
+ let value = if index == 0 {
+ let (x, y, z, w) = self.current_vertex_attrib_0.get();
+ [x, y, z, w]
+ } else {
+ let (sender, receiver) = webgl_channel().unwrap();
+ self.send_command(WebGLCommand::GetCurrentVertexAttrib(index, sender));
+ receiver.recv().unwrap()
+ };
+ rooted!(in(cx) let mut result = ptr::null_mut::<JSObject>());
+ let _ = Float32Array::create(
+ cx,
+ CreateWith::Slice(&value),
+ result.handle_mut(),
+ ).unwrap();
+ return ObjectValue(result.get());
}
- if param == constants::VERTEX_ATTRIB_ARRAY_BUFFER_BINDING {
- rooted!(in(cx) let mut jsval = NullValue());
- if let Some(buffer) = self.bound_attrib_buffers.get(index) {
- buffer.to_jsval(cx, jsval.handle_mut());
- }
- return jsval.get();
+ if !self.extension_manager.is_get_vertex_attrib_name_enabled(param) {
+ self.webgl_error(WebGLError::InvalidEnum);
+ return NullValue();
}
- match handle_potential_webgl_error!(self, VertexAttrib::from_u32(param), return NullValue()) {
- VertexAttrib::Bool(param) => {
- let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetVertexAttribBool(index, param, sender));
- let value = handle_potential_webgl_error!(self, receiver.recv().unwrap(), return NullValue());
- BooleanValue(value)
+ match param {
+ constants::VERTEX_ATTRIB_ARRAY_ENABLED => BooleanValue(data.enabled_as_array),
+ constants::VERTEX_ATTRIB_ARRAY_SIZE => Int32Value(data.size as i32),
+ constants::VERTEX_ATTRIB_ARRAY_TYPE => Int32Value(data.type_ as i32),
+ constants::VERTEX_ATTRIB_ARRAY_NORMALIZED => BooleanValue(data.normalized),
+ constants::VERTEX_ATTRIB_ARRAY_STRIDE => Int32Value(data.stride as i32),
+ constants::VERTEX_ATTRIB_ARRAY_BUFFER_BINDING => {
+ rooted!(in(cx) let mut jsval = NullValue());
+ if let Some(data) = self.vertex_attribs.get(index) {
+ if let Some(buffer) = data.buffer() {
+ buffer.to_jsval(cx, jsval.handle_mut());
+ }
+ }
+ jsval.get()
}
- VertexAttrib::Int(param) => {
- let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetVertexAttribInt(index, param, sender));
- let value = handle_potential_webgl_error!(self, receiver.recv().unwrap(), return NullValue());
- Int32Value(value)
+ ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE => {
+ Int32Value(data.divisor as i32)
}
- VertexAttrib::Float4(param) => {
- let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetVertexAttribFloat4(index, param, sender));
- let value = handle_potential_webgl_error!(self, receiver.recv().unwrap(), return NullValue());
- // FIXME(nox): https://github.com/servo/servo/issues/20655
- rooted!(in(cx) let mut result = UndefinedValue());
- value.to_jsval(cx, result.handle_mut());
- result.get()
+ _ => {
+ self.webgl_error(InvalidEnum);
+ NullValue()
}
}
}
@@ -2638,10 +2834,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
self.webgl_error(InvalidEnum);
return 0;
}
- let (sender, receiver) = webgl_channel().unwrap();
- self.send_command(WebGLCommand::GetVertexAttribOffset(index, pname, sender));
-
- receiver.recv().unwrap() as i64
+ let data = handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.get(index).ok_or(InvalidValue),
+ return 0
+ );
+ data.offset as i64
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
@@ -2956,12 +3154,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
- fn LinkProgram(&self, program: Option<&WebGLProgram>) {
- if let Some(program) = program {
- if let Err(e) = program.link() {
- self.webgl_error(e);
- }
- }
+ fn LinkProgram(&self, program: &WebGLProgram) {
+ // FIXME(nox): INVALID_OPERATION if program comes from a different context.
+ handle_potential_webgl_error!(self, program.link());
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
@@ -2971,7 +3166,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString> {
- shader.source()
+ // TODO(nox): https://github.com/servo/servo/issues/21133
+ Some(shader.source())
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
@@ -3245,11 +3441,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn UseProgram(&self, program: Option<&WebGLProgram>) {
if let Some(program) = program {
- match program.use_program() {
- Ok(()) => self.current_program.set(Some(program)),
- Err(e) => self.webgl_error(e),
+ if program.is_deleted() || !program.is_linked() {
+ return self.webgl_error(InvalidOperation);
}
}
+ self.send_command(WebGLCommand::UseProgram(program.map(|p| p.id())));
+ self.current_program.set(program);
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
@@ -3328,49 +3525,30 @@ 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 {
- return self.webgl_error(InvalidValue);
- }
-
- // GLES spec: If offset or stride is negative, an INVALID_VALUE error will be generated
- // WebGL spec: the maximum supported stride is 255
- if stride < 0 || stride > 255 || offset < 0 {
- return self.webgl_error(InvalidValue);
- }
- if size < 1 || size > 4 {
- return self.webgl_error(InvalidValue);
- }
-
- let buffer_array = match self.bound_buffer_array.get() {
- Some(buffer) => buffer,
- None => {
- return self.webgl_error(InvalidOperation);
- }
- };
-
- // stride and offset must be multiple of data_type
- match data_type {
- constants::BYTE | constants::UNSIGNED_BYTE => {},
- constants::SHORT | constants::UNSIGNED_SHORT => {
- if offset % 2 > 0 || stride % 2 > 0 {
- return self.webgl_error(InvalidOperation);
- }
- },
- constants::FLOAT => {
- if offset % 4 > 0 || stride % 4 > 0 {
- return self.webgl_error(InvalidOperation);
- }
- },
- _ => return self.webgl_error(InvalidEnum),
-
- }
-
- self.bound_attrib_buffers.bind_buffer(attrib_id, &buffer_array);
+ fn VertexAttribPointer(
+ &self,
+ index: u32,
+ size: i32,
+ type_: u32,
+ normalized: bool,
+ stride: i32,
+ offset: i64,
+ ) {
+ handle_potential_webgl_error!(
+ self,
+ self.vertex_attribs.set_pointer(
+ index,
+ size,
+ type_,
+ normalized,
+ stride,
+ offset,
+ self.bound_buffer_array.get().as_ref().map(|buffer| &**buffer),
+ ),
+ return
+ );
- let msg = WebGLCommand::VertexAttribPointer(attrib_id, size, data_type, normalized, stride, offset as u32);
- self.send_command(msg);
+ self.send_command(WebGLCommand::VertexAttribPointer(index, size, type_, normalized, stride, offset as u32));
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4
@@ -3685,27 +3863,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.7
- fn RenderbufferStorage(&self, target: u32, internal_format: u32,
- width: i32, height: i32) {
- // From the GLES 2.0.25 spec:
- //
- // "target must be RENDERBUFFER."
+ fn RenderbufferStorage(&self, target: u32, internal_format: u32, width: i32, height: i32) {
if target != constants::RENDERBUFFER {
return self.webgl_error(InvalidEnum);
}
- // From the GLES 2.0.25 spec:
- //
- // "If either width or height is greater than the value of
- // MAX_RENDERBUFFER_SIZE , the error INVALID_VALUE is
- // generated."
- //
- // and we have to throw out negative-size values as well just
- // like for TexImage.
- //
- // FIXME: Handle max_renderbuffer_size, which doesn't seem to
- // be in limits.
- if width < 0 || height < 0 {
+ let max = self.limits.max_renderbuffer_size;
+
+ if width < 0 || width as u32 > max || height < 0 || height as u32 > max {
return self.webgl_error(InvalidValue);
}
@@ -3805,48 +3970,195 @@ impl UniformSetterType {
}
}
-#[derive(Default, JSTraceable, MallocSizeOf)]
+#[derive(JSTraceable, MallocSizeOf)]
#[must_root]
-pub struct BoundAttribBuffers {
- elements: DomRefCell<FnvHashMap<u32, (bool, Option<Dom<WebGLBuffer>>)>>,
+pub struct VertexAttribs {
+ attribs: DomRefCell<Box<[VertexAttribData]>>,
}
-impl BoundAttribBuffers {
+impl VertexAttribs {
+ pub fn new(max: u32) -> Self {
+ // High-end GPUs have 16 of those, let's just use a boxed slice.
+ Self { attribs: DomRefCell::new(vec![Default::default(); max as usize].into()) }
+ }
+
pub fn clear(&self) {
- self.elements.borrow_mut().clear()
+ for attrib in &mut **self.attribs.borrow_mut() {
+ *attrib = Default::default();
+ }
}
- pub fn set_from(&self, other: &BoundAttribBuffers) {
- *self.elements.borrow_mut() = other.elements.borrow().clone();
+ pub fn clone_from(&self, other: &Self) {
+ self.attribs.borrow_mut().clone_from_slice(&other.attribs.borrow());
}
- pub fn borrow(&self) -> Ref<FnvHashMap<u32, (bool, Option<Dom<WebGLBuffer>>)>> {
- self.elements.borrow()
+ pub fn set_pointer(
+ &self,
+ index: u32,
+ size: i32,
+ type_: u32,
+ normalized: bool,
+ stride: i32,
+ offset: i64,
+ buffer: Option<&WebGLBuffer>,
+ ) -> WebGLResult<()> {
+ let mut attribs = self.attribs.borrow_mut();
+ let data = attribs.get_mut(index as usize).ok_or(InvalidValue)?;
+
+ if size < 1 || size > 4 {
+ return Err(InvalidValue);
+ }
+
+ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#BUFFER_OFFSET_AND_STRIDE
+ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#VERTEX_STRIDE
+ if stride < 0 || stride > 255 || offset < 0 {
+ return Err(InvalidValue);
+ }
+ let bytes_per_component: i32 = match type_ {
+ constants::BYTE | constants::UNSIGNED_BYTE => 1,
+ constants::SHORT | constants::UNSIGNED_SHORT => 2,
+ constants::FLOAT => 4,
+ _ => return Err(InvalidEnum),
+ };
+ if offset % bytes_per_component as i64 > 0 || stride % bytes_per_component > 0 {
+ return Err(InvalidOperation);
+ }
+
+ let buffer = buffer.ok_or(InvalidOperation)?;
+
+ *data = VertexAttribData {
+ enabled_as_array: data.enabled_as_array,
+ size: size as u8,
+ type_,
+ bytes_per_vertex: size as u8 * bytes_per_component as u8,
+ normalized,
+ stride: stride as u8,
+ offset: offset as u32,
+ buffer: Some(Dom::from_ref(buffer)),
+ divisor: data.divisor,
+ };
+ Ok(())
}
- fn remove_buffer(&self, buffer: &WebGLBuffer) {
- self.elements.borrow_mut().retain(|_, v| {
- v.1.as_ref().map_or(true, |b| b.id() != buffer.id())
- })
+ pub fn borrow(&self) -> Ref<[VertexAttribData]> {
+ Ref::map(self.attribs.borrow(), |attribs| &**attribs)
}
- fn get(&self, index: u32) -> Option<Ref<WebGLBuffer>> {
- ref_filter_map(self.elements.borrow(), |elements| {
- elements.get(&index).and_then(|&(_, ref buffer)| {
- buffer.as_ref().map(|b| &**b)
- })
- })
+ fn delete_buffer(&self, buffer: &WebGLBuffer) {
+ for attrib in &mut **self.attribs.borrow_mut() {
+ if attrib.buffer().map_or(false, |b| b.id() == buffer.id()) {
+ attrib.buffer = None;
+ }
+ }
+ }
+
+ fn get(&self, index: u32) -> Option<Ref<VertexAttribData>> {
+ ref_filter_map(self.attribs.borrow(), |attribs| attribs.get(index as usize))
+ }
+
+ fn enabled_as_array(&self, index: u32, value: bool) {
+ self.attribs.borrow_mut()[index as usize].enabled_as_array = value;
+ }
+
+ fn set_divisor(&self, index: u32, value: u32) {
+ self.attribs.borrow_mut()[index as usize].divisor = value;
+ }
+
+ fn validate_for_draw(
+ &self,
+ required_len: u32,
+ instance_count: u32,
+ active_attribs: &[ActiveAttribInfo],
+ ) -> WebGLResult<()> {
+ // TODO(nox): Cache limits per VAO.
+ let attribs = self.attribs.borrow();
+ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
+ if attribs.iter().any(|data| data.enabled_as_array && data.buffer.is_none()) {
+ return Err(InvalidOperation);
+ }
+ let mut has_active_attrib = false;
+ let mut has_divisor_0 = false;
+ for active_info in active_attribs {
+ if active_info.location < 0 {
+ continue;
+ }
+ has_active_attrib = true;
+ let attrib = &attribs[active_info.location as usize];
+ if attrib.divisor == 0 {
+ has_divisor_0 = true;
+ }
+ if !attrib.enabled_as_array {
+ continue;
+ }
+ // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.6
+ if required_len > 0 && instance_count > 0 {
+ let max_vertices = attrib.max_vertices();
+ if attrib.divisor == 0 {
+ if max_vertices < required_len {
+ return Err(InvalidOperation);
+ }
+ } else if max_vertices.checked_mul(attrib.divisor).map_or(false, |v| v < instance_count) {
+ return Err(InvalidOperation);
+ }
+ }
+ }
+ if has_active_attrib && !has_divisor_0 {
+ return Err(InvalidOperation);
+ }
+ Ok(())
+ }
+}
+
+#[derive(Clone, JSTraceable, MallocSizeOf)]
+#[must_root]
+pub struct VertexAttribData {
+ enabled_as_array: bool,
+ size: u8,
+ type_: u32,
+ bytes_per_vertex: u8,
+ normalized: bool,
+ stride: u8,
+ offset: u32,
+ buffer: Option<Dom<WebGLBuffer>>,
+ divisor: u32,
+}
+
+impl Default for VertexAttribData {
+ #[allow(unrooted_must_root)]
+ fn default() -> Self {
+ Self {
+ enabled_as_array: false,
+ size: 4,
+ type_: constants::FLOAT,
+ bytes_per_vertex: 16,
+ normalized: false,
+ stride: 0,
+ offset: 0,
+ buffer: None,
+ divisor: 0,
+ }
}
+}
- fn enabled(&self, index: u32, value: bool) {
- let mut elements = self.elements.borrow_mut();
- let pair = elements.entry(index).or_insert((false, None));
- pair.0 = value;
+impl VertexAttribData {
+ pub fn buffer(&self) -> Option<&WebGLBuffer> {
+ self.buffer.as_ref().map(|b| &**b)
}
- fn bind_buffer(&self, index: u32, buffer: &WebGLBuffer) {
- let mut elements = self.elements.borrow_mut();
- let pair = elements.entry(index).or_insert((false, None));
- pair.1 = Some(Dom::from_ref(buffer));
+ fn max_vertices(&self) -> u32 {
+ let capacity = (self.buffer().unwrap().capacity() as u32).saturating_sub(self.offset);
+ if capacity < self.bytes_per_vertex as u32 {
+ 0
+ } else if self.stride == 0 {
+ capacity / self.bytes_per_vertex as u32
+ } else if self.stride < self.bytes_per_vertex {
+ (capacity - (self.bytes_per_vertex - self.stride) as u32) / self.stride as u32
+ } else {
+ let mut max = capacity / self.stride as u32;
+ if capacity % self.stride as u32 >= self.bytes_per_vertex as u32 {
+ max += 1;
+ }
+ max
+ }
}
}
diff --git a/components/script/dom/webglshader.rs b/components/script/dom/webglshader.rs
index 0ec5c262803..1feb73d2d3a 100644
--- a/components/script/dom/webglshader.rs
+++ b/components/script/dom/webglshader.rs
@@ -18,7 +18,9 @@ use dom::webglobject::WebGLObject;
use dom::window::Window;
use dom_struct::dom_struct;
use mozangle::shaders::{BuiltInResources, Output, ShaderValidator};
+use offscreen_gl_context::GLLimits;
use std::cell::Cell;
+use std::os::raw::c_int;
use std::sync::{ONCE_INIT, Once};
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)]
@@ -33,8 +35,8 @@ pub struct WebGLShader {
webgl_object: WebGLObject,
id: WebGLShaderId,
gl_type: u32,
- source: DomRefCell<Option<DOMString>>,
- info_log: DomRefCell<Option<String>>,
+ source: DomRefCell<DOMString>,
+ info_log: DomRefCell<DOMString>,
is_deleted: Cell<bool>,
attached_counter: Cell<u32>,
compilation_status: Cell<ShaderCompilationStatus>,
@@ -54,8 +56,8 @@ impl WebGLShader {
webgl_object: WebGLObject::new_inherited(),
id: id,
gl_type: shader_type,
- source: DomRefCell::new(None),
- info_log: DomRefCell::new(None),
+ source: Default::default(),
+ info_log: Default::default(),
is_deleted: Cell::new(false),
attached_counter: Cell::new(0),
compilation_status: Cell::new(ShaderCompilationStatus::NotCompiled),
@@ -100,6 +102,7 @@ impl WebGLShader {
&self,
webgl_version: WebGLVersion,
glsl_version: WebGLSLVersion,
+ limits: &GLLimits,
ext: &WebGLExtensions,
) -> WebGLResult<()> {
if self.is_deleted.get() && !self.is_attached() {
@@ -110,15 +113,20 @@ impl WebGLShader {
}
let source = self.source.borrow();
- let source = match source.as_ref() {
- Some(source) => source,
- None => return Ok(()),
- };
- let mut params = BuiltInResources::default();
- params.FragmentPrecisionHigh = 1;
- params.OES_standard_derivatives = ext.is_enabled::<OESStandardDerivatives>() as i32;
- params.EXT_shader_texture_lod = ext.is_enabled::<EXTShaderTextureLod>() as i32;
+ let params = BuiltInResources {
+ MaxVertexAttribs: limits.max_vertex_attribs as c_int,
+ MaxVertexUniformVectors: limits.max_vertex_uniform_vectors as c_int,
+ MaxVaryingVectors: limits.max_varying_vectors as c_int,
+ MaxVertexTextureImageUnits: limits.max_vertex_texture_image_units as c_int,
+ MaxCombinedTextureImageUnits: limits.max_combined_texture_image_units as c_int,
+ MaxTextureImageUnits: limits.max_texture_image_units as c_int,
+ MaxFragmentUniformVectors: limits.max_fragment_uniform_vectors as c_int,
+ OES_standard_derivatives: ext.is_enabled::<OESStandardDerivatives>() as c_int,
+ EXT_shader_texture_lod: ext.is_enabled::<EXTShaderTextureLod>() as c_int,
+ FragmentPrecisionHigh: 1,
+ ..BuiltInResources::default()
+ };
let validator = match webgl_version {
WebGLVersion::WebGL1 => {
let output_format = if cfg!(any(target_os = "android", target_os = "ios")) {
@@ -154,7 +162,7 @@ impl WebGLShader {
},
};
- match validator.compile_and_translate(&[source]) {
+ match validator.compile_and_translate(&[&source]) {
Ok(translated_source) => {
debug!("Shader translated: {}", translated_source);
// NOTE: At this point we should be pretty sure that the compilation in the paint thread
@@ -170,7 +178,7 @@ impl WebGLShader {
},
}
- *self.info_log.borrow_mut() = Some(validator.info_log());
+ *self.info_log.borrow_mut() = validator.info_log().into();
// TODO(emilio): More data (like uniform data) should be collected
// here to properly validate uniforms.
@@ -208,18 +216,18 @@ impl WebGLShader {
}
/// glGetShaderInfoLog
- pub fn info_log(&self) -> Option<String> {
+ pub fn info_log(&self) -> DOMString {
self.info_log.borrow().clone()
}
/// Get the shader source
- pub fn source(&self) -> Option<DOMString> {
+ pub fn source(&self) -> DOMString {
self.source.borrow().clone()
}
/// glShaderSource
pub fn set_source(&self, source: DOMString) {
- *self.source.borrow_mut() = Some(source);
+ *self.source.borrow_mut() = source;
}
pub fn successfully_compiled(&self) -> bool {
diff --git a/components/script/dom/webglvertexarrayobjectoes.rs b/components/script/dom/webglvertexarrayobjectoes.rs
index 49babf3095d..883559f8ac2 100644
--- a/components/script/dom/webglvertexarrayobjectoes.rs
+++ b/components/script/dom/webglvertexarrayobjectoes.rs
@@ -9,7 +9,7 @@ use dom::bindings::root::{DomRoot, MutNullableDom};
use dom::globalscope::GlobalScope;
use dom::webglbuffer::WebGLBuffer;
use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::BoundAttribBuffers;
+use dom::webglrenderingcontext::VertexAttribs;
use dom_struct::dom_struct;
use std::cell::Cell;
@@ -19,30 +19,36 @@ pub struct WebGLVertexArrayObjectOES {
id: WebGLVertexArrayId,
ever_bound: Cell<bool>,
is_deleted: Cell<bool>,
- bound_attrib_buffers: BoundAttribBuffers,
+ vertex_attribs: VertexAttribs,
bound_buffer_element_array: MutNullableDom<WebGLBuffer>,
}
impl WebGLVertexArrayObjectOES {
- fn new_inherited(id: WebGLVertexArrayId) -> WebGLVertexArrayObjectOES {
+ fn new_inherited(id: WebGLVertexArrayId, max_vertex_attribs: u32) -> Self {
Self {
webgl_object_: WebGLObject::new_inherited(),
id: id,
ever_bound: Cell::new(false),
is_deleted: Cell::new(false),
- bound_attrib_buffers: Default::default(),
+ vertex_attribs: VertexAttribs::new(max_vertex_attribs),
bound_buffer_element_array: MutNullableDom::new(None),
}
}
- pub fn new(global: &GlobalScope, id: WebGLVertexArrayId) -> DomRoot<WebGLVertexArrayObjectOES> {
- reflect_dom_object(Box::new(WebGLVertexArrayObjectOES::new_inherited(id)),
- global,
- WebGLVertexArrayObjectOESBinding::Wrap)
+ pub fn new(
+ global: &GlobalScope,
+ id: WebGLVertexArrayId,
+ max_vertex_attribs: u32,
+ ) -> DomRoot<Self> {
+ reflect_dom_object(
+ Box::new(WebGLVertexArrayObjectOES::new_inherited(id, max_vertex_attribs)),
+ global,
+ WebGLVertexArrayObjectOESBinding::Wrap,
+ )
}
- pub fn bound_attrib_buffers(&self) -> &BoundAttribBuffers {
- &self.bound_attrib_buffers
+ pub fn vertex_attribs(&self) -> &VertexAttribs {
+ &self.vertex_attribs
}
pub fn id(&self) -> WebGLVertexArrayId {
diff --git a/components/script/dom/webidls/ANGLEInstancedArrays.webidl b/components/script/dom/webidls/ANGLEInstancedArrays.webidl
new file mode 100644
index 00000000000..a4ae955826a
--- /dev/null
+++ b/components/script/dom/webidls/ANGLEInstancedArrays.webidl
@@ -0,0 +1,15 @@
+/* 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/. */
+/*
+ * WebGL IDL definitions from the Khronos specification:
+ * https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
+ */
+
+[NoInterfaceObject]
+interface ANGLEInstancedArrays {
+ const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
+ void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+ void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
+ void vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+};
diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl
index 49377cd1044..2841f3e9016 100644
--- a/components/script/dom/webidls/CSSStyleDeclaration.webidl
+++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl
@@ -350,6 +350,14 @@ partial interface CSSStyleDeclaration {
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString offsetInlineStart;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString offset-inline-end;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString offsetInlineEnd;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString inset-block-start;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString insetBlockStart;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString inset-block-end;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString insetBlockEnd;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString inset-inline-start;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString insetInlineStart;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString inset-inline-end;
+ [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString insetInlineEnd;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString height;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString minHeight;
diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl
index 76b04e277ea..b14711d107e 100644
--- a/components/script/dom/webidls/WebGL2RenderingContext.webidl
+++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl
@@ -502,9 +502,9 @@ interface WebGL2RenderingContextBase
// void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
/* Writing to the drawing buffer */
- // void vertexAttribDivisor(GLuint index, GLuint divisor);
- // void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
- // void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
+ void vertexAttribDivisor(GLuint index, GLuint divisor);
+ void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
+ void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
// void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
/* Reading back pixels */
diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl
index 8ec02ce95ea..82769410062 100644
--- a/components/script/dom/webidls/WebGLRenderingContext.webidl
+++ b/components/script/dom/webidls/WebGLRenderingContext.webidl
@@ -597,7 +597,7 @@ interface WebGLRenderingContextBase
[WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader);
[WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture);
void lineWidth(GLfloat width);
- void linkProgram(WebGLProgram? program);
+ void linkProgram(WebGLProgram program);
void pixelStorei(GLenum pname, GLint param);
void polygonOffset(GLfloat factor, GLfloat units);
diff --git a/components/script/test.rs b/components/script/test.rs
index 351c3447688..b907404da0b 100644
--- a/components/script/test.rs
+++ b/components/script/test.rs
@@ -15,10 +15,6 @@ pub mod area {
pub use dom::htmlareaelement::{Area, Shape};
}
-pub mod sizes {
- pub use dom::htmlimageelement::{parse_a_sizes_attribute, Size};
-}
-
pub mod size_of {
use dom::characterdata::CharacterData;
use dom::element::Element;
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml
index 4af1f6237c8..f06ed32526e 100644
--- a/components/script_layout_interface/Cargo.toml
+++ b/components/script_layout_interface/Cargo.toml
@@ -13,7 +13,7 @@ path = "lib.rs"
app_units = "0.6"
atomic_refcell = "0.1"
canvas_traits = {path = "../canvas_traits"}
-cssparser = "0.23.0"
+cssparser = "0.24"
euclid = "0.17"
gfx_traits = {path = "../gfx_traits"}
html5ever = "0.22"
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index 6277b309c0c..29e74940536 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -7,7 +7,7 @@ use rustc::hir::intravisit as visit;
use rustc::hir::map as ast_map;
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
use rustc::ty;
-use syntax::{ast, codemap};
+use syntax::{ast, codemap, symbol::Ident};
use utils::{match_def_path, in_derive_expn};
declare_lint!(UNROOTED_MUST_ROOT, Deny,
@@ -52,6 +52,7 @@ fn is_unrooted_ty(cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool
} else if match_def_path(cx, did.did, &["core", "cell", "Ref"])
|| match_def_path(cx, did.did, &["core", "cell", "RefMut"])
|| match_def_path(cx, did.did, &["core", "slice", "Iter"])
+ || match_def_path(cx, did.did, &["core", "slice", "IterMut"])
|| match_def_path(cx, did.did, &["std", "collections", "hash", "map", "Entry"])
|| match_def_path(cx, did.did, &["std", "collections", "hash", "map", "OccupiedEntry"])
|| match_def_path(cx, did.did, &["std", "collections", "hash", "map", "VacantEntry"])
@@ -132,8 +133,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
span: codemap::Span,
id: ast::NodeId) {
let in_new_function = match kind {
- visit::FnKind::ItemFn(n, _, _, _, _, _, _) |
- visit::FnKind::Method(n, _, _, _) => {
+ visit::FnKind::ItemFn(n, _, _, _, _) |
+ visit::FnKind::Method(Ident { name: n, .. }, _, _, _) => {
&*n.as_str() == "new" || n.as_str().starts_with("new_")
}
visit::FnKind::Closure(_) => return,
diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs
index 9199e5b083b..92797f81430 100644
--- a/components/script_plugins/utils.rs
+++ b/components/script_plugins/utils.rs
@@ -30,7 +30,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool {
pub fn in_derive_expn(span: Span) -> bool {
if let Some(i) = span.ctxt().outer().expn_info() {
- if let ExpnFormat::MacroAttribute(n) = i.callee.format {
+ if let ExpnFormat::MacroAttribute(n) = i.format {
n.as_str().contains("derive")
} else {
false
diff --git a/components/selectors/Cargo.toml b/components/selectors/Cargo.toml
index ee38f2ef276..19adcdd1578 100644
--- a/components/selectors/Cargo.toml
+++ b/components/selectors/Cargo.toml
@@ -22,7 +22,7 @@ bench = []
[dependencies]
bitflags = "1.0"
matches = "0.1"
-cssparser = "0.23.0"
+cssparser = "0.24.0"
log = "0.4"
fnv = "1.0"
phf = "0.7.18"
diff --git a/components/selectors/builder.rs b/components/selectors/builder.rs
index 0be3eb90e0c..29ac822fa03 100644
--- a/components/selectors/builder.rs
+++ b/components/selectors/builder.rs
@@ -23,7 +23,7 @@ use sink::Push;
use smallvec::{self, SmallVec};
use std::cmp;
use std::iter;
-use std::ops::Add;
+use std::ops::{AddAssign, Add};
use std::ptr;
use std::slice;
@@ -228,6 +228,16 @@ struct Specificity {
element_selectors: u32,
}
+
+impl AddAssign for Specificity {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ self.id_selectors += rhs.id_selectors;
+ self.class_like_selectors += rhs.class_like_selectors;
+ self.element_selectors += rhs.element_selectors;
+ }
+}
+
impl Add for Specificity {
type Output = Specificity;
@@ -251,6 +261,7 @@ impl Default for Specificity {
}
impl From<u32> for Specificity {
+ #[inline]
fn from(value: u32) -> Specificity {
assert!(value <= MAX_10BIT << 20 | MAX_10BIT << 10 | MAX_10BIT);
Specificity {
@@ -262,6 +273,7 @@ impl From<u32> for Specificity {
}
impl From<Specificity> for u32 {
+ #[inline]
fn from(specificity: Specificity) -> u32 {
cmp::min(specificity.id_selectors, MAX_10BIT) << 20 |
cmp::min(specificity.class_like_selectors, MAX_10BIT) << 10 |
@@ -298,17 +310,29 @@ where
builder,
);
}
- // FIXME(emilio): Spec doesn't define any particular specificity for
- // ::slotted(), so apply the general rule for pseudos per:
- //
- // https://github.com/w3c/csswg-drafts/issues/1915
- //
- // Though other engines compute it dynamically, so maybe we should
- // do that instead, eventually.
- Component::Slotted(..) | Component::PseudoElement(..) | Component::LocalName(..) => {
+ Component::PseudoElement(..) | Component::LocalName(..) => {
specificity.element_selectors += 1
},
- Component::ID(..) => specificity.id_selectors += 1,
+ Component::Slotted(ref selector) => {
+ specificity.element_selectors += 1;
+ // Note that due to the way ::slotted works we only compete with
+ // other ::slotted rules, so the above rule doesn't really
+ // matter, but we do it still for consistency with other
+ // pseudo-elements.
+ //
+ // See: https://github.com/w3c/csswg-drafts/issues/1915
+ *specificity += Specificity::from(selector.specificity());
+ },
+ Component::Host(ref selector) => {
+ specificity.class_like_selectors += 1;
+ if let Some(ref selector) = *selector {
+ // See: https://github.com/w3c/csswg-drafts/issues/1915
+ *specificity += Specificity::from(selector.specificity());
+ }
+ }
+ Component::ID(..) => {
+ specificity.id_selectors += 1;
+ },
Component::Class(..) |
Component::AttributeInNoNamespace { .. } |
Component::AttributeInNoNamespaceExists { .. } |
@@ -319,7 +343,6 @@ where
Component::Root |
Component::Empty |
Component::Scope |
- Component::Host(..) |
Component::NthChild(..) |
Component::NthLastChild(..) |
Component::NthOfType(..) |
@@ -327,7 +350,9 @@ where
Component::FirstOfType |
Component::LastOfType |
Component::OnlyOfType |
- Component::NonTSPseudoClass(..) => specificity.class_like_selectors += 1,
+ Component::NonTSPseudoClass(..) => {
+ specificity.class_like_selectors += 1;
+ },
Component::ExplicitUniversalType |
Component::ExplicitAnyNamespace |
Component::ExplicitNoNamespace |
diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs
index c3591ff2727..7c4812cb963 100644
--- a/components/selectors/matching.rs
+++ b/components/selectors/matching.rs
@@ -576,7 +576,7 @@ where
_ => {},
}
- if element.is_link() || combinator.is_sibling() {
+ if element.is_link() {
visited_handling = VisitedHandlingMode::AllLinksUnvisited;
}
diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs
index 3210f1085b0..399f21e6361 100644
--- a/components/selectors/parser.rs
+++ b/components/selectors/parser.rs
@@ -995,8 +995,7 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
let mut combinators = self.iter_raw_match_order()
.rev()
- .filter(|x| x.is_combinator())
- .peekable();
+ .filter_map(|x| x.as_combinator());
let compound_selectors = self.iter_raw_match_order()
.as_slice()
.split(|x| x.is_combinator())
@@ -1007,72 +1006,74 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
debug_assert!(!combinators_exhausted);
// https://drafts.csswg.org/cssom/#serializing-selectors
+ if compound.is_empty() {
+ continue;
+ }
- if !compound.is_empty() {
- // 1. If there is only one simple selector in the compound selectors
- // which is a universal selector, append the result of
- // serializing the universal selector to s.
- //
- // Check if `!compound.empty()` first--this can happen if we have
- // something like `... > ::before`, because we store `>` and `::`
- // both as combinators internally.
- //
- // If we are in this case, after we have serialized the universal
- // selector, we skip Step 2 and continue with the algorithm.
- let (can_elide_namespace, first_non_namespace) = match &compound[0] {
- &Component::ExplicitAnyNamespace |
- &Component::ExplicitNoNamespace |
- &Component::Namespace(_, _) => (false, 1),
- &Component::DefaultNamespace(_) => (true, 1),
- _ => (true, 0),
- };
- let mut perform_step_2 = true;
- if first_non_namespace == compound.len() - 1 {
- match (combinators.peek(), &compound[first_non_namespace]) {
- // We have to be careful here, because if there is a
- // pseudo element "combinator" there isn't really just
- // the one simple selector. Technically this compound
- // selector contains the pseudo element selector as well
- // -- Combinator::PseudoElement, just like
- // Combinator::SlotAssignment, don't exist in the
- // spec.
- (Some(&&Component::Combinator(Combinator::PseudoElement)), _) |
- (Some(&&Component::Combinator(Combinator::SlotAssignment)), _) => (),
- (_, &Component::ExplicitUniversalType) => {
- // Iterate over everything so we serialize the namespace
- // too.
- for simple in compound.iter() {
- simple.to_css(dest)?;
- }
- // Skip step 2, which is an "otherwise".
- perform_step_2 = false;
- },
- (_, _) => (),
- }
+ // 1. If there is only one simple selector in the compound selectors
+ // which is a universal selector, append the result of
+ // serializing the universal selector to s.
+ //
+ // Check if `!compound.empty()` first--this can happen if we have
+ // something like `... > ::before`, because we store `>` and `::`
+ // both as combinators internally.
+ //
+ // If we are in this case, after we have serialized the universal
+ // selector, we skip Step 2 and continue with the algorithm.
+ let (can_elide_namespace, first_non_namespace) = match compound[0] {
+ Component::ExplicitAnyNamespace |
+ Component::ExplicitNoNamespace |
+ Component::Namespace(..) => (false, 1),
+ Component::DefaultNamespace(..) => (true, 1),
+ _ => (true, 0),
+ };
+ let mut perform_step_2 = true;
+ let next_combinator = combinators.next();
+ if first_non_namespace == compound.len() - 1 {
+ match (next_combinator, &compound[first_non_namespace]) {
+ // We have to be careful here, because if there is a
+ // pseudo element "combinator" there isn't really just
+ // the one simple selector. Technically this compound
+ // selector contains the pseudo element selector as well
+ // -- Combinator::PseudoElement, just like
+ // Combinator::SlotAssignment, don't exist in the
+ // spec.
+ (Some(Combinator::PseudoElement), _) |
+ (Some(Combinator::SlotAssignment), _) => (),
+ (_, &Component::ExplicitUniversalType) => {
+ // Iterate over everything so we serialize the namespace
+ // too.
+ for simple in compound.iter() {
+ simple.to_css(dest)?;
+ }
+ // Skip step 2, which is an "otherwise".
+ perform_step_2 = false;
+ },
+ _ => (),
}
+ }
- // 2. Otherwise, for each simple selector in the compound selectors
- // that is not a universal selector of which the namespace prefix
- // maps to a namespace that is not the default namespace
- // serialize the simple selector and append the result to s.
- //
- // See https://github.com/w3c/csswg-drafts/issues/1606, which is
- // proposing to change this to match up with the behavior asserted
- // in cssom/serialize-namespaced-type-selectors.html, which the
- // following code tries to match.
- if perform_step_2 {
- for simple in compound.iter() {
- if let Component::ExplicitUniversalType = *simple {
- // Can't have a namespace followed by a pseudo-element
- // selector followed by a universal selector in the same
- // compound selector, so we don't have to worry about the
- // real namespace being in a different `compound`.
- if can_elide_namespace {
- continue;
- }
+ // 2. Otherwise, for each simple selector in the compound selectors
+ // that is not a universal selector of which the namespace prefix
+ // maps to a namespace that is not the default namespace
+ // serialize the simple selector and append the result to s.
+ //
+ // See https://github.com/w3c/csswg-drafts/issues/1606, which is
+ // proposing to change this to match up with the behavior asserted
+ // in cssom/serialize-namespaced-type-selectors.html, which the
+ // following code tries to match.
+ if perform_step_2 {
+ for simple in compound.iter() {
+ if let Component::ExplicitUniversalType = *simple {
+ // Can't have a namespace followed by a pseudo-element
+ // selector followed by a universal selector in the same
+ // compound selector, so we don't have to worry about the
+ // real namespace being in a different `compound`.
+ if can_elide_namespace {
+ continue;
}
- simple.to_css(dest)?;
}
+ simple.to_css(dest)?;
}
}
@@ -1081,7 +1082,7 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
// ">", "+", "~", ">>", "||", as appropriate, followed by another
// single SPACE (U+0020) if the combinator was not whitespace, to
// s.
- match combinators.next() {
+ match next_combinator {
Some(c) => c.to_css(dest)?,
None => combinators_exhausted = true,
};
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index 4fb50d8ad85..33319ae5e36 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -31,7 +31,7 @@ atomic_refcell = "0.1"
bitflags = "1.0"
byteorder = "1.0"
cfg-if = "0.1.0"
-cssparser = "0.23.0"
+cssparser = "0.24.0"
new_debug_unreachable = "1.0"
encoding_rs = {version = "0.7", optional = true}
euclid = "0.17"
@@ -77,7 +77,7 @@ kernel32-sys = "0.2"
[build-dependencies]
lazy_static = "1"
log = "0.4"
-bindgen = { version = "0.36", optional = true, default-features = false }
-regex = {version = "0.2", optional = true}
+bindgen = { version = "0.37", optional = true, default-features = false }
+regex = {version = "1.0", optional = true}
walkdir = "2.1.4"
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 95bb1622942..68d160ab5e0 100644
--- a/components/style/build_gecko.rs
+++ b/components/style/build_gecko.rs
@@ -182,14 +182,21 @@ mod bindings {
// Disable rust unions, because we replace some types inside of
// them.
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").or_else(|| env::var_os("MOZ_SRC")))
- .map(PathBuf::from);
- builder = match rustfmt_path {
- Some(path) => builder.with_rustfmt(path.join("rustc").join("bin").join("rustfmt")),
- None => builder.rustfmt_bindings(env::var_os("STYLO_RUSTFMT_BINDINGS").is_some()),
- };
+ let rustfmt_path = env::var_os("RUSTFMT")
+ // This can be replaced with
+ // > .filter(|p| !p.is_empty()).map(PathBuf::from)
+ // once we can use 1.27+.
+ .and_then(|p| {
+ if p.is_empty() {
+ None
+ } else {
+ Some(PathBuf::from(p))
+ }
+ });
+ if let Some(path) = rustfmt_path {
+ builder = builder.with_rustfmt(path);
+ }
for dir in SEARCH_PATHS.iter() {
builder = builder.clang_arg("-I").clang_arg(dir.to_str().unwrap());
diff --git a/components/style/element_state.rs b/components/style/element_state.rs
index 0960ca3d4e1..1652dee672f 100644
--- a/components/style/element_state.rs
+++ b/components/style/element_state.rs
@@ -71,7 +71,8 @@ bitflags! {
const IN_OPTIONAL_STATE = 1 << 22;
/// <https://html.spec.whatwg.org/multipage/#selector-read-write>
const IN_READ_WRITE_STATE = 1 << 22;
- /// There is a free bit at 23.
+ /// <https://html.spec.whatwg.org/multipage/#selector-defined>
+ const IN_DEFINED_STATE = 1 << 23;
/// <https://html.spec.whatwg.org/multipage/#selector-visited>
const IN_VISITED_STATE = 1 << 24;
/// <https://html.spec.whatwg.org/multipage/#selector-link>
diff --git a/components/style/gecko/global_style_data.rs b/components/style/gecko/global_style_data.rs
index f1cb107dff0..6671de9867d 100644
--- a/components/style/gecko/global_style_data.rs
+++ b/components/style/gecko/global_style_data.rs
@@ -65,7 +65,12 @@ lazy_static! {
.map(|s| s.parse::<usize>().expect("invalid STYLO_THREADS value"));
let mut num_threads = match stylo_threads {
Ok(num) => num,
- _ => cmp::max(num_cpus::get() * 3 / 4, 1),
+ // The default heuristic is num_virtual_cores * .75. This gives us
+ // three threads on a hyper-threaded dual core, and six threads on
+ // a hyper-threaded quad core. The performance benefit of additional
+ // threads seems to level off at around six, so we cap it there on
+ // many-core machines (see bug 1431285 comment 14).
+ _ => cmp::min(cmp::max(num_cpus::get() * 3 / 4, 1), 6),
};
// If num_threads is one, there's no point in creating a thread pool, so
diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs
index 771f4570b47..9c5ef4d71a1 100644
--- a/components/style/gecko/media_queries.rs
+++ b/components/style/gecko/media_queries.rs
@@ -7,7 +7,7 @@
use app_units::AU_PER_PX;
use app_units::Au;
use context::QuirksMode;
-use cssparser::{BasicParseErrorKind, Parser, RGBA};
+use cssparser::{Parser, RGBA, Token};
use euclid::Size2D;
use euclid::TypedScale;
use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
@@ -255,20 +255,53 @@ pub enum Range {
Min,
/// At most the specified value.
Max,
- /// Exactly the specified value.
+}
+
+/// The operator that was specified in this media feature.
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq)]
+enum Operator {
Equal,
+ GreaterThan,
+ GreaterThanEqual,
+ LessThan,
+ LessThanEqual,
+}
+
+impl ToCss for Operator {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: fmt::Write,
+ {
+ dest.write_str(match *self {
+ Operator::Equal => "=",
+ Operator::LessThan => "<",
+ Operator::LessThanEqual => "<=",
+ Operator::GreaterThan => ">",
+ Operator::GreaterThanEqual => ">=",
+ })
+ }
}
-/// A expression for gecko contains a reference to the media feature, the value
-/// the media query contained, and the range to evaluate.
+/// Either a `Range` or an `Operator`.
+///
+/// Ranged media features are not allowed with operations (that'd make no
+/// sense).
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq)]
+enum RangeOrOperator {
+ Range(Range),
+ Operator(Operator),
+}
+
+/// A feature expression for gecko contains a reference to the media feature,
+/// the value the media query contained, and the range to evaluate.
#[derive(Clone, Debug, MallocSizeOf)]
-pub struct Expression {
+pub struct MediaFeatureExpression {
feature: &'static nsMediaFeature,
value: Option<MediaExpressionValue>,
- range: Range,
+ range_or_operator: Option<RangeOrOperator>,
}
-impl ToCss for Expression {
+impl ToCss for MediaFeatureExpression {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: fmt::Write,
@@ -279,10 +312,12 @@ impl ToCss for Expression {
{
dest.write_str("-webkit-")?;
}
- match self.range {
- Range::Min => dest.write_str("min-")?,
- Range::Max => dest.write_str("max-")?,
- Range::Equal => {},
+
+ if let Some(RangeOrOperator::Range(range)) = self.range_or_operator {
+ match range {
+ Range::Min => dest.write_str("min-")?,
+ Range::Max => dest.write_str("max-")?,
+ }
}
// NB: CssStringWriter not needed, feature names are under control.
@@ -290,8 +325,15 @@ impl ToCss for Expression {
Atom::from_static(*self.feature.mName)
})?;
- if let Some(ref val) = self.value {
+ if let Some(RangeOrOperator::Operator(op)) = self.range_or_operator {
+ dest.write_char(' ')?;
+ op.to_css(dest)?;
+ dest.write_char(' ')?;
+ } else if self.value.is_some() {
dest.write_str(": ")?;
+ }
+
+ if let Some(ref val) = self.value {
val.to_css(dest, self)?;
}
@@ -299,10 +341,10 @@ impl ToCss for Expression {
}
}
-impl PartialEq for Expression {
- fn eq(&self, other: &Expression) -> bool {
+impl PartialEq for MediaFeatureExpression {
+ fn eq(&self, other: &Self) -> bool {
self.feature.mName == other.feature.mName && self.value == other.value &&
- self.range == other.range
+ self.range_or_operator == other.range_or_operator
}
}
@@ -337,7 +379,10 @@ pub enum MediaExpressionValue {
}
impl MediaExpressionValue {
- fn from_css_value(for_expr: &Expression, css_value: &nsCSSValue) -> Option<Self> {
+ fn from_css_value(
+ for_expr: &MediaFeatureExpression,
+ css_value: &nsCSSValue,
+ ) -> Option<Self> {
// NB: If there's a null value, that means that we don't support the
// feature.
if css_value.mUnit == nsCSSUnit::eCSSUnit_Null {
@@ -395,7 +440,7 @@ impl MediaExpressionValue {
}
impl MediaExpressionValue {
- fn to_css<W>(&self, dest: &mut CssWriter<W>, for_expr: &Expression) -> fmt::Result
+ fn to_css<W>(&self, dest: &mut CssWriter<W>, for_expr: &MediaFeatureExpression) -> fmt::Result
where
W: fmt::Write,
{
@@ -537,17 +582,53 @@ fn parse_feature_value<'i, 't>(
Ok(value)
}
-impl Expression {
+/// Consumes an operation or a colon, or returns an error.
+fn consume_operation_or_colon(
+ input: &mut Parser,
+) -> Result<Option<Operator>, ()> {
+ let first_delim = {
+ let next_token = match input.next() {
+ Ok(t) => t,
+ Err(..) => return Err(()),
+ };
+
+ match *next_token {
+ Token::Colon => return Ok(None),
+ Token::Delim(oper) => oper,
+ _ => return Err(()),
+ }
+ };
+ Ok(Some(match first_delim {
+ '=' => Operator::Equal,
+ '>' => {
+ if input.try(|i| i.expect_delim('=')).is_ok() {
+ Operator::GreaterThanEqual
+ } else {
+ Operator::GreaterThan
+ }
+ }
+ '<' => {
+ if input.try(|i| i.expect_delim('=')).is_ok() {
+ Operator::LessThanEqual
+ } else {
+ Operator::LessThan
+ }
+ }
+ _ => return Err(()),
+ }))
+}
+
+impl MediaFeatureExpression {
/// Trivially construct a new expression.
fn new(
feature: &'static nsMediaFeature,
value: Option<MediaExpressionValue>,
- range: Range,
+ range_or_operator: Option<RangeOrOperator>,
) -> Self {
Self {
feature,
value,
- range,
+ range_or_operator,
}
}
@@ -560,116 +641,145 @@ impl Expression {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
- input.expect_parenthesis_block().map_err(|err| {
- err.location.new_custom_error(match err.kind {
- BasicParseErrorKind::UnexpectedToken(t) => {
- StyleParseErrorKind::ExpectedIdentifier(t)
- },
- _ => StyleParseErrorKind::UnspecifiedError,
- })
- })?;
-
+ input.expect_parenthesis_block()?;
input.parse_nested_block(|input| {
- // FIXME: remove extra indented block when lifetimes are non-lexical
- let feature;
- let range;
- {
- let location = input.current_source_location();
- let ident = input.expect_ident().map_err(|err| {
- err.location.new_custom_error(match err.kind {
- BasicParseErrorKind::UnexpectedToken(t) => {
- StyleParseErrorKind::ExpectedIdentifier(t)
- },
- _ => StyleParseErrorKind::UnspecifiedError,
- })
- })?;
-
- let mut flags = 0;
-
- if context.chrome_rules_enabled() || context.stylesheet_origin == Origin::UserAgent
- {
- flags |= structs::nsMediaFeature_RequirementFlags_eUserAgentAndChromeOnly;
- }
+ Self::parse_in_parenthesis_block(context, input)
+ })
+ }
- let result = {
- let mut feature_name = &**ident;
-
- if unsafe { structs::StaticPrefs_sVarCache_layout_css_prefixes_webkit } &&
- starts_with_ignore_ascii_case(feature_name, "-webkit-")
- {
- feature_name = &feature_name[8..];
- flags |= structs::nsMediaFeature_RequirementFlags_eHasWebkitPrefix;
- if unsafe {
- structs::StaticPrefs_sVarCache_layout_css_prefixes_device_pixel_ratio_webkit
- } {
- flags |= structs::nsMediaFeature_RequirementFlags_eWebkitDevicePixelRatioPrefEnabled;
- }
- }
+ /// Parse a media feature expression where we've already consumed the
+ /// parenthesis.
+ pub fn parse_in_parenthesis_block<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ // FIXME: remove extra indented block when lifetimes are non-lexical
+ let feature;
+ let range;
+ {
+ let location = input.current_source_location();
+ let ident = input.expect_ident()?;
- let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
- feature_name = &feature_name[4..];
- Range::Min
- } else if starts_with_ignore_ascii_case(feature_name, "max-") {
- feature_name = &feature_name[4..];
- Range::Max
- } else {
- Range::Equal
- };
+ let mut flags = 0;
- let atom = Atom::from(string_as_ascii_lowercase(feature_name));
- match find_feature(|f| atom.as_ptr() == unsafe { *f.mName as *mut _ }) {
- Some(f) => Ok((f, range)),
- None => Err(()),
+ if context.chrome_rules_enabled() || context.stylesheet_origin == Origin::UserAgent
+ {
+ flags |= structs::nsMediaFeature_RequirementFlags_eUserAgentAndChromeOnly;
+ }
+
+ let result = {
+ let mut feature_name = &**ident;
+
+ if unsafe { structs::StaticPrefs_sVarCache_layout_css_prefixes_webkit } &&
+ starts_with_ignore_ascii_case(feature_name, "-webkit-")
+ {
+ feature_name = &feature_name[8..];
+ flags |= structs::nsMediaFeature_RequirementFlags_eHasWebkitPrefix;
+ if unsafe {
+ structs::StaticPrefs_sVarCache_layout_css_prefixes_device_pixel_ratio_webkit
+ } {
+ flags |= structs::nsMediaFeature_RequirementFlags_eWebkitDevicePixelRatioPrefEnabled;
}
+ }
+
+ let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
+ feature_name = &feature_name[4..];
+ Some(Range::Min)
+ } else if starts_with_ignore_ascii_case(feature_name, "max-") {
+ feature_name = &feature_name[4..];
+ Some(Range::Max)
+ } else {
+ None
};
- match result {
- Ok((f, r)) => {
- feature = f;
- range = r;
- },
- Err(()) => {
- return Err(location.new_custom_error(
- StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
- ))
- },
+ let atom = Atom::from(string_as_ascii_lowercase(feature_name));
+ match find_feature(|f| atom.as_ptr() == unsafe { *f.mName as *mut _ }) {
+ Some(f) => Ok((f, range)),
+ None => Err(()),
}
+ };
- if (feature.mReqFlags & !flags) != 0 {
+ match result {
+ Ok((f, r)) => {
+ feature = f;
+ range = r;
+ },
+ Err(()) => {
return Err(location.new_custom_error(
StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
+ ))
+ },
+ }
+
+ if (feature.mReqFlags & !flags) != 0 {
+ return Err(location.new_custom_error(
+ StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
+ ));
+ }
+
+ if range.is_some() &&
+ feature.mRangeType != nsMediaFeature_RangeType::eMinMaxAllowed
+ {
+ return Err(location.new_custom_error(
+ StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
+ ));
+ }
+ }
+
+ let feature_allows_ranges =
+ feature.mRangeType == nsMediaFeature_RangeType::eMinMaxAllowed;
+
+ let operator = input.try(consume_operation_or_colon);
+ let operator = match operator {
+ Err(..) => {
+ // If there's no colon, this is a media query of the
+ // form '(<feature>)', that is, there's no value
+ // specified.
+ //
+ // Gecko doesn't allow ranged expressions without a
+ // value, so just reject them here too.
+ if range.is_some() {
+ return Err(input.new_custom_error(
+ StyleParseErrorKind::RangedExpressionWithNoValue
));
}
- if range != Range::Equal &&
- feature.mRangeType != nsMediaFeature_RangeType::eMinMaxAllowed
- {
- return Err(location.new_custom_error(
- StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
+ return Ok(Self::new(feature, None, None));
+ }
+ Ok(operator) => operator,
+ };
+
+ let range_or_operator = match range {
+ Some(range) => {
+ if operator.is_some() {
+ return Err(input.new_custom_error(
+ StyleParseErrorKind::MediaQueryUnexpectedOperator
));
}
+ Some(RangeOrOperator::Range(range))
}
-
- // If there's no colon, this is a media query of the form
- // '(<feature>)', that is, there's no value specified.
- //
- // Gecko doesn't allow ranged expressions without a value, so just
- // reject them here too.
- if input.try(|i| i.expect_colon()).is_err() {
- if range != Range::Equal {
- return Err(input.new_custom_error(StyleParseErrorKind::RangedExpressionWithNoValue));
+ None => {
+ match operator {
+ Some(operator) => {
+ if !feature_allows_ranges {
+ return Err(input.new_custom_error(
+ StyleParseErrorKind::MediaQueryUnexpectedOperator
+ ));
+ }
+ Some(RangeOrOperator::Operator(operator))
+ }
+ None => None,
}
- return Ok(Expression::new(feature, None, range));
}
+ };
- let value =
- parse_feature_value(feature, feature.mValueType, context, input).map_err(|err| {
- err.location
- .new_custom_error(StyleParseErrorKind::MediaQueryExpectedFeatureValue)
- })?;
+ let value =
+ parse_feature_value(feature, feature.mValueType, context, input).map_err(|err| {
+ err.location
+ .new_custom_error(StyleParseErrorKind::MediaQueryExpectedFeatureValue)
+ })?;
- Ok(Expression::new(feature, Some(value), range))
- })
+ Ok(Self::new(feature, Some(value), range_or_operator))
}
/// Returns whether this media query evaluates to true for the given device.
@@ -704,8 +814,8 @@ impl Expression {
use std::cmp::Ordering;
debug_assert!(
- self.range == Range::Equal ||
- self.feature.mRangeType == nsMediaFeature_RangeType::eMinMaxAllowed,
+ self.feature.mRangeType == nsMediaFeature_RangeType::eMinMaxAllowed ||
+ self.range_or_operator.is_none(),
"Whoops, wrong range"
);
@@ -730,7 +840,7 @@ impl Expression {
};
// FIXME(emilio): Handle the possible floating point errors?
- let cmp = match (required_value, actual_value) {
+ let cmp = match (actual_value, required_value) {
(&Length(ref one), &Length(ref other)) => {
computed::Context::for_media_query_evaluation(device, quirks_mode, |context| {
one.to_computed_value(&context)
@@ -750,11 +860,11 @@ impl Expression {
if (*device.pres_context).mOverrideDPPX > 0.0 {
self::Resolution::Dppx((*device.pres_context).mOverrideDPPX).to_dpi()
} else {
- other.to_dpi()
+ one.to_dpi()
}
};
- one.to_dpi().partial_cmp(&actual_dpi).unwrap()
+ actual_dpi.partial_cmp(&other.to_dpi()).unwrap()
},
(&Ident(ref one), &Ident(ref other)) => {
debug_assert_ne!(
@@ -773,10 +883,31 @@ impl Expression {
_ => unreachable!(),
};
- cmp == Ordering::Equal || match self.range {
- Range::Min => cmp == Ordering::Less,
- Range::Equal => false,
- Range::Max => cmp == Ordering::Greater,
+ let range_or_op = match self.range_or_operator {
+ Some(r) => r,
+ None => return cmp == Ordering::Equal,
+ };
+
+ match range_or_op {
+ RangeOrOperator::Range(range) => {
+ cmp == Ordering::Equal || match range {
+ Range::Min => cmp == Ordering::Greater,
+ Range::Max => cmp == Ordering::Less,
+ }
+ }
+ RangeOrOperator::Operator(op) => {
+ match op {
+ Operator::Equal => cmp == Ordering::Equal,
+ Operator::GreaterThan => cmp == Ordering::Greater,
+ Operator::GreaterThanEqual => {
+ cmp == Ordering::Equal || cmp == Ordering::Greater
+ }
+ Operator::LessThan => cmp == Ordering::Less,
+ Operator::LessThanEqual => {
+ cmp == Ordering::Equal || cmp == Ordering::Less
+ }
+ }
+ }
}
}
}
diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs
index b02e21fbf8a..04f57b73885 100644
--- a/components/style/gecko/non_ts_pseudo_class_list.rs
+++ b/components/style/gecko/non_ts_pseudo_class_list.rs
@@ -47,6 +47,7 @@ macro_rules! apply_non_ts_list {
("visited", Visited, visited, IN_VISITED_STATE, _),
("active", Active, active, IN_ACTIVE_STATE, _),
("checked", Checked, checked, IN_CHECKED_STATE, _),
+ ("defined", Defined, defined, IN_DEFINED_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
("disabled", Disabled, disabled, IN_DISABLED_STATE, _),
("enabled", Enabled, enabled, IN_ENABLED_STATE, _),
("focus", Focus, focus, IN_FOCUS_STATE, _),
diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs
index 57a98a89238..7dfc9aa1bbc 100644
--- a/components/style/gecko/selector_parser.rs
+++ b/components/style/gecko/selector_parser.rs
@@ -187,6 +187,9 @@ impl NonTSPseudoClass {
NonTSPseudoClass::Fullscreen => unsafe {
mozilla::StaticPrefs_sVarCache_full_screen_api_unprefix_enabled
},
+ NonTSPseudoClass::Defined => unsafe {
+ structs::nsContentUtils_sIsCustomElementsEnabled
+ },
// Otherwise, a pseudo-class is enabled in content when it
// doesn't have any enabled flag.
_ => !self.has_any_flag(
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index 0ce4a45d175..ee0c134b269 100644
--- a/components/style/gecko/wrapper.rs
+++ b/components/style/gecko/wrapper.rs
@@ -37,6 +37,7 @@ use gecko_bindings::bindings::Gecko_ElementHasAnimations;
use gecko_bindings::bindings::Gecko_ElementHasCSSAnimations;
use gecko_bindings::bindings::Gecko_ElementHasCSSTransitions;
use gecko_bindings::bindings::Gecko_GetActiveLinkAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_GetAnimationEffectCount;
use gecko_bindings::bindings::Gecko_GetAnimationRule;
use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
@@ -650,7 +651,10 @@ impl<'le> GeckoElement<'le> {
#[inline]
fn extended_slots(&self) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> {
self.dom_slots().and_then(|s| unsafe {
- (s._base.mExtendedSlots.mPtr as *const structs::FragmentOrElement_nsExtendedDOMSlots)
+ // For the bit usage, see nsContentSlots::GetExtendedSlots.
+ let e_slots = s._base.mExtendedSlots &
+ !structs::nsIContent_nsContentSlots_sNonOwningExtendedSlotsFlag;
+ (e_slots as *const structs::FragmentOrElement_nsExtendedDOMSlots)
.as_ref()
})
}
@@ -948,8 +952,16 @@ fn get_animation_rule(
cascade_level: CascadeLevel,
) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
use gecko_bindings::sugar::ownership::HasSimpleFFI;
+ use properties::longhands::ANIMATABLE_PROPERTY_COUNT;
+
+ // There's a very rough correlation between the number of effects
+ // (animations) on an element and the number of properties it is likely to
+ // animate, so we use that as an initial guess for the size of the
+ // AnimationValueMap in order to reduce the number of re-allocations needed.
+ let effect_count = unsafe { Gecko_GetAnimationEffectCount(element.0) };
// Also, we should try to reuse the PDB, to avoid creating extra rule nodes.
- let mut animation_values = AnimationValueMap::default();
+ let mut animation_values = AnimationValueMap::with_capacity_and_hasher(
+ effect_count.min(ANIMATABLE_PROPERTY_COUNT), Default::default());
if unsafe {
Gecko_GetAnimationRule(
element.0,
@@ -2115,6 +2127,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
{
use selectors::matching::*;
match *pseudo_class {
+ NonTSPseudoClass::Defined |
NonTSPseudoClass::Focus |
NonTSPseudoClass::Enabled |
NonTSPseudoClass::Disabled |
diff --git a/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs b/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
index 8bdf38d4f84..dfd819bcedb 100644
--- a/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
+++ b/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
@@ -5,9 +5,7 @@
//! Rust helpers for Gecko's `nsCSSShadowItem`.
use app_units::Au;
-use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
use gecko_bindings::structs::nsCSSShadowItem;
-use values::computed::RGBAColor;
use values::computed::effects::{BoxShadow, SimpleShadow};
impl nsCSSShadowItem {
@@ -37,31 +35,14 @@ impl nsCSSShadowItem {
self.mRadius = shadow.blur.0.to_i32_au();
self.mSpread = 0;
self.mInset = false;
- if let Some(color) = shadow.color {
- self.mHasColor = true;
- self.mColor = convert_rgba_to_nscolor(&color);
- } else {
- // TODO handle currentColor
- // https://bugzilla.mozilla.org/show_bug.cgi?id=760345
- self.mHasColor = false;
- self.mColor = 0;
- }
- }
-
- #[inline]
- fn extract_color(&self) -> Option<RGBAColor> {
- if self.mHasColor {
- Some(convert_nscolor_to_rgba(self.mColor))
- } else {
- None
- }
+ self.mColor = shadow.color.into();
}
/// Gets a simple shadow from this item.
#[inline]
fn extract_simple_shadow(&self) -> SimpleShadow {
SimpleShadow {
- color: self.extract_color(),
+ color: self.mColor.into(),
horizontal: Au(self.mXOffset).into(),
vertical: Au(self.mYOffset).into(),
blur: Au(self.mRadius).into(),
diff --git a/components/style/media_queries/media_condition.rs b/components/style/media_queries/media_condition.rs
new file mode 100644
index 00000000000..4b80794af39
--- /dev/null
+++ b/components/style/media_queries/media_condition.rs
@@ -0,0 +1,192 @@
+/* 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/. */
+
+//! A media query condition:
+//!
+//! https://drafts.csswg.org/mediaqueries-4/#typedef-media-condition
+
+use context::QuirksMode;
+use cssparser::{Parser, Token};
+use parser::ParserContext;
+use std::fmt::{self, Write};
+use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
+use super::{Device, MediaFeatureExpression};
+
+
+/// A binary `and` or `or` operator.
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)]
+#[allow(missing_docs)]
+pub enum Operator {
+ And,
+ Or,
+}
+
+/// Whether to allow an `or` condition or not during parsing.
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToCss)]
+enum AllowOr {
+ Yes,
+ No,
+}
+
+/// Represents a media condition.
+#[derive(Clone, Debug, MallocSizeOf, PartialEq)]
+pub enum MediaCondition {
+ /// A simple media feature expression, implicitly parenthesized.
+ Feature(MediaFeatureExpression),
+ /// A negation of a condition.
+ Not(Box<MediaCondition>),
+ /// A set of joint operations.
+ Operation(Box<[MediaCondition]>, Operator),
+ /// A condition wrapped in parenthesis.
+ InParens(Box<MediaCondition>),
+}
+
+impl ToCss for MediaCondition {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: fmt::Write,
+ {
+ match *self {
+ // NOTE(emilio): MediaFeatureExpression already includes the
+ // parenthesis.
+ MediaCondition::Feature(ref f) => f.to_css(dest),
+ MediaCondition::Not(ref c) => {
+ dest.write_str("not ")?;
+ c.to_css(dest)
+ }
+ MediaCondition::InParens(ref c) => {
+ dest.write_char('(')?;
+ c.to_css(dest)?;
+ dest.write_char(')')
+ }
+ MediaCondition::Operation(ref list, op) => {
+ let mut iter = list.iter();
+ iter.next().unwrap().to_css(dest)?;
+ for item in iter {
+ dest.write_char(' ')?;
+ op.to_css(dest)?;
+ dest.write_char(' ')?;
+ item.to_css(dest)?;
+ }
+ Ok(())
+ }
+ }
+ }
+}
+
+impl MediaCondition {
+ /// Parse a single media condition.
+ pub fn parse<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ Self::parse_internal(context, input, AllowOr::Yes)
+ }
+
+ /// Parse a single media condition, disallowing `or` expressions.
+ ///
+ /// To be used from the legacy media query syntax.
+ pub fn parse_disallow_or<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ Self::parse_internal(context, input, AllowOr::No)
+ }
+
+ fn parse_internal<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ allow_or: AllowOr,
+ ) -> Result<Self, ParseError<'i>> {
+ let location = input.current_source_location();
+
+ // FIXME(emilio): This can be cleaner with nll.
+ let is_negation = match *input.next()? {
+ Token::ParenthesisBlock => false,
+ Token::Ident(ref ident) if ident.eq_ignore_ascii_case("not") => true,
+ ref t => {
+ return Err(location.new_unexpected_token_error(t.clone()))
+ }
+ };
+
+ if is_negation {
+ let inner_condition = Self::parse_in_parens(context, input)?;
+ return Ok(MediaCondition::Not(Box::new(inner_condition)))
+ }
+
+ // ParenthesisBlock.
+ let first_condition = Self::parse_paren_block(context, input)?;
+ let operator = match input.try(Operator::parse) {
+ Ok(op) => op,
+ Err(..) => return Ok(first_condition),
+ };
+
+ if allow_or == AllowOr::No && operator == Operator::Or {
+ return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ }
+
+ let mut conditions = vec![];
+ conditions.push(first_condition);
+ conditions.push(Self::parse_in_parens(context, input)?);
+
+ let delim = match operator {
+ Operator::And => "and",
+ Operator::Or => "or",
+ };
+
+ loop {
+ if input.try(|i| i.expect_ident_matching(delim)).is_err() {
+ return Ok(MediaCondition::Operation(
+ conditions.into_boxed_slice(),
+ operator,
+ ));
+ }
+
+ conditions.push(Self::parse_in_parens(context, input)?);
+ }
+ }
+
+ /// Parse a media condition in parentheses.
+ pub fn parse_in_parens<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ input.expect_parenthesis_block()?;
+ Self::parse_paren_block(context, input)
+ }
+
+ fn parse_paren_block<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ input.parse_nested_block(|input| {
+ // Base case.
+ if let Ok(inner) = input.try(|i| Self::parse(context, i)) {
+ return Ok(MediaCondition::InParens(Box::new(inner)))
+ }
+ let expr = MediaFeatureExpression::parse_in_parenthesis_block(context, input)?;
+ Ok(MediaCondition::Feature(expr))
+ })
+ }
+
+ /// Whether this condition matches the device and quirks mode.
+ pub fn matches(&self, device: &Device, quirks_mode: QuirksMode) -> bool {
+ match *self {
+ MediaCondition::Feature(ref f) => f.matches(device, quirks_mode),
+ MediaCondition::InParens(ref c) => c.matches(device, quirks_mode),
+ MediaCondition::Not(ref c) => !c.matches(device, quirks_mode),
+ MediaCondition::Operation(ref conditions, op) => {
+ let mut iter = conditions.iter();
+ match op {
+ Operator::And => {
+ iter.all(|c| c.matches(device, quirks_mode))
+ }
+ Operator::Or => {
+ iter.any(|c| c.matches(device, quirks_mode))
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/components/style/media_queries/media_list.rs b/components/style/media_queries/media_list.rs
index a5604b6dc19..f8d15df7257 100644
--- a/components/style/media_queries/media_list.rs
+++ b/components/style/media_queries/media_list.rs
@@ -73,16 +73,14 @@ impl MediaList {
/// Evaluate a whole `MediaList` against `Device`.
pub fn evaluate(&self, device: &Device, quirks_mode: QuirksMode) -> bool {
- // Check if it is an empty media query list or any queries match (OR condition)
+ // Check if it is an empty media query list or any queries match.
// https://drafts.csswg.org/mediaqueries-4/#mq-list
self.media_queries.is_empty() || self.media_queries.iter().any(|mq| {
let media_match = mq.media_type.matches(device.media_type());
- // Check if all conditions match (AND condition)
+ // Check if the media condition match.
let query_match = media_match &&
- mq.expressions
- .iter()
- .all(|expression| expression.matches(&device, quirks_mode));
+ mq.condition.as_ref().map_or(true, |c| c.matches(device, quirks_mode));
// Apply the logical NOT qualifier to the result
match mq.qualifier {
diff --git a/components/style/media_queries/media_query.rs b/components/style/media_queries/media_query.rs
index 10fa84bd61a..089fc9412b2 100644
--- a/components/style/media_queries/media_query.rs
+++ b/components/style/media_queries/media_query.rs
@@ -9,13 +9,13 @@
use Atom;
use cssparser::Parser;
use parser::ParserContext;
-use selectors::parser::SelectorParseErrorKind;
use std::fmt::{self, Write};
use str::string_as_ascii_lowercase;
-use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
-use super::Expression;
+use style_traits::{CssWriter, ParseError, ToCss};
+use super::media_condition::MediaCondition;
use values::CustomIdent;
+
/// <https://drafts.csswg.org/mediaqueries/#mq-prefix>
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)]
pub enum Qualifier {
@@ -65,8 +65,9 @@ pub struct MediaQuery {
pub qualifier: Option<Qualifier>,
/// The media type for this query, that can be known, unknown, or "all".
pub media_type: MediaQueryType,
- /// The set of expressions that this media query contains.
- pub expressions: Vec<Expression>,
+ /// The condition that this media query contains. This cannot have `or`
+ /// in the first level.
+ pub condition: Option<MediaCondition>,
}
impl ToCss for MediaQuery {
@@ -86,28 +87,23 @@ impl ToCss for MediaQuery {
//
// Otherwise, we'd serialize media queries like "(min-width:
// 40px)" in "all (min-width: 40px)", which is unexpected.
- if self.qualifier.is_some() || self.expressions.is_empty() {
+ if self.qualifier.is_some() || self.condition.is_none() {
dest.write_str("all")?;
}
},
MediaQueryType::Concrete(MediaType(ref desc)) => desc.to_css(dest)?,
}
- if self.expressions.is_empty() {
- return Ok(());
- }
+ let condition = match self.condition {
+ Some(ref c) => c,
+ None => return Ok(()),
+ };
if self.media_type != MediaQueryType::All || self.qualifier.is_some() {
dest.write_str(" and ")?;
}
- self.expressions[0].to_css(dest)?;
-
- for expr in self.expressions.iter().skip(1) {
- dest.write_str(" and ")?;
- expr.to_css(dest)?;
- }
- Ok(())
+ condition.to_css(dest)
}
}
@@ -118,7 +114,7 @@ impl MediaQuery {
Self {
qualifier: Some(Qualifier::Not),
media_type: MediaQueryType::All,
- expressions: vec![],
+ condition: None,
}
}
@@ -128,41 +124,24 @@ impl MediaQuery {
pub fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
- ) -> Result<MediaQuery, ParseError<'i>> {
- let mut expressions = vec![];
-
- let qualifier = input.try(Qualifier::parse).ok();
- let media_type = match input.try(|i| i.expect_ident_cloned()) {
- Ok(ident) => MediaQueryType::parse(&*ident).map_err(|()| {
- input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))
- })?,
- Err(_) => {
- // Media type is only optional if qualifier is not specified.
- if qualifier.is_some() {
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
- }
-
- // Without a media type, require at least one expression.
- expressions.push(Expression::parse(context, input)?);
-
- MediaQueryType::All
- },
+ ) -> Result<Self, ParseError<'i>> {
+ let (qualifier, explicit_media_type) = input.try(|input| -> Result<_, ()> {
+ let qualifier = input.try(Qualifier::parse).ok();
+ let ident = input.expect_ident().map_err(|_| ())?;
+ let media_type = MediaQueryType::parse(&ident)?;
+ Ok((qualifier, Some(media_type)))
+ }).unwrap_or_default();
+
+ let condition = if explicit_media_type.is_none() {
+ Some(MediaCondition::parse(context, input)?)
+ } else if input.try(|i| i.expect_ident_matching("and")).is_ok() {
+ Some(MediaCondition::parse_disallow_or(context, input)?)
+ } else {
+ None
};
- // Parse any subsequent expressions
- loop {
- if input
- .try(|input| input.expect_ident_matching("and"))
- .is_err()
- {
- return Ok(MediaQuery {
- qualifier,
- media_type,
- expressions,
- });
- }
- expressions.push(Expression::parse(context, input)?)
- }
+ let media_type = explicit_media_type.unwrap_or(MediaQueryType::All);
+ Ok(Self { qualifier, media_type, condition })
}
}
diff --git a/components/style/media_queries/mod.rs b/components/style/media_queries/mod.rs
index 8da14fc67e5..d27e33cc64c 100644
--- a/components/style/media_queries/mod.rs
+++ b/components/style/media_queries/mod.rs
@@ -6,13 +6,15 @@
//!
//! [mq]: https://drafts.csswg.org/mediaqueries/
+mod media_condition;
mod media_list;
mod media_query;
+pub use self::media_condition::MediaCondition;
pub use self::media_list::MediaList;
pub use self::media_query::{MediaQuery, MediaQueryType, MediaType, Qualifier};
#[cfg(feature = "servo")]
-pub use servo::media_queries::{Device, Expression};
+pub use servo::media_queries::{Device, MediaFeatureExpression};
#[cfg(feature = "gecko")]
-pub use gecko::media_queries::{Device, Expression};
+pub use gecko::media_queries::{Device, MediaFeatureExpression};
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs
index f83e0836c91..c82288e14ae 100644
--- a/components/style/properties/gecko.mako.rs
+++ b/components/style/properties/gecko.mako.rs
@@ -49,8 +49,7 @@ use gecko::values::round_border_to_device_pixels;
use logical_geometry::WritingMode;
use media_queries::Device;
use properties::computed_value_flags::*;
-use properties::{longhands, Importance, LonghandId};
-use properties::{PropertyDeclaration, PropertyDeclarationBlock, PropertyDeclarationId};
+use properties::longhands;
use rule_tree::StrongRuleNode;
use selector_parser::PseudoElement;
use servo_arc::{Arc, RawOffsetArc};
@@ -58,7 +57,7 @@ use std::marker::PhantomData;
use std::mem::{forget, uninitialized, transmute, zeroed};
use std::{cmp, ops, ptr};
use values::{self, CustomIdent, Either, KeyframesName, None_};
-use values::computed::{NonNegativeLength, ToComputedValue, Percentage, TransitionProperty};
+use values::computed::{NonNegativeLength, Percentage, TransitionProperty};
use values::computed::font::FontSize;
use values::computed::effects::{BoxShadow, Filter, SimpleShadow};
use values::computed::outline::OutlineStyle;
@@ -307,30 +306,6 @@ impl ComputedValuesInner {
pub fn has_moz_binding(&self) -> bool {
!self.get_box().gecko.mBinding.mRawPtr.is_null()
}
-
- pub fn to_declaration_block(&self, property: PropertyDeclarationId) -> PropertyDeclarationBlock {
- let value = match property {
- % for prop in data.longhands:
- % if prop.animatable:
- PropertyDeclarationId::Longhand(LonghandId::${prop.camel_case}) => {
- PropertyDeclaration::${prop.camel_case}(
- % if prop.boxed:
- Box::new(
- % endif
- longhands::${prop.ident}::SpecifiedValue::from_computed_value(
- &self.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}())
- % if prop.boxed:
- )
- % endif
- )
- },
- % endif
- % endfor
- PropertyDeclarationId::Custom(_name) => unimplemented!(),
- _ => unimplemented!()
- };
- PropertyDeclarationBlock::with_one(value, Importance::Normal)
- }
}
<%def name="declare_style_struct(style_struct)">
@@ -5489,8 +5464,7 @@ clip-path
use values::generics::CounterStyleOrNone;
use gecko_bindings::structs::nsStyleContentData;
use gecko_bindings::structs::nsStyleContentAttr;
- use gecko_bindings::structs::nsStyleContentType;
- use gecko_bindings::structs::nsStyleContentType::*;
+ use gecko_bindings::structs::StyleContentType;
use gecko_bindings::bindings::Gecko_ClearAndResizeStyleContents;
// Converts a string as utf16, and returns an owned, zero-terminated raw buffer.
@@ -5505,19 +5479,19 @@ clip-path
fn set_counter_function(
data: &mut nsStyleContentData,
- content_type: nsStyleContentType,
+ content_type: StyleContentType,
name: &CustomIdent,
sep: &str,
style: CounterStyleOrNone,
device: &Device,
) {
- debug_assert!(content_type == eStyleContentType_Counter ||
- content_type == eStyleContentType_Counters);
+ debug_assert!(content_type == StyleContentType::Counter ||
+ content_type == StyleContentType::Counters);
let counter_func = unsafe {
bindings::Gecko_SetCounterFunction(data, content_type).as_mut().unwrap()
};
counter_func.mIdent.assign(name.0.as_slice());
- if content_type == eStyleContentType_Counters {
+ if content_type == StyleContentType::Counters {
counter_func.mSeparator.assign_utf8(sep);
}
style.to_gecko_value(&mut counter_func.mCounterStyle, device);
@@ -5538,7 +5512,7 @@ clip-path
Gecko_ClearAndResizeStyleContents(&mut self.gecko, 1);
*self.gecko.mContents[0].mContent.mString.as_mut() = ptr::null_mut();
}
- self.gecko.mContents[0].mType = eStyleContentType_AltContent;
+ self.gecko.mContents[0].mType = StyleContentType::AltContent;
},
Content::Items(items) => {
unsafe {
@@ -5554,7 +5528,7 @@ clip-path
}
match *item {
ContentItem::String(ref value) => {
- self.gecko.mContents[i].mType = eStyleContentType_String;
+ self.gecko.mContents[i].mType = StyleContentType::String;
unsafe {
// NB: we share allocators, so doing this is fine.
*self.gecko.mContents[i].mContent.mString.as_mut() =
@@ -5562,7 +5536,7 @@ clip-path
}
}
ContentItem::Attr(ref attr) => {
- self.gecko.mContents[i].mType = eStyleContentType_Attr;
+ self.gecko.mContents[i].mType = StyleContentType::Attr;
unsafe {
// NB: we share allocators, so doing this is fine.
let maybe_ns = attr.namespace.clone();
@@ -5581,17 +5555,17 @@ clip-path
}
}
ContentItem::OpenQuote
- => self.gecko.mContents[i].mType = eStyleContentType_OpenQuote,
+ => self.gecko.mContents[i].mType = StyleContentType::OpenQuote,
ContentItem::CloseQuote
- => self.gecko.mContents[i].mType = eStyleContentType_CloseQuote,
+ => self.gecko.mContents[i].mType = StyleContentType::CloseQuote,
ContentItem::NoOpenQuote
- => self.gecko.mContents[i].mType = eStyleContentType_NoOpenQuote,
+ => self.gecko.mContents[i].mType = StyleContentType::NoOpenQuote,
ContentItem::NoCloseQuote
- => self.gecko.mContents[i].mType = eStyleContentType_NoCloseQuote,
+ => self.gecko.mContents[i].mType = StyleContentType::NoCloseQuote,
ContentItem::Counter(ref name, ref style) => {
set_counter_function(
&mut self.gecko.mContents[i],
- eStyleContentType_Counter,
+ StyleContentType::Counter,
&name,
"",
style.clone(),
@@ -5601,7 +5575,7 @@ clip-path
ContentItem::Counters(ref name, ref sep, ref style) => {
set_counter_function(
&mut self.gecko.mContents[i],
- eStyleContentType_Counters,
+ StyleContentType::Counters,
&name,
&sep,
style.clone(),
@@ -5636,7 +5610,7 @@ clip-path
pub fn clone_content(&self) -> longhands::content::computed_value::T {
use {Atom, Namespace};
use gecko::conversions::string_from_chars_pointer;
- use gecko_bindings::structs::nsStyleContentType::*;
+ use gecko_bindings::structs::StyleContentType;
use values::generics::counters::{Content, ContentItem};
use values::computed::url::ComputedImageUrl;
use values::{CustomIdent, Either};
@@ -5644,27 +5618,27 @@ clip-path
use values::specified::Attr;
if self.gecko.mContents.is_empty() {
- return Content::Normal;
+ return Content::None;
}
if self.gecko.mContents.len() == 1 &&
- self.gecko.mContents[0].mType == eStyleContentType_AltContent {
+ self.gecko.mContents[0].mType == StyleContentType::AltContent {
return Content::MozAltContent;
}
Content::Items(
self.gecko.mContents.iter().map(|gecko_content| {
match gecko_content.mType {
- eStyleContentType_OpenQuote => ContentItem::OpenQuote,
- eStyleContentType_CloseQuote => ContentItem::CloseQuote,
- eStyleContentType_NoOpenQuote => ContentItem::NoOpenQuote,
- eStyleContentType_NoCloseQuote => ContentItem::NoCloseQuote,
- eStyleContentType_String => {
+ StyleContentType::OpenQuote => ContentItem::OpenQuote,
+ StyleContentType::CloseQuote => ContentItem::CloseQuote,
+ StyleContentType::NoOpenQuote => ContentItem::NoOpenQuote,
+ StyleContentType::NoCloseQuote => ContentItem::NoCloseQuote,
+ StyleContentType::String => {
let gecko_chars = unsafe { gecko_content.mContent.mString.as_ref() };
let string = unsafe { string_from_chars_pointer(*gecko_chars) };
ContentItem::String(string.into_boxed_str())
},
- eStyleContentType_Attr => {
+ StyleContentType::Attr => {
let (namespace, attribute) = unsafe {
let s = &**gecko_content.mContent.mAttr.as_ref();
let ns = if s.mNamespaceURL.mRawPtr.is_null() {
@@ -5678,7 +5652,7 @@ clip-path
};
ContentItem::Attr(Attr { namespace, attribute })
},
- eStyleContentType_Counter | eStyleContentType_Counters => {
+ StyleContentType::Counter | StyleContentType::Counters => {
let gecko_function =
unsafe { &**gecko_content.mContent.mCounters.as_ref() };
let ident = CustomIdent(Atom::from(&*gecko_function.mIdent));
@@ -5689,14 +5663,14 @@ clip-path
Either::Second(_) =>
unreachable!("counter function shouldn't have single string type"),
};
- if gecko_content.mType == eStyleContentType_Counter {
+ if gecko_content.mType == StyleContentType::Counter {
ContentItem::Counter(ident, style)
} else {
let separator = gecko_function.mSeparator.to_string();
ContentItem::Counters(ident, separator.into_boxed_str(), style)
}
},
- eStyleContentType_Image => {
+ StyleContentType::Image => {
unsafe {
let gecko_image_request =
&**gecko_content.mContent.mImage.as_ref();
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs
index 11a1283f1cc..e07c9bd57cb 100644
--- a/components/style/properties/helpers.mako.rs
+++ b/components/style/properties/helpers.mako.rs
@@ -856,7 +856,7 @@
elif len(maybe_size) == 1:
size = maybe_size[0]
def phys_ident(side, phy_side):
- return to_rust_ident(name.replace(side, phy_side).replace("offset-", ""))
+ return to_rust_ident(name.replace(side, phy_side).replace("inset-", ""))
%>
% if side is not None:
use logical_geometry::PhysicalSide;
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index 7a34cc4ade4..d4a96e1f177 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -207,8 +207,8 @@ impl AnimatedProperty {
% for prop in data.longhands:
% if prop.animatable:
LonghandId::${prop.camel_case} => {
- let old_computed = old_style.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}();
- let new_computed = new_style.get_${prop.style_struct.ident.strip("_")}().clone_${prop.ident}();
+ let old_computed = old_style.clone_${prop.ident}();
+ let new_computed = new_style.clone_${prop.ident}();
AnimatedProperty::${prop.camel_case}(
% if prop.is_animatable_with_computed_value:
old_computed,
@@ -546,15 +546,13 @@ impl AnimationValue {
/// Get an AnimationValue for an AnimatableLonghand from a given computed values.
pub fn from_computed_values(
property: LonghandId,
- computed_values: &ComputedValues
+ style: &ComputedValues,
) -> Option<Self> {
Some(match property {
% for prop in data.longhands:
% if prop.animatable:
LonghandId::${prop.camel_case} => {
- let computed = computed_values
- .get_${prop.style_struct.ident.strip("_")}()
- .clone_${prop.ident}();
+ let computed = style.clone_${prop.ident}();
AnimationValue::${prop.camel_case}(
% if prop.is_animatable_with_computed_value:
computed
diff --git a/components/style/properties/longhands/font.mako.rs b/components/style/properties/longhands/font.mako.rs
index 69f95532c16..e14d16e0cb7 100644
--- a/components/style/properties/longhands/font.mako.rs
+++ b/components/style/properties/longhands/font.mako.rs
@@ -7,13 +7,15 @@
<% data.new_style_struct("Font", inherited=True) %>
-${helpers.predefined_type("font-family",
- "FontFamily",
- initial_value="computed::FontFamily::serif()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "font-family",
+ "FontFamily",
+ initial_value="computed::FontFamily::serif()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
${helpers.predefined_type(
"font-style",
@@ -32,16 +34,18 @@ ${helpers.predefined_type(
"all-petite-caps": "ALLPETITE",
"titling-caps": "TITLING" } %>
-${helpers.single_keyword_system("font-variant-caps",
- "normal small-caps",
- extra_gecko_values="all-small-caps petite-caps all-petite-caps unicase titling-caps",
- gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
- gecko_ffi_name="mFont.variantCaps",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps",
- custom_consts=font_variant_caps_custom_consts,
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- animation_value_type="discrete",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword_system(
+ "font-variant-caps",
+ "normal small-caps",
+ extra_gecko_values="all-small-caps petite-caps all-petite-caps unicase titling-caps",
+ gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
+ gecko_ffi_name="mFont.variantCaps",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps",
+ custom_consts=font_variant_caps_custom_consts,
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ animation_value_type="discrete",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
${helpers.predefined_type(
"font-weight",
@@ -54,32 +58,38 @@ ${helpers.predefined_type(
servo_restyle_damage="rebuild_and_reflow",
)}
-${helpers.predefined_type("font-size",
- "FontSize",
- initial_value="computed::FontSize::medium()",
- initial_specified_value="specified::FontSize::medium()",
- animation_value_type="NonNegativeLength",
- allow_quirks=True,
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-size",
- servo_restyle_damage="rebuild_and_reflow")}
-
-${helpers.predefined_type("font-size-adjust",
- "FontSizeAdjust",
- products="gecko",
- initial_value="computed::FontSizeAdjust::none()",
- initial_specified_value="specified::FontSizeAdjust::none()",
- animation_value_type="ComputedValue",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust")}
-
-${helpers.predefined_type("font-synthesis",
- "FontSynthesis",
- products="gecko",
- initial_value="specified::FontSynthesis::get_initial_value()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis")}
+${helpers.predefined_type(
+ "font-size",
+ "FontSize",
+ initial_value="computed::FontSize::medium()",
+ initial_specified_value="specified::FontSize::medium()",
+ animation_value_type="NonNegativeLength",
+ allow_quirks=True,
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-size",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
+
+${helpers.predefined_type(
+ "font-size-adjust",
+ "FontSizeAdjust",
+ products="gecko",
+ initial_value="computed::FontSizeAdjust::none()",
+ initial_specified_value="specified::FontSizeAdjust::none()",
+ animation_value_type="ComputedValue",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust",
+)}
+
+${helpers.predefined_type(
+ "font-synthesis",
+ "FontSynthesis",
+ products="gecko",
+ initial_value="specified::FontSynthesis::get_initial_value()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis",
+)}
${helpers.predefined_type(
"font-stretch",
@@ -92,69 +102,83 @@ ${helpers.predefined_type(
servo_restyle_damage="rebuild_and_reflow",
)}
-${helpers.single_keyword_system("font-kerning",
- "auto none normal",
- products="gecko",
- gecko_ffi_name="mFont.kerning",
- gecko_constant_prefix="NS_FONT_KERNING",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-kerning",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- animation_value_type="discrete")}
-
-${helpers.predefined_type("font-variant-alternates",
- "FontVariantAlternates",
- products="gecko",
- initial_value="computed::FontVariantAlternates::get_initial_value()",
- initial_specified_value="specified::FontVariantAlternates::get_initial_specified_value()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-alternates")}
-
-${helpers.predefined_type("font-variant-east-asian",
- "FontVariantEastAsian",
- products="gecko",
- initial_value="computed::FontVariantEastAsian::empty()",
- initial_specified_value="specified::FontVariantEastAsian::empty()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-east-asian")}
-
-${helpers.predefined_type("font-variant-ligatures",
- "FontVariantLigatures",
- products="gecko",
- initial_value="computed::FontVariantLigatures::empty()",
- initial_specified_value="specified::FontVariantLigatures::empty()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-ligatures")}
-
-${helpers.predefined_type("font-variant-numeric",
- "FontVariantNumeric",
- products="gecko",
- initial_value="computed::FontVariantNumeric::empty()",
- initial_specified_value="specified::FontVariantNumeric::empty()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-numeric")}
-
-${helpers.single_keyword_system("font-variant-position",
- "normal sub super",
- products="gecko",
- gecko_ffi_name="mFont.variantPosition",
- gecko_constant_prefix="NS_FONT_VARIANT_POSITION",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-position",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- animation_value_type="discrete")}
-
-${helpers.predefined_type("font-feature-settings",
- "FontFeatureSettings",
- products="gecko",
- initial_value="computed::FontFeatureSettings::normal()",
- initial_specified_value="specified::FontFeatureSettings::normal()",
- extra_prefixes="moz:layout.css.prefixes.font-features",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts/#propdef-font-feature-settings")}
+${helpers.single_keyword_system(
+ "font-kerning",
+ "auto none normal",
+ products="gecko",
+ gecko_ffi_name="mFont.kerning",
+ gecko_constant_prefix="NS_FONT_KERNING",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-kerning",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ animation_value_type="discrete",
+)}
+
+${helpers.predefined_type(
+ "font-variant-alternates",
+ "FontVariantAlternates",
+ products="gecko",
+ initial_value="computed::FontVariantAlternates::get_initial_value()",
+ initial_specified_value="specified::FontVariantAlternates::get_initial_specified_value()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-alternates",
+)}
+
+${helpers.predefined_type(
+ "font-variant-east-asian",
+ "FontVariantEastAsian",
+ products="gecko",
+ initial_value="computed::FontVariantEastAsian::empty()",
+ initial_specified_value="specified::FontVariantEastAsian::empty()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-east-asian",
+)}
+
+${helpers.predefined_type(
+ "font-variant-ligatures",
+ "FontVariantLigatures",
+ products="gecko",
+ initial_value="computed::FontVariantLigatures::empty()",
+ initial_specified_value="specified::FontVariantLigatures::empty()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-ligatures",
+)}
+
+${helpers.predefined_type(
+ "font-variant-numeric",
+ "FontVariantNumeric",
+ products="gecko",
+ initial_value="computed::FontVariantNumeric::empty()",
+ initial_specified_value="specified::FontVariantNumeric::empty()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-numeric",
+)}
+
+${helpers.single_keyword_system(
+ "font-variant-position",
+ "normal sub super",
+ products="gecko",
+ gecko_ffi_name="mFont.variantPosition",
+ gecko_constant_prefix="NS_FONT_VARIANT_POSITION",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-position",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ animation_value_type="discrete",
+)}
+
+${helpers.predefined_type(
+ "font-feature-settings",
+ "FontFeatureSettings",
+ products="gecko",
+ initial_value="computed::FontFeatureSettings::normal()",
+ initial_specified_value="specified::FontFeatureSettings::normal()",
+ extra_prefixes="moz:layout.css.prefixes.font-features",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts/#propdef-font-feature-settings",
+)}
<%
# This spec link is too long to fit elsewhere
@@ -163,100 +187,120 @@ https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-settings-control-
"""
%>
-${helpers.predefined_type("font-variation-settings",
- "FontVariationSettings",
- products="gecko",
- gecko_pref="layout.css.font-variations.enabled",
- initial_value="computed::FontVariationSettings::normal()",
- initial_specified_value="specified::FontVariationSettings::normal()",
- animation_value_type="ComputedValue",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="${variation_spec}")}
-
-${helpers.predefined_type("font-language-override",
- "FontLanguageOverride",
- products="gecko",
- initial_value="computed::FontLanguageOverride::zero()",
- initial_specified_value="specified::FontLanguageOverride::normal()",
- animation_value_type="discrete",
- extra_prefixes="moz:layout.css.prefixes.font-features",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override")}
-
-${helpers.single_keyword_system("font-optical-sizing",
- "auto none",
- products="gecko",
- gecko_pref="layout.css.font-variations.enabled",
- gecko_ffi_name="mFont.opticalSizing",
- gecko_constant_prefix="NS_FONT_OPTICAL_SIZING",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://www.w3.org/TR/css-fonts-4/#font-optical-sizing-def")}
-
-${helpers.predefined_type("-x-lang",
- "XLang",
- products="gecko",
- initial_value="computed::XLang::get_initial_value()",
- animation_value_type="none",
- enabled_in="",
- spec="Internal (not web-exposed)")}
-
-${helpers.predefined_type("-moz-script-size-multiplier",
- "MozScriptSizeMultiplier",
- products="gecko",
- initial_value="computed::MozScriptSizeMultiplier::get_initial_value()",
- animation_value_type="none",
- gecko_ffi_name="mScriptSizeMultiplier",
- enabled_in="",
- spec="Internal (not web-exposed)")}
-
-${helpers.predefined_type("-moz-script-level",
- "MozScriptLevel",
- 0,
- animation_value_type="none",
- products="gecko",
- enabled_in="ua",
- gecko_ffi_name="mScriptLevel",
- spec="Internal (not web-exposed)")}
-
-${helpers.single_keyword("-moz-math-display",
- "inline block",
- gecko_constant_prefix="NS_MATHML_DISPLAYSTYLE",
- gecko_ffi_name="mMathDisplay",
- products="gecko",
- enabled_in="ua",
- spec="Internal (not web-exposed)",
- animation_value_type="none")}
-
-${helpers.single_keyword("-moz-math-variant",
- """none normal bold italic bold-italic script bold-script
- fraktur double-struck bold-fraktur sans-serif
- bold-sans-serif sans-serif-italic sans-serif-bold-italic
- monospace initial tailed looped stretched""",
- gecko_constant_prefix="NS_MATHML_MATHVARIANT",
- gecko_ffi_name="mMathVariant",
- products="gecko",
- spec="Internal (not web-exposed)",
- animation_value_type="none",
- enabled_in="",
- needs_conversion=True)}
-
-${helpers.predefined_type("-moz-script-min-size",
- "MozScriptMinSize",
- "specified::MozScriptMinSize::get_initial_value()",
- animation_value_type="none",
- products="gecko",
- enabled_in="",
- gecko_ffi_name="mScriptMinSize",
- spec="Internal (not web-exposed)")}
-
-${helpers.predefined_type("-x-text-zoom",
- "XTextZoom",
- "computed::XTextZoom(true)",
- animation_value_type="none",
- products="gecko",
- enabled_in="",
- spec="Internal (not web-exposed)")}
+${helpers.predefined_type(
+ "font-variation-settings",
+ "FontVariationSettings",
+ products="gecko",
+ gecko_pref="layout.css.font-variations.enabled",
+ initial_value="computed::FontVariationSettings::normal()",
+ initial_specified_value="specified::FontVariationSettings::normal()",
+ animation_value_type="ComputedValue",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="${variation_spec}",
+)}
+
+${helpers.predefined_type(
+ "font-language-override",
+ "FontLanguageOverride",
+ products="gecko",
+ initial_value="computed::FontLanguageOverride::zero()",
+ initial_specified_value="specified::FontLanguageOverride::normal()",
+ animation_value_type="discrete",
+ extra_prefixes="moz:layout.css.prefixes.font-features",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override",
+)}
+
+${helpers.single_keyword_system(
+ "font-optical-sizing",
+ "auto none",
+ products="gecko",
+ gecko_pref="layout.css.font-variations.enabled",
+ gecko_ffi_name="mFont.opticalSizing",
+ gecko_constant_prefix="NS_FONT_OPTICAL_SIZING",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://www.w3.org/TR/css-fonts-4/#font-optical-sizing-def",
+)}
+
+${helpers.predefined_type(
+ "-x-lang",
+ "XLang",
+ products="gecko",
+ initial_value="computed::XLang::get_initial_value()",
+ animation_value_type="none",
+ enabled_in="",
+ spec="Internal (not web-exposed)",
+)}
+
+${helpers.predefined_type(
+ "-moz-script-size-multiplier",
+ "MozScriptSizeMultiplier",
+ products="gecko",
+ initial_value="computed::MozScriptSizeMultiplier::get_initial_value()",
+ animation_value_type="none",
+ gecko_ffi_name="mScriptSizeMultiplier",
+ enabled_in="",
+ spec="Internal (not web-exposed)",
+)}
+
+${helpers.predefined_type(
+ "-moz-script-level",
+ "MozScriptLevel",
+ 0,
+ animation_value_type="none",
+ products="gecko",
+ enabled_in="ua",
+ gecko_ffi_name="mScriptLevel",
+ spec="Internal (not web-exposed)",
+)}
+
+${helpers.single_keyword(
+ "-moz-math-display",
+ "inline block",
+ gecko_constant_prefix="NS_MATHML_DISPLAYSTYLE",
+ gecko_ffi_name="mMathDisplay",
+ products="gecko",
+ enabled_in="ua",
+ spec="Internal (not web-exposed)",
+ animation_value_type="none",
+)}
+
+${helpers.single_keyword(
+ "-moz-math-variant",
+ """none normal bold italic bold-italic script bold-script
+ fraktur double-struck bold-fraktur sans-serif
+ bold-sans-serif sans-serif-italic sans-serif-bold-italic
+ monospace initial tailed looped stretched""",
+ gecko_constant_prefix="NS_MATHML_MATHVARIANT",
+ gecko_ffi_name="mMathVariant",
+ products="gecko",
+ spec="Internal (not web-exposed)",
+ animation_value_type="none",
+ enabled_in="",
+ needs_conversion=True,
+)}
+
+${helpers.predefined_type(
+ "-moz-script-min-size",
+ "MozScriptMinSize",
+ "specified::MozScriptMinSize::get_initial_value()",
+ animation_value_type="none",
+ products="gecko",
+ enabled_in="",
+ gecko_ffi_name="mScriptMinSize",
+ spec="Internal (not web-exposed)",
+)}
+
+${helpers.predefined_type(
+ "-x-text-zoom",
+ "XTextZoom",
+ "computed::XTextZoom(true)",
+ animation_value_type="none",
+ products="gecko",
+ enabled_in="",
+ spec="Internal (not web-exposed)",
+)}
% if product == "gecko":
pub mod system_font {
@@ -462,29 +506,35 @@ ${helpers.predefined_type("-x-text-zoom",
}
% endif
-${helpers.single_keyword("-moz-osx-font-smoothing",
- "auto grayscale",
- gecko_constant_prefix="NS_FONT_SMOOTHING",
- gecko_ffi_name="mFont.smoothing",
- gecko_pref="layout.css.osx-font-smoothing.enabled",
- products="gecko",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth)",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- animation_value_type="discrete")}
-
-${helpers.predefined_type("-moz-font-smoothing-background-color",
- "RGBAColor",
- "RGBA::transparent()",
- animation_value_type="AnimatedRGBA",
- products="gecko",
- gecko_ffi_name="mFont.fontSmoothingBackgroundColor",
- enabled_in="chrome",
- spec="None (Nonstandard internal property)")}
-
-${helpers.predefined_type("-moz-min-font-size-ratio",
- "Percentage",
- "computed::Percentage::hundred()",
- animation_value_type="none",
- products="gecko",
- enabled_in="ua",
- spec="Nonstandard (Internal-only)")}
+${helpers.single_keyword(
+ "-moz-osx-font-smoothing",
+ "auto grayscale",
+ gecko_constant_prefix="NS_FONT_SMOOTHING",
+ gecko_ffi_name="mFont.smoothing",
+ gecko_pref="layout.css.osx-font-smoothing.enabled",
+ products="gecko",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth)",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ animation_value_type="discrete",
+)}
+
+${helpers.predefined_type(
+ "-moz-font-smoothing-background-color",
+ "RGBAColor",
+ "RGBA::transparent()",
+ animation_value_type="AnimatedRGBA",
+ products="gecko",
+ gecko_ffi_name="mFont.fontSmoothingBackgroundColor",
+ enabled_in="chrome",
+ spec="None (Nonstandard internal property)",
+)}
+
+${helpers.predefined_type(
+ "-moz-min-font-size-ratio",
+ "Percentage",
+ "computed::Percentage::hundred()",
+ animation_value_type="none",
+ products="gecko",
+ enabled_in="ua",
+ spec="Nonstandard (Internal-only)",
+)}
diff --git a/components/style/properties/longhands/inherited_box.mako.rs b/components/style/properties/longhands/inherited_box.mako.rs
index 23dfe7fef5c..efb3ec19ccb 100644
--- a/components/style/properties/longhands/inherited_box.mako.rs
+++ b/components/style/properties/longhands/inherited_box.mako.rs
@@ -7,57 +7,74 @@
<% data.new_style_struct("InheritedBox", inherited=True, gecko_name="Visibility") %>
// TODO: collapse. Well, do tables first.
-${helpers.single_keyword("visibility",
- "visible hidden",
- extra_gecko_values="collapse",
- gecko_ffi_name="mVisible",
- animation_value_type="ComputedValue",
- spec="https://drafts.csswg.org/css-box/#propdef-visibility")}
+${helpers.single_keyword(
+ "visibility",
+ "visible hidden",
+ extra_gecko_values="collapse",
+ gecko_ffi_name="mVisible",
+ animation_value_type="ComputedValue",
+ spec="https://drafts.csswg.org/css-box/#propdef-visibility",
+)}
// CSS Writing Modes Level 3
// https://drafts.csswg.org/css-writing-modes-3
-${helpers.single_keyword("writing-mode",
- "horizontal-tb vertical-rl vertical-lr",
- extra_gecko_values="sideways-rl sideways-lr",
- extra_gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
- rl=horizontal-tb rl-tb=horizontal-tb \
- tb=vertical-rl tb-rl=vertical-rl",
- servo_pref="layout.writing-mode.enabled",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "writing-mode",
+ "horizontal-tb vertical-rl vertical-lr",
+ extra_gecko_values="sideways-rl sideways-lr",
+ extra_gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
+ rl=horizontal-tb rl-tb=horizontal-tb \
+ tb=vertical-rl tb-rl=vertical-rl",
+ servo_pref="layout.writing-mode.enabled",
+ animation_value_type="none",
+ spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.single_keyword("direction", "ltr rtl", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
- needs_conversion=True,
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "direction",
+ "ltr rtl",
+ animation_value_type="none",
+ spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
+ needs_conversion=True,
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.single_keyword("text-orientation",
- "mixed upright sideways",
- extra_gecko_aliases="sideways-right=sideways",
- products="gecko",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation")}
+// TODO(emilio): Should text-orientation be non-animatable? It affects the
+// WritingMode value, but not the logical -> physical mapping of properties,
+// which is the reason direction / writing-mode are non-animatable.
+${helpers.single_keyword(
+ "text-orientation",
+ "mixed upright sideways",
+ extra_gecko_aliases="sideways-right=sideways",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation",
+)}
// CSS Color Module Level 4
// https://drafts.csswg.org/css-color/
-${helpers.single_keyword("color-adjust",
- "economy exact", products="gecko",
- gecko_pref="layout.css.color-adjust.enabled",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-color/#propdef-color-adjust")}
+${helpers.single_keyword(
+ "color-adjust",
+ "economy exact", products="gecko",
+ gecko_pref="layout.css.color-adjust.enabled",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-color/#propdef-color-adjust",
+)}
<% image_rendering_custom_consts = { "crisp-edges": "CRISPEDGES",
"-moz-crisp-edges": "CRISPEDGES" } %>
// According to to CSS-IMAGES-3, `optimizespeed` and `optimizequality` are synonyms for `auto`
// And, firefox doesn't support `pixelated` yet (https://bugzilla.mozilla.org/show_bug.cgi?id=856337)
-${helpers.single_keyword("image-rendering",
- "auto",
- extra_gecko_values="optimizespeed optimizequality -moz-crisp-edges",
- extra_servo_values="pixelated crisp-edges",
- custom_consts=image_rendering_custom_consts,
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-images/#propdef-image-rendering")}
+${helpers.single_keyword(
+ "image-rendering",
+ "auto",
+ extra_gecko_values="optimizespeed optimizequality -moz-crisp-edges",
+ extra_servo_values="pixelated crisp-edges",
+ custom_consts=image_rendering_custom_consts,
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-images/#propdef-image-rendering",
+)}
${helpers.predefined_type("image-orientation",
"ImageOrientation",
diff --git a/components/style/properties/longhands/position.mako.rs b/components/style/properties/longhands/position.mako.rs
index a99cebfdba9..3b34047fc5a 100644
--- a/components/style/properties/longhands/position.mako.rs
+++ b/components/style/properties/longhands/position.mako.rs
@@ -21,14 +21,15 @@
servo_restyle_damage="reflow_out_of_flow"
)}
% endfor
-// offset-* logical properties, map to "top" / "left" / "bottom" / "right"
+// inset-* logical properties, map to "top" / "left" / "bottom" / "right"
% for side in LOGICAL_SIDES:
${helpers.predefined_type(
- "offset-%s" % side,
+ "inset-%s" % side,
"LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
- spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side,
+ spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
flags="GETCS_NEEDS_LAYOUT_FLUSH",
+ alias="offset-%s:layout.css.offset-logical-properties.enabled" % side,
animation_value_type="ComputedValue",
logical=True,
)}
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index b6a8879e106..3e6676842c5 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -35,7 +35,7 @@ use logical_geometry::WritingMode;
#[cfg(feature = "gecko")] use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use media_queries::Device;
use parser::ParserContext;
-#[cfg(feature = "gecko")] use properties::longhands::system_font::SystemFont;
+use properties::longhands::system_font::SystemFont;
use rule_cache::{RuleCache, RuleCacheConditions};
use selector_parser::PseudoElement;
use selectors::parser::SelectorParseErrorKind;
@@ -100,6 +100,7 @@ pub mod longhands {
% for style_struct in data.style_structs:
include!("${repr(os.path.join(OUT_DIR, 'longhands/{}.rs'.format(style_struct.name_lower)))[1:-1]}");
% endfor
+ pub const ANIMATABLE_PROPERTY_COUNT: usize = ${sum(1 for prop in data.longhands if prop.animatable)};
}
macro_rules! unwrap_or_initial {
@@ -177,7 +178,6 @@ pub mod shorthands {
data.declare_shorthand(
"all",
logical_longhands + other_longhands,
- gecko_pref="layout.css.all-shorthand.enabled",
spec="https://drafts.csswg.org/css-cascade-3/#all-shorthand"
)
%>
@@ -410,6 +410,7 @@ pub struct NonCustomPropertyId(usize);
impl NonCustomPropertyId {
#[cfg(feature = "gecko")]
+ #[inline]
fn to_nscsspropertyid(self) -> nsCSSPropertyID {
static MAP: [nsCSSPropertyID; ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())}] = [
% for property in data.longhands + data.shorthands + data.all_aliases():
@@ -835,6 +836,8 @@ bitflags! {
* they can be checked in the C++ side via ServoCSSPropList.h. */
/// This property can be animated on the compositor.
const CAN_ANIMATE_ON_COMPOSITOR = 0;
+ /// This shorthand property is accessible from getComputedStyle.
+ const SHORTHAND_IN_GETCS = 0;
}
}
@@ -943,25 +946,17 @@ impl LonghandId {
}
/// Returns whether this property is animatable.
+ #[inline]
pub fn is_animatable(self) -> bool {
- match self {
- % for property in data.longhands:
- LonghandId::${property.camel_case} => {
- ${str(property.animatable).lower()}
- }
- % endfor
- }
+ ${static_longhand_id_set("ANIMATABLE", lambda p: p.animatable)}
+ ANIMATABLE.contains(self)
}
/// Returns whether this property is animatable in a discrete way.
+ #[inline]
pub fn is_discrete_animatable(self) -> bool {
- match self {
- % for property in data.longhands:
- LonghandId::${property.camel_case} => {
- ${str(property.animation_value_type == "discrete").lower()}
- }
- % endfor
- }
+ ${static_longhand_id_set("DISCRETE_ANIMATABLE", lambda p: p.animation_value_type == "discrete")}
+ DISCRETE_ANIMATABLE.contains(self)
}
/// Converts from a LonghandId to an adequate nsCSSPropertyID.
@@ -982,20 +977,30 @@ impl LonghandId {
}
}
- /// If this is a logical property, return the corresponding physical one in the given writing mode.
+ /// Return whether this property is logical.
+ #[inline]
+ pub fn is_logical(&self) -> bool {
+ ${static_longhand_id_set("LOGICAL", lambda p: p.logical)}
+ LOGICAL.contains(*self)
+ }
+
+ /// If this is a logical property, return the corresponding physical one in
+ /// the given writing mode.
+ ///
/// Otherwise, return unchanged.
+ #[inline]
pub fn to_physical(&self, wm: WritingMode) -> Self {
match *self {
% for property in data.longhands:
- % if property.logical:
- LonghandId::${property.camel_case} => {
- <%helpers:logical_setter_helper name="${property.name}">
- <%def name="inner(physical_ident)">
- LonghandId::${to_camel_case(physical_ident)}
- </%def>
- </%helpers:logical_setter_helper>
- }
- % endif
+ % if property.logical:
+ LonghandId::${property.camel_case} => {
+ <%helpers:logical_setter_helper name="${property.name}">
+ <%def name="inner(physical_ident)">
+ LonghandId::${to_camel_case(physical_ident)}
+ </%def>
+ </%helpers:logical_setter_helper>
+ }
+ % endif
% endfor
_ => *self
}
@@ -1485,7 +1490,7 @@ impl UnparsedValue {
PropertyDeclaration::CSSWideKeyword(WideKeywordDeclaration {
id: longhand_id,
keyword,
- })
+ })
})
}
}
@@ -1708,6 +1713,9 @@ impl PropertyId {
}
/// Returns a property id from Gecko's nsCSSPropertyID.
+ ///
+ /// TODO(emilio): We should be able to make this a single integer cast to
+ /// `NonCustomPropertyId`.
#[cfg(feature = "gecko")]
#[allow(non_upper_case_globals)]
pub fn from_nscsspropertyid(id: nsCSSPropertyID) -> Result<Self, ()> {
@@ -1931,14 +1939,15 @@ impl PropertyDeclaration {
}
/// Returns whether or not the property is set by a system font
- #[cfg(feature = "gecko")]
pub fn get_system(&self) -> Option<SystemFont> {
match *self {
+ % if product == "gecko":
% for prop in SYSTEM_FONT_LONGHANDS:
PropertyDeclaration::${to_camel_case(prop)}(ref prop) => {
prop.get_system()
}
% endfor
+ % endif
_ => None,
}
}
@@ -1951,12 +1960,6 @@ impl PropertyDeclaration {
}
}
- #[cfg(feature = "servo")]
- /// Dummy method to avoid cfg()s
- pub fn get_system(&self) -> Option<()> {
- None
- }
-
/// Returns whether the declaration may be serialized as part of a shorthand.
///
/// This method returns false if this declaration contains variable or has a
@@ -2609,6 +2612,22 @@ impl ComputedValues {
self.custom_properties.as_ref()
}
+% for prop in data.longhands:
+ /// Gets the computed value of a given property.
+ #[inline(always)]
+ #[allow(non_snake_case)]
+ pub fn clone_${prop.ident}(
+ &self,
+ ) -> longhands::${prop.ident}::computed_value::T {
+ self.get_${prop.style_struct.ident.strip("_")}()
+ % if prop.logical:
+ .clone_${prop.ident}(self.writing_mode)
+ % else:
+ .clone_${prop.ident}()
+ % endif
+ }
+% endfor
+
/// Writes the value of the given longhand as a string in `dest`.
///
/// Note that the value will usually be the computed value, except for
@@ -2629,20 +2648,10 @@ impl ComputedValues {
match property_id {
% for prop in data.longhands:
LonghandId::${prop.camel_case} => {
- let style_struct =
- self.get_${prop.style_struct.ident.strip("_")}();
- let value =
- style_struct
- % if prop.logical:
- .clone_${prop.ident}(self.writing_mode);
- % else:
- .clone_${prop.ident}();
- % endif
-
+ let value = self.clone_${prop.ident}();
% if prop.predefined_type == "Color":
let value = self.resolve_color(value);
% endif
-
value.to_css(dest)
}
% endfor
diff --git a/components/style/properties/shorthands/background.mako.rs b/components/style/properties/shorthands/background.mako.rs
index b16c9918a24..dff9319cb30 100644
--- a/components/style/properties/shorthands/background.mako.rs
+++ b/components/style/properties/shorthands/background.mako.rs
@@ -196,6 +196,7 @@
</%helpers:shorthand>
<%helpers:shorthand name="background-position"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="background-position-x background-position-y"
spec="https://drafts.csswg.org/css-backgrounds-4/#the-background-position">
use properties::longhands::{background_position_x, background_position_y};
diff --git a/components/style/properties/shorthands/box.mako.rs b/components/style/properties/shorthands/box.mako.rs
index 842dfbd7229..1425f012854 100644
--- a/components/style/properties/shorthands/box.mako.rs
+++ b/components/style/properties/shorthands/box.mako.rs
@@ -6,6 +6,7 @@
<%helpers:shorthand
name="overflow"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="overflow-x overflow-y"
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"
>
diff --git a/components/style/properties/shorthands/font.mako.rs b/components/style/properties/shorthands/font.mako.rs
index a53f899851c..75095bcebc2 100644
--- a/components/style/properties/shorthands/font.mako.rs
+++ b/components/style/properties/shorthands/font.mako.rs
@@ -285,6 +285,7 @@
</%helpers:shorthand>
<%helpers:shorthand name="font-variant"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="font-variant-caps
${'font-variant-alternates' if product == 'gecko' else ''}
${'font-variant-east-asian' if product == 'gecko' else ''}
diff --git a/components/style/properties/shorthands/svg.mako.rs b/components/style/properties/shorthands/svg.mako.rs
index aa73c77e46b..03027359dd4 100644
--- a/components/style/properties/shorthands/svg.mako.rs
+++ b/components/style/properties/shorthands/svg.mako.rs
@@ -5,6 +5,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="mask" products="gecko" extra_prefixes="webkit"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="mask-mode mask-repeat mask-clip mask-origin mask-composite mask-position-x
mask-position-y mask-size mask-image"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask">
@@ -182,6 +183,7 @@
</%helpers:shorthand>
<%helpers:shorthand name="mask-position" products="gecko" extra_prefixes="webkit"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="mask-position-x mask-position-y"
spec="https://drafts.csswg.org/css-masks-4/#the-mask-position">
use properties::longhands::{mask_position_x,mask_position_y};
diff --git a/components/style/properties/shorthands/text.mako.rs b/components/style/properties/shorthands/text.mako.rs
index 18a0786494d..e83d0b67544 100644
--- a/components/style/properties/shorthands/text.mako.rs
+++ b/components/style/properties/shorthands/text.mako.rs
@@ -5,6 +5,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<%helpers:shorthand name="text-decoration"
+ flags="SHORTHAND_IN_GETCS"
sub_properties="text-decoration-line
${' text-decoration-style text-decoration-color' if product == 'gecko' else ''}"
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration">
diff --git a/components/style/selector_map.rs b/components/style/selector_map.rs
index 3b9b6f20184..3b0dcca9525 100644
--- a/components/style/selector_map.rs
+++ b/components/style/selector_map.rs
@@ -5,7 +5,7 @@
//! A data structure to efficiently index structs containing selectors by local
//! name, ids and hash.
-use {Atom, LocalName, WeakAtom};
+use {Atom, LocalName, Namespace, WeakAtom};
use applicable_declarations::ApplicableDeclarationList;
use context::QuirksMode;
use dom::TElement;
@@ -102,6 +102,8 @@ pub struct SelectorMap<T: 'static> {
pub class_hash: MaybeCaseInsensitiveHashMap<Atom, SmallVec<[T; 1]>>,
/// A hash from local name to rules which contain that local name selector.
pub local_name_hash: PrecomputedHashMap<LocalName, SmallVec<[T; 1]>>,
+ /// A hash from namespace to rules which contain that namespace selector.
+ pub namespace_hash: PrecomputedHashMap<Namespace, SmallVec<[T; 1]>>,
/// Rules that don't have ID, class, or element selectors.
pub other: SmallVec<[T; 1]>,
/// The number of entries in this map.
@@ -125,6 +127,7 @@ impl<T: 'static> SelectorMap<T> {
id_hash: MaybeCaseInsensitiveHashMap::new(),
class_hash: MaybeCaseInsensitiveHashMap::new(),
local_name_hash: HashMap::default(),
+ namespace_hash: HashMap::default(),
other: SmallVec::new(),
count: 0,
}
@@ -135,6 +138,7 @@ impl<T: 'static> SelectorMap<T> {
self.id_hash.clear();
self.class_hash.clear();
self.local_name_hash.clear();
+ self.namespace_hash.clear();
self.other.clear();
self.count = 0;
}
@@ -217,6 +221,18 @@ impl SelectorMap<Rule> {
)
}
+ if let Some(rules) = self.namespace_hash.get(rule_hash_target.namespace()) {
+ SelectorMap::get_matching_rules(
+ element,
+ rules,
+ matching_rules_list,
+ context,
+ flags_setter,
+ cascade_level,
+ shadow_cascade_order,
+ )
+ }
+
SelectorMap::get_matching_rules(
element,
&self.other,
@@ -261,7 +277,8 @@ impl SelectorMap<Rule> {
}
impl<T: SelectorMapEntry> SelectorMap<T> {
- /// Inserts into the correct hash, trying id, class, and localname.
+ /// Inserts into the correct hash, trying id, class, localname and
+ /// namespace.
pub fn insert(
&mut self,
entry: T,
@@ -298,13 +315,17 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
.try_entry(name.clone())?
.or_insert_with(SmallVec::new)
},
+ Bucket::Namespace(url) => self.namespace_hash
+ .try_entry(url.clone())?
+ .or_insert_with(SmallVec::new),
Bucket::Universal => &mut self.other,
};
vector.try_push(entry)
}
- /// Looks up entries by id, class, local name, and other (in order).
+ /// Looks up entries by id, class, local name, namespace, and other (in
+ /// order).
///
/// Each entry is passed to the callback, which returns true to continue
/// iterating entries, or false to terminate the lookup.
@@ -319,7 +340,6 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
E: TElement,
F: FnMut(&'a T) -> bool,
{
- // Id.
if let Some(id) = element.id() {
if let Some(v) = self.id_hash.get(id, quirks_mode) {
for entry in v.iter() {
@@ -330,7 +350,6 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
}
}
- // Class.
let mut done = false;
element.each_class(|class| {
if !done {
@@ -348,7 +367,6 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
return false;
}
- // Local name.
if let Some(v) = self.local_name_hash.get(element.local_name()) {
for entry in v.iter() {
if !f(&entry) {
@@ -357,7 +375,14 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
}
}
- // Other.
+ if let Some(v) = self.namespace_hash.get(element.namespace()) {
+ for entry in v.iter() {
+ if !f(&entry) {
+ return false;
+ }
+ }
+ }
+
for entry in self.other.iter() {
if !f(&entry) {
return false;
@@ -425,6 +450,7 @@ enum Bucket<'a> {
name: &'a LocalName,
lower_name: &'a LocalName,
},
+ Namespace(&'a Namespace),
Universal,
}
@@ -436,6 +462,8 @@ fn specific_bucket_for<'a>(component: &'a Component<SelectorImpl>) -> Bucket<'a>
name: &selector.name,
lower_name: &selector.lower_name,
},
+ Component::Namespace(_, ref url) |
+ Component::DefaultNamespace(ref url) => Bucket::Namespace(url),
// ::slotted(..) isn't a normal pseudo-element, so we can insert it on
// the rule hash normally without much problem. For example, in a
// selector like:
@@ -470,7 +498,7 @@ fn find_bucket<'a>(mut iter: SelectorIter<'a, SelectorImpl>) -> Bucket<'a> {
// We basically want to find the most specific bucket,
// where:
//
- // id > class > local name > universal.
+ // id > class > local name > namespace > universal.
//
for ss in &mut iter {
let new_bucket = specific_bucket_for(ss);
@@ -480,10 +508,15 @@ fn find_bucket<'a>(mut iter: SelectorIter<'a, SelectorImpl>) -> Bucket<'a> {
current_bucket = new_bucket;
},
Bucket::LocalName { .. } => {
- if matches!(current_bucket, Bucket::Universal) {
+ if matches!(current_bucket, Bucket::Universal | Bucket::Namespace(..)) {
current_bucket = new_bucket;
}
},
+ Bucket::Namespace(..) => {
+ if matches!(current_bucket, Bucket::Universal) {
+ current_bucket = new_bucket;
+ }
+ }
Bucket::Universal => {},
}
}
diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs
index 336971f98df..ba31cfcaf4b 100644
--- a/components/style/servo/media_queries.rs
+++ b/components/style/servo/media_queries.rs
@@ -170,9 +170,9 @@ pub enum ExpressionKind {
/// <http://dev.w3.org/csswg/mediaqueries-3/#media1>
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
-pub struct Expression(pub ExpressionKind);
+pub struct MediaFeatureExpression(pub ExpressionKind);
-impl Expression {
+impl MediaFeatureExpression {
/// The kind of expression we're, just for unit testing.
///
/// Eventually this will become servo-only.
@@ -183,34 +183,43 @@ impl Expression {
/// Parse a media expression of the form:
///
/// ```
- /// (media-feature: media-value)
+ /// media-feature: media-value
/// ```
///
- /// Only supports width and width ranges for now.
+ /// Only supports width ranges for now.
pub fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
input.expect_parenthesis_block()?;
input.parse_nested_block(|input| {
- let name = input.expect_ident_cloned()?;
- input.expect_colon()?;
- // TODO: Handle other media features
- Ok(Expression(match_ignore_ascii_case! { &name,
- "min-width" => {
- ExpressionKind::Width(Range::Min(specified::Length::parse_non_negative(context, input)?))
- },
- "max-width" => {
- ExpressionKind::Width(Range::Max(specified::Length::parse_non_negative(context, input)?))
- },
- "width" => {
- ExpressionKind::Width(Range::Eq(specified::Length::parse_non_negative(context, input)?))
- },
- _ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
- }))
+ Self::parse_in_parenthesis_block(context, input)
})
}
+ /// Parse a media range expression where we've already consumed the
+ /// parenthesis.
+ pub fn parse_in_parenthesis_block<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ let name = input.expect_ident_cloned()?;
+ input.expect_colon()?;
+ // TODO: Handle other media features
+ Ok(MediaFeatureExpression(match_ignore_ascii_case! { &name,
+ "min-width" => {
+ ExpressionKind::Width(Range::Min(specified::Length::parse_non_negative(context, input)?))
+ },
+ "max-width" => {
+ ExpressionKind::Width(Range::Max(specified::Length::parse_non_negative(context, input)?))
+ },
+ "width" => {
+ ExpressionKind::Width(Range::Eq(specified::Length::parse_non_negative(context, input)?))
+ },
+ _ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
+ }))
+ }
+
/// Evaluate this expression and return whether it matches the current
/// device.
pub fn matches(&self, device: &Device, quirks_mode: QuirksMode) -> bool {
@@ -228,7 +237,7 @@ impl Expression {
}
}
-impl ToCss for Expression {
+impl ToCss for MediaFeatureExpression {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
@@ -246,8 +255,8 @@ impl ToCss for Expression {
/// An enumeration that represents a ranged value.
///
-/// Only public for testing, implementation details of `Expression` may change
-/// for Stylo.
+/// Only public for testing, implementation details of `MediaFeatureExpression`
+/// may change for Stylo.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
pub enum Range<T> {
diff --git a/components/style/stylesheets/font_feature_values_rule.rs b/components/style/stylesheets/font_feature_values_rule.rs
index 8ce16e2ccf9..c70a46c1c9d 100644
--- a/components/style/stylesheets/font_feature_values_rule.rs
+++ b/components/style/stylesheets/font_feature_values_rule.rs
@@ -428,6 +428,7 @@ macro_rules! font_feature_values_blocks {
fn parse_block<'t>(
&mut self,
prelude: BlockType,
+ _location: SourceLocation,
input: &mut Parser<'i, 't>
) -> Result<Self::AtRule, ParseError<'i>> {
debug_assert_eq!(self.context.rule_type(), CssRuleType::FontFeatureValues);
diff --git a/components/style/stylesheets/keyframes_rule.rs b/components/style/stylesheets/keyframes_rule.rs
index a0cb5fa0b1d..85dc00bb9af 100644
--- a/components/style/stylesheets/keyframes_rule.rs
+++ b/components/style/stylesheets/keyframes_rule.rs
@@ -509,14 +509,8 @@ impl<'a, 'i> AtRuleParser<'i> for KeyframeListParser<'a> {
type Error = StyleParseErrorKind<'i>;
}
-/// A wrapper to wraps the KeyframeSelector with its source location
-struct KeyframeSelectorParserPrelude {
- selector: KeyframeSelector,
- source_location: SourceLocation,
-}
-
impl<'a, 'i> QualifiedRuleParser<'i> for KeyframeListParser<'a> {
- type Prelude = KeyframeSelectorParserPrelude;
+ type Prelude = KeyframeSelector;
type QualifiedRule = Arc<Locked<Keyframe>>;
type Error = StyleParseErrorKind<'i>;
@@ -525,27 +519,21 @@ impl<'a, 'i> QualifiedRuleParser<'i> for KeyframeListParser<'a> {
input: &mut Parser<'i, 't>,
) -> Result<Self::Prelude, ParseError<'i>> {
let start_position = input.position();
- let start_location = input.current_source_location();
- match KeyframeSelector::parse(input) {
- Ok(sel) => Ok(KeyframeSelectorParserPrelude {
- selector: sel,
- source_location: start_location,
- }),
- Err(e) => {
- let location = e.location;
- let error = ContextualParseError::InvalidKeyframeRule(
- input.slice_from(start_position),
- e.clone(),
+ KeyframeSelector::parse(input).map_err(|e| {
+ let location = e.location;
+ let error = ContextualParseError::InvalidKeyframeRule(
+ input.slice_from(start_position),
+ e.clone(),
);
- self.context.log_css_error(location, error);
- Err(e)
- },
- }
+ self.context.log_css_error(location, error);
+ e
+ })
}
fn parse_block<'t>(
&mut self,
- prelude: Self::Prelude,
+ selector: Self::Prelude,
+ source_location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<Self::QualifiedRule, ParseError<'i>> {
let context = ParserContext::new_with_rule_type(
@@ -580,9 +568,9 @@ impl<'a, 'i> QualifiedRuleParser<'i> for KeyframeListParser<'a> {
// `parse_important` is not called here, `!important` is not allowed in keyframe blocks.
}
Ok(Arc::new(self.shared_lock.wrap(Keyframe {
- selector: prelude.selector,
+ selector,
block: Arc::new(self.shared_lock.wrap(block)),
- source_location: prelude.source_location,
+ source_location,
})))
}
}
diff --git a/components/style/stylesheets/rule_parser.rs b/components/style/stylesheets/rule_parser.rs
index 41d87aa07a4..d2f9b691ad4 100644
--- a/components/style/stylesheets/rule_parser.rs
+++ b/components/style/stylesheets/rule_parser.rs
@@ -146,31 +146,31 @@ pub enum VendorPrefix {
/// A rule prelude for at-rule with block.
pub enum AtRuleBlockPrelude {
/// A @font-face rule prelude.
- FontFace(SourceLocation),
+ FontFace,
/// A @font-feature-values rule prelude, with its FamilyName list.
- FontFeatureValues(Vec<FamilyName>, SourceLocation),
+ FontFeatureValues(Vec<FamilyName>),
/// A @counter-style rule prelude, with its counter style name.
- CounterStyle(CustomIdent, SourceLocation),
+ CounterStyle(CustomIdent),
/// A @media rule prelude, with its media queries.
- Media(Arc<Locked<MediaList>>, SourceLocation),
+ Media(Arc<Locked<MediaList>>),
/// An @supports rule, with its conditional
- Supports(SupportsCondition, SourceLocation),
+ Supports(SupportsCondition),
/// A @viewport rule prelude.
Viewport,
/// A @keyframes rule, with its animation name and vendor prefix if exists.
- Keyframes(KeyframesName, Option<VendorPrefix>, SourceLocation),
+ Keyframes(KeyframesName, Option<VendorPrefix>),
/// A @page rule prelude.
- Page(SourceLocation),
+ Page,
/// A @document rule, with its conditional.
- Document(DocumentCondition, SourceLocation),
+ Document(DocumentCondition),
}
/// A rule prelude for at-rule without block.
pub enum AtRuleNonBlockPrelude {
/// A @import rule prelude.
- Import(CssUrl, Arc<Locked<MediaList>>, SourceLocation),
+ Import(CssUrl, Arc<Locked<MediaList>>),
/// A @namespace rule prelude.
- Namespace(Option<Prefix>, Namespace, SourceLocation),
+ Namespace(Option<Prefix>, Namespace),
}
impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
@@ -184,7 +184,6 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
name: CowRcStr<'i>,
input: &mut Parser<'i, 't>,
) -> Result<AtRuleType<AtRuleNonBlockPrelude, AtRuleBlockPrelude>, ParseError<'i>> {
- let location = input.current_source_location();
match_ignore_ascii_case! { &*name,
"import" => {
if !self.check_state(State::Imports) {
@@ -197,7 +196,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
let media = MediaList::parse(&self.context, input);
let media = Arc::new(self.shared_lock.wrap(media));
- let prelude = AtRuleNonBlockPrelude::Import(url, media, location);
+ let prelude = AtRuleNonBlockPrelude::Import(url, media);
return Ok(AtRuleType::WithoutBlock(prelude));
},
"namespace" => {
@@ -215,7 +214,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
Err(e) => return Err(e.into()),
};
let url = Namespace::from(maybe_namespace.as_ref());
- let prelude = AtRuleNonBlockPrelude::Namespace(prefix, url, location);
+ let prelude = AtRuleNonBlockPrelude::Namespace(prefix, url);
return Ok(AtRuleType::WithoutBlock(prelude));
},
// @charset is removed by rust-cssparser if it’s the first rule in the stylesheet
@@ -238,24 +237,29 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
fn parse_block<'t>(
&mut self,
prelude: AtRuleBlockPrelude,
+ location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<CssRule, ParseError<'i>> {
- AtRuleParser::parse_block(&mut self.nested(), prelude, input).map(|rule| {
+ AtRuleParser::parse_block(&mut self.nested(), prelude, location, input).map(|rule| {
self.state = State::Body;
rule
})
}
#[inline]
- fn rule_without_block(&mut self, prelude: AtRuleNonBlockPrelude) -> CssRule {
+ fn rule_without_block(
+ &mut self,
+ prelude: AtRuleNonBlockPrelude,
+ source_location: SourceLocation,
+ ) -> CssRule {
match prelude {
- AtRuleNonBlockPrelude::Import(url, media, location) => {
+ AtRuleNonBlockPrelude::Import(url, media) => {
let loader = self.loader
.expect("Expected a stylesheet loader for @import");
let import_rule = loader.request_stylesheet(
url,
- location,
+ source_location,
&self.context,
&self.shared_lock,
media,
@@ -264,7 +268,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
self.state = State::Imports;
CssRule::Import(import_rule)
},
- AtRuleNonBlockPrelude::Namespace(prefix, url, source_location) => {
+ AtRuleNonBlockPrelude::Namespace(prefix, url) => {
let prefix = if let Some(prefix) = prefix {
self.namespaces.prefixes.insert(prefix.clone(), url.clone());
Some(prefix)
@@ -284,13 +288,8 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
}
}
-pub struct QualifiedRuleParserPrelude {
- selectors: SelectorList<SelectorImpl>,
- source_location: SourceLocation,
-}
-
impl<'a, 'i> QualifiedRuleParser<'i> for TopLevelRuleParser<'a> {
- type Prelude = QualifiedRuleParserPrelude;
+ type Prelude = SelectorList<SelectorImpl>;
type QualifiedRule = CssRule;
type Error = StyleParseErrorKind<'i>;
@@ -298,7 +297,7 @@ impl<'a, 'i> QualifiedRuleParser<'i> for TopLevelRuleParser<'a> {
fn parse_prelude<'t>(
&mut self,
input: &mut Parser<'i, 't>,
- ) -> Result<QualifiedRuleParserPrelude, ParseError<'i>> {
+ ) -> Result<Self::Prelude, ParseError<'i>> {
if !self.check_state(State::Body) {
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
}
@@ -309,10 +308,16 @@ impl<'a, 'i> QualifiedRuleParser<'i> for TopLevelRuleParser<'a> {
#[inline]
fn parse_block<'t>(
&mut self,
- prelude: QualifiedRuleParserPrelude,
+ prelude: Self::Prelude,
+ location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<CssRule, ParseError<'i>> {
- QualifiedRuleParser::parse_block(&mut self.nested(), prelude, input).map(|result| {
+ QualifiedRuleParser::parse_block(
+ &mut self.nested(),
+ prelude,
+ location,
+ input,
+ ).map(|result| {
self.state = State::Body;
result
})
@@ -373,20 +378,18 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
name: CowRcStr<'i>,
input: &mut Parser<'i, 't>,
) -> Result<AtRuleType<AtRuleNonBlockPrelude, AtRuleBlockPrelude>, ParseError<'i>> {
- let location = input.current_source_location();
-
match_ignore_ascii_case! { &*name,
"media" => {
let media_queries = MediaList::parse(self.context, input);
let arc = Arc::new(self.shared_lock.wrap(media_queries));
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Media(arc, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Media(arc)))
},
"supports" => {
let cond = SupportsCondition::parse(input)?;
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Supports(cond, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Supports(cond)))
},
"font-face" => {
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::FontFace(location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::FontFace))
},
"font-feature-values" => {
if !cfg!(feature = "gecko") {
@@ -394,7 +397,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
return Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
}
let family_names = parse_family_name_list(self.context, input)?;
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::FontFeatureValues(family_names, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::FontFeatureValues(family_names)))
},
"counter-style" => {
if !cfg!(feature = "gecko") {
@@ -402,7 +405,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
return Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
}
let name = parse_counter_style_name_definition(input)?;
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::CounterStyle(name, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::CounterStyle(name)))
},
"viewport" => {
if viewport_rule::enabled() {
@@ -426,11 +429,11 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
}
let name = KeyframesName::parse(self.context, input)?;
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Keyframes(name, prefix, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Keyframes(name, prefix)))
},
"page" => {
if cfg!(feature = "gecko") {
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Page(location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Page))
} else {
Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
}
@@ -443,7 +446,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
}
let cond = DocumentCondition::parse(self.context, input)?;
- Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond, location)))
+ Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond)))
},
_ => Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
}
@@ -452,10 +455,11 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
fn parse_block<'t>(
&mut self,
prelude: AtRuleBlockPrelude,
+ source_location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<CssRule, ParseError<'i>> {
match prelude {
- AtRuleBlockPrelude::FontFace(location) => {
+ AtRuleBlockPrelude::FontFace => {
let context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::FontFace,
@@ -463,10 +467,10 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
);
Ok(CssRule::FontFace(Arc::new(self.shared_lock.wrap(
- parse_font_face_block(&context, input, location).into(),
+ parse_font_face_block(&context, input, source_location).into(),
))))
},
- AtRuleBlockPrelude::FontFeatureValues(family_names, location) => {
+ AtRuleBlockPrelude::FontFeatureValues(family_names) => {
let context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::FontFeatureValues,
@@ -478,11 +482,11 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
&context,
input,
family_names,
- location,
+ source_location,
),
))))
},
- AtRuleBlockPrelude::CounterStyle(name, location) => {
+ AtRuleBlockPrelude::CounterStyle(name) => {
let context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::CounterStyle,
@@ -495,19 +499,19 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
name,
&context,
input,
- location,
+ source_location,
)?.into(),
),
)))
},
- AtRuleBlockPrelude::Media(media_queries, source_location) => {
+ AtRuleBlockPrelude::Media(media_queries) => {
Ok(CssRule::Media(Arc::new(self.shared_lock.wrap(MediaRule {
media_queries,
rules: self.parse_nested_rules(input, CssRuleType::Media),
source_location,
}))))
},
- AtRuleBlockPrelude::Supports(condition, source_location) => {
+ AtRuleBlockPrelude::Supports(condition) => {
let eval_context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::Style,
@@ -535,7 +539,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
ViewportRule::parse(&context, input)?,
))))
},
- AtRuleBlockPrelude::Keyframes(name, vendor_prefix, source_location) => {
+ AtRuleBlockPrelude::Keyframes(name, vendor_prefix) => {
let context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::Keyframes,
@@ -555,7 +559,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
},
))))
},
- AtRuleBlockPrelude::Page(source_location) => {
+ AtRuleBlockPrelude::Page => {
let context = ParserContext::new_with_rule_type(
self.context,
CssRuleType::Page,
@@ -569,7 +573,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
source_location,
}))))
},
- AtRuleBlockPrelude::Document(condition, source_location) => {
+ AtRuleBlockPrelude::Document(condition) => {
if !cfg!(feature = "gecko") {
unreachable!()
}
@@ -586,39 +590,37 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
}
impl<'a, 'b, 'i> QualifiedRuleParser<'i> for NestedRuleParser<'a, 'b> {
- type Prelude = QualifiedRuleParserPrelude;
+ type Prelude = SelectorList<SelectorImpl>;
type QualifiedRule = CssRule;
type Error = StyleParseErrorKind<'i>;
fn parse_prelude<'t>(
&mut self,
input: &mut Parser<'i, 't>,
- ) -> Result<QualifiedRuleParserPrelude, ParseError<'i>> {
+ ) -> Result<Self::Prelude, ParseError<'i>> {
let selector_parser = SelectorParser {
stylesheet_origin: self.stylesheet_origin,
namespaces: self.namespaces,
url_data: Some(self.context.url_data),
};
-
- let source_location = input.current_source_location();
- let selectors = SelectorList::parse(&selector_parser, input)?;
-
- Ok(QualifiedRuleParserPrelude { selectors, source_location, })
+ SelectorList::parse(&selector_parser, input)
}
fn parse_block<'t>(
&mut self,
- prelude: QualifiedRuleParserPrelude,
+ selectors: Self::Prelude,
+ source_location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<CssRule, ParseError<'i>> {
let context =
ParserContext::new_with_rule_type(self.context, CssRuleType::Style, self.namespaces);
let declarations = parse_property_declaration_list(&context, input);
+ let block = Arc::new(self.shared_lock.wrap(declarations));
Ok(CssRule::Style(Arc::new(self.shared_lock.wrap(StyleRule {
- selectors: prelude.selectors,
- block: Arc::new(self.shared_lock.wrap(declarations)),
- source_location: prelude.source_location,
+ selectors,
+ block,
+ source_location,
}))))
}
}
diff --git a/components/style/values/animated/color.rs b/components/style/values/animated/color.rs
index 1b01a86457a..7f6b4cd9d43 100644
--- a/components/style/values/animated/color.rs
+++ b/components/style/values/animated/color.rs
@@ -186,7 +186,7 @@ impl ComputeSquaredDistance for Color {
(Foreground, Foreground) => SquaredDistance::from_sqrt(0.),
(Numeric(c1), Numeric(c2)) => c1.compute_squared_distance(&c2)?,
(Foreground, Numeric(color)) | (Numeric(color), Foreground) => {
- // `computed_squared_distance` is symmetic.
+ // `computed_squared_distance` is symmetric.
color.compute_squared_distance(&RGBA::transparent())?
+ SquaredDistance::from_sqrt(1.)
}
@@ -207,7 +207,6 @@ impl ComputeSquaredDistance for Color {
impl ToAnimatedZero for Color {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {
- // FIXME(nox): This does not look correct to me.
- Err(())
+ Ok(RGBA::transparent().into())
}
}
diff --git a/components/style/values/animated/effects.rs b/components/style/values/animated/effects.rs
index d0463365fc2..a201ec0549e 100644
--- a/components/style/values/animated/effects.rs
+++ b/components/style/values/animated/effects.rs
@@ -6,7 +6,7 @@
#[cfg(not(feature = "gecko"))]
use values::Impossible;
-use values::animated::color::RGBA;
+use values::animated::color::Color;
use values::computed::{Angle, Number};
use values::computed::length::Length;
#[cfg(feature = "gecko")]
@@ -17,7 +17,7 @@ use values::generics::effects::Filter as GenericFilter;
use values::generics::effects::SimpleShadow as GenericSimpleShadow;
/// An animated value for a single `box-shadow`.
-pub type BoxShadow = GenericBoxShadow<Option<RGBA>, Length, Length, Length>;
+pub type BoxShadow = GenericBoxShadow<Color, Length, Length, Length>;
/// An animated value for a single `filter`.
#[cfg(feature = "gecko")]
@@ -28,7 +28,7 @@ pub type Filter = GenericFilter<Angle, Number, Length, SimpleShadow, ComputedUrl
pub type Filter = GenericFilter<Angle, Number, Length, Impossible, Impossible>;
/// An animated value for the `drop-shadow()` filter.
-pub type SimpleShadow = GenericSimpleShadow<Option<RGBA>, Length, Length>;
+pub type SimpleShadow = GenericSimpleShadow<Color, Length, Length>;
impl ComputeSquaredDistance for BoxShadow {
#[inline]
diff --git a/components/style/values/computed/effects.rs b/components/style/values/computed/effects.rs
index 3d804d42605..07ac6441b6c 100644
--- a/components/style/values/computed/effects.rs
+++ b/components/style/values/computed/effects.rs
@@ -7,7 +7,7 @@
#[cfg(not(feature = "gecko"))]
use values::Impossible;
use values::computed::{Angle, NonNegativeNumber};
-use values::computed::color::RGBAColor;
+use values::computed::color::Color;
use values::computed::length::{Length, NonNegativeLength};
#[cfg(feature = "gecko")]
use values::computed::url::ComputedUrl;
@@ -16,7 +16,7 @@ use values::generics::effects::Filter as GenericFilter;
use values::generics::effects::SimpleShadow as GenericSimpleShadow;
/// A computed value for a single shadow of the `box-shadow` property.
-pub type BoxShadow = GenericBoxShadow<Option<RGBAColor>, Length, NonNegativeLength, Length>;
+pub type BoxShadow = GenericBoxShadow<Color, Length, NonNegativeLength, Length>;
/// A computed value for a single `filter`.
#[cfg(feature = "gecko")]
@@ -27,4 +27,4 @@ pub type Filter = GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, Sim
pub type Filter = GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, Impossible, Impossible>;
/// A computed value for the `drop-shadow()` filter.
-pub type SimpleShadow = GenericSimpleShadow<Option<RGBAColor>, Length, NonNegativeLength>;
+pub type SimpleShadow = GenericSimpleShadow<Color, Length, NonNegativeLength>;
diff --git a/components/style/values/generics/counters.rs b/components/style/values/generics/counters.rs
index 66da2625ffd..779d56d65ee 100644
--- a/components/style/values/generics/counters.rs
+++ b/components/style/values/generics/counters.rs
@@ -122,7 +122,6 @@ impl<ImageUrl> Content<ImageUrl> {
pub fn normal() -> Self {
Content::Normal
}
-
}
/// Items for the `content` property.
diff --git a/components/style/values/specified/effects.rs b/components/style/values/specified/effects.rs
index f10b53fa788..c3304b05af0 100644
--- a/components/style/values/specified/effects.rs
+++ b/components/style/values/specified/effects.rs
@@ -17,14 +17,14 @@ use values::generics::effects::BoxShadow as GenericBoxShadow;
use values::generics::effects::Filter as GenericFilter;
use values::generics::effects::SimpleShadow as GenericSimpleShadow;
use values::specified::{Angle, NumberOrPercentage};
-use values::specified::color::RGBAColor;
+use values::specified::color::Color;
use values::specified::length::{Length, NonNegativeLength};
#[cfg(feature = "gecko")]
use values::specified::url::SpecifiedUrl;
/// A specified value for a single shadow of the `box-shadow` property.
pub type BoxShadow =
- GenericBoxShadow<Option<RGBAColor>, Length, Option<NonNegativeLength>, Option<Length>>;
+ GenericBoxShadow<Option<Color>, Length, Option<NonNegativeLength>, Option<Length>>;
/// A specified value for a single `filter`.
#[cfg(feature = "gecko")]
@@ -93,7 +93,7 @@ impl ToComputedValue for Factor {
}
/// A specified value for the `drop-shadow()` filter.
-pub type SimpleShadow = GenericSimpleShadow<Option<RGBAColor>, Length, Option<NonNegativeLength>>;
+pub type SimpleShadow = GenericSimpleShadow<Option<Color>, Length, Option<NonNegativeLength>>;
impl Parse for BoxShadow {
fn parse<'i, 't>(
@@ -135,7 +135,7 @@ impl Parse for BoxShadow {
}
}
if color.is_none() {
- if let Ok(value) = input.try(|i| RGBAColor::parse(context, i)) {
+ if let Ok(value) = input.try(|i| Color::parse(context, i)) {
color = Some(value);
continue;
}
@@ -249,16 +249,18 @@ impl Parse for SimpleShadow {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
- let color = input.try(|i| RGBAColor::parse(context, i)).ok();
+ let color = input.try(|i| Color::parse(context, i)).ok();
let horizontal = Length::parse(context, input)?;
let vertical = Length::parse(context, input)?;
let blur = input.try(|i| Length::parse_non_negative(context, i)).ok();
- let color = color.or_else(|| input.try(|i| RGBAColor::parse(context, i)).ok());
+ let blur = blur.map(NonNegative::<Length>);
+ let color = color.or_else(|| input.try(|i| Color::parse(context, i)).ok());
+
Ok(SimpleShadow {
- color: color,
- horizontal: horizontal,
- vertical: vertical,
- blur: blur.map(NonNegative::<Length>),
+ color,
+ horizontal,
+ vertical,
+ blur,
})
}
}
@@ -269,7 +271,10 @@ impl ToComputedValue for SimpleShadow {
#[inline]
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
ComputedSimpleShadow {
- color: self.color.to_computed_value(context),
+ color: self.color
+ .as_ref()
+ .unwrap_or(&Color::currentcolor())
+ .to_computed_value(context),
horizontal: self.horizontal.to_computed_value(context),
vertical: self.vertical.to_computed_value(context),
blur: self.blur
@@ -282,7 +287,7 @@ impl ToComputedValue for SimpleShadow {
#[inline]
fn from_computed_value(computed: &Self::ComputedValue) -> Self {
SimpleShadow {
- color: ToComputedValue::from_computed_value(&computed.color),
+ color: Some(ToComputedValue::from_computed_value(&computed.color)),
horizontal: ToComputedValue::from_computed_value(&computed.horizontal),
vertical: ToComputedValue::from_computed_value(&computed.vertical),
blur: Some(ToComputedValue::from_computed_value(&computed.blur)),
diff --git a/components/style/values/specified/source_size_list.rs b/components/style/values/specified/source_size_list.rs
index 596c2f73951..d41fc283bcc 100644
--- a/components/style/values/specified/source_size_list.rs
+++ b/components/style/values/specified/source_size_list.rs
@@ -8,7 +8,7 @@ use app_units::Au;
use cssparser::{Delimiter, Parser, Token};
#[cfg(feature = "gecko")]
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
-use media_queries::{Device, Expression as MediaExpression};
+use media_queries::{Device, MediaCondition};
use parser::{Parse, ParserContext};
use selectors::context::QuirksMode;
use style_traits::ParseError;
@@ -19,9 +19,7 @@ use values::specified::{Length, NoCalcLength, ViewportPercentageLength};
///
/// https://html.spec.whatwg.org/multipage/#source-size
pub struct SourceSize {
- // FIXME(emilio): This should be a `MediaCondition`, and support `and` and
- // `or`.
- condition: MediaExpression,
+ condition: MediaCondition,
value: Length,
}
@@ -30,7 +28,7 @@ impl Parse for SourceSize {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
- let condition = MediaExpression::parse(context, input)?;
+ let condition = MediaCondition::parse(context, input)?;
let value = Length::parse_non_negative(context, input)?;
Ok(Self { condition, value })
diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml
index 67a6c851dce..9b273472774 100644
--- a/components/style_traits/Cargo.toml
+++ b/components/style_traits/Cargo.toml
@@ -15,7 +15,7 @@ gecko = []
[dependencies]
app_units = "0.6"
-cssparser = "0.23.0"
+cssparser = "0.24.0"
bitflags = "1.0"
euclid = "0.17"
malloc_size_of = { path = "../malloc_size_of" }
diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs
index b1eaf4e086f..737450b5e05 100644
--- a/components/style_traits/lib.rs
+++ b/components/style_traits/lib.rs
@@ -106,12 +106,12 @@ pub enum StyleParseErrorKind<'i> {
PropertyDeclarationValueNotExhausted,
/// An unexpected dimension token was encountered.
UnexpectedDimension(CowRcStr<'i>),
- /// Expected identifier not found.
- ExpectedIdentifier(Token<'i>),
/// Missing or invalid media feature name.
MediaQueryExpectedFeatureName(CowRcStr<'i>),
/// Missing or invalid media feature value.
MediaQueryExpectedFeatureValue,
+ /// A media feature range operator was not expected.
+ MediaQueryUnexpectedOperator,
/// min- or max- properties must have a value.
RangedExpressionWithNoValue,
/// A function was encountered that was not expected.
diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml
index 421d3defe57..5ee0d762df5 100644
--- a/components/webdriver_server/Cargo.toml
+++ b/components/webdriver_server/Cargo.toml
@@ -19,11 +19,11 @@ ipc-channel = "0.10"
log = "0.4"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
-regex = "0.2"
+regex = "1.0"
rustc-serialize = "0.3.4"
script_traits = {path = "../script_traits"}
servo_config = {path = "../config"}
servo_url = {path = "../url"}
url = "1.2"
uuid = {version = "0.6", features = ["v4"]}
-webdriver = "0.33"
+webdriver = "0.35"
diff --git a/ports/servo/Cargo.toml b/ports/servo/Cargo.toml
index fcd38b722cc..15f11eee314 100644
--- a/ports/servo/Cargo.toml
+++ b/ports/servo/Cargo.toml
@@ -38,12 +38,12 @@ backtrace = "0.3"
bitflags = "1.0"
euclid = "0.17"
gleam = "0.5"
-glutin = "0.13"
+glutin = "0.17"
lazy_static = "1"
libservo = {path = "../../components/servo"}
log = "0.4"
tinyfiledialogs = "3.0"
-winit = "0.11.2"
+winit = {version = "0.16", features = ["icon_loading"]}
[target.'cfg(not(target_os = "android"))'.dependencies]
sig = "0.1"
diff --git a/ports/servo/glutin_app/keyutils.rs b/ports/servo/glutin_app/keyutils.rs
index 4f7047b96d9..6936f467dfa 100644
--- a/ports/servo/glutin_app/keyutils.rs
+++ b/ports/servo/glutin_app/keyutils.rs
@@ -295,7 +295,6 @@ pub fn is_printable(key_code: VirtualKeyCode) -> bool {
Back |
LAlt |
LControl |
- LMenu |
LShift |
LWin |
Mail |
@@ -312,7 +311,6 @@ pub fn is_printable(key_code: VirtualKeyCode) -> bool {
PrevTrack |
RAlt |
RControl |
- RMenu |
RShift |
RWin |
Sleep |
diff --git a/ports/servo/glutin_app/window.rs b/ports/servo/glutin_app/window.rs
index d7cca306fc8..514b1f8c076 100644
--- a/ports/servo/glutin_app/window.rs
+++ b/ports/servo/glutin_app/window.rs
@@ -38,6 +38,7 @@ use user32;
use winapi;
use winit;
use winit::{ElementState, Event, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode};
+use winit::dpi::{LogicalPosition, LogicalSize, PhysicalSize};
#[cfg(target_os = "macos")]
use winit::os::macos::{ActivationPolicy, WindowBuilderExt};
@@ -173,8 +174,10 @@ fn window_creation_scale_factor() -> TypedScale<f32, DeviceIndependentPixel, Dev
impl Window {
- pub fn new(is_foreground: bool,
- window_size: TypedSize2D<u32, DeviceIndependentPixel>) -> Rc<Window> {
+ pub fn new(
+ is_foreground: bool,
+ window_size: TypedSize2D<u32, DeviceIndependentPixel>,
+ ) -> Rc<Window> {
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;
@@ -197,10 +200,17 @@ impl Window {
.with_title("Servo".to_string())
.with_decorations(!opts::get().no_native_titlebar)
.with_transparency(opts::get().no_native_titlebar)
- .with_dimensions(width, height)
+ .with_dimensions(LogicalSize::new(width as f64, height as f64))
.with_visibility(visible)
.with_multitouch();
+ #[cfg(any(target_os = "linux", target_os = "windows"))]
+ {
+ let icon_bytes = include_bytes!("../../../resources/servo64.png");
+ let icon = Some(winit::Icon::from_bytes(icon_bytes).expect("Failed to open icon"));
+ window_builder = window_builder.with_window_icon(icon);
+ }
+
window_builder = builder_with_platform_options(window_builder);
let mut context_builder = ContextBuilder::new()
@@ -218,11 +228,15 @@ impl Window {
glutin_window.context().make_current().expect("Couldn't make window current");
}
- let (screen_width, screen_height) = events_loop.get_primary_monitor().get_dimensions();
- screen_size = TypedSize2D::new(screen_width, screen_height);
+ let PhysicalSize {
+ width: screen_width,
+ height: screen_height,
+ } = events_loop.get_primary_monitor().get_dimensions();
+ screen_size = TypedSize2D::new(screen_width as u32, screen_height as u32);
// 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);
+ let LogicalSize { width, height } =
+ glutin_window.get_inner_size().expect("Failed to get window inner size.");
+ inner_size = TypedSize2D::new(width as u32, height as u32);
glutin_window.show();
@@ -294,8 +308,8 @@ impl Window {
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()
+ let size = window.get_inner_size().expect("Failed to get window inner size.");
+ size.height as f32 * dpr.get()
},
WindowKind::Headless(ref context) => {
context.height as f32 * dpr.get()
@@ -312,14 +326,14 @@ impl Window {
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)
+ window.set_inner_size(LogicalSize::new(size.width.into(), size.height.into()))
}
}
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)
+ window.set_position(LogicalPosition::new(point.x.into(), point.y.into()))
}
}
@@ -479,7 +493,7 @@ impl Window {
},
Event::WindowEvent {
event: winit::WindowEvent::CursorMoved {
- position: (x, y),
+ position: LogicalPosition { x, y },
..
},
..
@@ -494,7 +508,7 @@ impl Window {
} => {
let (mut dx, mut dy) = match delta {
MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT),
- MouseScrollDelta::PixelDelta(dx, dy) => (dx, dy),
+ MouseScrollDelta::PixelDelta(LogicalPosition { x: dx, y: dy }) => (dx as f32, dy as f32),
};
// Scroll events snap to the major axis of movement, with vertical
// preferred over horizontal.
@@ -517,7 +531,7 @@ impl Window {
let phase = winit_phase_to_touch_event_type(touch.phase);
let id = TouchId(touch.id as i32);
- let point = TypedPoint2D::new(touch.location.0 as f32, touch.location.1 as f32);
+ let point = TypedPoint2D::new(touch.location.x as f32, touch.location.y as f32);
self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point));
}
Event::WindowEvent {
@@ -525,19 +539,19 @@ impl Window {
..
} => self.event_queue.borrow_mut().push(WindowEvent::Refresh),
Event::WindowEvent {
- event: winit::WindowEvent::Closed,
+ event: winit::WindowEvent::CloseRequested,
..
} => {
self.event_queue.borrow_mut().push(WindowEvent::Quit);
}
Event::WindowEvent {
- event: winit::WindowEvent::Resized(width, height),
+ event: winit::WindowEvent::Resized(LogicalSize { width, height }),
..
} => {
// width and height are DevicePixel.
// window.resize() takes DevicePixel.
if let WindowKind::Window(ref window, _) = self.kind {
- window.resize(width, height);
+ window.resize(PhysicalSize { width, height });
}
// window.set_inner_size() takes DeviceIndependentPixel.
let new_size = TypedSize2D::new(width as f32, height as f32);
@@ -606,30 +620,18 @@ impl 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.platform_hidpi_factor()
- }
- }
- }
-
- #[cfg(not(target_os = "windows"))]
- fn platform_hidpi_factor(&self) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel> {
- match self.kind {
- WindowKind::Window(ref window, ..) => {
- TypedScale::new(window.hidpi_factor())
- }
- WindowKind::Headless(..) => {
- TypedScale::new(1.0)
+ None => match self.kind {
+ WindowKind::Window(ref window, ..) => {
+ TypedScale::new(window.get_hidpi_factor() as f32)
+ }
+ WindowKind::Headless(..) => {
+ TypedScale::new(1.0)
+ }
+ }
}
}
}
- #[cfg(target_os = "windows")]
- 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)
- }
-
/// Has no effect on Android.
pub fn set_cursor(&self, cursor: CursorKind) {
match self.kind {
@@ -638,7 +640,6 @@ impl Window {
let winit_cursor = match cursor {
CursorKind::Auto => MouseCursor::Default,
- CursorKind::None => MouseCursor::NoneCursor,
CursorKind::Default => MouseCursor::Default,
CursorKind::Pointer => MouseCursor::Hand,
CursorKind::ContextMenu => MouseCursor::ContextMenu,
@@ -673,6 +674,7 @@ impl Window {
CursorKind::AllScroll => MouseCursor::AllScroll,
CursorKind::ZoomIn => MouseCursor::ZoomIn,
CursorKind::ZoomOut => MouseCursor::ZoomOut,
+ _ => MouseCursor::Default
};
window.set_cursor(winit_cursor);
}
@@ -691,13 +693,13 @@ impl WindowMethods for Window {
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 LogicalSize { width, height } = window.get_outer_size().expect("Failed to get window outer size.");
+ let LogicalPosition { x, y } = window.get_position().unwrap_or(LogicalPosition::new(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 LogicalSize { 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);
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index b422a553003..699981ff6d1 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -13,6 +13,7 @@ import base64
import json
import os
import os.path as path
+import platform
import re
import subprocess
import sys
@@ -28,7 +29,7 @@ from mach.decorators import (
import servo.bootstrap as bootstrap
from servo.command_base import CommandBase, cd, check_call
-from servo.util import delete, download_bytes
+from servo.util import delete, download_bytes, download_file, extract, check_hash
@CommandProvider
@@ -54,6 +55,111 @@ class MachCommands(CommandBase):
def bootstrap(self, force=False):
return bootstrap.bootstrap(self.context, force=force)
+ @Command('bootstrap-android',
+ description='Install the Android SDK and NDK.',
+ category='bootstrap')
+ @CommandArgument('--update',
+ action='store_true',
+ help='Run SDK component install and emulator image creation again')
+ def bootstrap_android(self, update=False):
+
+ ndk = "android-ndk-r12b-{system}-{arch}"
+ tools = "sdk-tools-{system}-4333796"
+
+ sdk_build_tools = "25.0.2"
+ emulator_images = [
+ ("servo-arm", "25", "google_apis;armeabi-v7a"),
+ ("servo-x86", "28", "google_apis;x86"),
+ ]
+
+ known_sha1 = {
+ # https://dl.google.com/android/repository/repository2-1.xml
+ "sdk-tools-darwin-4333796.zip": "ed85ea7b59bc3483ce0af4c198523ba044e083ad",
+ "sdk-tools-linux-4333796.zip": "8c7c28554a32318461802c1291d76fccfafde054",
+ "sdk-tools-windows-4333796.zip": "aa298b5346ee0d63940d13609fe6bec621384510",
+
+ # https://developer.android.com/ndk/downloads/older_releases
+ "android-ndk-r12b-windows-x86.zip": "8e6eef0091dac2f3c7a1ecbb7070d4fa22212c04",
+ "android-ndk-r12b-windows-x86_64.zip": "337746d8579a1c65e8a69bf9cbdc9849bcacf7f5",
+ "android-ndk-r12b-darwin-x86_64.zip": "e257fe12f8947be9f79c10c3fffe87fb9406118a",
+ "android-ndk-r12b-linux-x86_64.zip": "170a119bfa0f0ce5dc932405eaa3a7cc61b27694",
+ }
+
+ toolchains = path.join(self.context.topdir, "android-toolchains")
+ if not path.isdir(toolchains):
+ os.makedirs(toolchains)
+
+ def download(target_dir, name, flatten=False):
+ final = path.join(toolchains, target_dir)
+ if path.isdir(final):
+ return
+
+ base_url = "https://dl.google.com/android/repository/"
+ filename = name + ".zip"
+ url = base_url + filename
+ archive = path.join(toolchains, filename)
+
+ if not path.isfile(archive):
+ download_file(filename, url, archive)
+ check_hash(archive, known_sha1[filename], "sha1")
+ print("Extracting " + filename)
+ remove = True # Set to False to avoid repeated downloads while debugging this script
+ if flatten:
+ extracted = final + "_"
+ extract(archive, extracted, remove=remove)
+ contents = os.listdir(extracted)
+ assert len(contents) == 1
+ os.rename(path.join(extracted, contents[0]), final)
+ os.rmdir(extracted)
+ else:
+ extract(archive, final, remove=remove)
+
+ system = platform.system().lower()
+ machine = platform.machine().lower()
+ arch = {"i386": "x86"}.get(machine, machine)
+ download("ndk", ndk.format(system=system, arch=arch), flatten=True)
+ download("sdk", tools.format(system=system))
+
+ subprocess.check_call([
+ path.join(toolchains, "sdk", "tools", "bin", "sdkmanager"),
+ "platform-tools",
+ "build-tools;" + sdk_build_tools,
+ "emulator",
+ ] + [
+ arg
+ for avd_name, api_level, system_image in emulator_images
+ for arg in [
+ "platforms;android-" + api_level,
+ "system-images;android-%s;%s" % (api_level, system_image),
+ ]
+ ])
+ for avd_name, api_level, system_image in emulator_images:
+ process = subprocess.Popen(stdin=subprocess.PIPE, stdout=subprocess.PIPE, args=[
+ path.join(toolchains, "sdk", "tools", "bin", "avdmanager"),
+ "create", "avd",
+ "--path", path.join(toolchains, "avd", avd_name),
+ "--name", avd_name,
+ "--package", "system-images;android-%s;%s" % (api_level, system_image),
+ "--force",
+ ])
+ output = b""
+ while 1:
+ # Read one byte at a time because in Python:
+ # * readline() blocks until "\n", which doesn't come before the prompt
+ # * read() blocks until EOF, which doesn't come before the prompt
+ # * read(n) keeps reading until it gets n bytes or EOF,
+ # but we don't know reliably how many bytes to read until the prompt
+ byte = process.stdout.read(1)
+ if len(byte) == 0:
+ break
+ output += byte
+ # There seems to be no way to disable this prompt:
+ if output.endswith(b"Do you wish to create a custom hardware profile? [no]"):
+ process.stdin.write("no\n")
+ assert process.wait() == 0
+ with open(path.join(toolchains, "avd", avd_name, "config.ini"), "a") as f:
+ f.write("disk.dataPartition.size=2G\n")
+
@Command('update-hsts-preload',
description='Download the HSTS preload list',
category='bootstrap')
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index d48730252b2..02d71eee8bd 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -260,10 +260,10 @@ class MachCommands(CommandBase):
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
if android:
- if "ANDROID_NDK" not in os.environ:
+ if "ANDROID_NDK" not in env:
print("Please set the ANDROID_NDK environment variable.")
sys.exit(1)
- if "ANDROID_SDK" not in os.environ:
+ if "ANDROID_SDK" not in env:
print("Please set the ANDROID_SDK environment variable.")
sys.exit(1)
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 8e7a9f4b2dc..0963242226b 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -525,6 +525,16 @@ class CommandBase(object):
if self.config["android"]["platform"]:
env["ANDROID_PLATFORM"] = self.config["android"]["platform"]
+ toolchains = path.join(self.context.topdir, "android-toolchains")
+ for kind in ["sdk", "ndk"]:
+ default = os.path.join(toolchains, kind)
+ if os.path.isdir(default):
+ env.setdefault("ANDROID_" + kind.upper(), default)
+
+ tools = os.path.join(toolchains, "sdk", "platform-tools")
+ if os.path.isdir(tools):
+ env["PATH"] = "%s%s%s" % (tools, os.pathsep, env["PATH"])
+
# These are set because they are the variable names that build-apk
# expects. However, other submodules have makefiles that reference
# the env var names above. Once glutin is enabled and set as the
@@ -613,6 +623,13 @@ class CommandBase(object):
return sdk_adb
return "adb"
+ def android_emulator_path(self, env):
+ if "ANDROID_SDK" in env:
+ sdk_adb = path.join(env["ANDROID_SDK"], "emulator", "emulator")
+ if path.exists(sdk_adb):
+ return sdk_adb
+ return "emulator"
+
def handle_android_target(self, target):
if target == "arm-linux-androideabi":
self.config["android"]["platform"] = "android-18"
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py
index 5f0e3494279..03c2390e308 100644
--- a/python/servo/package_commands.py
+++ b/python/servo/package_commands.py
@@ -389,10 +389,16 @@ class PackageCommands(CommandBase):
@CommandArgument('--android',
action='store_true',
help='Install on Android')
+ @CommandArgument('--emulator',
+ action='store_true',
+ help='For Android, install to the only emulated device')
+ @CommandArgument('--usb',
+ action='store_true',
+ help='For Android, install to the only USB device')
@CommandArgument('--target', '-t',
default=None,
help='Install the given target platform')
- def install(self, release=False, dev=False, android=False, target=None):
+ def install(self, release=False, dev=False, android=False, emulator=False, usb=False, target=None):
env = self.build_env()
if target and android:
print("Please specify either --target or --android.")
@@ -416,7 +422,15 @@ class PackageCommands(CommandBase):
if android:
pkg_path = binary_path + ".apk"
- exec_command = [self.android_adb_path(env), "install", "-r", pkg_path]
+ exec_command = [self.android_adb_path(env)]
+ if emulator and usb:
+ print("Cannot install to both emulator and USB at the same time.")
+ return 1
+ if emulator:
+ exec_command += ["-e"]
+ if usb:
+ exec_command += ["-d"]
+ exec_command += ["install", "-r", pkg_path]
elif is_windows():
pkg_path = path.join(path.dirname(binary_path), 'msi', 'Servo.msi')
exec_command = ["msiexec", "/i", pkg_path]
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index 4cca8f80a20..0132d2ea4b0 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -45,6 +45,12 @@ class PostBuildCommands(CommandBase):
help='Run the dev build')
@CommandArgument('--android', action='store_true', default=None,
help='Run on an Android device through `adb shell`')
+ @CommandArgument('--emulator',
+ action='store_true',
+ help='For Android, run in the only emulated device')
+ @CommandArgument('--usb',
+ action='store_true',
+ help='For Android, run in the only USB device')
@CommandArgument('--debug', action='store_true',
help='Enable the debugger. Not specifying a '
'--debugger option will result in the default '
@@ -64,7 +70,7 @@ class PostBuildCommands(CommandBase):
'params', nargs='...',
help="Command-line arguments to be passed through to Servo")
def run(self, params, release=False, dev=False, android=None, debug=False, debugger=None,
- headless=False, software=False, bin=None, nightly=None):
+ headless=False, software=False, bin=None, emulator=False, usb=False, nightly=None):
env = self.build_env()
env["RUST_BACKTRACE"] = "1"
@@ -91,9 +97,19 @@ class PostBuildCommands(CommandBase):
]
script += [
"am start com.mozilla.servo/com.mozilla.servo.MainActivity",
+ "sleep 0.5",
+ "echo Servo PID: $(pidof com.mozilla.servo)",
"exit"
]
- shell = subprocess.Popen([self.android_adb_path(env), "shell"], stdin=subprocess.PIPE)
+ args = [self.android_adb_path(env)]
+ if emulator and usb:
+ print("Cannot run in both emulator and USB at the same time.")
+ return 1
+ if emulator:
+ args += ["-e"]
+ if usb:
+ args += ["-d"]
+ shell = subprocess.Popen(args + ["shell"], stdin=subprocess.PIPE)
shell.communicate("\n".join(script) + "\n")
return shell.wait()
@@ -153,6 +169,18 @@ class PostBuildCommands(CommandBase):
else:
raise e
+ @Command('android-emulator',
+ description='Run the Android emulator',
+ category='post-build')
+ @CommandArgument(
+ 'args', nargs='...',
+ help="Command-line arguments to be passed through to the emulator")
+ def android_emulator(self, args=None):
+ if not args:
+ print("AVDs created by `./mach bootstrap-android` are servo-arm and servo-x86.")
+ emulator = self.android_emulator_path(self.build_env())
+ return subprocess.call([emulator] + args)
+
@Command('rr-record',
description='Run Servo whilst recording execution with rr',
category='post-build')
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 545fa19f3b0..f705939ba53 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -17,7 +17,7 @@ import os.path as path
import platform
import copy
from collections import OrderedDict
-from time import time
+import time
import json
import urllib2
import urllib
@@ -157,7 +157,7 @@ class MachCommands(CommandBase):
print("%s is not a valid test path or suite name" % arg)
return 1
- test_start = time()
+ test_start = time.time()
for suite, tests in selected_suites.iteritems():
props = suites[suite]
kwargs = props.get("kwargs", {})
@@ -166,7 +166,7 @@ class MachCommands(CommandBase):
Registrar.dispatch("test-%s" % suite, context=self.context, **kwargs)
- elapsed = time() - test_start
+ elapsed = time.time() - test_start
print("Tests completed in %0.2fs" % elapsed)
@@ -551,6 +551,87 @@ class MachCommands(CommandBase):
output.close()
return 1
+ @Command('test-android-startup',
+ description='Extremely minimal testing of Servo for Android',
+ category='testing')
+ @CommandArgument('--release', '-r', action='store_true',
+ help='Run the release build')
+ @CommandArgument('--dev', '-d', action='store_true',
+ help='Run the dev build')
+ def test_android_startup(self, release, dev):
+ if (release and dev) or not (release or dev):
+ print("Please specify one of --dev or --release.")
+ return 1
+ target = "i686-linux-android"
+ print("Assuming --target " + target)
+ env = self.build_env(target=target)
+ assert self.handle_android_target(target)
+
+ emulator_port = "5580"
+ adb = [self.android_adb_path(env), "-s", "emulator-" + emulator_port]
+ emulator_process = subprocess.Popen([
+ self.android_emulator_path(env),
+ "@servo-x86",
+ "-no-window",
+ "-gpu", "guest",
+ "-port", emulator_port,
+ ])
+ try:
+ # This is hopefully enough time for the emulator to exit
+ # if it cannot start because of a configuration problem,
+ # and probably more time than it needs to boot anyway
+ time.sleep(1)
+ if emulator_process.poll() is not None:
+ # The process has terminated already, wait-for-device would block indefinitely
+ return 1
+
+ subprocess.call(adb + ["wait-for-device"])
+
+ # https://stackoverflow.com/a/38896494/1162888
+ while 1:
+ stdout, stderr = subprocess.Popen(
+ adb + ["shell", "getprop", "sys.boot_completed"],
+ stdout=subprocess.PIPE,
+ ).communicate()
+ if "1" in stdout:
+ break
+ print("Waiting for the emulator to boot")
+ time.sleep(1)
+
+ binary_path = self.get_binary_path(release, dev, android=True)
+ result = subprocess.call(adb + ["install", "-r", binary_path + ".apk"])
+ if result != 0:
+ return result
+
+ html = """
+ <script>
+ console.log("JavaScript is running!")
+ </script>
+ """
+ url = "data:text/html;base64," + html.encode("base64").replace("\n", "")
+ result = subprocess.call(adb + ["shell", """
+ mkdir -p /sdcard/Android/data/com.mozilla.servo/files/
+ echo 'servo' > /sdcard/Android/data/com.mozilla.servo/files/android_params
+ echo '%s' >> /sdcard/Android/data/com.mozilla.servo/files/android_params
+ am start com.mozilla.servo/com.mozilla.servo.MainActivity
+ """ % url])
+ if result != 0:
+ return result
+
+ logcat = adb + ["logcat", "RustAndroidGlueStdouterr:D", "*:S", "-v", "raw"]
+ logcat_process = subprocess.Popen(logcat, stdout=subprocess.PIPE)
+ while 1:
+ line = logcat_process.stdout.readline()
+ if "JavaScript is running!" in line:
+ print(line)
+ break
+ logcat_process.kill()
+ finally:
+ try:
+ emulator_process.kill()
+ except OSError:
+ pass
+
@Command('test-jquery',
description='Run the jQuery test suite',
category='testing')
diff --git a/python/servo/util.py b/python/servo/util.py
index 2043b0e2868..d71cffe27da 100644
--- a/python/servo/util.py
+++ b/python/servo/util.py
@@ -9,6 +9,7 @@
from __future__ import absolute_import, print_function, unicode_literals
+import hashlib
import os
import os.path
import platform
@@ -153,9 +154,26 @@ def download_file(desc, src, dst):
os.rename(tmp_path, dst)
-def extract(src, dst, movedir=None):
+# https://stackoverflow.com/questions/39296101/python-zipfile-removes-execute-permissions-from-binaries
+# In particular, we want the executable bit for executable files.
+class ZipFileWithUnixPermissions(zipfile.ZipFile):
+ def extract(self, member, path=None, pwd=None):
+ if not isinstance(member, zipfile.ZipInfo):
+ member = self.getinfo(member)
+
+ if path is None:
+ path = os.getcwd()
+
+ extracted = self._extract_member(member, path, pwd)
+ mode = os.stat(extracted).st_mode
+ mode |= (member.external_attr >> 16)
+ os.chmod(extracted, mode)
+ return extracted
+
+
+def extract(src, dst, movedir=None, remove=True):
assert src.endswith(".zip")
- zipfile.ZipFile(src).extractall(dst)
+ ZipFileWithUnixPermissions(src).extractall(dst)
if movedir:
for f in os.listdir(movedir):
@@ -164,4 +182,18 @@ def extract(src, dst, movedir=None):
os.rename(frm, to)
os.rmdir(movedir)
- os.remove(src)
+ if remove:
+ os.remove(src)
+
+
+def check_hash(filename, expected, algorithm):
+ hasher = hashlib.new(algorithm)
+ with open(filename, "rb") as f:
+ while True:
+ block = f.read(16 * 1024)
+ if len(block) == 0:
+ break
+ hasher.update(block)
+ if hasher.hexdigest() != expected:
+ print("Incorrect {} hash for {}".format(algorithm, filename))
+ sys.exit(1)
diff --git a/resources/servo64.png b/resources/servo64.png
new file mode 100644
index 00000000000..3511b723c4f
--- /dev/null
+++ b/resources/servo64.png
Binary files differ
diff --git a/rust-toolchain b/rust-toolchain
index efeae5ba310..7888624d5e7 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2018-06-13
+nightly-2018-07-07
diff --git a/servo-tidy.toml b/servo-tidy.toml
index ce69b5a24cc..10080704d7e 100644
--- a/servo-tidy.toml
+++ b/servo-tidy.toml
@@ -47,6 +47,14 @@ packages = [
"syn",
"quote",
"proc-macro2",
+
+ "core-foundation",
+ "core-foundation-sys",
+ "core-graphics",
+ "inflate",
+ "image",
+ "gif",
+ "png",
]
# Files that are ignored for all tidy and lint checks.
files = [
diff --git a/tests/unit/script/Cargo.toml b/tests/unit/script/Cargo.toml
index f6743a7dba6..dc78113136f 100644
--- a/tests/unit/script/Cargo.toml
+++ b/tests/unit/script/Cargo.toml
@@ -13,4 +13,3 @@ euclid = "0.17"
msg = {path = "../../../components/msg"}
script = {path = "../../../components/script"}
servo_url = {path = "../../../components/url"}
-style = {path = "../../../components/style"}
diff --git a/tests/unit/script/htmlimageelement.rs b/tests/unit/script/htmlimageelement.rs
index 6d62f25a500..796e63c2e2b 100644
--- a/tests/unit/script/htmlimageelement.rs
+++ b/tests/unit/script/htmlimageelement.rs
@@ -2,104 +2,7 @@
* 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 script::test::DOMString;
-use script::test::sizes::{parse_a_sizes_attribute, Size};
use script::test::srcset::{Descriptor, ImageSource, parse_a_srcset_attribute};
-use style::media_queries::{MediaQuery, MediaQueryType};
-use style::media_queries::Expression;
-use style::servo::media_queries::{ExpressionKind, Range};
-use style::values::specified::{Length, NoCalcLength, AbsoluteLength, ViewportPercentageLength};
-
-pub fn test_length_for_no_default_provided(len: f32) -> Length {
- let length = Length::NoCalc(NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vw(len)));
- return length;
-}
-
-#[test]
-fn no_default_provided() {
- let mut a = vec![];
- let length = test_length_for_no_default_provided(100f32);
- let size = Size { query: None, length: length };
- a.push(size);
- assert_eq!(parse_a_sizes_attribute(DOMString::new(), None), a);
-}
-
-pub fn test_length_for_default_provided(len: f32) -> Length {
- let length = Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(len)));
- return length;
-}
-
-#[test]
-fn default_provided() {
- let mut a = vec![];
- let length = test_length_for_default_provided(2f32);
- let size = Size { query: None, length: length };
- a.push(size);
- assert_eq!(parse_a_sizes_attribute(DOMString::new(), Some(2)), a);
-}
-
-pub fn test_media_query(len: f32) -> MediaQuery {
- let length = Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(len)));
- let expr = Expression(ExpressionKind::Width(Range::Max(length)));
- let media_query = MediaQuery {
- qualifier: None,
- media_type: MediaQueryType::All,
- expressions: vec![expr]
- };
- media_query
-}
-
-pub fn test_length(len: f32) -> Length {
- let length = Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(len)));
- return length;
-}
-
-#[test]
-fn one_value() {
- let mut a = vec![];
- let media_query = test_media_query(200f32);
- let length = test_length(545f32);
- let size = Size { query: Some(media_query), length: length };
- a.push(size);
- assert_eq!(parse_a_sizes_attribute(DOMString::from("(max-width: 200px) 545px"), None), a);
-}
-
-#[test]
-fn more_then_one_value() {
- let media_query = test_media_query(900f32);
- let length = test_length(1000f32);
- let size = Size { query: Some(media_query), length: length };
- let media_query1 = test_media_query(900f32);
- let length1 = test_length(50f32);
- let size1 = Size { query: Some(media_query1), length: length1 };
- let a = &[size, size1];
- assert_eq!(parse_a_sizes_attribute(DOMString::from("(max-width: 900px) 1000px, (max-width: 900px) 50px"),
- None), a);
-}
-
-#[test]
-fn no_extra_whitespace() {
- let mut a = vec![];
- let media_query = test_media_query(200f32);
- let length = test_length(545f32);
- let size = Size { query: Some(media_query), length: length };
- a.push(size);
- assert_eq!(parse_a_sizes_attribute(DOMString::from("(max-width: 200px) 545px"), None), a);
-}
-
-#[test]
-fn extra_whitespace() {
- let media_query = test_media_query(900f32);
- let length = test_length(1000f32);
- let size = Size { query: Some(media_query), length: length };
- let media_query1 = test_media_query(900f32);
- let length1 = test_length(50f32);
- let size1 = Size { query: Some(media_query1), length: length1 };
- let a = &[size, size1];
- assert_eq!(parse_a_sizes_attribute(
- DOMString::from("(max-width: 900px) 1000px, (max-width: 900px) 50px"),
- None), a);
-}
#[test]
fn no_value() {
diff --git a/tests/unit/script/lib.rs b/tests/unit/script/lib.rs
index 6d724db5358..069417a5911 100644
--- a/tests/unit/script/lib.rs
+++ b/tests/unit/script/lib.rs
@@ -6,7 +6,6 @@
#[cfg(test)] extern crate msg;
#[cfg(test)] extern crate script;
#[cfg(test)] extern crate servo_url;
-#[cfg(test)] extern crate style;
#[cfg(test)] mod origin;
#[cfg(all(test, target_pointer_width = "64"))] mod size_of;
diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml
index 23778c73f93..77b0ac34fd1 100644
--- a/tests/unit/style/Cargo.toml
+++ b/tests/unit/style/Cargo.toml
@@ -12,7 +12,7 @@ doctest = false
[dependencies]
byteorder = "1.0"
app_units = "0.6"
-cssparser = "0.23.0"
+cssparser = "0.24.0"
euclid = "0.17"
html5ever = "0.22"
parking_lot = "0.5"
diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs
index 2c46bb65063..faa15845195 100644
--- a/tests/unit/style/lib.rs
+++ b/tests/unit/style/lib.rs
@@ -27,7 +27,6 @@ mod attr;
mod custom_properties;
mod keyframes;
mod logical_geometry;
-mod media_queries;
mod parsing;
mod properties;
mod rule_tree;
@@ -37,16 +36,3 @@ mod str;
mod stylesheets;
mod stylist;
mod viewport;
-
-mod writing_modes {
- use style::logical_geometry::WritingMode;
- use style::properties::INITIAL_SERVO_VALUES;
-
- #[test]
- fn initial_writing_mode_is_empty() {
- assert_eq!(
- WritingMode::new(INITIAL_SERVO_VALUES.get_inherited_box()),
- WritingMode::empty(),
- )
- }
-}
diff --git a/tests/unit/style/media_queries.rs b/tests/unit/style/media_queries.rs
deleted file mode 100644
index 044dee3db72..00000000000
--- a/tests/unit/style/media_queries.rs
+++ /dev/null
@@ -1,398 +0,0 @@
-/* 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 euclid::TypedScale;
-use euclid::TypedSize2D;
-use servo_arc::Arc;
-use servo_url::ServoUrl;
-use std::borrow::ToOwned;
-use style::Atom;
-use style::context::QuirksMode;
-use style::media_queries::*;
-use style::servo::media_queries::*;
-use style::shared_lock::SharedRwLock;
-use style::stylesheets::{AllRules, Stylesheet, StylesheetInDocument, Origin, CssRule};
-use style::values::{CustomIdent, specified};
-use style_traits::ToCss;
-
-fn test_media_rule<F>(css: &str, callback: F)
-where
- F: Fn(&MediaList, &str),
-{
- let url = ServoUrl::parse("http://localhost").unwrap();
- let css_str = css.to_owned();
- let lock = SharedRwLock::new();
- let media_list = Arc::new(lock.wrap(MediaList::empty()));
- let stylesheet = Stylesheet::from_str(
- css, url, Origin::Author, media_list, lock,
- None, None, QuirksMode::NoQuirks, 0);
- let dummy = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
- let mut rule_count = 0;
- let guard = stylesheet.shared_lock.read();
- for rule in stylesheet.iter_rules::<AllRules>(&dummy, &guard) {
- if let CssRule::Media(ref lock) = *rule {
- rule_count += 1;
- callback(&lock.read_with(&guard).media_queries.read_with(&guard), css);
- }
- }
- assert!(rule_count > 0, css_str);
-}
-
-fn media_query_test(device: &Device, css: &str, expected_rule_count: usize) {
- let url = ServoUrl::parse("http://localhost").unwrap();
- let lock = SharedRwLock::new();
- let media_list = Arc::new(lock.wrap(MediaList::empty()));
- let ss = Stylesheet::from_str(
- css, url, Origin::Author, media_list, lock,
- None, None, QuirksMode::NoQuirks, 0);
- let mut rule_count = 0;
- ss.effective_style_rules(device, &ss.shared_lock.read(), |_| rule_count += 1);
- assert!(rule_count == expected_rule_count, css.to_owned());
-}
-
-#[test]
-fn test_mq_empty() {
- test_media_rule("@media { }", |list, css| {
- assert!(list.media_queries.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_screen() {
- test_media_rule("@media screen { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media only screen { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Only), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media not screen { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_print() {
- test_media_rule("@media print { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media only print { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Only), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media not print { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_unknown() {
- test_media_rule("@media fridge { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(
- MediaType(CustomIdent(Atom::from("fridge")))), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media only glass { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Only), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(
- MediaType(CustomIdent(Atom::from("glass")))), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media not wood { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(
- MediaType(CustomIdent(Atom::from("wood")))), css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_all() {
- test_media_rule("@media all { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media only all { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Only), css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-
- test_media_rule("@media not all { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_or() {
- test_media_rule("@media screen, print { }", |list, css| {
- assert!(list.media_queries.len() == 2, css.to_owned());
- let q0 = &list.media_queries[0];
- assert!(q0.qualifier == None, css.to_owned());
- assert!(q0.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q0.expressions.len() == 0, css.to_owned());
-
- let q1 = &list.media_queries[1];
- assert!(q1.qualifier == None, css.to_owned());
- assert!(q1.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q1.expressions.len() == 0, css.to_owned());
- });
-}
-
-#[test]
-fn test_mq_default_expressions() {
- test_media_rule("@media (min-width: 100px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Min(ref w)) => assert!(*w == specified::Length::from_px(100.)),
- _ => panic!("wrong expression type"),
- }
- });
-
- test_media_rule("@media (max-width: 43px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Max(ref w)) => assert!(*w == specified::Length::from_px(43.)),
- _ => panic!("wrong expression type"),
- }
- });
-}
-
-#[test]
-fn test_mq_expressions() {
- test_media_rule("@media screen and (min-width: 100px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Min(ref w)) => assert!(*w == specified::Length::from_px(100.)),
- _ => panic!("wrong expression type"),
- }
- });
-
- test_media_rule("@media print and (max-width: 43px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Max(ref w)) => assert!(*w == specified::Length::from_px(43.)),
- _ => panic!("wrong expression type"),
- }
- });
-
- test_media_rule("@media print and (width: 43px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::print()), css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Eq(ref w)) => assert!(*w == specified::Length::from_px(43.)),
- _ => panic!("wrong expression type"),
- }
- });
-
- test_media_rule("@media fridge and (max-width: 52px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(
- MediaType(CustomIdent(Atom::from("fridge")))), css.to_owned());
- assert!(q.expressions.len() == 1, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Max(ref w)) => assert!(*w == specified::Length::from_px(52.)),
- _ => panic!("wrong expression type"),
- }
- });
-}
-
-#[test]
-fn test_to_css() {
- test_media_rule("@media print and (width: 43px) { }", |list, _| {
- let q = &list.media_queries[0];
- let dest = q.to_css_string();
- assert_eq!(dest, "print and (width: 43px)");
- });
-}
-
-#[test]
-fn test_mq_multiple_expressions() {
- test_media_rule("@media (min-width: 100px) and (max-width: 200px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == None, css.to_owned());
- assert!(q.media_type == MediaQueryType::All, css.to_owned());
- assert!(q.expressions.len() == 2, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Min(ref w)) => assert!(*w == specified::Length::from_px(100.)),
- _ => panic!("wrong expression type"),
- }
- match *q.expressions[1].kind_for_testing() {
- ExpressionKind::Width(Range::Max(ref w)) => assert!(*w == specified::Length::from_px(200.)),
- _ => panic!("wrong expression type"),
- }
- });
-
- test_media_rule("@media not screen and (min-width: 100px) and (max-width: 200px) { }", |list, css| {
- assert!(list.media_queries.len() == 1, css.to_owned());
- let q = &list.media_queries[0];
- assert!(q.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(q.media_type == MediaQueryType::Concrete(MediaType::screen()), css.to_owned());
- assert!(q.expressions.len() == 2, css.to_owned());
- match *q.expressions[0].kind_for_testing() {
- ExpressionKind::Width(Range::Min(ref w)) => assert!(*w == specified::Length::from_px(100.)),
- _ => panic!("wrong expression type"),
- }
- match *q.expressions[1].kind_for_testing() {
- ExpressionKind::Width(Range::Max(ref w)) => assert!(*w == specified::Length::from_px(200.)),
- _ => panic!("wrong expression type"),
- }
- });
-}
-
-#[test]
-fn test_mq_malformed_expressions() {
- fn check_malformed_expr(list: &MediaList, css: &str) {
- assert!(!list.media_queries.is_empty(), css.to_owned());
- for mq in &list.media_queries {
- assert!(mq.qualifier == Some(Qualifier::Not), css.to_owned());
- assert!(mq.media_type == MediaQueryType::All, css.to_owned());
- assert!(mq.expressions.is_empty(), css.to_owned());
- }
- }
-
- for rule in &[
- "@media (min-width: 100blah) and (max-width: 200px) { }",
- "@media screen and (height: 200px) { }",
- "@media (min-width: 30em foo bar) {}",
- "@media not {}",
- "@media not (min-width: 300px) {}",
- "@media , {}",
- ] {
- test_media_rule(rule, check_malformed_expr);
- }
-}
-
-#[test]
-fn test_matching_simple() {
- let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
-
- media_query_test(&device, "@media not all { a { color: red; } }", 0);
- media_query_test(&device, "@media not screen { a { color: red; } }", 0);
- media_query_test(&device, "@media not print { a { color: red; } }", 1);
-
- media_query_test(&device, "@media unknown { a { color: red; } }", 0);
- media_query_test(&device, "@media not unknown { a { color: red; } }", 1);
-
- media_query_test(&device, "@media { a { color: red; } }", 1);
- media_query_test(&device, "@media screen { a { color: red; } }", 1);
- media_query_test(&device, "@media print { a { color: red; } }", 0);
-}
-
-#[test]
-fn test_matching_width() {
- let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
-
- media_query_test(&device, "@media { a { color: red; } }", 1);
-
- media_query_test(&device, "@media (min-width: 50px) { a { color: red; } }", 1);
- media_query_test(&device, "@media (min-width: 150px) { a { color: red; } }", 1);
- media_query_test(&device, "@media (min-width: 300px) { a { color: red; } }", 0);
-
- media_query_test(&device, "@media screen and (min-width: 50px) { a { color: red; } }", 1);
- media_query_test(&device, "@media screen and (min-width: 150px) { a { color: red; } }", 1);
- media_query_test(&device, "@media screen and (min-width: 300px) { a { color: red; } }", 0);
-
- media_query_test(&device, "@media not screen and (min-width: 50px) { a { color: red; } }", 0);
- media_query_test(&device, "@media not screen and (min-width: 150px) { a { color: red; } }", 0);
- media_query_test(&device, "@media not screen and (min-width: 300px) { a { color: red; } }", 1);
-
- media_query_test(&device, "@media (max-width: 50px) { a { color: red; } }", 0);
- media_query_test(&device, "@media (max-width: 150px) { a { color: red; } }", 0);
- media_query_test(&device, "@media (max-width: 300px) { a { color: red; } }", 1);
-
- media_query_test(&device, "@media screen and (min-width: 50px) and (max-width: 100px) { a { color: red; } }", 0);
- media_query_test(&device, "@media screen and (min-width: 250px) and (max-width: 300px) { a { color: red; } }", 0);
- media_query_test(&device, "@media screen and (min-width: 50px) and (max-width: 250px) { a { color: red; } }", 1);
-
- media_query_test(
- &device, "@media not screen and (min-width: 50px) and (max-width: 100px) { a { color: red; } }", 1);
- media_query_test(
- &device, "@media not screen and (min-width: 250px) and (max-width: 300px) { a { color: red; } }", 1);
- media_query_test(
- &device, "@media not screen and (min-width: 50px) and (max-width: 250px) { a { color: red; } }", 0);
-
- media_query_test(
- &device, "@media not screen and (min-width: 3.1em) and (max-width: 6em) { a { color: red; } }", 1);
- media_query_test(
- &device, "@media not screen and (min-width: 16em) and (max-width: 19.75em) { a { color: red; } }", 1);
- media_query_test(
- &device, "@media not screen and (min-width: 3em) and (max-width: 250px) { a { color: red; } }", 0);
-}
-
-#[test]
-fn test_matching_invalid() {
- let device = Device::new(MediaType::screen(), TypedSize2D::new(200.0, 100.0), TypedScale::new(1.0));
-
- media_query_test(&device, "@media fridge { a { color: red; } }", 0);
- media_query_test(&device, "@media screen and (height: 100px) { a { color: red; } }", 0);
- media_query_test(&device, "@media not print and (width: 100) { a { color: red; } }", 0);
-}
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 57cddd34edc..116d3578ba0 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -30429,6 +30429,11 @@
{}
]
],
+ "webgl/tools/timeout.patch": [
+ [
+ {}
+ ]
+ ],
"webgl/tools/unit.patch": [
[
{}
@@ -39429,7 +39434,9 @@
"webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html": [
[
"/_mozilla/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html": [
@@ -39573,7 +39580,9 @@
"webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html": [
[
"/_mozilla/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html": [
@@ -43425,7 +43434,9 @@
"webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html": [
[
"/_mozilla/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html": [
@@ -71210,7 +71221,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html": [
- "2db1eb69271fd2cdf1f23ed1aefe7ee04a409614",
+ "bb00d5648733c8b523093bba59a58eeda15c2dc9",
"testharness"
],
"webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html": [
@@ -71314,7 +71325,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html": [
- "14e68235cfa7ed8d396e33bfea2b337308f300c0",
+ "14ade92783494631f0aa38c7b65ef27afa5d4a5a",
"testharness"
],
"webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html": [
@@ -71346,15 +71357,15 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html": [
- "5353020ebad3058be7c46d31205eb98afa4f40e4",
+ "6e329116409fae60838c3d4e63f84999b06cf1b5",
"testharness"
],
"webgl/conformance-1.0.3/conformance/context/context-creation.html": [
- "08a7054a6bee4901dcb6636cf376c452e9004184",
+ "2a6ebdcb04a602ae7b73a7a0385533f72c89c212",
"testharness"
],
"webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html": [
- "63c2768e01d84a6344d08efa79bac5fdf9d545a7",
+ "9eac94ca3bc359985efc1ac0e7e7c37ec2599278",
"testharness"
],
"webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html": [
@@ -72910,7 +72921,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html": [
- "925cff1fe7e1a27f9a1d809a06cb0b3b0fd2e409",
+ "d8f835e310803c6f2c83a010cf325973a870877e",
"testharness"
],
"webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html": [
@@ -73046,7 +73057,7 @@
"support"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html": [
- "b4a53ad041367ac7a16a050098532b01fcd135dc",
+ "85555ba68d88a743a41b691e864f5e2305c03bc3",
"testharness"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag": [
@@ -73214,7 +73225,7 @@
"support"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html": [
- "402a2259934781e8866ec3555282e2257a9963cb",
+ "5ddd8eac037ae86a0f82aaebcd05f1702b4598ce",
"testharness"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag": [
@@ -76378,7 +76389,7 @@
"support"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html": [
- "4e72ddeef5f237b63fcdd8c49ee3c61dc16ae529",
+ "cadfc9c0ab49a1de7ee8ef91c49c20da40b405b4",
"testharness"
],
"webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html": [
@@ -80266,7 +80277,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html": [
- "1b579c2798c69585cf8959c09fdc5845aa92526e",
+ "5c6cf39bcf8c2a5e71e894c7453de7359095b2b1",
"testharness"
],
"webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html": [
@@ -80338,7 +80349,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html": [
- "df9d9db523e8fc9e672b9478d4ed7539b0afb8bb",
+ "e58263e358ab36319fb894e0a5cdfaf635a800d0",
"testharness"
],
"webgl/conformance-1.0.3/conformance/textures/texture-size.html": [
@@ -80426,7 +80437,7 @@
"testharness"
],
"webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html": [
- "5471a14283e0a23cfab7f504529aec8bee5ee4c3",
+ "e6687ab849c63a7db2b855d5f0b4c4583132613f",
"testharness"
],
"webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html": [
@@ -80470,7 +80481,7 @@
"support"
],
"webgl/conformance-1.0.3/resources/js-test-pre.js": [
- "c908f204f89f448526ad40357f7169cf5803e67d",
+ "e477a3121fd6086aa97343e395e8d8622c01d844",
"support"
],
"webgl/conformance-1.0.3/resources/js-test-style.css": [
@@ -80486,7 +80497,7 @@
"support"
],
"webgl/conformance-1.0.3/resources/webgl-test-harness.js": [
- "1cb2adb8fb53fa658bbb73ef61c08bcb587b2c0a",
+ "98e8e7e62030796bf34285f5bcbac3bd8b77ddb3",
"support"
],
"webgl/conformance-1.0.3/test-guidelines.md": [
@@ -82470,7 +82481,7 @@
"testharness"
],
"webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html": [
- "e0b233b82376bae960bc435ea2f390a3c892fb78",
+ "880919800fd7b68bfe97bcd8148fde5e41c1af5f",
"testharness"
],
"webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DHTML.html": [
@@ -89858,7 +89869,7 @@
"testharness"
],
"webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html": [
- "e2ddd9863e70ef2c74ba38007235d6f5332c3690",
+ "188327cf75f77ba75096e17a32e6182bd8d7966c",
"testharness"
],
"webgl/conformance-2.0.0/conformance/textures/misc/texture-size.html": [
@@ -90078,7 +90089,7 @@
"testharness"
],
"webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html": [
- "0220d823c0e8190475b7f704e9f81b0f02c5fd01",
+ "5fc1eeb29286971424220ecd122e9b2b605ff06d",
"testharness"
],
"webgl/conformance-2.0.0/conformance2/buffers/get-buffer-sub-data.html": [
@@ -93218,7 +93229,7 @@
"testharness"
],
"webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html": [
- "e95ff06a4d3f1a77011a7c306dd4e0afd38a1552",
+ "b6f306193a82e55a53dc436949d76776632960b9",
"testharness"
],
"webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-webgl-specific.html": [
@@ -98622,7 +98633,7 @@
"support"
],
"webgl/conformance-2.0.0/js/js-test-pre.js": [
- "440f5f81367b9a376423601ab45960a5319b1b0b",
+ "8f199ed7f5cea4fa0750de009149ac48a27d5a10",
"support"
],
"webgl/conformance-2.0.0/js/pnglib.js": [
@@ -98682,7 +98693,7 @@
"support"
],
"webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js": [
- "8505a329d65a627cfab08dcef9e384f499bd2fd7",
+ "699897b0a2ceea03ec7bc113fd9350e26805dd70",
"support"
],
"webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-canvas.js": [
@@ -98734,7 +98745,7 @@
"support"
],
"webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js": [
- "34685e9545ac0f9fbb9665b9788b52a6ea656544",
+ "3691acb33bda464b05c21e6c0aea18d83a32ee7e",
"support"
],
"webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-canvas.js": [
@@ -98786,7 +98797,7 @@
"support"
],
"webgl/conformance-2.0.0/js/tests/tex-input-validation.js": [
- "89befe095ced5482aa9788e1a4362cbc2771c462",
+ "d8b584d6ccc1d76239f412eca8360007c4a016c7",
"support"
],
"webgl/conformance-2.0.0/js/tests/typed-array-test-cases.js": [
@@ -98798,7 +98809,7 @@
"support"
],
"webgl/conformance-2.0.0/js/webgl-test-harness.js": [
- "fd8879f1c8300d3ab3a3d9c15e49aa2b5fe25aca",
+ "c2c0b7c5660f9309682091150ef7e64e171a823d",
"support"
],
"webgl/conformance-2.0.0/js/webgl-test-utils.js": [
@@ -99086,7 +99097,7 @@
"testharness"
],
"webgl/tools/import-conformance-tests.py": [
- "d3823f6646375ab6c48b77de8fb1c798d4132e3d",
+ "73e9fad27290f3f10246390fca47bfeb64bc86ec",
"support"
],
"webgl/tools/js-test-pre.patch": [
@@ -99097,6 +99108,10 @@
"d1fc86aa99334ca252f0e9fdd48f5d85255f24a3",
"support"
],
+ "webgl/tools/timeout.patch": [
+ "88da623430c6ab2c3738433604a5077a24a7a7a0",
+ "support"
+ ],
"webgl/tools/unit.patch": [
"1d3713862875b47ae9c07462e6962eb21e40e404",
"support"
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html.ini
deleted file mode 100644
index 4a283182df8..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html.ini
+++ /dev/null
@@ -1,770 +0,0 @@
-[gl-bindAttribLocation-aliasing.html]
- type: testharness
- [WebGL test #1: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #2: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #3: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #4: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #5: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #6: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #7: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #8: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #9: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #10: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #11: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #12: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #13: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #14: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #15: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #16: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #18: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #19: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #20: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #21: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #22: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #23: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #24: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #25: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #26: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #27: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #28: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #29: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #30: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #31: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #32: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #33: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #35: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #36: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #37: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #38: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #39: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #40: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #41: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #42: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #43: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #44: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #45: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #46: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #47: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #48: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #49: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #50: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #52: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #53: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #54: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #55: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #56: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #57: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #58: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #59: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #60: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #61: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #62: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #63: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #64: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #65: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #66: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #67: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #69: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #70: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #71: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #72: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #73: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #74: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #75: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #76: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #77: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #78: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #79: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #80: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #81: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #82: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #83: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #84: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #86: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #87: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #88: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #89: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #90: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #91: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #92: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #93: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #94: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #95: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #96: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #97: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #98: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #99: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #100: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #101: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #103: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #104: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #105: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #106: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #107: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #108: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #109: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #110: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #111: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #112: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #113: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #114: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #115: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #116: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #117: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #118: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #120: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #121: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #122: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #123: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #124: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #125: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #126: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #127: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #128: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #129: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #130: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #131: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #132: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #133: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #134: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #135: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #137: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #138: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #139: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #140: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #141: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #142: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #143: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #144: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #145: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #146: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #147: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #148: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #149: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #150: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #151: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #152: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #154: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #155: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #156: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #157: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #158: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #159: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #160: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #161: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #162: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #163: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #164: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #165: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #166: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #167: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #168: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #169: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #171: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #172: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #173: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #174: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #175: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #176: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #177: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #178: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #179: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #180: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #181: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #182: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #183: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #184: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #185: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #186: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #188: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #189: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #190: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #191: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #192: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #193: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #194: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #195: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #196: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #197: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #198: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #199: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #200: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #201: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #202: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #203: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #205: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #206: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #207: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #208: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #209: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #210: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #211: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #212: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #213: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #214: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #215: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #216: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #217: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #218: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #219: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #220: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #222: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #223: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #224: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #225: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #226: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #227: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #228: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #229: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #230: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #231: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #232: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #233: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #234: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #235: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #236: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #237: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #239: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #240: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #241: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #242: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #243: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #244: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #245: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #246: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #247: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #248: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #249: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #250: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #251: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #252: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #253: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #254: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
- [WebGL test #256: Link should fail when both types are aliased to location 0]
- expected: FAIL
-
- [WebGL test #257: Link should fail when both types are aliased to location 1]
- expected: FAIL
-
- [WebGL test #258: Link should fail when both types are aliased to location 2]
- expected: FAIL
-
- [WebGL test #259: Link should fail when both types are aliased to location 3]
- expected: FAIL
-
- [WebGL test #260: Link should fail when both types are aliased to location 4]
- expected: FAIL
-
- [WebGL test #261: Link should fail when both types are aliased to location 5]
- expected: FAIL
-
- [WebGL test #262: Link should fail when both types are aliased to location 6]
- expected: FAIL
-
- [WebGL test #263: Link should fail when both types are aliased to location 7]
- expected: FAIL
-
- [WebGL test #264: Link should fail when both types are aliased to location 8]
- expected: FAIL
-
- [WebGL test #265: Link should fail when both types are aliased to location 9]
- expected: FAIL
-
- [WebGL test #266: Link should fail when both types are aliased to location 10]
- expected: FAIL
-
- [WebGL test #267: Link should fail when both types are aliased to location 11]
- expected: FAIL
-
- [WebGL test #268: Link should fail when both types are aliased to location 12]
- expected: FAIL
-
- [WebGL test #269: Link should fail when both types are aliased to location 13]
- expected: FAIL
-
- [WebGL test #270: Link should fail when both types are aliased to location 14]
- expected: FAIL
-
- [WebGL test #271: Link should fail when both types are aliased to location 15]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html.ini
deleted file mode 100644
index 4e12c662099..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html.ini
+++ /dev/null
@@ -1,347 +0,0 @@
-[gl-bindAttribLocation-matrix.html]
- type: testharness
- [WebGL test #1: Matrix with location 0 and vector with location 0 should not link.]
- expected: FAIL
-
- [WebGL test #2: Matrix with location 0 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #4: Matrix with location 1 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #5: Matrix with location 1 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #7: Matrix with location 2 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #8: Matrix with location 2 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #10: Matrix with location 3 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #11: Matrix with location 3 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #13: Matrix with location 4 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #14: Matrix with location 4 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #16: Matrix with location 5 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #17: Matrix with location 5 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #19: Matrix with location 6 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #20: Matrix with location 6 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #22: Matrix with location 7 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #23: Matrix with location 7 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #25: Matrix with location 8 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #26: Matrix with location 8 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #28: Matrix with location 9 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #29: Matrix with location 9 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #31: Matrix with location 10 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #32: Matrix with location 10 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #34: Matrix with location 11 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #35: Matrix with location 11 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #37: Matrix with location 12 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #38: Matrix with location 12 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #40: Matrix with location 13 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #41: Matrix with location 13 and vector with location 14 should not link.]
- expected: FAIL
-
- [WebGL test #43: Matrix with location 0 and vector with location 0 should not link.]
- expected: FAIL
-
- [WebGL test #44: Matrix with location 0 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #45: Matrix with location 0 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #47: Matrix with location 1 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #48: Matrix with location 1 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #49: Matrix with location 1 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #51: Matrix with location 2 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #52: Matrix with location 2 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #53: Matrix with location 2 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #55: Matrix with location 3 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #56: Matrix with location 3 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #57: Matrix with location 3 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #59: Matrix with location 4 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #60: Matrix with location 4 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #61: Matrix with location 4 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #63: Matrix with location 5 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #64: Matrix with location 5 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #65: Matrix with location 5 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #67: Matrix with location 6 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #68: Matrix with location 6 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #69: Matrix with location 6 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #71: Matrix with location 7 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #72: Matrix with location 7 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #73: Matrix with location 7 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #75: Matrix with location 8 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #76: Matrix with location 8 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #77: Matrix with location 8 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #79: Matrix with location 9 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #80: Matrix with location 9 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #81: Matrix with location 9 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #83: Matrix with location 10 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #84: Matrix with location 10 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #85: Matrix with location 10 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #87: Matrix with location 11 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #88: Matrix with location 11 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #89: Matrix with location 11 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #91: Matrix with location 12 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #92: Matrix with location 12 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #93: Matrix with location 12 and vector with location 14 should not link.]
- expected: FAIL
-
- [WebGL test #95: Matrix with location 0 and vector with location 0 should not link.]
- expected: FAIL
-
- [WebGL test #96: Matrix with location 0 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #97: Matrix with location 0 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #98: Matrix with location 0 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #100: Matrix with location 1 and vector with location 1 should not link.]
- expected: FAIL
-
- [WebGL test #101: Matrix with location 1 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #102: Matrix with location 1 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #103: Matrix with location 1 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #105: Matrix with location 2 and vector with location 2 should not link.]
- expected: FAIL
-
- [WebGL test #106: Matrix with location 2 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #107: Matrix with location 2 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #108: Matrix with location 2 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #110: Matrix with location 3 and vector with location 3 should not link.]
- expected: FAIL
-
- [WebGL test #111: Matrix with location 3 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #112: Matrix with location 3 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #113: Matrix with location 3 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #115: Matrix with location 4 and vector with location 4 should not link.]
- expected: FAIL
-
- [WebGL test #116: Matrix with location 4 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #117: Matrix with location 4 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #118: Matrix with location 4 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #120: Matrix with location 5 and vector with location 5 should not link.]
- expected: FAIL
-
- [WebGL test #121: Matrix with location 5 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #122: Matrix with location 5 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #123: Matrix with location 5 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #125: Matrix with location 6 and vector with location 6 should not link.]
- expected: FAIL
-
- [WebGL test #126: Matrix with location 6 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #127: Matrix with location 6 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #128: Matrix with location 6 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #130: Matrix with location 7 and vector with location 7 should not link.]
- expected: FAIL
-
- [WebGL test #131: Matrix with location 7 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #132: Matrix with location 7 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #133: Matrix with location 7 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #135: Matrix with location 8 and vector with location 8 should not link.]
- expected: FAIL
-
- [WebGL test #136: Matrix with location 8 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #137: Matrix with location 8 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #138: Matrix with location 8 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #140: Matrix with location 9 and vector with location 9 should not link.]
- expected: FAIL
-
- [WebGL test #141: Matrix with location 9 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #142: Matrix with location 9 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #143: Matrix with location 9 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #145: Matrix with location 10 and vector with location 10 should not link.]
- expected: FAIL
-
- [WebGL test #146: Matrix with location 10 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #147: Matrix with location 10 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #148: Matrix with location 10 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #150: Matrix with location 11 and vector with location 11 should not link.]
- expected: FAIL
-
- [WebGL test #151: Matrix with location 11 and vector with location 12 should not link.]
- expected: FAIL
-
- [WebGL test #152: Matrix with location 11 and vector with location 13 should not link.]
- expected: FAIL
-
- [WebGL test #153: Matrix with location 11 and vector with location 14 should not link.]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html.ini
deleted file mode 100644
index 1156e7c8543..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[gl-enable-vertex-attrib.html]
- type: testharness
- [WebGL test #1: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html.ini
index 7ca8281c991..fc428173245 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html.ini
@@ -1,4 +1,5 @@
[gl-vertex-attrib-render.html]
+ bug: https://github.com/servo/servo/issues/21132
type: testharness
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini
deleted file mode 100644
index b5291d6078b..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[gl-vertex-attrib-zero-issues.html]
- type: testharness
- expected: TIMEOUT
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html.ini
index bc630e5579b..32f41771f0e 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html.ini
@@ -1,4 +1,5 @@
[buffer-data-array-buffer-delete.html]
+ bug: https://github.com/servo/servo/issues/21132
type: testharness
expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html.ini
deleted file mode 100644
index 661f857562f..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[buffer-data-array-buffer.html]
- type: testharness
- [WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_VALUE : ]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini
deleted file mode 100644
index 7c161d80677..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[index-validation.html]
- [WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
index d17a5872378..64c90bdf140 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
@@ -1,12 +1,3 @@
[drawingbuffer-static-canvas-test.html]
type: testharness
- expected: ERROR
- [WebGL test #5: maxSize[0\] > 0 should be true. Threw exception TypeError: maxSize is null]
- expected: FAIL
-
- [WebGL test #6: maxSize[1\] > 0 should be true. Threw exception TypeError: maxSize is null]
- expected: FAIL
-
- [WebGL test #7: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
+ expected: CRASH
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html.ini
index 2fd2b75c155..6570acb25a4 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html.ini
@@ -1,6 +1,3 @@
[drawingbuffer-test.html]
type: testharness
- expected: ERROR
- [WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
+ expected: CRASH
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini
deleted file mode 100644
index 1e2567027d8..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[rapid-resizing.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html.ini
index 309d087d9fd..b77cd62d6ae 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html.ini
@@ -1,4 +1,5 @@
[incorrect-context-object-behaviour.html]
+ bug: https://github.com/servo/servo/issues/21133
type: testharness
[WebGL test #0: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: contextA.compileShader(shaderB)]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini
new file mode 100644
index 00000000000..a9d5d9cf2d9
--- /dev/null
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html.ini
@@ -0,0 +1,26 @@
+[angle-instanced-arrays-out-of-bounds.html]
+ bug: https://github.com/servo/servo/issues/20599
+ [WebGL test #175: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 1)]
+ expected: FAIL
+
+ [WebGL test #178: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 1)]
+ expected: FAIL
+
+ [WebGL test #180: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 2)]
+ expected: FAIL
+
+ [WebGL test #182: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 4)]
+ expected: FAIL
+
+ [WebGL test #183: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 10000)]
+ expected: FAIL
+
+ [WebGL test #184: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 0x7fffffff)]
+ expected: FAIL
+
+ [WebGL test #186: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 3)]
+ expected: FAIL
+
+ [WebGL test #188: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 5)]
+ expected: FAIL
+
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html.ini
deleted file mode 100644
index 6dcb5bcd848..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[ext-frag-depth.html]
- type: testharness
- [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
- [WebGL test #1: WebGL context does not exist]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html.ini
deleted file mode 100644
index ce6159e1e38..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[ext-sRGB.html]
- type: testharness
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
- [WebGL test #1: context does not exist]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html.ini
deleted file mode 100644
index 629c3a9e959..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[webgl-compressed-texture-atc.html]
- type: testharness
- [WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html.ini
deleted file mode 100644
index 20e8d70fc9d..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[webgl-compressed-texture-pvrtc.html]
- type: testharness
- [WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html.ini
deleted file mode 100644
index 7a8ac511d9b..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[webgl-compressed-texture-s3tc.html]
- type: testharness
- [WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html.ini
deleted file mode 100644
index 3074eab2d1f..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[large-loop-compile.html]
- type: testharness
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
- [WebGL test #1: context does not exist]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html.ini
deleted file mode 100644
index a3228d706a4..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[functions-returning-strings.html]
- type: testharness
- [WebGL test #0: gl.getShaderSource(vs) should return a string. Returns: "null"]
- expected: FAIL
-
- [WebGL test #1: gl.getShaderInfoLog(vs) should return a string. Returns: "null"]
- expected: FAIL
-
- [WebGL test #4: gl.getShaderSource(fs) should return a string. Returns: "null"]
- expected: FAIL
-
- [WebGL test #5: gl.getShaderInfoLog(fs) should return a string. Returns: "null"]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html.ini
index ba10566d977..b5e607a5871 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html.ini
@@ -1,14 +1,5 @@
[invalid-passed-params.html]
type: testharness
- [WebGL test #4: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\])]
- expected: FAIL
-
- [WebGL test #5: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\] | context.COLOR_BUFFER_BIT)]
- expected: FAIL
-
- [WebGL test #6: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\] | context.COLOR_BUFFER_BIT | context.DEPTH_BUFFER_BIT | context.STENCIL_BUFFER_BIT)]
- expected: FAIL
-
[WebGL test #44: context.getError() should be 1281. Was 0.]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html.ini
deleted file mode 100644
index ffd049d0cd1..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[null-object-behaviour.html]
- [WebGL test #3: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.linkProgram(undefined)]
- expected: FAIL
-
- [WebGL test #38: getError expected: INVALID_OPERATION. Was INVALID_VALUE : after evaluating: context.bufferData(context.ARRAY_BUFFER, 1, context.STATIC_DRAW)]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html.ini
deleted file mode 100644
index 9a846f5ae00..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[bindBufferBadArgs.html]
- type: testharness
- disabled: flaky
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html.ini
deleted file mode 100644
index 77ebe6b334b..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[bufferSubDataBadArgs.html]
- type: testharness
- disabled: flaky
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html.ini
deleted file mode 100644
index 38d628ebc51..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[acos_001_to_006.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html.ini
deleted file mode 100644
index 2cd9fa6c511..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[asin_001_to_006.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html.ini
deleted file mode 100644
index 2f542bb9ba6..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[build_001_to_008.html]
- type: testharness
- disabled: https://github.com/servo/servo/issues/13165
- [WebGL test #0: expected compile success but it failed]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html.ini
deleted file mode 100644
index 14b80c4c044..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[build_009_to_016.html]
- type: testharness
- disabled: https://github.com/servo/servo/issues/13165
- [WebGL test #0: expected compile success but it failed]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html.ini
deleted file mode 100644
index fa82bb79cc3..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[functions_025_to_032.html]
- type: testharness
- disabled: flaky
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html.ini
deleted file mode 100644
index 5967e1d8d7e..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[functions_049_to_056.html]
- type: testharness
- disabled: flaky
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html.ini
deleted file mode 100644
index 0bcf8268f38..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[log_001_to_008.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html.ini
deleted file mode 100644
index 579708b48b2..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[log2_001_to_008.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini
index 5fbfe345024..6708fb9cc83 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini
@@ -1,4 +1,5 @@
[get-active-test.html]
+ bug: https://github.com/servo/servo/issues/21133
type: testharness
[WebGL test #31: context2.getActiveAttrib(program, 0) should be null. Was [object WebGLActiveInfo\].]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini
deleted file mode 100644
index 27c2d34fffd..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[gl-bind-attrib-location-long-names-test.html]
- type: testharness
- [WebGL test #4: at (0, 0) expected: 0,255,0,255 was 255,255,255,255]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 255,0,0,255 was 0,0,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini
deleted file mode 100644
index 130c279aeb0..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[gl-bind-attrib-location-test.html]
- type: testharness
- [WebGL test #7: at (20, 15) expected: 0,255,0,255 was 0,0,0,255]
- expected: FAIL
-
- [WebGL test #13: at (20, 15) expected: 255,0,0,255 was 0,0,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/program-test.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/program-test.html.ini
index a5f39d42b57..164f0e3c2a2 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/program-test.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/programs/program-test.html.ini
@@ -1,10 +1,4 @@
[program-test.html]
- [WebGL test #53: getError expected: INVALID_OPERATION. Was NO_ERROR : drawing with a null program should generate INVALID_OPERATION]
- expected: FAIL
-
- [WebGL test #58: linking should fail with in-use formerly good program, with new bad shader attached]
- expected: FAIL
-
[WebGL test #64: getError expected: NO_ERROR. Was INVALID_OPERATION : delete the current program shouldn't change the current rendering state]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html.ini
index 76ecfa152bc..9d117696378 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html.ini
@@ -1,11 +1,5 @@
[feedback-loop.html]
type: testharness
- [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after draw with invalid feedback loop]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html.ini
index af0302b85f8..f3b0b2e6ae9 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html.ini
@@ -1,12 +1,3 @@
[renderbuffer-initialization.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13710
- [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL test #2: 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
deleted file mode 100644
index 18a9a05ee2b..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[draw-arrays-out-of-bounds.html]
- type: testharness
- [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
deleted file mode 100644
index 87558e7b05a..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html.ini
+++ /dev/null
@@ -1,131 +0,0 @@
-[gl-get-calls.html]
- type: testharness
- [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
-
- [WebGL test #4: (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0\] <= 1) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0\] > 0) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[1\] >= 1) should be true. Threw exception TypeError: context.getParameter(...) is null]
- expected: FAIL
-
- [WebGL test #5: context.getParameter(context.ALIASED_LINE_WIDTH_RANGE) is not an instance of Float32Array]
- expected: FAIL
-
- [WebGL test #6: context.getParameter(context.ALIASED_POINT_SIZE_RANGE) is not an instance of Float32Array]
- expected: FAIL
-
- [WebGL test #9: context.getParameter(context.BLEND_COLOR) should be 0,0,0,0. Was null.]
- expected: FAIL
-
- [WebGL test #10: context.getParameter(context.BLEND_COLOR) is not an instance of Float32Array]
- expected: FAIL
-
- [WebGL test #17: context.getParameter(context.COLOR_CLEAR_VALUE) should be 0,0,0,0. Was null.]
- expected: FAIL
-
- [WebGL test #18: context.getParameter(context.COLOR_CLEAR_VALUE) is not an instance of Float32Array]
- expected: FAIL
-
- [WebGL test #19: context.getParameter(context.COLOR_WRITEMASK) should be true,true,true,true. Was null.]
- expected: FAIL
-
- [WebGL test #20: context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) is not an instance of Uint32Array]
- expected: FAIL
-
- [WebGL test #26: context.getParameter(context.DEPTH_RANGE) should be 0,1. Was null.]
- expected: FAIL
-
- [WebGL test #27: context.getParameter(context.DEPTH_RANGE) is not an instance of Float32Array]
- expected: FAIL
-
- [WebGL test #33: context.getParameter(context.GENERATE_MIPMAP_HINT) should be 4352 (of type number). Was null (of type object).]
- expected: FAIL
-
- [WebGL test #42: context.getParameter(context.SCISSOR_BOX)[0\] should be 0. Threw exception TypeError: context.getParameter(...) is null]
- expected: FAIL
-
- [WebGL test #43: context.getParameter(context.SCISSOR_BOX)[1\] should be 0. Threw exception TypeError: context.getParameter(...) is null]
- expected: FAIL
-
- [WebGL test #44: context.getParameter(context.SCISSOR_BOX)[2\] should be 2. Threw exception TypeError: context.getParameter(...) is null]
- expected: FAIL
-
- [WebGL test #45: context.getParameter(context.SCISSOR_BOX)[3\] should be 2. Threw exception TypeError: context.getParameter(...) is null]
- expected: FAIL
-
- [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 #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-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini
index e28d29a1447..804deaf6a8f 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini
@@ -1,9 +1,6 @@
[tex-image-and-sub-image-2d-with-svg-image.html]
type: testharness
expected: TIMEOUT
- [WebGL test #0: at (4, 4) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
[Overall test]
expected: NOTRUN
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini
index 70695a2543f..d81e40d0a02 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini
@@ -1,9 +1,6 @@
[tex-image-and-sub-image-2d-with-video-rgba5551.html]
type: testharness
expected: TIMEOUT
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
[Overall test]
expected: NOTRUN
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini
index f74c0b51cf2..7756d0a6fcf 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini
@@ -1,9 +1,6 @@
[tex-image-and-sub-image-2d-with-video.html]
type: testharness
expected: TIMEOUT
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
[Overall test]
expected: NOTRUN
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html.ini
index 4d390acaba6..f91c50e108b 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html.ini
@@ -1,5 +1,4 @@
[tex-input-validation.html]
- type: testharness
[WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D border: 0]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html.ini
index 6ea96be3e18..57985f1badf 100644
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html.ini
+++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html.ini
@@ -1,14 +1,5 @@
[texture-attachment-formats.html]
type: testharness
- [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
- [WebGL test #1: context does not exist]
- expected: FAIL
-
[WebGL test #14: at (0, 0) expected: 63,63,63,255 was 64,0,0,255]
expected: FAIL
diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html.ini
deleted file mode 100644
index 3461ba85016..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[out-of-bounds-uniform-array-access.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
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 7ab92b0f2e8..6eedd053fe6 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
@@ -113,159 +113,150 @@
[WebGL test #37: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL
- [WebGL test #38: Property either does not exist or is not a function: vertexAttribDivisor]
+ [WebGL test #38: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL
- [WebGL test #39: Property either does not exist or is not a function: drawArraysInstanced]
+ [WebGL test #39: Property either does not exist or is not a function: drawBuffers]
expected: FAIL
- [WebGL test #40: Property either does not exist or is not a function: drawElementsInstanced]
+ [WebGL test #40: Property either does not exist or is not a function: clearBufferiv]
expected: FAIL
- [WebGL test #41: Property either does not exist or is not a function: drawRangeElements]
+ [WebGL test #41: Property either does not exist or is not a function: clearBufferuiv]
expected: FAIL
- [WebGL test #42: Property either does not exist or is not a function: drawBuffers]
+ [WebGL test #42: Property either does not exist or is not a function: clearBufferfv]
expected: FAIL
- [WebGL test #43: Property either does not exist or is not a function: clearBufferiv]
+ [WebGL test #43: Property either does not exist or is not a function: clearBufferfi]
expected: FAIL
- [WebGL test #44: Property either does not exist or is not a function: clearBufferuiv]
+ [WebGL test #44: Property either does not exist or is not a function: createQuery]
expected: FAIL
- [WebGL test #45: Property either does not exist or is not a function: clearBufferfv]
+ [WebGL test #45: Property either does not exist or is not a function: deleteQuery]
expected: FAIL
- [WebGL test #46: Property either does not exist or is not a function: clearBufferfi]
+ [WebGL test #46: Property either does not exist or is not a function: isQuery]
expected: FAIL
- [WebGL test #47: Property either does not exist or is not a function: createQuery]
+ [WebGL test #47: Property either does not exist or is not a function: beginQuery]
expected: FAIL
- [WebGL test #48: Property either does not exist or is not a function: deleteQuery]
+ [WebGL test #48: Property either does not exist or is not a function: endQuery]
expected: FAIL
- [WebGL test #49: Property either does not exist or is not a function: isQuery]
+ [WebGL test #49: Property either does not exist or is not a function: getQuery]
expected: FAIL
- [WebGL test #50: Property either does not exist or is not a function: beginQuery]
+ [WebGL test #50: Property either does not exist or is not a function: getQueryParameter]
expected: FAIL
- [WebGL test #51: Property either does not exist or is not a function: endQuery]
+ [WebGL test #51: Property either does not exist or is not a function: createSampler]
expected: FAIL
- [WebGL test #52: Property either does not exist or is not a function: getQuery]
+ [WebGL test #52: Property either does not exist or is not a function: deleteSampler]
expected: FAIL
- [WebGL test #53: Property either does not exist or is not a function: getQueryParameter]
+ [WebGL test #53: Property either does not exist or is not a function: isSampler]
expected: FAIL
- [WebGL test #54: Property either does not exist or is not a function: createSampler]
+ [WebGL test #54: Property either does not exist or is not a function: bindSampler]
expected: FAIL
- [WebGL test #55: Property either does not exist or is not a function: deleteSampler]
+ [WebGL test #55: Property either does not exist or is not a function: samplerParameteri]
expected: FAIL
- [WebGL test #56: Property either does not exist or is not a function: isSampler]
+ [WebGL test #56: Property either does not exist or is not a function: samplerParameterf]
expected: FAIL
- [WebGL test #57: Property either does not exist or is not a function: bindSampler]
+ [WebGL test #57: Property either does not exist or is not a function: getSamplerParameter]
expected: FAIL
- [WebGL test #58: Property either does not exist or is not a function: samplerParameteri]
+ [WebGL test #58: Property either does not exist or is not a function: fenceSync]
expected: FAIL
- [WebGL test #59: Property either does not exist or is not a function: samplerParameterf]
+ [WebGL test #59: Property either does not exist or is not a function: isSync]
expected: FAIL
- [WebGL test #60: Property either does not exist or is not a function: getSamplerParameter]
+ [WebGL test #60: Property either does not exist or is not a function: deleteSync]
expected: FAIL
- [WebGL test #61: Property either does not exist or is not a function: fenceSync]
+ [WebGL test #61: Property either does not exist or is not a function: clientWaitSync]
expected: FAIL
- [WebGL test #62: Property either does not exist or is not a function: isSync]
+ [WebGL test #62: Property either does not exist or is not a function: waitSync]
expected: FAIL
- [WebGL test #63: Property either does not exist or is not a function: deleteSync]
+ [WebGL test #63: Property either does not exist or is not a function: getSyncParameter]
expected: FAIL
- [WebGL test #64: Property either does not exist or is not a function: clientWaitSync]
+ [WebGL test #64: Property either does not exist or is not a function: createTransformFeedback]
expected: FAIL
- [WebGL test #65: Property either does not exist or is not a function: waitSync]
+ [WebGL test #65: Property either does not exist or is not a function: deleteTransformFeedback]
expected: FAIL
- [WebGL test #66: Property either does not exist or is not a function: getSyncParameter]
+ [WebGL test #66: Property either does not exist or is not a function: isTransformFeedback]
expected: FAIL
- [WebGL test #67: Property either does not exist or is not a function: createTransformFeedback]
+ [WebGL test #67: Property either does not exist or is not a function: bindTransformFeedback]
expected: FAIL
- [WebGL test #68: Property either does not exist or is not a function: deleteTransformFeedback]
+ [WebGL test #68: Property either does not exist or is not a function: beginTransformFeedback]
expected: FAIL
- [WebGL test #69: Property either does not exist or is not a function: isTransformFeedback]
+ [WebGL test #69: Property either does not exist or is not a function: endTransformFeedback]
expected: FAIL
- [WebGL test #70: Property either does not exist or is not a function: bindTransformFeedback]
+ [WebGL test #70: Property either does not exist or is not a function: transformFeedbackVaryings]
expected: FAIL
- [WebGL test #71: Property either does not exist or is not a function: beginTransformFeedback]
+ [WebGL test #71: Property either does not exist or is not a function: getTransformFeedbackVarying]
expected: FAIL
- [WebGL test #72: Property either does not exist or is not a function: endTransformFeedback]
+ [WebGL test #72: Property either does not exist or is not a function: pauseTransformFeedback]
expected: FAIL
- [WebGL test #73: Property either does not exist or is not a function: transformFeedbackVaryings]
+ [WebGL test #73: Property either does not exist or is not a function: resumeTransformFeedback]
expected: FAIL
- [WebGL test #74: Property either does not exist or is not a function: getTransformFeedbackVarying]
+ [WebGL test #74: Property either does not exist or is not a function: bindBufferBase]
expected: FAIL
- [WebGL test #75: Property either does not exist or is not a function: pauseTransformFeedback]
+ [WebGL test #75: Property either does not exist or is not a function: bindBufferRange]
expected: FAIL
- [WebGL test #76: Property either does not exist or is not a function: resumeTransformFeedback]
+ [WebGL test #76: Property either does not exist or is not a function: getIndexedParameter]
expected: FAIL
- [WebGL test #77: Property either does not exist or is not a function: bindBufferBase]
+ [WebGL test #77: Property either does not exist or is not a function: getUniformIndices]
expected: FAIL
- [WebGL test #78: Property either does not exist or is not a function: bindBufferRange]
+ [WebGL test #78: Property either does not exist or is not a function: getActiveUniforms]
expected: FAIL
- [WebGL test #79: Property either does not exist or is not a function: getIndexedParameter]
+ [WebGL test #79: Property either does not exist or is not a function: getUniformBlockIndex]
expected: FAIL
- [WebGL test #80: Property either does not exist or is not a function: getUniformIndices]
+ [WebGL test #80: Property either does not exist or is not a function: getActiveUniformBlockParameter]
expected: FAIL
- [WebGL test #81: Property either does not exist or is not a function: getActiveUniforms]
+ [WebGL test #81: Property either does not exist or is not a function: getActiveUniformBlockName]
expected: FAIL
- [WebGL test #82: Property either does not exist or is not a function: getUniformBlockIndex]
+ [WebGL test #82: Property either does not exist or is not a function: uniformBlockBinding]
expected: FAIL
- [WebGL test #83: Property either does not exist or is not a function: getActiveUniformBlockParameter]
+ [WebGL test #83: Property either does not exist or is not a function: createVertexArray]
expected: FAIL
- [WebGL test #84: Property either does not exist or is not a function: getActiveUniformBlockName]
+ [WebGL test #84: Property either does not exist or is not a function: deleteVertexArray]
expected: FAIL
- [WebGL test #85: Property either does not exist or is not a function: uniformBlockBinding]
+ [WebGL test #85: Property either does not exist or is not a function: isVertexArray]
expected: FAIL
- [WebGL test #86: Property either does not exist or is not a function: createVertexArray]
- expected: FAIL
-
- [WebGL test #87: Property either does not exist or is not a function: deleteVertexArray]
- expected: FAIL
-
- [WebGL test #88: Property either does not exist or is not a function: isVertexArray]
- expected: FAIL
-
- [WebGL test #89: Property either does not exist or is not a function: bindVertexArray]
+ [WebGL test #86: 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/rendering/instanced-arrays.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/rendering/instanced-arrays.html.ini
deleted file mode 100644
index 01926549c2e..00000000000
--- a/tests/wpt/mozilla/meta/webgl/conformance-2.0.0/conformance2/rendering/instanced-arrays.html.ini
+++ /dev/null
@@ -1,53 +0,0 @@
-[instanced-arrays.html]
- expected: ERROR
- [WebGL test #2: Default divisor of vertex attribute 0 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #3: Default divisor of vertex attribute 1 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #4: Default divisor of vertex attribute 2 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #5: Default divisor of vertex attribute 3 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #6: Default divisor of vertex attribute 4 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #7: Default divisor of vertex attribute 5 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #8: Default divisor of vertex attribute 6 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #9: Default divisor of vertex attribute 7 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #10: Default divisor of vertex attribute 8 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #11: Default divisor of vertex attribute 9 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #12: Default divisor of vertex attribute 10 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #13: Default divisor of vertex attribute 11 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #14: Default divisor of vertex attribute 12 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #15: Default divisor of vertex attribute 13 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #16: Default divisor of vertex attribute 14 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #17: Default divisor of vertex attribute 15 should be: 0, returned value was: null]
- expected: FAIL
-
- [WebGL test #18: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html
index de45ce308cf..11a83ac00a7 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" content="long">
<title>WebGL Enable Vertex Attrib Zero Test</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html
index 1faa7372227..89f9e1e3c23 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" content="long">
<title>WebGL Rapid Resizing Test</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html
index a02dd2d14c0..47099e57bd7 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>Test that contexts are freed and garbage collected reasonably</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html
index 04b138daf43..703bcfa8dca 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>Test that you can create large numbers of WebGL contexts.</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html
index 3989c7679aa..b52e3a9e9f7 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>Test that context eviction and garbage collection do not interfere with each other</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html
index b435e15e98b..875f4c49597 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html
@@ -84,10 +84,10 @@ Tests.testTexImage2D = function(gl) {
assertGLError(gl, gl.INVALID_VALUE, "negative y", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0,1,-1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
});
- assertGLError(gl, gl.INVALID_ENUM, "bad format", function(){
+ assertGLErrorIn(gl, [gl.INVALID_OPERATION, gl.INVALID_ENUM], "bad format", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.FLOAT,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
});
- assertGLError(gl, gl.INVALID_ENUM, "bad type", function(){
+ assertGLErrorIn(gl, [gl.INVALID_OPERATION, gl.INVALID_ENUM], "bad type", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.TEXTURE_2D, new Uint8Array([0,0,0,0]));
});
assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html
index 99de4e0a792..71c89906388 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html
@@ -28,6 +28,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>WebGL GLSL conformance test: acos_001_to_006.html</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html
index 5af87433aa9..79afd9f4303 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html
@@ -28,6 +28,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>WebGL GLSL conformance test: asin_001_to_006.html</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html
index 5552a4f82e6..539cb332140 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html
@@ -28,6 +28,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" value="content">
<title>WebGL GLSL conformance test: log2_001_to_008.html</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html
index 4d7a5489253..d6904d648f7 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html
@@ -245,11 +245,11 @@ testCases =
[ {target: gl.TEXTURE_2D,
format: 0x1903, // GL_RED
type: gl.UNSIGNED_BYTE,
- expectedError: gl.INVALID_ENUM},
+ expectedError: [gl.INVALID_ENUM, gl.INVALID_OPERATION] },
{target: gl.TEXTURE_2D,
format: gl.RGBA,
type: gl.BYTE,
- expectedError: gl.INVALID_ENUM},
+ expectedError: [gl.INVALID_ENUM, gl.INVALID_OPERATION] },
{target: gl.TEXTURE_2D,
format: gl.RGBA,
type: gl.UNSIGNED_BYTE,
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html
index 176e1ce96a1..73bc6a7dfff 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html
@@ -73,13 +73,11 @@ var targets = [
{ target: gl.TEXTURE_2D,
maxSize: gl.getParameter(gl.MAX_TEXTURE_SIZE),
maxLevel: 1000,
- tex: gl.createTexture(),
targets: [gl.TEXTURE_2D]
},
{ target: gl.TEXTURE_CUBE_MAP,
maxSize: gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),
maxLevel: 5,
- tex: gl.createTexture(),
targets: [
gl.TEXTURE_CUBE_MAP_POSITIVE_X,
gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
@@ -95,13 +93,15 @@ gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
var trg = 0;
var tt = 0;
+var tex = null;
runNextTest();
function runNextTest() {
var t = targets[trg];
if (tt == 0) {
- var tex = t.tex;
+ gl.deleteTexture(tex);
+ tex = gl.createTexture();
gl.bindTexture(t.target, tex);
debug("");
@@ -127,43 +127,60 @@ function runNextTest() {
function testFormatType(t, test) {
debug("");
debug("testing: " + wtu.glEnumToString(gl, test.format) + ", " + wtu.glEnumToString(gl, test.type));
+
for (var j = 0; j < t.targets.length; ++j) {
var target = t.targets[j];
debug("");
debug(wtu.glEnumToString(gl, target));
var numLevels = numLevelsFromSize(t.maxSize);
- var numTestLevels = Math.min(numLevels, t.maxLevel);
// out of bounds tests
+ for (var i = 0; i < numLevels; i++) {
+ // width and height out of bounds
+ var size = t.maxSize >> i;
+ gl.texImage2D(target, i, test.format, size + 1, size + 1, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE: level is " + i + ", size is "
+ + (size + 1) + "x" + (size + 1));
+ }
// level out of bounds
gl.texImage2D(target, numLevels, test.format, 1, 1, 0, test.format, test.type, null);
wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "level out of bounds: should generate INVALID_VALUE: level is: "
+ numLevels + ", size is 1x1.");
- // width and height out of bounds
- gl.texImage2D(target, 0, test.format, t.maxSize + 1, t.maxSize + 1, 0, test.format, test.type, null);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE: level is 0, size is "
- + (t.maxSize + 1) + "x" + (t.maxSize + 1));
- // width and height out of bounds for specified level
- gl.texImage2D(target, (numLevels - 1), test.format, 4, 4, 0, test.format, test.type, null);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds for specified level: should generate INVALID_VALUE: level is "
- + (numLevels - 1) + ", size is 4x4.");
+ // Probe to discover the max non-OOM level.
+ // For instance, on some drivers (at least Intel+Mesa) we can create
+ // a maxLevel L8 texture, but only a maxLevel-1 RGB8 texture.
+ var maxLevelsForFormat = numLevels;
+ while (true) {
+ gl.texImage2D(target, maxLevelsForFormat-1, test.format, 1, 1, 0, test.format, test.type, null);
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("Probe failed for level=" + (maxLevelsForFormat-1) + ", reducing...");
+ maxLevelsForFormat -= 1;
+ if (!maxLevelsForFormat) {
+ testFailed("Failed to allocate any levels for format " + test.format);
+ return;
+ }
+ continue;
+ }
+ if (err) {
+ testFailed("Should not hit non-OOM errors during max level probing.");
+ return;
+ }
+ break;
+ }
+ var numTestLevels = Math.min(maxLevelsForFormat, t.maxLevel);
for (var l = 0; l < numTestLevels; ++l) {
// Do bottom levels first;
var size = 1 << l;
- var level = numLevels - l - 1;
+ var level = maxLevelsForFormat - l - 1;
var otherDimension = t.target == gl.TEXTURE_2D ? 1 : size;
- var badSize = size * 2;
- var badOtherDimension = t.target == gl.TEXTURE_2D ? 1 : badSize;
- var pixels = new test.dataType(badSize * badOtherDimension * test.size);
- gl.texImage2D(target, level, test.format, size, otherDimension, 0, test.format, test.type, pixels);
+ gl.texImage2D(target, level, test.format, size, otherDimension, 0, test.format, test.type, null);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + size + "x" + otherDimension);
- gl.texImage2D(target, level, test.format, otherDimension, size, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + otherDimension + "x" + size);
- gl.texImage2D(target, level, test.format, badSize, badOtherDimension, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badSize + "x" + badOtherDimension);
- gl.texImage2D(target, level, test.format, badOtherDimension, badSize, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badOtherDimension + "x" + badSize);
+ if (otherDimension != size) {
+ gl.texImage2D(target, level, test.format, otherDimension, size, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + otherDimension + "x" + size);
+ }
}
}
}
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html
index 2758b320ff1..4d85c3a53ac 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html
@@ -29,6 +29,7 @@
<html>
<head>
<meta charset="utf-8">
+<meta name="timeout" content="long">
<title>WebGL out of bounds uniform array access.</title>
<link rel="stylesheet" href="../../resources/js-test-style.css"/>
<script src=/resources/testharness.js></script>
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/js-test-pre.js b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/js-test-pre.js
index c4bb6531acd..3c5f2c6e908 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/js-test-pre.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/js-test-pre.js
@@ -49,11 +49,6 @@
window.console.log = function() { };
window.console.error = function() { };
window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
-
- // RAF doesn't work in LayoutTests. Disable it so the tests will
- // use setTimeout instead.
- window.requestAnimationFrame = undefined;
- window.webkitRequestAnimationFrame = undefined;
}
/* -- end platform specific code --*/
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js
index 1bf7283aa93..a55f6837b71 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js
@@ -616,7 +616,7 @@ TestHarness.prototype.reportResults = function(url, success, msg, skipped) {
url = FilterURL(url);
var test = this.getTest(url);
this.clearTimeout(test);
- log(success ? "PASS" : "FAIL", msg);
+ log((success ? "PASS" : "FAIL") + ": " + msg);
this.reportFunc(TestHarness.reportType.TEST_RESULT, url, msg, success, skipped);
// For each result we get, reset the timeout
this.setTimeout(test);
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html
index a050d87dd1a..188b2616baf 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/more/functions/texSubImage2DBadArgs.html
@@ -90,10 +90,10 @@ Tests.testTexImage2D = function(gl) {
assertGLError(gl, gl.INVALID_VALUE, "negative y", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0,1,-1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
});
- assertGLError(gl, gl.INVALID_ENUM, "bad format", function(){
+ assertGLErrorIn(gl, [gl.INVALID_OPERATION, gl.INVALID_ENUM], "bad format", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.FLOAT,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
});
- assertGLError(gl, gl.INVALID_ENUM, "bad type", function(){
+ assertGLErrorIn(gl, [gl.INVALID_OPERATION, gl.INVALID_ENUM], "bad type", function(){
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.TEXTURE_2D, new Uint8Array([0,0,0,0]));
});
assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html
index ec527b6068d..6576773e58a 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance/textures/misc/texture-size-limit.html
@@ -73,13 +73,11 @@ var targets = [
{ target: gl.TEXTURE_2D,
maxSize: gl.getParameter(gl.MAX_TEXTURE_SIZE),
maxLevel: 1000,
- tex: gl.createTexture(),
targets: [gl.TEXTURE_2D]
},
{ target: gl.TEXTURE_CUBE_MAP,
maxSize: gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),
maxLevel: 5,
- tex: gl.createTexture(),
targets: [
gl.TEXTURE_CUBE_MAP_POSITIVE_X,
gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
@@ -95,13 +93,15 @@ gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
var trg = 0;
var tt = 0;
+var tex = null;
runNextTest();
function runNextTest() {
var t = targets[trg];
if (tt == 0) {
- var tex = t.tex;
+ gl.deleteTexture(tex);
+ tex = gl.createTexture();
gl.bindTexture(t.target, tex);
debug("");
@@ -127,43 +127,60 @@ function runNextTest() {
function testFormatType(t, test) {
debug("");
debug("testing: " + wtu.glEnumToString(gl, test.format) + ", " + wtu.glEnumToString(gl, test.type));
+
for (var j = 0; j < t.targets.length; ++j) {
var target = t.targets[j];
debug("");
debug(wtu.glEnumToString(gl, target));
var numLevels = numLevelsFromSize(t.maxSize);
- var numTestLevels = Math.min(numLevels, t.maxLevel);
// out of bounds tests
+ for (var i = 0; i < numLevels; i++) {
+ // width and height out of bounds
+ var size = t.maxSize >> i;
+ gl.texImage2D(target, i, test.format, size + 1, size + 1, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE: level is " + i + ", size is "
+ + (size + 1) + "x" + (size + 1));
+ }
// level out of bounds
gl.texImage2D(target, numLevels, test.format, 1, 1, 0, test.format, test.type, null);
wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "level out of bounds: should generate INVALID_VALUE: level is: "
+ numLevels + ", size is 1x1.");
- // width and height out of bounds
- gl.texImage2D(target, 0, test.format, t.maxSize + 1, t.maxSize + 1, 0, test.format, test.type, null);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE: level is 0, size is "
- + (t.maxSize + 1) + "x" + (t.maxSize + 1));
- // width and height out of bounds for specified level
- gl.texImage2D(target, (numLevels - 1), test.format, 4, 4, 0, test.format, test.type, null);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds for specified level: should generate INVALID_VALUE: level is "
- + (numLevels - 1) + ", size is 4x4.");
+ // Probe to discover the max non-OOM level.
+ // For instance, on some drivers (at least Intel+Mesa) we can create
+ // a maxLevel L8 texture, but only a maxLevel-1 RGB8 texture.
+ var maxLevelsForFormat = numLevels;
+ while (true) {
+ gl.texImage2D(target, maxLevelsForFormat-1, test.format, 1, 1, 0, test.format, test.type, null);
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("Probe failed for level=" + (maxLevelsForFormat-1) + ", reducing...");
+ maxLevelsForFormat -= 1;
+ if (!maxLevelsForFormat) {
+ testFailed("Failed to allocate any levels for format " + test.format);
+ return;
+ }
+ continue;
+ }
+ if (err) {
+ testFailed("Should not hit non-OOM errors during max level probing.");
+ return;
+ }
+ break;
+ }
+ var numTestLevels = Math.min(maxLevelsForFormat, t.maxLevel);
for (var l = 0; l < numTestLevels; ++l) {
// Do bottom levels first;
var size = 1 << l;
- var level = numLevels - l - 1;
+ var level = maxLevelsForFormat - l - 1;
var otherDimension = t.target == gl.TEXTURE_2D ? 1 : size;
- var badSize = size * 2;
- var badOtherDimension = t.target == gl.TEXTURE_2D ? 1 : badSize;
- var pixels = new test.dataType(badSize * badOtherDimension * test.size);
- gl.texImage2D(target, level, test.format, size, otherDimension, 0, test.format, test.type, pixels);
+ gl.texImage2D(target, level, test.format, size, otherDimension, 0, test.format, test.type, null);
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + size + "x" + otherDimension);
- gl.texImage2D(target, level, test.format, otherDimension, size, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + otherDimension + "x" + size);
- gl.texImage2D(target, level, test.format, badSize, badOtherDimension, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badSize + "x" + badOtherDimension);
- gl.texImage2D(target, level, test.format, badOtherDimension, badSize, 0, test.format, test.type, pixels);
- wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badOtherDimension + "x" + badSize);
+ if (otherDimension != size) {
+ gl.texImage2D(target, level, test.format, otherDimension, size, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + otherDimension + "x" + size);
+ }
}
}
}
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html
index ef29a11cae4..7c19dccf3dd 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/buffers/buffer-type-restrictions.html
@@ -90,16 +90,6 @@ var testBindingFn = function(firstBindFn, secondBindFn, firstTarget, secondTarge
wtu.glErrorShouldBe(gl, gl.NO_ERROR, messagePrefix + "WORK");
else
wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, messagePrefix + "FAIL");
-
- if ((firstTarget == gl.TRANSFORM_FEEDBACK_BUFFER && secondTarget != gl.TRANSFORM_FEEDBACK_BUFFER) ||
- (firstTarget != gl.TRANSFORM_FEEDBACK_BUFFER && secondTarget == gl.TRANSFORM_FEEDBACK_BUFFER)) {
- bind(firstBindFn, firstTarget, buffer);
- bind(secondBindFn, secondTarget, buffer);
-
- var message = "Binding buffer first with " + firstBindFn + " to gl." + firstTargetStr
- + " and simultaneously binding buffer with " + secondBindFn + " to gl." + secondTargetStr + " should FAIL";
- wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, message);
- }
}
var testBinding = function(firstTarget, secondTarget) {
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html
index 4dfee411d15..b8460e6512e 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/conformance2/textures/misc/copy-texture-image-luma-format.html
@@ -123,7 +123,7 @@ function copytexsubimage3D_luma_format() {
gl.copyTexSubImage3D(gl.TEXTURE_3D, 0, 0, 0, layer, 0, 0,width, height);
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
- var program = wtu.setupProgram(gl, ["vshader", "fshader_luminance_alpha"]);
+ var program = wtu.setupProgram(gl, ["vshader", "fshader_luminance_alpha"], ["a_position", "a_coord"]);
wtu.setupUnitQuad(gl, 0, 1);
wtu.drawUnitQuad(gl);
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/js-test-pre.js b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/js-test-pre.js
index 7ca8559d9bc..6b054242d99 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/js-test-pre.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/js-test-pre.js
@@ -49,11 +49,6 @@
window.console.log = function() { };
window.console.error = function() { };
window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
-
- // RAF doesn't work in LayoutTests. Disable it so the tests will
- // use setTimeout instead.
- window.requestAnimationFrame = undefined;
- window.webkitRequestAnimationFrame = undefined;
}
/* -- end platform specific code --*/
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js
index 906e337b206..b2bbb850fbc 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-2d-with-image-bitmap-from-blob.js
@@ -51,14 +51,14 @@ function generateTest(internalFormat, pixelFormat, pixelType, prologue, resource
var xhr = new XMLHttpRequest();
xhr.open("GET", resourcePath + "red-green-semi-transparent.png");
xhr.responseType = 'blob';
- xhr.send();
xhr.onload = function() {
var blob = xhr.response;
runImageBitmapTest(blob, 0.5, internalFormat, pixelFormat, pixelType, gl, tiu, wtu, false)
.then(() => {
finishTest();
});
- }
+ };
+ xhr.send();
}
return init;
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js
index 823f9e394f2..ac06127d852 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-image-and-sub-image-3d-with-image-bitmap-from-blob.js
@@ -51,14 +51,14 @@ function generateTest(internalFormat, pixelFormat, pixelType, prologue, resource
var xhr = new XMLHttpRequest();
xhr.open("GET", resourcePath + "red-green-semi-transparent.png");
xhr.responseType = 'blob';
- xhr.send();
xhr.onload = function() {
var blob = xhr.response;
runImageBitmapTest(blob, 0.5, internalFormat, pixelFormat, pixelType, gl, tiu, wtu, true)
.then(() => {
finishTest();
});
- }
+ };
+ xhr.send();
}
return init;
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-input-validation.js b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-input-validation.js
index 154dfbddf97..77237fae374 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-input-validation.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/tests/tex-input-validation.js
@@ -358,11 +358,11 @@ if (contextVersion < 2) {
{ target: gl.TEXTURE_2D,
format: 0x1903, // GL_RED
type: gl.UNSIGNED_BYTE,
- expectedError: gl.INVALID_ENUM },
+ expectedError: [gl.INVALID_ENUM, gl.INVALID_OPERATION] },
{ target: gl.TEXTURE_2D,
format: gl.RGBA,
type: gl.BYTE,
- expectedError: gl.INVALID_ENUM }
+ expectedError: [gl.INVALID_ENUM, gl.INVALID_OPERATION] }
]);
} else {
testCases = testCases.concat([
diff --git a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/webgl-test-harness.js b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/webgl-test-harness.js
index 0287bf6ecb7..4fb179f2b21 100644
--- a/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/webgl-test-harness.js
+++ b/tests/wpt/mozilla/tests/webgl/conformance-2.0.0/js/webgl-test-harness.js
@@ -613,7 +613,7 @@ TestHarness.prototype.reportResults = function(url, success, msg, skipped) {
url = FilterURL(url);
var test = this.getTest(url);
this.clearTimeout(test);
- log(success ? "PASS" : "FAIL", msg);
+ log((success ? "PASS" : "FAIL") + ": " + msg);
this.reportFunc(TestHarness.reportType.TEST_RESULT, url, msg, success, skipped);
// For each result we get, reset the timeout
this.setTimeout(test);
diff --git a/tests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py b/tests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py
index fdedb71989d..14cafcf4f27 100755
--- a/tests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py
+++ b/tests/wpt/mozilla/tests/webgl/tools/import-conformance-tests.py
@@ -12,7 +12,8 @@ KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git"
# Patches for conformance tests 1.0.x
PATCHES_1X = [
("js-test-pre.patch", "resources/js-test-pre.js"),
- ("unit.patch", "conformance/more/unit.js")
+ ("unit.patch", "conformance/more/unit.js"),
+ ("timeout.patch", None)
]
# Patches for conformance tests 2.0.x
PATCHES_2X = [
@@ -134,7 +135,10 @@ def update_conformance(version, destination, existing_repo, patches_dir):
for patch, file_name in patches:
try:
patch = os.path.join(patches_dir, patch)
- subprocess.check_call(["patch", "-d", destination, file_name, patch])
+ if file_name is None:
+ subprocess.check_call(["patch", "-d", destination, "-p", "1"], stdin=open(patch))
+ else:
+ subprocess.check_call(["patch", "-x", "3", "-d", destination, file_name, patch])
except subprocess.CalledProcessError:
print("Automatic patch failed for {}".format(file_name))
print("Please review the WPT integration and update {} accordingly".format(os.path.basename(patch)))
diff --git a/tests/wpt/mozilla/tests/webgl/tools/timeout.patch b/tests/wpt/mozilla/tests/webgl/tools/timeout.patch
new file mode 100644
index 00000000000..da53aa632f7
--- /dev/null
+++ b/tests/wpt/mozilla/tests/webgl/tools/timeout.patch
@@ -0,0 +1,108 @@
+diff --git i/conformance/attribs/gl-vertex-attrib-zero-issues.html w/conformance/attribs/gl-vertex-attrib-zero-issues.html
+index de45ce308c..11a83ac00a 100644
+--- i/conformance/attribs/gl-vertex-attrib-zero-issues.html
++++ w/conformance/attribs/gl-vertex-attrib-zero-issues.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" content="long">
+ <title>WebGL Enable Vertex Attrib Zero Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+diff --git i/conformance/canvas/rapid-resizing.html w/conformance/canvas/rapid-resizing.html
+index 1faa737222..89f9e1e3c2 100644
+--- i/conformance/canvas/rapid-resizing.html
++++ w/conformance/canvas/rapid-resizing.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" content="long">
+ <title>WebGL Rapid Resizing Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+diff --git i/conformance/context/context-creation-and-destruction.html w/conformance/context/context-creation-and-destruction.html
+index a02dd2d14c..47099e57bd 100644
+--- i/conformance/context/context-creation-and-destruction.html
++++ w/conformance/context/context-creation-and-destruction.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>Test that contexts are freed and garbage collected reasonably</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+diff --git i/conformance/context/context-creation.html w/conformance/context/context-creation.html
+index 04b138daf4..703bcfa8dc 100644
+--- i/conformance/context/context-creation.html
++++ w/conformance/context/context-creation.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>Test that you can create large numbers of WebGL contexts.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+diff --git i/conformance/context/context-eviction-with-garbage-collection.html w/conformance/context/context-eviction-with-garbage-collection.html
+index 3989c7679a..b52e3a9e9f 100644
+--- i/conformance/context/context-eviction-with-garbage-collection.html
++++ w/conformance/context/context-eviction-with-garbage-collection.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>Test that context eviction and garbage collection do not interfere with each other</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+diff --git i/conformance/ogles/GL/acos/acos_001_to_006.html w/conformance/ogles/GL/acos/acos_001_to_006.html
+index 99de4e0a79..71c8990638 100644
+--- i/conformance/ogles/GL/acos/acos_001_to_006.html
++++ w/conformance/ogles/GL/acos/acos_001_to_006.html
+@@ -28,6 +28,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>WebGL GLSL conformance test: acos_001_to_006.html</title>
+ <link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+ <link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+diff --git i/conformance/ogles/GL/asin/asin_001_to_006.html w/conformance/ogles/GL/asin/asin_001_to_006.html
+index 5af87433aa..79afd9f430 100644
+--- i/conformance/ogles/GL/asin/asin_001_to_006.html
++++ w/conformance/ogles/GL/asin/asin_001_to_006.html
+@@ -28,6 +28,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>WebGL GLSL conformance test: asin_001_to_006.html</title>
+ <link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+ <link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+diff --git i/conformance/ogles/GL/log2/log2_001_to_008.html w/conformance/ogles/GL/log2/log2_001_to_008.html
+index 5552a4f82e..539cb33214 100644
+--- i/conformance/ogles/GL/log2/log2_001_to_008.html
++++ w/conformance/ogles/GL/log2/log2_001_to_008.html
+@@ -28,6 +28,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" value="content">
+ <title>WebGL GLSL conformance test: log2_001_to_008.html</title>
+ <link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+ <link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+diff --git i/conformance/uniforms/out-of-bounds-uniform-array-access.html w/conformance/uniforms/out-of-bounds-uniform-array-access.html
+index 2758b320ff..4d85c3a53a 100644
+--- i/conformance/uniforms/out-of-bounds-uniform-array-access.html
++++ w/conformance/uniforms/out-of-bounds-uniform-array-access.html
+@@ -29,6 +29,7 @@
+ <html>
+ <head>
+ <meta charset="utf-8">
++<meta name="timeout" content="long">
+ <title>WebGL out of bounds uniform array access.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>